@Override public boolean applicable(final ServiceContext context, final Class<? extends Service> service) { final ValueProperty property = context.find(ValueProperty.class); final IModelElement element = context.find(IModelElement.class); return (property != null && property.hasAnnotation(NoDuplicates.class) && element.parent() instanceof ModelElementList); }
@Override public boolean applicable(final ServiceContext context) { final ValueProperty property = context.find(ValueProperty.class); if (property != null) { final NumericRange range = property.getAnnotation(NumericRange.class); return (range != null && (range.min().length() > 0 || range.max().length() > 0)); } return false; }
@Override public boolean applicable(final ServiceContext context) { ISapphirePart part = context.find(ISapphirePart.class); if (part instanceof SapphireDiagramEditorPagePart) { SapphireDiagramEditorPagePart diagramPagePart = (SapphireDiagramEditorPagePart) part; DiagramEditorPageDef pageDef = diagramPagePart.getPageDef(); if (pageDef.getLayoutPersistence().content() == LayoutPersistence.SIDE_BY_SIDE) { return true; } } return false; }
@Override public boolean applicable( final ServiceContext context, final Class<? extends Service> service) { final ValueProperty property = context.find(ValueProperty.class); return (property != null && property.hasAnnotation(ValidFileSystemResourceType.class)); }
@Override public boolean applicable( final ServiceContext context, final Class<? extends Service> service) { return context.find(ModelProperty.class).hasAnnotation(ReadOnly.class); }
@Override public boolean applicable( final ServiceContext context, final Class<? extends Service> service) { return (context.find(Element.class).parent() != null); }
@Override public boolean applicable(final ServiceContext context) { return (context.find(ValueProperty.class) != null); }
@Override public boolean applicable( final ServiceContext context, final Class<? extends Service> service) { return (context.find(IModelElement.class).getParentProperty() != null); }