/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static ColorFactory init() { try { ColorFactory theColorFactory = (ColorFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.omg.org/spec/BPMN/non-normative/color"); if (theColorFactory != null) { return theColorFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new ColorFactoryImpl(); }
@Override protected boolean readElement(IConfigurationElement element) if (element.getName().equals("registry")) String implementationClass = element.getAttribute("class"); if (implementationClass == null) INSTANCE.log("Both '" + previous.getContributor().getName() + "' and '" + element.getContributor().getName() + "' register a package registry implementation"); INSTANCE.log(exception);
final ParseException ex(String key, int loc) { return new ParseException(EcorePlugin.INSTANCE.getString(key), loc); }
/** * Computes a map so that plugins in the workspace will override those in the target platform or the environment * and so that plugins with Ecore and GenModels in the target platform or the environment will look like projects in the workspace. * It's implemented like this: *<pre> * return computePlatformURIMap(false); *</pre> * @deprecated since 2.9; * use {@link #computePlatformURIMap(boolean) computePlatformURIMap(true)} * to get the mappings for the target platform, * or use {@link #computePlatformURIMap(boolean) computePlatformURIMap(false)} to get the legacy behavior, i.e., the mappings for the installed environment. * It's generally expected that all clients, will migrate to use the target platform. * @return computes a map so that plugins in the workspace will override those in the environment * and so that plugins with Ecore and GenModels will look like projects in the workspace. * @see org.eclipse.emf.ecore.resource.URIConverter#getURIMap() * @see #computePlatformPluginToPlatformResourceMap() * @see #computePlatformResourceToPlatformPluginMap(Collection) */ @Deprecated public static Map<URI, URI> computePlatformURIMap() { return computePlatformURIMap(false); }
@Override protected boolean readElement(IConfigurationElement element) if (element.getName().equals("registry")) String implementationClass = element.getAttribute("class"); if (implementationClass == null) INSTANCE.log("Both '" + previous.getContributor().getName() + "' and '" + element.getContributor().getName() + "' register a package registry implementation"); INSTANCE.log(exception);
final ParseException ex(String key, int loc) { return new ParseException(EcorePlugin.INSTANCE.getString(key), loc); }
/** * Computes a map so that plugins in the workspace will override those in the target platform or the environment * and so that plugins with Ecore and GenModels in the target platform or the environment will look like projects in the workspace. * It's implemented like this: *<pre> * return computePlatformURIMap(false); *</pre> * @deprecated since 2.9; * use {@link #computePlatformURIMap(boolean) computePlatformURIMap(true)} * to get the mappings for the target platform, * or use {@link #computePlatformURIMap(boolean) computePlatformURIMap(false)} to get the legacy behavior, i.e., the mappings for the installed environment. * It's generally expected that all clients, will migrate to use the target platform. * @return computes a map so that plugins in the workspace will override those in the environment * and so that plugins with Ecore and GenModels will look like projects in the workspace. * @see org.eclipse.emf.ecore.resource.URIConverter#getURIMap() * @see #computePlatformPluginToPlatformResourceMap() * @see #computePlatformResourceToPlatformPluginMap(Collection) */ @Deprecated public static Map<URI, URI> computePlatformURIMap() { return computePlatformURIMap(false); }
@Override protected boolean readElement(IConfigurationElement element, boolean add) if (element.getName().equals(TAG_RESOURCE)) String packageURI = element.getAttribute(ATT_URI); if (packageURI == null) else if (element.getAttribute(ATT_LOCATION) == null) Object previous = EPackage.Registry.INSTANCE.put(packageURI, new EPackageDescriptor.Dynamic(element, ATT_LOCATION)); if (previous instanceof PluginClassDescriptor) EcorePlugin.INSTANCE.log ("Both '" + descriptor.element.getContributor().getName() + "' and '" + element.getContributor().getName() + "' register a package for '" + packageURI + "'"); EPackage.Registry.INSTANCE.remove(packageURI); return true;
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static DroolsFactory init() { try { DroolsFactory theDroolsFactory = (DroolsFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.jboss.org/drools"); if (theDroolsFactory != null) { return theDroolsFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new DroolsFactoryImpl(); }
/** * @since 2.4 */ public BasicDiagnostic createDefaultDiagnostic(EObject eObject) { return new BasicDiagnostic (EObjectValidator.DIAGNOSTIC_SOURCE, 0, EcorePlugin.INSTANCE.getString("_UI_DiagnosticRoot_diagnostic", new Object[] { getObjectLabel(eObject) }), new Object [] { eObject }); }
public static ResourceSet createResourceSet() { ResourceSet result = new ResourceSetImpl(); result.getURIConverter().getURIMap().putAll(EcorePlugin.computePlatformURIMap(true)); return result; }
@Override protected boolean readElement(IConfigurationElement element, boolean add) if (element.getName().equals(TAG_PARSER)) String contentTypeIdentifier = element.getAttribute(ATT_CONTENT_TYPE_IDENTIFIER); if (contentTypeIdentifier == null) else if (element.getAttribute(ATT_CLASS) == null) EcorePlugin.INSTANCE.log ("Both '" + descriptor.element.getContributor().getName() + "' and '" + element.getContributor().getName() + "' register a content parser for '" + contentTypeIdentifier + "'");
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static BpsimFactory init() { try { BpsimFactory theBpsimFactory = (BpsimFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.bpsim.org/schemas/1.0"); if (theBpsimFactory != null) { return theBpsimFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new BpsimFactoryImpl(); }
/** * @since 2.4 */ public BasicDiagnostic createDefaultDiagnostic(EDataType eDataType, Object value) { return new BasicDiagnostic (EObjectValidator.DIAGNOSTIC_SOURCE, 0, EcorePlugin.INSTANCE.getString("_UI_DiagnosticRoot_diagnostic", new Object [] { getValueLabel(eDataType, value) }), new Object [] { value, eDataType }); }
@Before public void setUp() throws Exception { resourceSet = new XtextResourceSet(); resourceSet.getURIConverter().getURIMap().putAll(EcorePlugin.computePlatformURIMap(false)); resourceSet.getLoadOptions().put(XMLResource.OPTION_URI_HANDLER, this); }
@Override protected boolean readElement(IConfigurationElement element, boolean add) if (element.getName().equals(TAG_PARSER)) String protocolName = element.getAttribute(ATT_PROTOCOLNAME); if (protocolName == null) else if (element.getAttribute(ATT_CLASS) == null) EcorePlugin.INSTANCE.log ("Both '" + descriptor.element.getContributor().getName() + "' and '" + element.getContributor().getName() + "' register a protocol parser for '" + protocolName + "'");
/** * Creates the default factory implementation. * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public static Wfs20Factory init() { try { Wfs20Factory theWfs20Factory = (Wfs20Factory)EPackage.Registry.INSTANCE.getEFactory(Wfs20Package.eNS_URI); if (theWfs20Factory != null) { return theWfs20Factory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new Wfs20FactoryImpl(); }
/** * @since 2.4 */ public BasicDiagnostic createDefaultDiagnostic(EDataType eDataType, Object value) { return new BasicDiagnostic (EObjectValidator.DIAGNOSTIC_SOURCE, 0, EcorePlugin.INSTANCE.getString("_UI_DiagnosticRoot_diagnostic", new Object [] { getValueLabel(eDataType, value) }), new Object [] { value, eDataType }); }
@Override protected boolean readElement(IConfigurationElement element, boolean add) if (element.getName().equals(TAG_PARSER)) String contentTypeIdentifier = element.getAttribute(ATT_CONTENT_TYPE_IDENTIFIER); if (contentTypeIdentifier == null) else if (element.getAttribute(ATT_CLASS) == null) EcorePlugin.INSTANCE.log ("Both '" + descriptor.element.getContributor().getName() + "' and '" + element.getContributor().getName() + "' register a content parser for '" + contentTypeIdentifier + "'");
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static StoreFactory init() { try { StoreFactory theStoreFactory = (StoreFactory) EPackage.Registry.INSTANCE.getEFactory(StorePackage.eNS_URI); if (theStoreFactory != null) { return theStoreFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new StoreFactoryImpl(); }