Examples of ListPropertyDescriptor


Examples of com.sun.grid.jgdi.configuration.reflect.ListPropertyDescriptor

                GEObject child = null;
                if (propDescr instanceof SimplePropertyDescriptor) {
                    SimplePropertyDescriptor spd = (SimplePropertyDescriptor) propDescr;
                    child = (GEObject) spd.getValue(root);
                } else if (propDescr instanceof ListPropertyDescriptor) {
                    ListPropertyDescriptor lpd = (ListPropertyDescriptor) propDescr;
                    int propCount = lpd.getCount(root);
                    GEObject tmpChild = null;
                    for (int i = 0; i < propCount; i++) {
                        tmpChild = (GEObject) lpd.get(root, i);
                        if (tmpChild.getName().equals(name)) {
                            child = tmpChild;
                            break;
                        }
                    }
View Full Code Here

Examples of com.sun.grid.jgdi.configuration.reflect.ListPropertyDescriptor

                                differences.add(new Difference(propPath, v1 + " != " + v2));
                            }
                        }
                    }
                } else if (pd instanceof ListPropertyDescriptor) {
                    ListPropertyDescriptor lpd = (ListPropertyDescriptor) pd;
                   
                    int count1 = lpd.getCount(obj1);
                    int count2 = lpd.getCount(obj2);
                    if (count1 != count2) {
                        differences.add(new Difference(propPath, "MLPD: different length (" + count1 + " != " + count2 + ")"));
                    } else {
                        for (int valueIndex = 0; valueIndex < count1; valueIndex++) {
                            Object v1 = lpd.get(obj1, valueIndex);
                            Object v2 = lpd.get(obj2, valueIndex);
                           
                            String myPath = propPath + "[" + valueIndex + "]";
                            if (v1 == null && v2 == null) {
                                // do nothing
                            } else if (v1 == null && v2 != null) {
                                differences.add(new Difference(myPath, "MLPD: missing in obj1 (" + v2 + ")"));
                            } else if (v1 != null && v2 == null) {
                                differences.add(new Difference(myPath, "MLPD: missing in obj2 (" + v1 + ")"));
                            } else {
                                if (GEObject.class.isAssignableFrom(lpd.getPropertyType())) {
                                    getDifferences((GEObject) v1, (GEObject) v2, myPath + ".", differences);
                                } else {
                                    if (!v1.equals(v2)) {
                                        differences.add(new Difference(myPath, v1 + " != " + v2));
                                    }
                                }
                            }
                        }
                    }
                } else if (pd instanceof MapListPropertyDescriptor) {
                   
                    MapListPropertyDescriptor lpd = (MapListPropertyDescriptor) pd;
                   
                    Set keys1 = lpd.getKeys(obj1);
                    Set keys2 = lpd.getKeys(obj2);
                    if (keys1.size() != keys2.size()) {
                        differences.add(new Difference(propPath, "MLPD: different key count (" + keys1.size() + " != " + keys2.size() + ")"));
                    } else {
                        Iterator iter = keys1.iterator();
                        while (iter.hasNext()) {
                            Object key = iter.next();
                            String keyPath = propPath + "[" + key + "]";
                            int count1 = lpd.getCount(obj1, key);
                            int count2 = lpd.getCount(obj2, key);
                           
                            if (count1 != count2) {
                                differences.add(new Difference(keyPath, "MLPD: different length (" + count1 + " != " + count2 + ")"));
                            } else {
                                for (int valueIndex = 0; valueIndex < count1; valueIndex++) {
                                    Object v1 = lpd.get(obj1, key, valueIndex);
                                    Object v2 = lpd.get(obj2, key, valueIndex);
                                   
                                    String myPath = keyPath + "[" + valueIndex + "]";
                                    if (v1 == null && v2 == null) {
                                        // do nothing
                                    } else if (v1 == null && v2 != null) {
                                        differences.add(new Difference(myPath, "MPD: missing in obj1 (" + v2 + ")"));
                                    } else if (v1 != null && v2 == null) {
                                        differences.add(new Difference(myPath, "MPD: missing in obj2 (" + v1 + ")"));
                                    } else {
                                        if (GEObject.class.isAssignableFrom(lpd.getPropertyType())) {
                                            getDifferences((GEObject) v1, (GEObject) v2, myPath + ".", differences);
                                        } else {
                                            if (!v1.equals(v2)) {
                                                differences.add(new Difference(myPath, v1 + " != " + v2));
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                } else if (pd instanceof MapPropertyDescriptor) {
                   
                    MapPropertyDescriptor lpd = (MapPropertyDescriptor) pd;
                   
                    Set keys1 = lpd.getKeys(obj1);
                    Set keys2 = lpd.getKeys(obj2);
                   
                    if (keys1.size() != keys2.size()) {
                        differences.add(new Difference(propPath, "MPD: different key count (" + keys1.size() + " != " + keys2.size() + ")"));
                    } else {
                        Iterator iter = keys1.iterator();
                        while (iter.hasNext()) {
                            Object key = iter.next();
                           
                            String keyPath = propPath + "[" + key + "]";
                            Object v1 = lpd.get(obj1, key);
                            Object v2 = lpd.get(obj2, key);
                           
                            if (v1 == null && v2 == null) {
                                // do nothing
                            } else if (v1 == null && v2 != null) {
                                differences.add(new Difference(keyPath, "MPD: missing in obj1 (" + v2 + ")"));
                            } else if (v1 != null && v2 == null) {
                                differences.add(new Difference(keyPath, "MPD: missing in obj2 (" + v1 + ")"));
                            } else {
                                if (GEObject.class.isAssignableFrom(lpd.getPropertyType())) {
                                    getDifferences((GEObject) v1, (GEObject) v2, keyPath + ".", differences);
                                } else {
                                    if (!v1.equals(v2)) {
                                        differences.add(new Difference(keyPath, v1 + " != " + v2));
                                    }
View Full Code Here

Examples of info.textgrid.lab.noteeditor.properties.ListPropertyDescriptor

        GraphicalConstants.PROPCOMBO_STRING_ARRAY_DURATIONS);
    cpd.setCategory(this.toString());
    cpd.setDescription(MusicMessages.MEI_documentation_generic_dur);
    descriptors.add(cpd);
   
    ListPropertyDescriptor lpd = new ListPropertyDescriptor(
        StringConstants.NOTE_ARTIC, StringConstants.NOTE_ARTIC,
        GraphicalConstants.TYPE_DATA_ARTICULATION);
    lpd.setCategory(this.toString());
    lpd.setDescription(MusicMessages.MEI_documentation_note_artic);
    descriptors.add(lpd);
   
    cpd = new ComboBoxPropertyDescriptor(StringConstants.NOTE_PITCHNAME,
        StringConstants.NOTE_PITCHNAME,
        GraphicalConstants.PROPCOMBO_STRING_ARRAY_PITCHVALUES);
View Full Code Here

Examples of info.textgrid.lab.noteeditor.properties.ListPropertyDescriptor

        GraphicalConstants.PROPCOMBO_STRING_ARRAY_SIZEVALUES);
    cpd.setCategory(this.toString());
    cpd.setDescription(MusicMessages.MEI_documentation_note_size);
    descriptors.add(cpd);
   
    ListPropertyDescriptor lpd = new ListPropertyDescriptor(
        StringConstants.CHORD_ARTIC, StringConstants.CHORD_ARTIC,
        GraphicalConstants.TYPE_DATA_ARTICULATION);
    lpd.setCategory(this.toString());
    lpd.setDescription(MusicMessages.MEI_documentation_note_artic);
    descriptors.add(lpd);
  }
View Full Code Here

Examples of org.drools.eclipse.flow.common.view.property.ListPropertyDescriptor

              new TextPropertyDescriptor(VERSION, "Version"),
              new TextPropertyDescriptor(ID, "Id"),
              new TextPropertyDescriptor(PACKAGE_NAME, "Package"),
              new ComboBoxPropertyDescriptor(ROUTER_LAYOUT, "Connection Layout",
                  new String[] { "Manual", "Manhattan", "Shortest Path" }),
              new ListPropertyDescriptor(VARIABLES, "Variables", VariableListCellEditor.class),
              new ListPropertyDescriptor(SWIMLANES, "Swimlanes",
                  SwimlanesCellEditor.class),
              new ExceptionHandlersPropertyDescriptor(EXCEPTION_HANDLERS,
                  "Exception Handlers", process),
          };
      } else {
        descriptors = new IPropertyDescriptor[] {
              new TextPropertyDescriptor(NAME, "Name"),
              new TextPropertyDescriptor(VERSION, "Version"),
              new TextPropertyDescriptor(ID, "Id"),
              new TextPropertyDescriptor(PACKAGE_NAME, "Package"),
              new ListPropertyDescriptor(VARIABLES, "Variables", VariableListCellEditor.class),
              new ListPropertyDescriptor(SWIMLANES, "Swimlanes",
                  SwimlanesCellEditor.class),
          };
      }
    }
View Full Code Here

Examples of org.drools.eclipse.flow.common.view.property.ListPropertyDescriptor

            new TextPropertyDescriptor(VERSION, "Version"),
            new TextPropertyDescriptor(ID, "Id"),
            new TextPropertyDescriptor(PACKAGE_NAME, "Package"),
            new ComboBoxPropertyDescriptor(ROUTER_LAYOUT, "Connection Layout",
                new String[] { "Manual", "Manhattan", "Shortest Path" }),
            new ListPropertyDescriptor(VARIABLES, "Variables", VariableListCellEditor.class),
            new ListPropertyDescriptor(SWIMLANES, "Swimlanes",
                SwimlanesCellEditor.class),
            new ExceptionHandlersPropertyDescriptor(EXCEPTION_HANDLERS,
                "Exception Handlers", process),
        };
    }
View Full Code Here

Examples of org.drools.eclipse.flow.common.view.property.ListPropertyDescriptor

        descriptors[descriptors.length - 4] =
            new TextPropertyDescriptor(START_NODE, "StartNodeId");
        descriptors[descriptors.length - 3] =
            new TextPropertyDescriptor(END_NODE, "EndNodeId");
        descriptors[descriptors.length - 2] =
            new ListPropertyDescriptor(VARIABLES, "Variables", VariableListCellEditor.class);
        descriptors[descriptors.length - 1] =
            new ExceptionHandlersPropertyDescriptor(EXCEPTION_HANDLERS,
                "Exception Handlers", getProcessWrapper().getProcess());
    }
View Full Code Here

Examples of org.drools.eclipse.flow.common.view.property.ListPropertyDescriptor

              new TextPropertyDescriptor(VERSION, "Version"),
              new TextPropertyDescriptor(ID, "Id"),
              new TextPropertyDescriptor(PACKAGE_NAME, "Package"),
              new ComboBoxPropertyDescriptor(ROUTER_LAYOUT, "Connection Layout",
                  new String[] { "Manual", "Manhattan", "Shortest Path" }),
              new ListPropertyDescriptor(VARIABLES, "Variables", VariableListCellEditor.class),
              new ListPropertyDescriptor(SWIMLANES, "Swimlanes",
                  SwimlanesCellEditor.class),
              new ExceptionHandlersPropertyDescriptor(EXCEPTION_HANDLERS,
                  "Exception Handlers", process),
          };
      } else {
        descriptors = new IPropertyDescriptor[] {
              new TextPropertyDescriptor(NAME, "Name"),
              new TextPropertyDescriptor(VERSION, "Version"),
              new TextPropertyDescriptor(ID, "Id"),
              new TextPropertyDescriptor(PACKAGE_NAME, "Package"),
              new ListPropertyDescriptor(VARIABLES, "Variables", VariableListCellEditor.class),
              new ListPropertyDescriptor(SWIMLANES, "Swimlanes",
                  SwimlanesCellEditor.class),
          };
      }
    }
