Beispiel #1
0
  public CellEditor getEditor(Composite parent) {

    if (editor == null) {
      editor = descriptor.createPropertyEditor(parent);
      if (editor != null) {
        editor.addListener(cellEditorListener);
      }
    }
    if (editor != null) {
      editor.setValue(editValue);
      setErrorText(editor.getErrorMessage());
    }
    return editor;
  }
  /*
   * (non-Javadoc)
   *
   * @see
   * org.eclipse.ui.views.properties.IPropertySheetEntry#getEditor(org.eclipse
   * .swt.widgets.Composite)
   */
  public CellEditor getEditor(Composite parent) {

    if (editor == null || editor.getControl().isDisposed()) {
      editor = descriptor.createPropertyEditor(parent);
      if (editor != null) {
        editor.addListener(cellEditorListener);
      }
    }
    // && !eq(editor.getValue(), editValue)
    if (editor != null) {
      editor.setValue(editValue);
    }
    return editor;
  }