/** * Sets the current view. * * @param view the current view. */ public void setView(Object view) { if (view instanceof Editor) { editor = (Editor) view; } else { editor = null; } setDocument(parent.getDocument()); }
/** * The implementation of the tag action, called after a user action. * * @param event the action event. */ public void actionPerformed(ActionEvent event) { if (DEBUG) System.out.println("TagAction.actionPerformed( " + event + ")"); if (dialog == null) { dialog = new TagDialog(parent); } dialog.init(editor); dialog.show(); if (!dialog.isCancelled()) { String tag = dialog.getTag(); if (tag != null && tag.trim().length() > 0) { parent.getRepeatTagAction().setTag(tag); editor.insertTag(tag); } } editor.setFocus(); }
private void elementSelected() { parent.getView().getSchemaViewer().setRoot(getSelectedElement()); }