/* * (non-Javadoc) * * @see org.eclipse.gef.ui.actions.SelectionAction#handleSelectionChanged() */ protected void handleSelectionChanged() { super.handleSelectionChanged(); EditPart editPart = getEditPart(); if (window != null && window.isOpened() && editPart != null) { window.setEditPart(editPart); } }
/** @see org.eclipse.jface.action.Action#run() */ public void run() { EditPart editPart = getEditPart(); if (editPart == null) { return; } if (window == null || window.isClosed()) { window = new LayoutAssistantWindow(getWorkbenchPart().getSite().getShell()); } window.setEditPart(editPart); if (!window.isOpened()) { window.open(); } else { window.refresh(); } }
/* * (non-Javadoc) * * @see org.eclipse.gef.ui.actions.SelectionAction#dispose() */ public void dispose() { if (window != null) { window.close(); } super.dispose(); }