コード例 #1
0
 @Override
 protected void init() {
   super.init();
   setText("Break Apart");
   setId(BREAK_APART);
   setEnabled(false);
 }
コード例 #2
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);
   }
 }
コード例 #3
0
ファイル: CopyAction.java プロジェクト: pkantner/prob2
 @Override
 protected void init() {
   super.init();
   ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
   setText("Copy");
   setId(ActionFactory.COPY.getId());
   setHoverImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
   setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
   setDisabledImageDescriptor(
       sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED));
   setEnabled(false);
 }
コード例 #4
0
ファイル: PasteAction.java プロジェクト: muharihar/archi
  @Override
  public void dispose() {
    super.dispose();

    getWorkbenchPart()
        .getSite()
        .getWorkbenchWindow()
        .getWorkbench()
        .removeWindowListener(windowListener);
    ((GraphicalEditPart) fGraphicalViewer.getRootEditPart())
        .getFigure()
        .removeMouseListener(mouseListener);

    fGraphicalViewer = null;
  }
コード例 #5
0
 @Override
 protected void init() {
   super.init();
   setEnabled(false);
 }
コード例 #6
0
 /* (non-Javadoc)
  * @see org.eclipse.gef.ui.actions.SelectionAction#setSelectionProvider(org.eclipse.jface.viewers.ISelectionProvider)
  */
 public void setSelectionProvider(ISelectionProvider provider) {
   super.setSelectionProvider(provider);
   this.provider = provider;
 }
コード例 #7
0
 /*
  * (non-Javadoc)
  *
  * @see org.eclipse.gef.ui.actions.SelectionAction#dispose()
  */
 public void dispose() {
   if (window != null) {
     window.close();
   }
   super.dispose();
 }