コード例 #1
0
 @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);
 }
コード例 #2
0
    @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;
    }
コード例 #3
0
 @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;
 }
コード例 #4
0
 @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));
 }
コード例 #5
0
 @Override
 public boolean applicable(
     final ServiceContext context, final Class<? extends Service> service) {
   return context.find(ModelProperty.class).hasAnnotation(ReadOnly.class);
 }
コード例 #6
0
 @Override
 public boolean applicable(
     final ServiceContext context, final Class<? extends Service> service) {
   return (context.find(Element.class).parent() != null);
 }
コード例 #7
0
 @Override
 public boolean applicable(final ServiceContext context) {
   return (context.find(ValueProperty.class) != null);
 }
コード例 #8
0
 @Override
 public boolean applicable(
     final ServiceContext context, final Class<? extends Service> service) {
   return (context.find(IModelElement.class).getParentProperty() != null);
 }