/** * @since 2.1 */ protected boolean canBeReferencedLocally(EObject object) { boolean result = qualifiedNameProvider.getFullyQualifiedName(object) != null; return result; }
/** * * @param collection * @param guiElementId * @return */ public static boolean hasDuplicateElementsWithId(Collection<EObject> collection, final QualifiedName guiElementId, IQualifiedNameProvider qualifiedNameProvider) { int count = 0; for (EObject obj : collection) { QualifiedName currentId = qualifiedNameProvider.apply(obj); if (guiElementId.equals(currentId)) { count++; if (count > 1) return true; } } return false; }
protected boolean hasHover(EObject o) { return nameProvider.getFullyQualifiedName(o) !=null; }
@Check(CheckType.NORMAL) public void checkGuiElementUnique(final GuiElement guiElement) { final QualifiedName guiElementId = qualifiedNameProvider.apply(guiElement); if (guiElementId != null) { EObject nsContainer = scopeProvider.getNsContainer(guiElement); List<EObject> nsElements = scopeProvider.getNsElements(nsContainer); if (ValidationCollectionUtil.hasDuplicateElementsWithId(nsElements, guiElementId, qualifiedNameProvider)) { error( "Duplicate page element detected " + guiElement.getClass().getSimpleName() + ": " + guiElementId + "'", null); } } }
protected QualifiedName getQualifiedNameOfLocalElement(final EObject context) { return qualifiedNameProvider.getFullyQualifiedName(context); }
@Check(CheckType.NORMAL) public void checkCompositeSimpleLayout(ReferencedXMAComposite composite) { boolean check = composite instanceof XmadslComposite || composite.getXmaComposite().isYnSimpleLayout(); if (!check) { error("Composite '" + qualifiedNameProvider.apply(composite) + "' has no SimpleLayout and can't be modelled", null); } }
protected QualifiedName getQualifiedNameOfLocalElement(final EObject context) { return qualifiedNameProvider.getFullyQualifiedName(context); }
@Check(CheckType.NORMAL) public void checkControl(XMAWidgetEventMapping widgetEventMapping) { if (!(widgetEventMapping.getControl() instanceof ISelectFunctionCaller) && !(widgetEventMapping.getControl() instanceof XMATree)) { error( "Type of widget '" + qualifiedNameProvider.apply(widgetEventMapping) + "' does not support event mapping!", PomPackage.eINSTANCE.getXMAWidgetEventMapping_Control()); } }
protected QualifiedName getQualifiedNameOfLocalElement(final EObject context) { return qualifiedNameProvider.getFullyQualifiedName(context); }
private boolean isFeatureValid(ComplexType parent, FieldFeature fieldFeature) { PresentableFeature f = fieldFeature.getFeature(); if (f.getAttribute() != null) { Attribute a = f.getAttribute(); if (parent.getAllPresentableFeaturesIncludingSuperType().contains(f) == false) { error("Attribute '" + qualifiedNameProvider.apply(a) + "' is not a member of '" + qualifiedNameProvider.apply(parent) + "'", PomPackage.eINSTANCE.getIField_Feature()); return false; } } Type type = getTypeOfPresentableFeature(f); if (type instanceof ComplexType) { if (fieldFeature.getSubFeature() != null) { return isFeatureValid((ComplexType) type, fieldFeature.getSubFeature()); } error("The feature " + type.getName() + " is complex and therefore must habe a subfeature specified", PomPackage.eINSTANCE.getIField_Feature()); return false; } return true; }
public String getName(final EObject object) { QualifiedName _fullyQualifiedName = null; if (object!=null) { _fullyQualifiedName=this._iQualifiedNameProvider.getFullyQualifiedName(object); } return this.getName(_fullyQualifiedName); }
error("Widget '" + qualifiedNameProvider.apply(widgetEventMapping.getControl()) + "' does not support event '" + widgetEventMapping.getEvent().getName() + "'", PomPackage.eINSTANCE.getXMAWidgetEventMapping_Control());
private QualifiedName getFullyQualifiedName(EObject selectedElement) { if (selectedElement == null) { return null; } return getQualifiedNameProvider(selectedElement).getFullyQualifiedName(selectedElement); }
@Override protected String getQualifiedNameFor(XtendTypeDeclaration element) { return this.nameProvider.getFullyQualifiedName(element).toString(); }
@Override protected String getQualifiedNameFor(SarlAgent element) { return this.nameProvider.getFullyQualifiedName(element).toString(); }
@Override protected String getQualifiedNameFor(SarlClass element) { return this.nameProvider.getFullyQualifiedName(element).toString(); }
public Set<IEObjectDescription> findDuplicates(Pattern pattern) { QualifiedName fullyQualifiedName = nameProvider.getFullyQualifiedName(pattern); return findShadowingClasses(pattern, fullyQualifiedName, PatternLanguagePackage.Literals.PATTERN); }
protected String getSymbolName(final EObject object) { return this.getSymbolName(this._iQualifiedNameProvider.getFullyQualifiedName(object)); }
protected String getQualifiedName(EObject object) { return this.qualifiedNameProvider.getFullyQualifiedName(object).toString(); }
public String executableExtensionFactoryQN(final org.eclipse.emf.parsley.dsl.model.Module element) { String _string = this._iQualifiedNameProvider.getFullyQualifiedName(element).toString(); String _plus = (_string + "."); CharSequence _extFactoryName = this.projectFilesGenerator.extFactoryName(this._iQualifiedNameProvider.getFullyQualifiedName(element).toString()); return (_plus + _extFactoryName); }