Wednesday, March 28, 2012

Examine Eclipse via OSGi console


  • Launch eclipse with just the osgi console (eclipse -console -noexit) 
  • Run 'ss' to figure out what hasn't been resolved 
  • 'diag [bundle #]' will give you some details on the problem

Tuesday, March 20, 2012

Adding 'Collapse All' button to a view

Start by adding extension point to plugin.xml of plugin where View lives:

 

    
       
    
 

Then add service code to the View's createPartControl method:

 
 IWorkbenchPartSite site = getSite();
        if (site != null) {
         IHandlerService handlerService = (IHandlerService) site.getService(
           IHandlerService.class);
         if (handlerService != null) {
          CollapseAllHandler fCollapseHandler = new CollapseAllHandler(viewer);
          handlerService.activateHandler(CollapseAllHandler.COMMAND_ID ,
            fCollapseHandler);
         }
        }

Blogger Syntax Highliter