directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r986618 - in /directory/sandbox/kayyagari/studio-http: ./ META-INF/ src/ src/studio_http/ src/studiohttp/
Date Wed, 18 Aug 2010 10:12:28 GMT
Author: kayyagari
Date: Wed Aug 18 10:12:27 2010
New Revision: 986618

URL: http://svn.apache.org/viewvc?rev=986618&view=rev
Log:
o experimenting for a web based studio

Added:
    directory/sandbox/kayyagari/studio-http/   (with props)
    directory/sandbox/kayyagari/studio-http/META-INF/
    directory/sandbox/kayyagari/studio-http/META-INF/MANIFEST.MF
    directory/sandbox/kayyagari/studio-http/build.properties
    directory/sandbox/kayyagari/studio-http/plugin.xml
    directory/sandbox/kayyagari/studio-http/src/
    directory/sandbox/kayyagari/studio-http/src/studio_http/
    directory/sandbox/kayyagari/studio-http/src/studio_http/Activator.java
    directory/sandbox/kayyagari/studio-http/src/studiohttp/
    directory/sandbox/kayyagari/studio-http/src/studiohttp/ApplicationActionBarAdvisor.java
    directory/sandbox/kayyagari/studio-http/src/studiohttp/ApplicationWorkbenchAdvisor.java
    directory/sandbox/kayyagari/studio-http/src/studiohttp/ApplicationWorkbenchWindowAdvisor.java
    directory/sandbox/kayyagari/studio-http/src/studiohttp/HttpStudio.java
    directory/sandbox/kayyagari/studio-http/src/studiohttp/Perspective.java
    directory/sandbox/kayyagari/studio-http/src/studiohttp/View.java
    directory/sandbox/kayyagari/studio-http/studio-http.launch

Propchange: directory/sandbox/kayyagari/studio-http/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Aug 18 10:12:27 2010
@@ -0,0 +1,2 @@
+bin
+.settings

Added: directory/sandbox/kayyagari/studio-http/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/studio-http/META-INF/MANIFEST.MF?rev=986618&view=auto
==============================================================================
--- directory/sandbox/kayyagari/studio-http/META-INF/MANIFEST.MF (added)
+++ directory/sandbox/kayyagari/studio-http/META-INF/MANIFEST.MF Wed Aug 18 10:12:27 2010
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Studio-http
+Bundle-SymbolicName: studio-http; singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: studio_http.Activator
+Require-Bundle: org.eclipse.rap.ui
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: javax.servlet;version="2.4.0",
+ javax.servlet.http;version="2.4.0"

Added: directory/sandbox/kayyagari/studio-http/build.properties
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/studio-http/build.properties?rev=986618&view=auto
==============================================================================
--- directory/sandbox/kayyagari/studio-http/build.properties (added)
+++ directory/sandbox/kayyagari/studio-http/build.properties Wed Aug 18 10:12:27 2010
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+               META-INF/,\
+               .

Added: directory/sandbox/kayyagari/studio-http/plugin.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/studio-http/plugin.xml?rev=986618&view=auto
==============================================================================
--- directory/sandbox/kayyagari/studio-http/plugin.xml (added)
+++ directory/sandbox/kayyagari/studio-http/plugin.xml Wed Aug 18 10:12:27 2010
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+   <extension
+         point="org.eclipse.rap.ui.entrypoint">
+      <entrypoint
+            class="studiohttp.HttpStudio"
+            parameter="view"
+            id="studiohttp.HttpStudio">
+      </entrypoint>
+   </extension>
+   <extension
+         point="org.eclipse.ui.perspectives">
+      <perspective
+            name="RAP Perspective"
+            class="studiohttp.Perspective"
+            id="studio-http.perspective">
+      </perspective>
+   </extension>
+   <extension
+         point="org.eclipse.ui.views">
+      <view
+            name="View"
+            class="studiohttp.View"
+            id="studio-http.view">
+      </view>
+   </extension>
+   <extension
+         point="org.eclipse.rap.ui.branding">
+      <branding
+            servletName="view"
+            themeId="org.eclipse.rap.design.example.fancy.theme"
+            defaultEntrypointId="studiohttp.HttpStudio"
+            title="RAP Single View"
+            id="studiohttp.branding">
+      </branding>
+   </extension>
+
+</plugin>

Added: directory/sandbox/kayyagari/studio-http/src/studio_http/Activator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/studio-http/src/studio_http/Activator.java?rev=986618&view=auto
==============================================================================
--- directory/sandbox/kayyagari/studio-http/src/studio_http/Activator.java (added)
+++ directory/sandbox/kayyagari/studio-http/src/studio_http/Activator.java Wed Aug 18 10:12:27
2010
@@ -0,0 +1,61 @@
+package studio_http;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "studio-http"; //$NON-NLS-1$
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+	/**
+	 * Returns an image descriptor for the image file at the given
+	 * plug-in relative path
+	 *
+	 * @param path the path
+	 * @return the image descriptor
+	 */
+	public static ImageDescriptor getImageDescriptor(String path) {
+		return imageDescriptorFromPlugin(PLUGIN_ID, path);
+	}
+}

