/** * Gets the possible types for the parameter * * @return the possible types */ private Set<Object> getPossibleTypes() { Collection<EObject> types = ModelSetQuery.getObjectsOfType( parameterOwner, UMLPackage.eINSTANCE.getTypedElement_Type().getEType()); Set<Object> result = new HashSet<Object>(); result.add(""); result.addAll(types); return result; }
/** * Queries the {@link ModelSetQuery} for all elements of given type and adds them to the choices */ public void addElementsOfType(EClassifier ofType) { myElementsOfType.addAll(ModelSetQuery.getObjectsOfType(mySourceObject, ofType)); }