avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oberh...@apache.org
Subject svn commit: rev 37416 - in avalon/trunk/central/laboratory/studio/eclipse/test: . src src/org src/org/apache src/org/apache/metro src/org/apache/metro/studio src/org/apache/metro/studio/eclipse src/org/apache/metro/studio/eclipse/tests
Date Thu, 02 Sep 2004 20:14:28 GMT
Author: oberhack
Date: Thu Sep  2 13:14:28 2004
New Revision: 37416

Added:
   avalon/trunk/central/laboratory/studio/eclipse/test/   (props changed)
   avalon/trunk/central/laboratory/studio/eclipse/test/build.properties
   avalon/trunk/central/laboratory/studio/eclipse/test/plugin.xml
   avalon/trunk/central/laboratory/studio/eclipse/test/src/
   avalon/trunk/central/laboratory/studio/eclipse/test/src/org/
   avalon/trunk/central/laboratory/studio/eclipse/test/src/org/apache/
   avalon/trunk/central/laboratory/studio/eclipse/test/src/org/apache/metro/
   avalon/trunk/central/laboratory/studio/eclipse/test/src/org/apache/metro/studio/
   avalon/trunk/central/laboratory/studio/eclipse/test/src/org/apache/metro/studio/eclipse/
   avalon/trunk/central/laboratory/studio/eclipse/test/src/org/apache/metro/studio/eclipse/tests/
   avalon/trunk/central/laboratory/studio/eclipse/test/src/org/apache/metro/studio/eclipse/tests/MetroStudioTests.java
Log:


Added: avalon/trunk/central/laboratory/studio/eclipse/test/build.properties
==============================================================================
--- (empty file)
+++ avalon/trunk/central/laboratory/studio/eclipse/test/build.properties	Thu Sep  2 13:14:28
2004
@@ -0,0 +1,4 @@
+source.MetroStudioTests.jar = src/
+output.MetroStudioTests.jar = bin/
+bin.includes = plugin.xml,\
+               MetroStudioTests.jar

Added: avalon/trunk/central/laboratory/studio/eclipse/test/plugin.xml
==============================================================================
--- (empty file)
+++ avalon/trunk/central/laboratory/studio/eclipse/test/plugin.xml	Thu Sep  2 13:14:28 2004
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin
+   id="org.apache.metro.studio.tests"
+   name="Metro Studio Tests"
+   version="0.1.0"
+   provider-name="Apache Software Foundation"
+   class="org.apache.metro.studio.eclipse.tests.MetroStudioTests">
+
+   <runtime>
+      <library name="MetroStudioTests.jar">
+         <export name="*"/>
+      </library>
+   </runtime>
+
+   <requires>
+      <import plugin="org.eclipse.ui"/>
+      <import plugin="org.eclipse.core.runtime"/>
+   </requires>
+
+</plugin>

Added: avalon/trunk/central/laboratory/studio/eclipse/test/src/org/apache/metro/studio/eclipse/tests/MetroStudioTests.java
==============================================================================
--- (empty file)
+++ avalon/trunk/central/laboratory/studio/eclipse/test/src/org/apache/metro/studio/eclipse/tests/MetroStudioTests.java
Thu Sep  2 13:14:28 2004
@@ -0,0 +1,69 @@
+package org.apache.metro.studio.eclipse.tests;
+
+import org.eclipse.ui.plugin.*;
+import org.osgi.framework.BundleContext;
+import java.util.*;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class MetroStudioTests extends AbstractUIPlugin {
+	//The shared instance.
+	private static MetroStudioTests plugin;
+	//Resource bundle.
+	private ResourceBundle resourceBundle;
+	
+	/**
+	 * The constructor.
+	 */
+	public MetroStudioTests() {
+		super();
+		plugin = this;
+		try {
+			resourceBundle = ResourceBundle.getBundle("org.apache.metro.studio.eclipse.tests.MetroStudioTestsResources");
+		} catch (MissingResourceException x) {
+			resourceBundle = null;
+		}
+	}
+
+	/**
+	 * This method is called upon plug-in activation
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+	}
+
+	/**
+	 * This method is called when the plug-in is stopped
+	 */
+	public void stop(BundleContext context) throws Exception {
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance.
+	 */
+	public static MetroStudioTests getDefault() {
+		return plugin;
+	}
+
+	/**
+	 * Returns the string from the plugin's resource bundle,
+	 * or 'key' if not found.
+	 */
+	public static String getResourceString(String key) {
+		ResourceBundle bundle = MetroStudioTests.getDefault().getResourceBundle();
+		try {
+			return (bundle != null) ? bundle.getString(key) : key;
+		} catch (MissingResourceException e) {
+			return key;
+		}
+	}
+
+	/**
+	 * Returns the plugin's resource bundle,
+	 */
+	public ResourceBundle getResourceBundle() {
+		return resourceBundle;
+	}
+}

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message