@Override
 protected void init() {
   super.init();
   setText("Break Apart");
   setId(BREAK_APART);
   setEnabled(false);
 }
 /*
  * (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);
   }
 }
Ejemplo n.º 3
0
 @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);
 }
Ejemplo n.º 4
0
  @Override
  public void dispose() {
    super.dispose();

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

    fGraphicalViewer = null;
  }
 @Override
 protected void init() {
   super.init();
   setEnabled(false);
 }
 /* (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;
 }
 /*
  * (non-Javadoc)
  *
  * @see org.eclipse.gef.ui.actions.SelectionAction#dispose()
  */
 public void dispose() {
   if (window != null) {
     window.close();
   }
   super.dispose();
 }