예제 #1
0
 public static boolean isMultiChoice(EObject object, EStructuralFeature feature) {
   if (feature.getEType() instanceof EClass) {
     ExtendedPropertiesAdapter adapter =
         (ExtendedPropertiesAdapter) AdapterUtil.adapt(object, ExtendedPropertiesAdapter.class);
     if (adapter != null) {
       Object result = adapter.getProperty(feature, ExtendedPropertiesAdapter.UI_IS_MULTI_CHOICE);
       if (result instanceof Boolean) return ((Boolean) result);
     }
   }
   return getChoiceOfValues(object, feature) != null;
 }
예제 #2
0
 public static boolean canEditInline(EObject object, EStructuralFeature feature) {
   if (feature.getEType() instanceof EClass) {
     ExtendedPropertiesAdapter adapter =
         (ExtendedPropertiesAdapter) AdapterUtil.adapt(object, ExtendedPropertiesAdapter.class);
     if (adapter != null) {
       Object result = adapter.getProperty(feature, ExtendedPropertiesAdapter.UI_CAN_EDIT_INLINE);
       if (result instanceof Boolean) return ((Boolean) result);
     }
   }
   return false;
 }
예제 #3
0
 public static boolean canCreateNew(EObject object, EStructuralFeature feature) {
   if (feature.getEType() instanceof EClass) {
     ExtendedPropertiesAdapter adapter =
         (ExtendedPropertiesAdapter) AdapterUtil.adapt(object, ExtendedPropertiesAdapter.class);
     if (adapter != null) {
       Object result = adapter.getProperty(feature, ExtendedPropertiesAdapter.UI_CAN_CREATE_NEW);
       if (result instanceof Boolean) return ((Boolean) result);
     }
     return true;
   }
   return false;
 }