Added: directory/sandbox/kayyagari/studio-http/src/studiohttp/ApplicationActionBarAdvisor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/studio-http/src/studiohttp/ApplicationActionBarAdvisor.java?rev=986618&view=auto
==============================================================================
--- directory/sandbox/kayyagari/studio-http/src/studiohttp/ApplicationActionBarAdvisor.java
(added)
+++ directory/sandbox/kayyagari/studio-http/src/studiohttp/ApplicationActionBarAdvisor.java
Wed Aug 18 10:12:27 2010
@@ -0,0 +1,41 @@
+package studiohttp;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+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);
+	}
+
+	// Actions - important to allocate these only in makeActions, and then use
+	// them in the fill methods. This ensures that the actions aren't recreated
+	// in the fill methods. 
+	private IWorkbenchAction exitAction;
+
+	protected void makeActions(IWorkbenchWindow window) {
+		// Creates the actions and registers them. Registering also 
+		// provides automatic disposal of the actions when the window is closed.
+		exitAction = ActionFactory.QUIT.create(window);
+		register(exitAction);
+	}
+
+	protected void fillMenuBar(IMenuManager menuBar) {
+		MenuManager fileMenu 
+		= new MenuManager("&File",IWorkbenchActionConstants.M_FILE);
+		menuBar.add(fileMenu);
+		fileMenu.add(exitAction);
+	}
+
+}

Added: directory/sandbox/kayyagari/studio-http/src/studiohttp/ApplicationWorkbenchAdvisor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/studio-http/src/studiohttp/ApplicationWorkbenchAdvisor.java?rev=986618&view=auto
==============================================================================
--- directory/sandbox/kayyagari/studio-http/src/studiohttp/ApplicationWorkbenchAdvisor.java
(added)
+++ directory/sandbox/kayyagari/studio-http/src/studiohttp/ApplicationWorkbenchAdvisor.java
Wed Aug 18 10:12:27 2010
@@ -0,0 +1,22 @@
+package studiohttp;
+
+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 = "studio-http.perspective";
+
+    public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer
configurer) {
+        return new ApplicationWorkbenchWindowAdvisor(configurer);
+    }
+
+	public String getInitialWindowPerspectiveId() {
+		return PERSPECTIVE_ID;
+	}
+}

Added: directory/sandbox/kayyagari/studio-http/src/studiohttp/ApplicationWorkbenchWindowAdvisor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/studio-http/src/studiohttp/ApplicationWorkbenchWindowAdvisor.java?rev=986618&view=auto
==============================================================================
--- directory/sandbox/kayyagari/studio-http/src/studiohttp/ApplicationWorkbenchWindowAdvisor.java
(added)
+++ directory/sandbox/kayyagari/studio-http/src/studiohttp/ApplicationWorkbenchWindowAdvisor.java
Wed Aug 18 10:12:27 2010
@@ -0,0 +1,29 @@
+package studiohttp;
+
+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(400, 300));
+        configurer.setShowCoolBar(false);
+        configurer.setShowStatusLine(false);
+        configurer.setTitle("Studio on web using RAP");
+    }
+}

Added: directory/sandbox/kayyagari/studio-http/src/studiohttp/HttpStudio.java
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/studio-http/src/studiohttp/HttpStudio.java?rev=986618&view=auto
==============================================================================
--- directory/sandbox/kayyagari/studio-http/src/studiohttp/HttpStudio.java (added)
+++ directory/sandbox/kayyagari/studio-http/src/studiohttp/HttpStudio.java Wed Aug 18 10:12:27
2010
@@ -0,0 +1,19 @@
+package studiohttp;
+
+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 HttpStudio implements IEntryPoint {
+
+  public int createUI() {
+    Display display = PlatformUI.createDisplay();
+    WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
+    return PlatformUI.createAndRunWorkbench( display, advisor );
+  }
+}

Added: directory/sandbox/kayyagari/studio-http/src/studiohttp/Perspective.java
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/studio-http/src/studiohttp/Perspective.java?rev=986618&view=auto
==============================================================================
--- directory/sandbox/kayyagari/studio-http/src/studiohttp/Perspective.java (added)
+++ directory/sandbox/kayyagari/studio-http/src/studiohttp/Perspective.java Wed Aug 18 10:12:27
2010
@@ -0,0 +1,20 @@
+package studiohttp;
+
+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) {
+		String editorArea = layout.getEditorArea();
+		layout.setEditorAreaVisible(false);
+		layout.setFixed(true);
+
+		layout.addStandaloneView(View.ID, false, IPageLayout.LEFT, 1.0f,
+				editorArea);
+	}
+}

