Skip to content
Snippets Groups Projects
Commit c738bd04 authored by Anders Kofod-Petersen's avatar Anders Kofod-Petersen
Browse files

Working first version of the dashboard

parent b1f5d20f
No related branches found
No related tags found
No related merge requests found
Showing with 46 additions and 20 deletions
......@@ -4,7 +4,8 @@ Bundle-Name: Dashboard
Bundle-SymbolicName: org.universaal.tools.dashboard;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.universaal.tools.dashboard.Activator
Bundle-Vendor: SINTEF ICT
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
dashboard/org.universaal.tools.dashboard/icons/universaal.ico

698 B

......@@ -2,12 +2,34 @@
<?eclipse version="3.4"?>
<plugin>
<extension
id="org.universaal.tools.dashboard.perspectives"
name="Dashboard Perspective"
point="org.eclipse.ui.perspectives">
<perspective
class="org.universaal.tools.dashboard.perspective.DashboardPerspectiveFactory"
icon="icons/universaal.ico"
id="org.universaal.tools.dashboard.perspective.DashboardPerspectiveFactory"
name="universAAL Dashboard">
</perspective>
</extension>
<extension
point="org.eclipse.ui.views">
<view
class="org.universaal.tools.dashboard.views.MonitoringView"
id="org.universaal.tools.dashboard.views.MonitoringView"
name="MonitoringView"
restorable="true">
</view>
<view
class="org.universaal.tools.dashboard.views.OverviewView"
id="org.universaal.tools.dashboard.views.OverviewView"
name="OverviewView"
restorable="true">
</view>
<view
class="org.universaal.tools.dashboard.views.StatemachineView"
id="org.universaal.tools.dashboard.views.StatemachineView"
name="StatemachineView"
restorable="true">
</view>
</extension>
</plugin>
......@@ -4,15 +4,12 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle.
* The activator class controls the plug-in life cycle
*/
//I am pretty sure that we are not to mess about with this one!
public class Activator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "com.sintef.universaal.developmenttools.dashboard"; //$NON-NLS-1$
public static final String PLUGIN_ID = "org.universaal.tools.dashboard"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
......
package org.universaal.tools.dashboard.perspectives;
package org.universaal.tools.dashboard.perspective;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
public class DashboardPerspectiveFactory implements IPerspectiveFactory {
/**
* Just to keep it simple.
*/
private static final String OVERVIEW_VIEW = "com.sintef.universaal.developmenttools.dashboard.views.OverviewView";
private static final String MONITORING_VIEW = "com.sintef.universaal.developmenttools.dashboard.views.MonitoringView";
private static final String STATEMACHINE_VIEW = "com.sintef.universaal.developmenttools.dashboard.views.StatemachineView";
private static final String OVERVIEW_VIEW = "org.universaal.tools.dashboard.views.OverviewView";
private static final String MONITORING_VIEW = "org.universaal.tools.dashboard.views.MonitoringView";
private static final String STATEMACHINE_VIEW = "org.universaal.tools.dashboard.views.StatemachineView";
/**
* This method creates the initial layout of the perspective. Views are added to the perspective; around the editor, which is obligatory.
......@@ -26,5 +26,4 @@ public class DashboardPerspectiveFactory implements IPerspectiveFactory {
myLayout.addView(OVERVIEW_VIEW, IPageLayout.LEFT, 0.20f, myLayout.getEditorArea());
myLayout.addView(MONITORING_VIEW, IPageLayout.RIGHT, 0.80f, myLayout.getEditorArea());
}
}
......@@ -14,8 +14,9 @@ import org.eclipse.ui.part.ViewPart;
public class MonitoringView extends ViewPart {
private TableViewer viewer;
private TableViewer viewer;
class ViewContentProvider implements IStructuredContentProvider {
public void inputChanged(Viewer v, Object oldInput, Object newInput) {}
......@@ -54,4 +55,5 @@ public class MonitoringView extends ViewPart {
public void setFocus() {
viewer.getControl().setFocus();
}
}
......@@ -14,6 +14,8 @@ public class OverviewView extends ViewPart {
private Button button01;
private Button button02;
//TODO Fix listners
private static Listener button01Listener;
private static Listener button02Listener;
......@@ -29,25 +31,26 @@ public class OverviewView extends ViewPart {
button01.setText("First button");
//TODO make sensible event!
button01Listener = new Listener() {
/* button01Listener = new Listener() {
public void handleEvent(Event event) {
}
};
};*/
button01.addListener(SWT.Selection, button01Listener);
// button01.addListener(SWT.Selection, button01Listener);
button02 = new Button(canvas, SWT.PUSH);
button02.setBounds(10, 50, 100, 50);
button02.setText("Second button");
button02.addListener(SWT.Selection, button02Listener);
// button02.addListener(SWT.Selection, button02Listener);
}
@Override
public void setFocus() {}
}
......@@ -11,12 +11,13 @@ import org.eclipse.ui.part.ViewPart;
public class StatemachineView extends ViewPart {
private boolean pressed = false;
private boolean pressed = false;
public StatemachineView() {
//TODO Auto-generated constructor stub
}
/**
* So far only a little printing.
*/
......@@ -49,4 +50,5 @@ public class StatemachineView extends ViewPart {
@Override
public void setFocus() {}
}
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