2012-05-08 40 views
0

我有一個類,它擴展了PropertyDescriptor,它將打開一個小對話框來輸入值。
它到目前爲止工作,對話框顯示,我可以輸入所有的值。但系統並未顯示該文件已被編輯。DialogCellEditor:如何觸發變更事件/將屬性標記爲已更改?

該對話框是InputDialog的副本。

我試過使用像fireApplyEditorValue,​​和valueChanged這樣的方法。但它沒有區別。
我已經檢查了聽衆,可以在fire方法中找到它們,它們是TextCellEditor使用的相同聽衆。

我搞不​​清楚,我錯過了什麼。

感謝您的任何建議。

這裏是我的createPropertyEditor方法:

public CellEditor createPropertyEditor(Composite parent) { 
    CellEditor editor = new DialogCellEditor(parent) { 
     @Override 
     protected Object openDialogBox(Control cellEditorWindow) { 
      SimpleDialog dialog = new SimpleDialog(cellEditorWindow.getShell(), (SomeValue) doGetValue()); 
      dialog.open(); 
      return dialog.getValue(); 
     } 
    }; 
    if (getValidator() != null) 
     editor.setValidator(getValidator()); 
    return editor; 
} 

回答

2

我發現我錯了。
我必須改寫我的課equals的方法SomeValue

相關問題