private void update() { final IEvaluationNode node = ((EvaluationEditorInput) this.getEditorInput()).getData(); Listener listener = new Listener() { public void handleEvent(Event event) { ((EvaluationEditor) getEditor()).setDirty(true); getEditor().editorDirtyStateChanged(); try { if (event.widget == backgroud) { node.getEvaluation() .firePropertyChange(SystemConstants.BACKGROUND, backgroud.getText()); } else if (event.widget == remark) { node.getEvaluation() .firePropertyChange(SystemConstants.MODEL_REMARK, remark.getText()); } } catch (Exception e) { MessageDialog.openError( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), Messages.EvaluationGeneralPage_17, Messages.EvaluationGeneralPage_18); } } }; schemeName.setText(((ISchemeNode) node.getParent()).getName()); evalSerial.setText(node.getName()); author.setText(node.getEvaluation().getAuthor()); String s = Evaluations.getInstance().getConfig(node.getEvaluation().getPath()).getString("background"); backgroud.setText(s == null ? "" : s); s = Evaluations.getInstance().getConfig(node.getEvaluation().getPath()).getString("remark"); remark.setText(s == null ? "" : s); evalSerial.addListener(SWT.Modify, listener); backgroud.addListener(SWT.Modify, listener); remark.addListener(SWT.Modify, listener); }
public String getToolTipText() { return node.toString(); }