Skip to content
Snippets Groups Projects
Commit 1a34fac6 authored by Mr Adrian Norås's avatar Mr Adrian Norås
Browse files

Updated the command-ID to launch the uploadopensource-command.

Added a button to the AAL Studio Menu to open the Dashboard View.
parent 00ada589
No related branches found
No related tags found
No related merge requests found
......@@ -33,5 +33,31 @@
file="contexts.xml">
</contexts>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
id="org.universaal.tools.dashboard.opendashboard"
name="Open AAL Studio Dashboard">
</command>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
class="org.universaal.tools.dashboard.handlers.OpenDashboardHandler"
commandId="org.universaal.tools.dashboard.opendashboard">
</handler>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="menu:org.universaal.tools.AALStudio.menu?before=new">
<command
commandId="org.universaal.tools.dashboard.opendashboard"
id="org.universaal.tools.dashboard.menu.opendashboard"
style="push">
</command>
</menuContribution>
</extension>
</plugin>
......@@ -22,7 +22,7 @@ public class UploadOpenSourceListener implements SelectionListener {
public void widgetSelected(SelectionEvent e) {
IHandlerService handlerService = (IHandlerService)view.getSite().getService(IHandlerService.class);
try {
handlerService.executeCommand("uploadopensourceplugin.commands.uploadopensource", null);
handlerService.executeCommand("org.universaal.tools.uploadopensourceplugin.commands.uploadopensource", null);
} catch (ExecutionException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
......
package org.universaal.tools.dashboard.handlers;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.universaal.tools.dashboard.views.DashboardView;
public class OpenDashboardHandler extends AbstractHandler {
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
try {
PlatformUI.getWorkbench().
getActiveWorkbenchWindow().getActivePage().showView(DashboardView.ID);
} catch (PartInitException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
}
......@@ -34,7 +34,7 @@ import org.universaal.tools.dashboard.listeners.ProjectNameListener;
public class DashboardView extends ViewPart {
public static final String ID = "org.universaal.tools.views.DashboardView"; //$NON-NLS-1$
public static final String ID = "org.universaal.tools.dashboard.views.DashboardView"; //$NON-NLS-1$
private Button btnCreateProject;
private Button btnImportProject;
private Button btnEditProject;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment