I was looking at the ProjectViewer code, trying to figure out how to
programmatically add items to the context menu. I ran across the
'registerAction' method in VPTContextMenu which seems to be the right
thing, but the javadoc says this method is deprecated. The comment says
"Use the property system to add context menu actions" but I'm not
finding any documentation on how exactly to do that. I've added macros
to the context menu via the ProjectViewer options panel before, and I
see they are listed in the 'projectviewer.user_context_menu' in the
config.properties file. However, I'm not wanting to add macros as I
would like to be able to enable or disable (or add and remove) the menu
items based on some conditions. Do you have any pointers on how to do this?
Get latest updates about Open Source Projects, Conferences and News.