コード例 #1
0
 /*
  * (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);
   }
 }
コード例 #2
0
 /** @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();
   }
 }
コード例 #3
0
 /*
  * (non-Javadoc)
  *
  * @see org.eclipse.gef.ui.actions.SelectionAction#dispose()
  */
 public void dispose() {
   if (window != null) {
     window.close();
   }
   super.dispose();
 }