- 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
Collection of notes on common problems and issues I faced while doing day to day programming
Wednesday, March 28, 2012
Examine Eclipse via OSGi console
Tuesday, March 20, 2012
Adding 'Collapse All' button to a view
Start by adding extension point to plugin.xml of plugin where View lives:
- <extension point="org.eclipse.ui.menus">
- <menucontribution locationuri="toolbar:com.iwaysoftware.explorer.views.ExplorerView">
- <command commandid="org.eclipse.ui.navigate.collapseAll"></command>
- </menucontribution>
- </extension>
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);
- }
- }
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); } }
Subscribe to:
Posts (Atom)