Added: directory/sandbox/kayyagari/studio-http/src/studiohttp/View.java
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/studio-http/src/studiohttp/View.java?rev=986618&view=auto
==============================================================================
--- directory/sandbox/kayyagari/studio-http/src/studiohttp/View.java (added)
+++ directory/sandbox/kayyagari/studio-http/src/studiohttp/View.java Wed Aug 18 10:12:27 2010
@@ -0,0 +1,73 @@
+package studiohttp;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.ViewPart;
+
+public class View extends ViewPart {
+	public static final String ID = "studio-http.view";
+
+	private TableViewer viewer;
+
+	/**
+	 * The content provider class is responsible for providing objects to the
+	 * view. It can wrap existing objects in adapters or simply return objects
+	 * as-is. These objects may be sensitive to the current input of the view,
+	 * or ignore it and always show the same content (like Task List, for
+	 * example).
+	 */
+	class ViewContentProvider implements IStructuredContentProvider {
+		public void inputChanged(Viewer v, Object oldInput, Object newInput) {
+		}
+
+		public void dispose() {
+		}
+
+		public Object[] getElements(Object parent) {
+			return new String[] { "One", "Two", "Three" };
+		}
+	}
+
+	class ViewLabelProvider extends LabelProvider implements
+			ITableLabelProvider {
+		public String getColumnText(Object obj, int index) {
+			return getText(obj);
+		}
+
+		public Image getColumnImage(Object obj, int index) {
+			return getImage(obj);
+		}
+
+		public Image getImage(Object obj) {
+			return PlatformUI.getWorkbench().getSharedImages().getImage(
+					ISharedImages.IMG_OBJ_ELEMENT);
+		}
+	}
+
+	/**
+	 * This is a callback that will allow us to create the viewer and initialize
+	 * it.
+	 */
+	public void createPartControl(Composite parent) {
+		int style = SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL;
+		viewer = new TableViewer(parent, style);
+		viewer.setContentProvider(new ViewContentProvider());
+		viewer.setLabelProvider(new ViewLabelProvider());
+		viewer.setInput(getViewSite());
+	}
+
+	/**
+	 * Passing the focus request to the viewer's control.
+	 */
+	public void setFocus() {
+		viewer.getControl().setFocus();
+	}
+}
\ No newline at end of file

Added: directory/sandbox/kayyagari/studio-http/studio-http.launch
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/studio-http/studio-http.launch?rev=986618&view=auto
==============================================================================
--- directory/sandbox/kayyagari/studio-http/studio-http.launch (added)
+++ directory/sandbox/kayyagari/studio-http/studio-http.launch Wed Aug 18 10:12:27 2010
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.rap.ui.launch.RAPLauncher">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="automaticAdd" value="false"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/studio-http"/>
+<booleanAttribute key="default_auto_start" value="true"/>
+<intAttribute key="default_start_level" value="4"/>
+<booleanAttribute key="includeOptional" value="false"/>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os}
-ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -console -consolelog"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.ignoreApp=true
-Dosgi.noShutdown=true -Dorg.eclipse.rwt.compression=true -Dorg.eclipse.equinox.http.jetty.log.stderr.threshold=info"/>
+<stringAttribute key="org.eclipse.rap.launch.browserMode" value="INTERNAL"/>
+<stringAttribute key="org.eclipse.rap.launch.entryPoint" value="view"/>
+<stringAttribute key="org.eclipse.rap.launch.libraryVariant" value="STANDARD"/>
+<stringAttribute key="org.eclipse.rap.launch.logLevel" value="OFF"/>
+<intAttribute key="org.eclipse.rap.launch.port" value="10080"/>
+<stringAttribute key="org.eclipse.rap.launch.servletName" value="view"/>
+<booleanAttribute key="org.eclipse.rap.launch.terminatePrevious" value="true"/>
+<booleanAttribute key="org.eclipse.rap.launch.useManualPort" value="false"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="target_bundles" value="com.ibm.icu.base@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.databinding.beans@default:default,javax.servlet@default:default,org.apache.commons.logging@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi@default:default,org.eclipse.osgi.services@default:default,org.eclipse.rap.demo@default:default,org.eclipse.rap.demo.databinding@default:default,org.eclipse.rap.jface@default:default,org.eclips
 e.rap.jface.databinding@default:default,org.eclipse.rap.rwt@default:default,org.eclipse.rap.rwt.q07@default:default,org.eclipse.rap.source@default:default,org.eclipse.rap.design.example@default:default,org.eclipse.rap.ui@default:default,org.eclipse.rap.ui.forms@default:default,org.eclipse.rap.ui.views@default:default,org.eclipse.rap.ui.workbench@default:default,org.mortbay.jetty.server@default:default,org.mortbay.jetty.util@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.help@default:default"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<stringAttribute key="workspace_bundles" value="studio-http@default:default"/>
+</launchConfiguration>



Mime
View raw message