Java Code Examples for org.eclipse.emf.ecore.EClass#isAbstract()
The following examples show how to use
org.eclipse.emf.ecore.EClass#isAbstract() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ComponentModelWizard.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames () { if ( initialObjectNames == null ) { initialObjectNames = new ArrayList<String> (); for ( EClassifier eClassifier : componentPackage.getEClassifiers () ) { if ( eClassifier instanceof EClass ) { EClass eClass = (EClass)eClassifier; if ( !eClass.isAbstract () ) { initialObjectNames.add ( eClass.getName () ); } } } Collections.sort ( initialObjectNames, CommonPlugin.INSTANCE.getComparator () ); } return initialObjectNames; }
Example 2
Source File: EipModelWizard.java From eip-designer with Apache License 2.0 | 6 votes |
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames() { if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); for (EClassifier eClassifier : eipPackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; if (!eClass.isAbstract()) { initialObjectNames.add(eClass.getName()); } } } Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); } return initialObjectNames; }
Example 3
Source File: CoreModelWizard.java From ifml-editor with MIT License | 6 votes |
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ protected Collection<String> getInitialObjectNames() { if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); for (EClassifier eClassifier : corePackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass) eClassifier; if (!eClass.isAbstract()) { initialObjectNames.add(eClass.getName()); } } } Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); } return initialObjectNames; }
Example 4
Source File: BeansModelWizard.java From hybris-commerce-eclipse-plugin with Apache License 2.0 | 6 votes |
/** * Returns the names of the features representing global elements. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames() { if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); for (EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements(ExtendedMetaData.INSTANCE.getDocumentRoot(beansPackage))) { if (eStructuralFeature.isChangeable()) { EClassifier eClassifier = eStructuralFeature.getEType(); if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; if (!eClass.isAbstract()) { initialObjectNames.add(eStructuralFeature.getName()); } } } } Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); } return initialObjectNames; }
Example 5
Source File: GenconfModelWizard.java From M2Doc with Eclipse Public License 1.0 | 6 votes |
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ protected Collection<String> getInitialObjectNames() { if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); for (EClassifier eClassifier : genconfPackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass) eClassifier; if (!eClass.isAbstract()) { initialObjectNames.add(eClass.getName()); } } } Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); } return initialObjectNames; }
Example 6
Source File: ConfigurationModelWizard.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns the names of the features representing global elements. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames () { if ( initialObjectNames == null ) { initialObjectNames = new ArrayList<String> (); for ( EStructuralFeature eStructuralFeature : ExtendedMetaData.INSTANCE.getAllElements ( ExtendedMetaData.INSTANCE.getDocumentRoot ( configurationPackage ) ) ) { if ( eStructuralFeature.isChangeable () ) { EClassifier eClassifier = eStructuralFeature.getEType (); if ( eClassifier instanceof EClass ) { EClass eClass = (EClass)eClassifier; if ( !eClass.isAbstract () ) { initialObjectNames.add ( eStructuralFeature.getName () ); } } } } Collections.sort ( initialObjectNames, CommonPlugin.INSTANCE.getComparator () ); } return initialObjectNames; }
Example 7
Source File: ItemModelWizard.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames () { if ( initialObjectNames == null ) { initialObjectNames = new ArrayList<String> (); for ( EClassifier eClassifier : itemPackage.getEClassifiers () ) { if ( eClassifier instanceof EClass ) { EClass eClass = (EClass)eClassifier; if ( !eClass.isAbstract () ) { initialObjectNames.add ( eClass.getName () ); } } } Collections.sort ( initialObjectNames, CommonPlugin.INSTANCE.getComparator () ); } return initialObjectNames; }
Example 8
Source File: ExtensionsModelWizard.java From ifml-editor with MIT License | 6 votes |
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames() { if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); for (EClassifier eClassifier : extensionsPackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; if (!eClass.isAbstract()) { initialObjectNames.add(eClass.getName()); } } } Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); } return initialObjectNames; }
Example 9
Source File: SecurityModelWizard.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames () { if ( initialObjectNames == null ) { initialObjectNames = new ArrayList<String> (); for ( EClassifier eClassifier : securityPackage.getEClassifiers () ) { if ( eClassifier instanceof EClass ) { EClass eClass = (EClass)eClassifier; if ( !eClass.isAbstract () ) { initialObjectNames.add ( eClass.getName () ); } } } Collections.sort ( initialObjectNames, CommonPlugin.INSTANCE.getComparator () ); } return initialObjectNames; }
Example 10
Source File: InfrastructureModelWizard.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames () { if ( initialObjectNames == null ) { initialObjectNames = new ArrayList<String> (); for ( EClassifier eClassifier : infrastructurePackage.getEClassifiers () ) { if ( eClassifier instanceof EClass ) { EClass eClass = (EClass)eClassifier; if ( !eClass.isAbstract () ) { initialObjectNames.add ( eClass.getName () ); } } } Collections.sort ( initialObjectNames, CommonPlugin.INSTANCE.getComparator () ); } return initialObjectNames; }
Example 11
Source File: WorldModelWizard.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ protected Collection<String> getInitialObjectNames () { if ( this.initialObjectNames == null ) { this.initialObjectNames = new ArrayList<String> (); for ( EClassifier eClassifier : this.worldPackage.getEClassifiers () ) { if ( eClassifier instanceof EClass ) { EClass eClass = (EClass)eClassifier; if ( !eClass.isAbstract () ) { this.initialObjectNames.add ( eClass.getName () ); } } } Collections.sort ( this.initialObjectNames, CommonPlugin.INSTANCE.getComparator () ); } return this.initialObjectNames; }
Example 12
Source File: ProfileModelWizard.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames () { if ( initialObjectNames == null ) { initialObjectNames = new ArrayList<String> (); for ( EClassifier eClassifier : profilePackage.getEClassifiers () ) { if ( eClassifier instanceof EClass ) { EClass eClass = (EClass)eClassifier; if ( !eClass.isAbstract () ) { initialObjectNames.add ( eClass.getName () ); } } } Collections.sort ( initialObjectNames, CommonPlugin.INSTANCE.getComparator () ); } return initialObjectNames; }
Example 13
Source File: SetupModelWizard.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames () { if ( initialObjectNames == null ) { initialObjectNames = new ArrayList<String> (); for ( EClassifier eClassifier : setupPackage.getEClassifiers () ) { if ( eClassifier instanceof EClass ) { EClass eClass = (EClass)eClassifier; if ( !eClass.isAbstract () ) { initialObjectNames.add ( eClass.getName () ); } } } Collections.sort ( initialObjectNames, CommonPlugin.INSTANCE.getComparator () ); } return initialObjectNames; }
Example 14
Source File: DeploymentModelWizard.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames () { if ( initialObjectNames == null ) { initialObjectNames = new ArrayList<String> (); for ( EClassifier eClassifier : deploymentPackage.getEClassifiers () ) { if ( eClassifier instanceof EClass ) { EClass eClass = (EClass)eClassifier; if ( !eClass.isAbstract () ) { initialObjectNames.add ( eClass.getName () ); } } } Collections.sort ( initialObjectNames, CommonPlugin.INSTANCE.getComparator () ); } return initialObjectNames; }
Example 15
Source File: DetailViewModelWizard.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames () { if ( initialObjectNames == null ) { initialObjectNames = new ArrayList<String> (); for ( EClassifier eClassifier : detailViewPackage.getEClassifiers () ) { if ( eClassifier instanceof EClass ) { EClass eClass = (EClass)eClassifier; if ( !eClass.isAbstract () ) { initialObjectNames.add ( eClass.getName () ); } } } Collections.sort ( initialObjectNames, CommonPlugin.INSTANCE.getComparator () ); } return initialObjectNames; }
Example 16
Source File: ProtocolModelWizard.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames () { if ( initialObjectNames == null ) { initialObjectNames = new ArrayList<String> (); for ( EClassifier eClassifier : protocolPackage.getEClassifiers () ) { if ( eClassifier instanceof EClass ) { EClass eClass = (EClass)eClassifier; if ( !eClass.isAbstract () ) { initialObjectNames.add ( eClass.getName () ); } } } Collections.sort ( initialObjectNames, CommonPlugin.INSTANCE.getComparator () ); } return initialObjectNames; }
Example 17
Source File: ExtendedMetaModel.java From BIMserver with GNU Affero General Public License v3.0 | 5 votes |
public EClass getRandomInstantiableSubClassOrSelf(EClass eType) { List<EClass> list = inheritedSubClasses.get(eType); EClass result = null; if (random.nextInt(list.size() + 1) == 0) { result = eType; } else { result = list.get(random.nextInt(list.size())); } if (result.isAbstract() || result.isInterface()) { return getRandomInstantiableSubClassOrSelf(eType); } else { return result; } }
Example 18
Source File: DefaultEcoreElementFactory.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
@Override public EObject create(EClassifier classifier) { if (classifier == null) throw new NullPointerException("Classifier may not be null."); if (!(classifier instanceof EClass)) throw new IllegalArgumentException("Cannot create instance of datatype '" + classifier.getName() + "'"); EClass clazz = (EClass) classifier; if (clazz.isAbstract() || clazz.isInterface()) throw new IllegalArgumentException("Cannot create instance of abstract class '" + clazz.getName() + "'"); if (classifier.eIsProxy()) throw new IllegalStateException("Unresolved proxy "+((InternalEObject)classifier).eProxyURI()+". Make sure the EPackage has been registered."); return clazz.getEPackage().getEFactoryInstance().create(clazz); }
Example 19
Source File: LazyLinker.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
protected EClass findInstantiableCompatible(EClass eType) { if (eType.isAbstract() || eType.isInterface()) { // check local Package EClass eClass = findSubTypeInEPackage(eType.getEPackage(), eType); if (eClass != null) return eClass; return globalFindInstantiableCompatible(eType); } return eType; }
Example 20
Source File: N4JSLinker.java From n4js with Eclipse Public License 1.0 | 4 votes |
private boolean isInstantiatableSubType(EClass c, EClass superType) { return !c.isAbstract() && !c.isInterface() && EcoreUtil2.isAssignableFrom(superType, c); }