Skip to content

Instantly share code, notes, and snippets.

@andyhuey
Created April 5, 2013 00:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andyhuey/5315559 to your computer and use it in GitHub Desktop.
Save andyhuey/5315559 to your computer and use it in GitHub Desktop.
public static void main(Args args)
{
AjhDevLaunchStartupProjects obj = AjhDevLaunchStartupProjects::construct();
SysContextMenu contextMenu;
str projectName, x;
;
// should always be called from a menu item.
if (!args.menuItemName())
{
return;
}
// if called from the add-ins context menu...
if (SysContextMenu::startedFrom(args))
{
contextMenu = args.parmObject();
projectName = contextMenu.getFirstNode().treeNodeName();
}
switch (args.menuItemName())
{
case menuitemActionStr(AjhDevStartupProjectAdd):
obj.addProject(projectName);
break;
case menuitemActionStr(AjhDevStartupProjectRemove):
obj.removeProject(projectName);
break;
case menuitemActionStr(AjhDevStartupProjectOpenAll):
obj.openAllProjects();
default:
return;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment