]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java
White space clean-up
[simantics/3d.git] / org.simantics.g3d / src / org / simantics / g3d / property / AnnotatedPropertyTabContributorFactory.java
index a3fca78bb4206dc18adafa617073919702042778..e216e5e7ae558e672c47fade33c3dea82b920633 100644 (file)
@@ -131,85 +131,85 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri
        
        
        private static void collectItems(Class<?> clazz, Map<String, IPropertyItem> items) throws InstantiationException, IllegalAccessException {
-                Class<?> superclass = clazz.getSuperclass();
-                if(superclass != null)
-                        collectItems(superclass, items);
-                
-                for (Method m : clazz.getDeclaredMethods()) {
-                        m.setAccessible(true);
-               for (Annotation annotation : m.getAnnotations()) {
-                       if (annotation.annotationType().equals(GetPropertyValue.class)) {
-                               GetPropertyValue get = (GetPropertyValue)annotation;
-                               PropertyItem item = (PropertyItem)items.get(get.value());
-                               if (item == null) {
-                                       item = new PropertyItem(get.value());
-                                       items.put(item.id, item);
-                               }
+               Class<?> superclass = clazz.getSuperclass();
+               if(superclass != null)
+                       collectItems(superclass, items);
+               
+               for (Method m : clazz.getDeclaredMethods()) {
+                       m.setAccessible(true);
+                       for (Annotation annotation : m.getAnnotations()) {
+                               if (annotation.annotationType().equals(GetPropertyValue.class)) {
+                                       GetPropertyValue get = (GetPropertyValue)annotation;
+                                       PropertyItem item = (PropertyItem)items.get(get.value());
+                                       if (item == null) {
+                                               item = new PropertyItem(get.value());
+                                               items.put(item.id, item);
+                                       }
 
-                               item.getter = m;
-                               item.manipulatorClass = get.manipulator().newInstance().get(m,null);
+                                       item.getter = m;
+                                       item.manipulatorClass = get.manipulator().newInstance().get(m,null);
 
-                               item.tabId = get.tabId();
+                                       item.tabId = get.tabId();
 
-                               item.name = get.name();
-                               
-                               
-                       } else if (annotation.annotationType().equals(SetPropertyValue.class)) {
-                               SetPropertyValue set = (SetPropertyValue)annotation;
-                               PropertyItem item = (PropertyItem)items.get(set.value());
-                               if (item == null) {
-                                       item = new PropertyItem(set.value());
-                                       items.put(item.id, item);
-                               }
-                               
-                               item.setter = m;
-                       } else if (annotation.annotationType().equals(CompoundGetPropertyValue.class)) {
-                               CompoundGetPropertyValue get = (CompoundGetPropertyValue)annotation;
-                               CompoundPropertyItem item = (CompoundPropertyItem)items.get(get.value());
-                               if (item == null) {
-                                       item = new CompoundPropertyItem(get.value());
-                                       items.put(item.id, item);
-                               }
+                                       item.name = get.name();
+                                       
+                                       
+                               } else if (annotation.annotationType().equals(SetPropertyValue.class)) {
+                                       SetPropertyValue set = (SetPropertyValue)annotation;
+                                       PropertyItem item = (PropertyItem)items.get(set.value());
+                                       if (item == null) {
+                                               item = new PropertyItem(set.value());
+                                               items.put(item.id, item);
+                                       }
+                                       
+                                       item.setter = m;
+                               } else if (annotation.annotationType().equals(CompoundGetPropertyValue.class)) {
+                                       CompoundGetPropertyValue get = (CompoundGetPropertyValue)annotation;
+                                       CompoundPropertyItem item = (CompoundPropertyItem)items.get(get.value());
+                                       if (item == null) {
+                                               item = new CompoundPropertyItem(get.value());
+                                               items.put(item.id, item);
+                                       }
 
-                               item.getter = m;
-                               item.manipulatorFactory = get.manipulator().newInstance();
+                                       item.getter = m;
+                                       item.manipulatorFactory = get.manipulator().newInstance();
 
-                               item.tabId = get.tabId();
+                                       item.tabId = get.tabId();
 
-                               item.name = get.name();
-                       } else if (annotation.annotationType().equals(CompoundSetPropertyValue.class)) {
-                               CompoundSetPropertyValue set = (CompoundSetPropertyValue)annotation;
-                               CompoundPropertyItem item = (CompoundPropertyItem)items.get(set.value());
-                               if (item == null) {
-                                       item = new CompoundPropertyItem(set.value());
-                                       items.put(item.id, item);
-                               }
-                               
-                               item.setter = m;
-                       }
-               }
-                }
+                                       item.name = get.name();
+                               } else if (annotation.annotationType().equals(CompoundSetPropertyValue.class)) {
+                                       CompoundSetPropertyValue set = (CompoundSetPropertyValue)annotation;
+                                       CompoundPropertyItem item = (CompoundPropertyItem)items.get(set.value());
+                                       if (item == null) {
+                                               item = new CompoundPropertyItem(set.value());
+                                               items.put(item.id, item);
+                                       }
+                                       
+                                       item.setter = m;
+                               }
+                       }
+               }
                
                
        }
        
        private static void collectBlacklist(Class<?> clazz, List<String> blacklist) throws InstantiationException, IllegalAccessException {
-                Class<?> superclass = clazz.getSuperclass();
-                if(superclass != null)
-                        collectBlacklist(superclass, blacklist);
-                
-                PropertyTabBlacklist ann = clazz.getAnnotation(PropertyTabBlacklist.class);
-                if (ann == null)
-                        return;
-                String s = ann.value();
-                if (s == null)
-                        return;
-                if (s.length() == 0)
-                        return;
-                for (String item : s.split(";")) {
-                        blacklist.add(item);
-                }
-                
+               Class<?> superclass = clazz.getSuperclass();
+               if(superclass != null)
+                       collectBlacklist(superclass, blacklist);
+               
+               PropertyTabBlacklist ann = clazz.getAnnotation(PropertyTabBlacklist.class);
+               if (ann == null)
+                       return;
+               String s = ann.value();
+               if (s == null)
+                       return;
+               if (s.length() == 0)
+                       return;
+               for (String item : s.split(";")) {
+                       blacklist.add(item);
+               }
+               
                
        }