mercoledì 27 gennaio 2010

Organize extension point popupMenus

A popupMenu declares one or more insertionPoints that will be used by contributors to organize their contributions into a meaningful, more user-friendly, consistent list.
If clients only specify the "popupMenuId" attribute of the viewer element, then the set of insertionPoints used by the context menu will default to the following list in the given order:

"group.new" separator="true"
"group.goto"
"group.open" separator="true"
"group.openWith"
"group.show" separator="true"
"group.edit" separator="true"
"group.reorganize"
"group.port"
"group.generate" separator="true"
"group.search" separator="true"
"group.build" separator="true"
"additions" separator="true"
"group.properties" separator="true"


If not specified, the default group is additions.

Clients that wish to refer to these values programmatically may use the corresponding constants in org.eclipse.ui.navigator.ICommonMenuConstants.

Clients that wish to customize their menus are encouraged to start with this list and add or remove insertion points as necessary. Clients are also encouraged to follow the pattern of beginning each group name with "group.".

martedì 26 gennaio 2010

How to start a java application for remote debugging

In order to allow remote debugging for a java application the command line should be customized with the following arguments:
java -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n MyClass
-Xdebug enables debugging mode;
-Xrunjdwp configures Java Debug Wire Protocol with sub-options; like the communication mode between jvm and debugger, the listening port, whether wait until the debugger connection or not, etc. See links for further details

See also:
-Xrunjdwp sub-options
Remote Debugging with Eclipse