Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
Adding new extensions and unimplemented command handler to create a new
Browse files Browse the repository at this point in the history
MOOSE Kernel class by right clicking a 'fork the stork' moose app and
selecting New > New MOOSE Kernel from the context menu. 

Signed-off-by: Alex McCaskey <mccaskeyaj@ornl.gov>
  • Loading branch information
Alex McCaskey committed Apr 21, 2015
1 parent 3f2f330 commit 5c91b80
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 2 deletions.
42 changes: 42 additions & 0 deletions src/org.eclipse.ice.client.widgets.moose/plugin.xml
Expand Up @@ -161,4 +161,46 @@
</page>
</extension>


<extension
point="org.eclipse.ui.commands">
<command
defaultHandler="org.eclipse.ice.client.widgets.moose.NewKernelHandler"
id="org.eclipse.ice.client.widgets.moose.newkernel"
name="New MOOOSE Kernel">
</command>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:common.new.menu?after=new">
<command
commandId="org.eclipse.ice.client.widgets.moose.newkernel"
label="New MOOSE Kernel"
style="push">
<visibleWhen
checkEnabled="false">
<with
variable="activeWorkbenchWindow.activePerspective">
<equals
value="org.eclipse.cdt.ui.CPerspective">
</equals>
</with>
</visibleWhen>
</command>
</menuContribution>
<menuContribution
locationURI="popup:common.new.menu?after=new">
<menu
id="org.eclipse.ui.navigator.ProjectExplorer.newkernel"
label="New MOOSE Kernel">
<command
commandId="org.eclipse.ice.client.widgets.moose.newkernel"
label="New MOOSE Kernel"
style="push">
</command>
</menu>
</menuContribution>
</extension>

</plugin>
Expand Up @@ -182,7 +182,7 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
e.printStackTrace();
}

try {
/*try {
IMakeTargetManager manager = MakeCorePlugin.getDefault()
.getTargetManager();
String[] ids = manager.getTargetBuilders(cProject);
Expand All @@ -198,7 +198,7 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
manager.addTarget(cProject, target);
} catch (CoreException e) {
e.printStackTrace();
}
}*/
return null;

}
Expand Down
@@ -0,0 +1,22 @@
package org.eclipse.ice.client.widgets.moose;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;

public class NewKernelHandler extends AbstractHandler {

/**
* (non-Javadoc)
*
* @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {


System.out.println("HELLO WORLD FROM NEW KERNEL HANDLER");
return null;
}

}

0 comments on commit 5c91b80

Please sign in to comment.