Package org.eclipse.ui.actions

Examples of org.eclipse.ui.actions.BaseSelectionListenerAction


    });
   
    mgr.add(shareSomethingAction);
   
    menuManager = new MenuManager();
    subscribeAction = new BaseSelectionListenerAction("Subscribe") {
         
      public void run() {
        PublishedServiceDescriptor desc = (PublishedServiceDescriptor) getStructuredSelection().getFirstElement();
        IPublishedServiceRequestor requestor = (IPublishedServiceRequestor) container.getAdapter(IPublishedServiceRequestor.class);
        requestor.subscribe(desc.getContainerID(), desc.getSharedObjectID(), new SubscriptionViewOpener());
      }
     
      protected boolean updateSelection(IStructuredSelection selection) {
        return !selection.isEmpty();
      }
    };
       
    subscribeAction.setEnabled(false);
    menuManager.add(subscribeAction);
   
    sharedListMenuManager = new MenuManager();
    appendAction = new BaseSelectionListenerAction("Append...") {
     
      public void run() {
        InputDialog dlg = new InputDialog(getSite().getShell(), "Append to Shared List", "Enter element to append:", null, null);
        dlg.open();
        String value = dlg.getValue();
View Full Code Here

TOP

Related Classes of org.eclipse.ui.actions.BaseSelectionListenerAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.