--- /dev/null
+package org.argeo.slc.client.rap;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.application.ActionBarAdvisor;
+import org.eclipse.ui.application.IActionBarConfigurer;
+
+/**
+ * Creates, adds and disposes actions for the menus and action bars of
+ * each workbench window.
+ */
+public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
+
+ public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
+ super(configurer);
+ }
+
+ protected void makeActions(IWorkbenchWindow window) {
+ }
+
+ protected void fillMenuBar(IMenuManager menuBar) {
+ }
+
+}
--- /dev/null
+package org.argeo.slc.client.rap;
+
+import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
+import org.eclipse.ui.application.WorkbenchAdvisor;
+import org.eclipse.ui.application.WorkbenchWindowAdvisor;
+
+/**
+ * This workbench advisor creates the window advisor, and specifies
+ * the perspective id for the initial window.
+ */
+public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
+
+ private static final String PERSPECTIVE_ID = "org.argeo.slc.client.ui.perspectives.slcExecution";
+
+ public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
+ return new ApplicationWorkbenchWindowAdvisor(configurer);
+ }
+
+ public String getInitialWindowPerspectiveId() {
+ return PERSPECTIVE_ID;
+ }
+}
--- /dev/null
+package org.argeo.slc.client.rap;
+
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.application.ActionBarAdvisor;
+import org.eclipse.ui.application.IActionBarConfigurer;
+import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
+import org.eclipse.ui.application.WorkbenchWindowAdvisor;
+
+/**
+ * Configures the initial size and appearance of a workbench window.
+ */
+public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
+
+ public ApplicationWorkbenchWindowAdvisor(
+ IWorkbenchWindowConfigurer configurer) {
+ super(configurer);
+ }
+
+ public ActionBarAdvisor createActionBarAdvisor(
+ IActionBarConfigurer configurer) {
+ return new ApplicationActionBarAdvisor(configurer);
+ }
+
+ public void preWindowOpen() {
+ IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
+ configurer.setInitialSize(new Point(1200, 900));
+ configurer.setShowCoolBar(false);
+ configurer.setShowStatusLine(false);
+ }
+}
--- /dev/null
+package org.argeo.slc.client.rap;
+
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+
+/**
+ * Configures the perspective layout. This class is contributed
+ * through the plugin.xml.
+ */
+public class Perspective implements IPerspectiveFactory {
+
+ public void createInitialLayout(IPageLayout layout) {
+ }
+}
--- /dev/null
+package org.argeo.slc.client.rap;
+
+import org.eclipse.rwt.lifecycle.IEntryPoint;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.application.WorkbenchAdvisor;
+
+/**
+ * This class controls all aspects of the application's execution
+ * and is contributed through the plugin.xml.
+ */
+public class SlcClientRapApplication implements IEntryPoint {
+
+ public int createUI() {
+ Display display = PlatformUI.createDisplay();
+ WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
+ return PlatformUI.createAndRunWorkbench( display, advisor );
+ }
+}
--- /dev/null
+package org.argeo.slc.client.rap;\r
+\r
+import org.eclipse.jface.resource.ImageDescriptor;\r
+import org.eclipse.ui.plugin.AbstractUIPlugin;\r
+import org.osgi.framework.BundleContext;\r
+\r
+/**\r
+ * The activator class controls the plug-in life cycle\r
+ */\r
+public class SlcClientRapPlugin extends AbstractUIPlugin {\r
+\r
+ // The plug-in ID\r
+ public static final String PLUGIN_ID = "org.argeo.slc.client.rap"; //$NON-NLS-1$\r
+\r
+ // The shared instance\r
+ private static SlcClientRapPlugin plugin;\r
+\r
+ /**\r
+ * The constructor\r
+ */\r
+ public SlcClientRapPlugin() {\r
+ }\r
+\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext\r
+ * )\r
+ */\r
+ public void start(BundleContext context) throws Exception {\r
+ super.start(context);\r
+ plugin = this;\r
+ }\r
+\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext\r
+ * )\r
+ */\r
+ public void stop(BundleContext context) throws Exception {\r
+ plugin = null;\r
+ super.stop(context);\r
+ }\r
+\r
+ /**\r
+ * Returns the shared instance\r
+ * \r
+ * @return the shared instance\r
+ */\r
+ public static SlcClientRapPlugin getDefault() {\r
+ return plugin;\r
+ }\r
+\r
+ /**\r
+ * Returns an image descriptor for the image file at the given plug-in\r
+ * relative path\r
+ * \r
+ * @param path\r
+ * the path\r
+ * @return the image descriptor\r
+ */\r
+ public static ImageDescriptor getImageDescriptor(String path) {\r
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);\r
+ }\r
+}\r