View Full Code Here

Examples of org.drools.eclipse.flow.common.view.property.ListPropertyDescriptor

          descriptors[descriptors.length - 2] =
              new ExceptionHandlersPropertyDescriptor(EXCEPTION_HANDLERS,
                  "Exception Handlers", getProcessWrapper().getProcess());
        }
        descriptors[descriptors.length - 1] =
            new ListPropertyDescriptor(VARIABLES, "Variables", VariableListCellEditor.class);
    }
View Full Code Here

Examples of org.drools.eclipse.flow.common.view.property.ListPropertyDescriptor

              new TextPropertyDescriptor(VERSION, "Version"),
              new TextPropertyDescriptor(ID, "Id"),
              new TextPropertyDescriptor(PACKAGE_NAME, "Package"),
              new ComboBoxPropertyDescriptor(ROUTER_LAYOUT, "Connection Layout",
                  new String[] { "Manual", "Manhattan", "Shortest Path" }),
              new ListPropertyDescriptor(VARIABLES, "Variables", VariableListCellEditor.class),
              new ListPropertyDescriptor(SWIMLANES, "Swimlanes",
                  SwimlanesCellEditor.class),
              new ExceptionHandlersPropertyDescriptor(EXCEPTION_HANDLERS,
                  "Exception Handlers", process),
          };
      } else {
        descriptors = new IPropertyDescriptor[] {
              new TextPropertyDescriptor(NAME, "Name"),
              new TextPropertyDescriptor(VERSION, "Version"),
              new TextPropertyDescriptor(ID, "Id"),
              new TextPropertyDescriptor(PACKAGE_NAME, "Package"),
              new ListPropertyDescriptor(VARIABLES, "Variables", VariableListCellEditor.class),
              new ListPropertyDescriptor(SWIMLANES, "Swimlanes",
                  SwimlanesCellEditor.class),
          };
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.