From b7272b3248f71353ede625a12e20f600896a41f6 Mon Sep 17 00:00:00 2001 From: Steve Harris Date: Wed, 30 Apr 2014 13:59:33 -0500 Subject: [PATCH] Omaha #3085 - moved com.raytheon.uf.viz.application and com.raytheon.uf.viz.application.feature to core Former-commit-id: 839a926dca01566419409138e9810f14e0e46b84 --- .../.project | 17 -- .../build.properties | 1 - .../feature.xml | 219 ------------------ .../.classpath | 7 - cave/com.raytheon.uf.viz.application/.project | 28 --- .../.settings/org.eclipse.jdt.core.prefs | 8 - .../META-INF/MANIFEST.MF | 13 -- .../build.properties | 6 - .../com.raytheon.uf.viz.application.ecl | 0 .../plugin.xml | 34 --- .../schema/component.exsd | 109 --------- .../uf/viz/application/Activator.java | 50 ---- .../uf/viz/application/VizApplication.java | 168 -------------- .../component/IStandaloneComponent.java | 52 ----- 14 files changed, 712 deletions(-) delete mode 100644 cave/com.raytheon.uf.viz.application.feature/.project delete mode 100644 cave/com.raytheon.uf.viz.application.feature/build.properties delete mode 100644 cave/com.raytheon.uf.viz.application.feature/feature.xml delete mode 100644 cave/com.raytheon.uf.viz.application/.classpath delete mode 100644 cave/com.raytheon.uf.viz.application/.project delete mode 100644 cave/com.raytheon.uf.viz.application/.settings/org.eclipse.jdt.core.prefs delete mode 100644 cave/com.raytheon.uf.viz.application/META-INF/MANIFEST.MF delete mode 100644 cave/com.raytheon.uf.viz.application/build.properties delete mode 100644 cave/com.raytheon.uf.viz.application/com.raytheon.uf.viz.application.ecl delete mode 100644 cave/com.raytheon.uf.viz.application/plugin.xml delete mode 100644 cave/com.raytheon.uf.viz.application/schema/component.exsd delete mode 100644 cave/com.raytheon.uf.viz.application/src/com/raytheon/uf/viz/application/Activator.java delete mode 100644 cave/com.raytheon.uf.viz.application/src/com/raytheon/uf/viz/application/VizApplication.java delete mode 100644 cave/com.raytheon.uf.viz.application/src/com/raytheon/uf/viz/application/component/IStandaloneComponent.java diff --git a/cave/com.raytheon.uf.viz.application.feature/.project b/cave/com.raytheon.uf.viz.application.feature/.project deleted file mode 100644 index 6cf8f7ba22..0000000000 --- a/cave/com.raytheon.uf.viz.application.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - com.raytheon.uf.viz.application.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/cave/com.raytheon.uf.viz.application.feature/build.properties b/cave/com.raytheon.uf.viz.application.feature/build.properties deleted file mode 100644 index 64f93a9f0b..0000000000 --- a/cave/com.raytheon.uf.viz.application.feature/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/cave/com.raytheon.uf.viz.application.feature/feature.xml b/cave/com.raytheon.uf.viz.application.feature/feature.xml deleted file mode 100644 index 4d17db91fa..0000000000 --- a/cave/com.raytheon.uf.viz.application.feature/feature.xml +++ /dev/null @@ -1,219 +0,0 @@ - - - - - [Enter Feature Description here.] - - - - [Enter Copyright Description here.] - - - - [Enter License Description here.] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cave/com.raytheon.uf.viz.application/.classpath b/cave/com.raytheon.uf.viz.application/.classpath deleted file mode 100644 index ad32c83a78..0000000000 --- a/cave/com.raytheon.uf.viz.application/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/cave/com.raytheon.uf.viz.application/.project b/cave/com.raytheon.uf.viz.application/.project deleted file mode 100644 index 15db18387e..0000000000 --- a/cave/com.raytheon.uf.viz.application/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - com.raytheon.uf.viz.application - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/cave/com.raytheon.uf.viz.application/.settings/org.eclipse.jdt.core.prefs b/cave/com.raytheon.uf.viz.application/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index d308c498e1..0000000000 --- a/cave/com.raytheon.uf.viz.application/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Fri Apr 29 08:20:12 CDT 2011 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/cave/com.raytheon.uf.viz.application/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.application/META-INF/MANIFEST.MF deleted file mode 100644 index 9a91744e1f..0000000000 --- a/cave/com.raytheon.uf.viz.application/META-INF/MANIFEST.MF +++ /dev/null @@ -1,13 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Application -Bundle-SymbolicName: com.raytheon.uf.viz.application;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-Activator: com.raytheon.uf.viz.application.Activator -Bundle-Vendor: RAYTHEON -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Bundle-ActivationPolicy: lazy -Export-Package: com.raytheon.uf.viz.application, - com.raytheon.uf.viz.application.component diff --git a/cave/com.raytheon.uf.viz.application/build.properties b/cave/com.raytheon.uf.viz.application/build.properties deleted file mode 100644 index 3595411e85..0000000000 --- a/cave/com.raytheon.uf.viz.application/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - schema/ diff --git a/cave/com.raytheon.uf.viz.application/com.raytheon.uf.viz.application.ecl b/cave/com.raytheon.uf.viz.application/com.raytheon.uf.viz.application.ecl deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/cave/com.raytheon.uf.viz.application/plugin.xml b/cave/com.raytheon.uf.viz.application/plugin.xml deleted file mode 100644 index a61bf9c04c..0000000000 --- a/cave/com.raytheon.uf.viz.application/plugin.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/cave/com.raytheon.uf.viz.application/schema/component.exsd b/cave/com.raytheon.uf.viz.application/schema/component.exsd deleted file mode 100644 index 56afe95992..0000000000 --- a/cave/com.raytheon.uf.viz.application/schema/component.exsd +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - [Enter description of this extension point.] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [Enter the first release in which this extension point appears.] - - - - - - - - - [Enter extension point usage example here.] - - - - - - - - - [Enter API information here.] - - - - - - - - - [Enter information about supplied implementation of this extension point.] - - - - - diff --git a/cave/com.raytheon.uf.viz.application/src/com/raytheon/uf/viz/application/Activator.java b/cave/com.raytheon.uf.viz.application/src/com/raytheon/uf/viz/application/Activator.java deleted file mode 100644 index 324d265f0c..0000000000 --- a/cave/com.raytheon.uf.viz.application/src/com/raytheon/uf/viz/application/Activator.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.raytheon.uf.viz.application; - -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 = "com.raytheon.uf.viz.application"; //$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; - } - -} diff --git a/cave/com.raytheon.uf.viz.application/src/com/raytheon/uf/viz/application/VizApplication.java b/cave/com.raytheon.uf.viz.application/src/com/raytheon/uf/viz/application/VizApplication.java deleted file mode 100644 index 751236b7ee..0000000000 --- a/cave/com.raytheon.uf.viz.application/src/com/raytheon/uf/viz/application/VizApplication.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ - -package com.raytheon.uf.viz.application; - -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.TimeZone; - -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IExtension; -import org.eclipse.core.runtime.IExtensionPoint; -import org.eclipse.core.runtime.IExtensionRegistry; -import org.eclipse.core.runtime.Platform; -import org.eclipse.equinox.app.IApplication; -import org.eclipse.equinox.app.IApplicationContext; - -import com.raytheon.uf.viz.application.component.IStandaloneComponent; - -/** - * Defines the Application context - * - *
- * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Apr 18, 2007            chammack    Initial Creation.
- * Dec 03, 2007 461        bphillip    Added persistence of workstation time to localization
- * Oct 07, 2008 1433       chammack    Added alertviz startup
- * Nov 27, 2013            mschenke    Removed ProgramArguments to make dependencies cleaner
- * Jan 23, 2014            njensen     Added shutdown hook and printout
- * 
- * 
- * - * @author chammack - * @version 1.0 - */ - -public class VizApplication implements IApplication { - - /* - * (non-Javadoc) - * - * @seeorg.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app. - * IApplicationContext) - */ - @Override - public Object start(IApplicationContext context) throws Exception { - String appToRun = null; - String[] arguments = Platform.getApplicationArgs(); - for (int i = 0; i < arguments.length; ++i) { - if ("-component".equals(arguments[i])) { - if (i < (arguments.length - 1)) { - appToRun = arguments[i + 1]; - } - break; - } - } - - IStandaloneComponent component = null; - - if (appToRun == null) { - System.out.println("No component specified, defaulting to 'viz'"); - appToRun = "viz"; - } - - try { - component = getComponent(appToRun); - } catch (Exception e) { - e.printStackTrace(); - } - - if (component == null) { - System.err.println("No component by name: " + appToRun - + ", exiting..."); - return IApplication.EXIT_OK; - } - - addShutdownHook(); - - return component.startComponent(appToRun); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.equinox.app.IApplication#stop() - */ - @Override - public void stop() { - - } - - /** - * Run a component registered with the given name - * - * @param component - * the component key for the extension point - * com.raytheon.uf.viz.core.component - */ - private IStandaloneComponent getComponent(String component) - throws Exception { - IStandaloneComponent standalone = null; - // Search for a key that matches what was passed in - IExtensionRegistry registry = Platform.getExtensionRegistry(); - IExtensionPoint point = registry - .getExtensionPoint("com.raytheon.uf.viz.core.component"); - if (point != null) { - IExtension[] extensions = point.getExtensions(); - for (int i = 0; i < extensions.length && standalone == null; i++) { - IConfigurationElement[] config = extensions[i] - .getConfigurationElements(); - - for (int j = 0; j < config.length && standalone == null; j++) { - String key = config[j].getAttribute("key"); - if (key != null && key.equalsIgnoreCase(component)) { - standalone = (IStandaloneComponent) config[j] - .createExecutableExtension("class"); - } - } - } - } - - return standalone; - } - - protected void addShutdownHook() { - Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() { - @Override - public void run() { - /* - * This may seem pointless but is actually quite helpful to - * confirm how the process exited. If the process is killed by a - * kill command on a terminal, the console output will have this - * message but not the normal safe shutdown output (see - * com.raytheon.uf.viz.core.Activator's stop() and - * VizWorkbenchAdvisor's preShutdown()). In contrast, a - * spontaneous death of the process or force kill will not have - * this printout. - */ - SimpleDateFormat sdf = new SimpleDateFormat( - "yyyy-MM-dd HH:mm:ss"); - sdf.setTimeZone(TimeZone.getTimeZone("GMT")); - System.out.println(sdf.format(new Date()) - + " VizApplication's runtime shutdown hook triggered"); - } - }) { - - }); - } - -} diff --git a/cave/com.raytheon.uf.viz.application/src/com/raytheon/uf/viz/application/component/IStandaloneComponent.java b/cave/com.raytheon.uf.viz.application/src/com/raytheon/uf/viz/application/component/IStandaloneComponent.java deleted file mode 100644 index 22b806a55c..0000000000 --- a/cave/com.raytheon.uf.viz.application/src/com/raytheon/uf/viz/application/component/IStandaloneComponent.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.uf.viz.application.component; - -/** - * Interface for declaring standalone component, should be registered through - * plugin.xml extension point com.raytheon.uf.viz.core.component - * - *
- * 
- * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Nov 10, 2009            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ - -public interface IStandaloneComponent { - - /** - * Launch the standalone component, may involve opening a dialog or running - * a job, once this function returns, the application will exit - * - * @throws Exception - * any exception thrown will be treated as a critical exception - * and the application will exit, non critical exceptoins should - * be logged using UFStatus - */ - public Object startComponent(String componentName) throws Exception; - -}