Merge branch 'omaha_14.4.1' into field_14.4.1. Conflicts resolved: VLab Issue #4129, #5421, #5345.

Conflicts:
	cave/com.raytheon.uf.viz.image.export/src/com/raytheon/uf/viz/image/export/dialog/ImageExportDialog.java
	cave/com.raytheon.uf.viz.image.export/src/com/raytheon/uf/viz/image/export/options/ImageExportOptions.java
	cave/com.raytheon.viz.feature.awips.developer/feature.xml
	edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/grid/dataset/alias/gfeParamInfo.xml
	edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/serverConfig.py

Change-Id: Ic838b8b0499b1022a555915c7264b414d6948895

Former-commit-id: 043bc3a8b7 [formerly 043bc3a8b7 [formerly 111ae763e6becb944e34e262e1d87d2d344236e4]]
Former-commit-id: 1823ed3596
Former-commit-id: d2d8127363
This commit is contained in:
Ana Rivera 2014-12-16 23:39:02 +00:00
commit f7c0319ee4
4622 changed files with 31273 additions and 472711 deletions

11
build/build.core/.project Normal file
View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>build.core</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>

View file

@ -0,0 +1,108 @@
/**
* 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.
**/
/**
* POJO-based representation of the contents of an Eclipse feature file.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 4, 2014 3836 bkowal Initial Commit
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
class Feature
{
private String feature
private String featureDirectory
/*
* The first iteration of the build will assume that when includes
* are present, there will not be any plugins or dependencies
* because we will be working with the product feature
*/
private List includesList
private List dependenciesList
private List pluginsList
public Feature(String feature, String featureDirectory)
{
this.feature = feature
this.featureDirectory = featureDirectory
this.includesList = []
this.dependenciesList = []
this.pluginsList = []
}
public String getFeature()
{
return this.feature
}
public String getFeatureDirectory()
{
return this.featureDirectory
}
public void addInclude(String includedFeature)
{
this.includesList.add(includedFeature)
}
public List getIncludes()
{
return this.includesList
}
public boolean hasIncludes()
{
return this.includesList.size() > 0
}
public void addDependency(String dependency)
{
this.dependenciesList.add(dependency)
}
public List getDependencies()
{
return this.dependenciesList
}
public boolean hasDependencies()
{
return this.dependenciesList.size() > 0
}
public void addPlugin(String plugin)
{
this.pluginsList.add(plugin)
}
public List getPlugins()
{
return this.pluginsList
}
}

View file

@ -0,0 +1,52 @@
/**
* 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.
**/
/**
* Parses an Eclipse feature file (feature.xml) and returns a POJO representation
* of the contents of the feature file.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 4, 2014 3836 bkowal Initial Commit
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
class FeatureParser
{
public static Feature parseFeature(String featureFile, String featureDirectory)
{
Feature feature = new Feature(featureFile, featureDirectory)
def featureXML = new XmlSlurper().parse(new File(featureFile))
featureXML.includes.each {feature.addInclude(it.attributes().id)}
featureXML.requires.import.each {feature.addDependency(it.attributes().feature)}
featureXML.plugin.each {feature.addPlugin(it.attributes().id)}
return feature
}
}

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>deploy.edex</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>

View file

@ -0,0 +1,51 @@
/**
* 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.
**/
/**
* Abstraction of a customized plugin deployer that provides access
* to a pre-configured groovy Ant Builder.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 4, 2014 3836 bkowal Initial Commit
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
abstract class AbstractAntBasedPluginCustomDeployer
implements IPluginCustomDeployer
{
protected AntBuilder ant
protected AbstractAntBasedPluginCustomDeployer()
{
this.ant = new AntBuilder()
// disable ant logging - based on:
// http://stackoverflow.com/questions/15143221/enable-verbose-output-from-groovys-antbuilder
this.ant.project.getBuildListeners().firstElement().setMessageOutputLevel(0)
}
}

View file

@ -0,0 +1,72 @@
/**
* 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.
**/
/**
* Abstraction of a customized plugin deployer that deploys
* plugin-specific files and directories that exist outside
* of the Java src directory. Files are deployed from
* the specified externalDirectory in the plugin (if it exists) to the
* specified destinationDirectoryTree located beneath the root edex directory.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 4, 2014 3836 bkowal Initial Commit
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
abstract class AbstractExternalPluginFilesDeployer
extends AbstractAntBasedPluginCustomDeployer {
private String externalDirectory
private String destinationDirectoryTree
protected AbstractExternalPluginFilesDeployer(String externalDirectory, String destinationDirectoryTree) {
super()
this.externalDirectory = externalDirectory
this.destinationDirectoryTree = destinationDirectoryTree
}
// Add plugin name if we want to add logging to this capability
protected void deployExternalFilesystem(String edexRootDirectory, String pluginFullPath)
{
String fullPluginExternalPath = pluginFullPath + File.separator + this.externalDirectory
// ensure that this plugin has an external directory
if (new File(fullPluginExternalPath).exists() == false)
{
return
}
String fullDestinationPath = edexRootDirectory + File.separator +
this.destinationDirectoryTree + File.separator + this.externalDirectory
// ensure that the destination directory exists
new File(fullDestinationPath).mkdirs()
// copy the files
ant.copy( todir : fullDestinationPath, overwrite : true )
{ fileset( dir : fullPluginExternalPath ) }
}
}

View file

@ -0,0 +1,61 @@
/**
* 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.
**/
/**
* Searches for and runs custom plugin-specific groovy scripts named plugin-deploy.groovy
* located directly within the plugin directory. The requirement is that the custom
* plugin deployments must only deploy files to a location relative to the EDEX root directory.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 4, 2014 3836 bkowal Initial Commit
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
class CustomDeploymentRunner
implements IPluginCustomDeployer {
private static final String PLUGIN_GROOVY_SCRIPT = "plugin-deploy.groovy"
private static final String BINDING_EDEX_ROOT = "__EDEX_ROOT__"
private static final String BINDING_PLUGIN = "__PLUGIN__"
private static final String BINDING_PLUGIN_PATH = "__PLUGIN_PATH__"
public void deploy(String edexRootDirectory, String plugin, String pluginFullPath) {
File groovyScript = new File(pluginFullPath + File.separator + PLUGIN_GROOVY_SCRIPT)
if (groovyScript.exists() == false) {
return
}
Binding binding = new Binding()
binding.setVariable(BINDING_EDEX_ROOT, edexRootDirectory)
binding.setVariable(BINDING_PLUGIN, plugin)
binding.setVariable(BINDING_PLUGIN_PATH, pluginFullPath)
def groovyShell = new GroovyShell(binding)
groovyShell.run(groovyScript)
}
}

View file

@ -0,0 +1,120 @@
/**
* 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.
**/
import groovy.util.logging.*
/**
* Deploys the EDEX esb scripts, libraries, and other files.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 4, 2014 3836 bkowal Initial Commit
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
@Log
class DeployESB
{
private static final String SETUP_ENV = "setup.env"
private DeployESB()
{
}
public static void deploy(String edexRootDirectory, String esbDirectory, String overrideArchitecture)
{
if (new File(esbDirectory).exists() == false)
{
log.log(java.util.logging.Level.SEVERE,
"The specified esb directory does not exist - " + esbDirectory)
System.exit(-1)
}
new File(edexRootDirectory).mkdirs()
// deploy the ESB directory structure.
AntBuilder ant = new AntBuilder()
ant.project.getBuildListeners().firstElement().setMessageOutputLevel(0)
log.info "Deploying ESB ..."
ant.copy( todir : edexRootDirectory,
overwrite : true )
{
fileset( dir : esbDirectory )
}
// remove setup.env
new File(edexRootDirectory + File.separator + "bin" + File.separator + SETUP_ENV).delete()
// remove lib_illusion
new File(edexRootDirectory + File.separator + "lib" + File.separator + "lib_illusion").deleteDir()
// copy the correct lib_illusion based on architecture
// determine architecture?
// since this is only a temporary consideration since we will eventually be switching to a 64-bit
// EDEX, we will just look at the OS architecture since the JDK does not provide a simple way
// to retrieve the required information about the JVM process, itself. The -Darchitecture argument
// can be used to override the dynamically determined architecture
String architecture = overrideArchitecture
if (architecture == "")
{
architecture =
(System.getProperty("os.arch") == "amd64") ? "x86_64" : "x86"
}
String esbLibIllusionPath = esbDirectory + File.separator + "lib" + File.separator +
"lib_illusion" + File.separator + architecture
if (new File(esbLibIllusionPath).exists() == false)
{
log.log(java.util.logging.Level.SEVERE,
"Unable to find the illusion lib associated with architecture - " + architecture)
System.exit(-1)
}
String libIllusionDestination = edexRootDirectory + File.separator +
"lib" + File.separator + "lib_illusion"
new File(libIllusionDestination).mkdirs()
ant.copy( todir : libIllusionDestination, overwrite : true )
{
fileset( dir : esbLibIllusionPath )
}
}
public static void deployEdexConfiguration(String edexRootDirectory, String esbDirectory)
{
final String setupEnvSrc = esbDirectory + File.separator + "bin" + File.separator + SETUP_ENV
final String destinationDirectory = edexRootDirectory + File.separator + "bin"
AntBuilder ant = new AntBuilder()
ant.project.getBuildListeners().firstElement().setMessageOutputLevel(0)
ant.copy( todir : destinationDirectory,
overwrite : true )
{
fileset( file : setupEnvSrc )
}
}
}

View file

@ -0,0 +1,53 @@
/**
* 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.
**/
/**
* Deploys plugin-provided localization files.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 4, 2014 3836 bkowal Initial Commit
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
class DeployEdexLocalization
extends AbstractExternalPluginFilesDeployer
{
private static final String destinationDirectory = "utility"
private static final String destinationDirectoryTree = "data"
public DeployEdexLocalization()
{
super(destinationDirectory, destinationDirectoryTree)
}
public void deploy(String edexRootDirectory, String plugin, String pluginFullPath)
{
super.deployExternalFilesystem(edexRootDirectory, pluginFullPath)
}
}

View file

@ -0,0 +1,53 @@
/**
* 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.
**/
/**
* Deploys plugin-provided resource (properties) files.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 4, 2014 3836 bkowal Initial Commit
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
class DeployEdexResources
extends AbstractExternalPluginFilesDeployer
{
private static final String destinationDirectory = "resources"
private static final String destinationDirectoryTree = "conf"
public DeployEdexResources()
{
super(destinationDirectory, destinationDirectoryTree)
}
public void deploy(String edexRootDirectory, String plugin, String pluginFullPath)
{
super.deployExternalFilesystem(edexRootDirectory, pluginFullPath)
}
}

View file

@ -0,0 +1,73 @@
/**
* 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.
**/
import groovy.util.logging.*
import ProjectInformation
/**
* Deploys the sample EDEX localization files when requested.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 4, 2014 3836 bkowal Initial Commit
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
@Log
class DeployEdexSiteLocalization
{
private static final String EDEX_LOCALIZATION_DIRECTORY = "data" + File.separator +
"utility"
private DeployEdexSiteLocalization()
{
}
public static void deploy(String edexRootDirectory, ProjectInformation projectInformation, String site)
{
if (projectInformation == null)
{
log.log(java.util.logging.Level.WARNING,
"Unable to find the localization project associated with site " + site +
"; skipping localization deployment")
return
}
String localizationDestination = edexRootDirectory + File.separator + EDEX_LOCALIZATION_DIRECTORY
new File(localizationDestination).mkdirs()
AntBuilder ant = new AntBuilder()
ant.project.getBuildListeners().firstElement().setMessageOutputLevel(0)
log.info "Deploying localization for site ... " + site
ant.copy( todir : localizationDestination, overwrite : true )
{
fileset( dir : projectInformation.projectFullLocation + File.separator + "utility" )
}
}
}

View file

@ -0,0 +1,55 @@
/**
* 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.
**/
import java.io.File
/**
* Deploys plugin-provided EDEX mode files.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 4, 2014 3836 bkowal Initial Commit
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
class DeployModes
extends AbstractExternalPluginFilesDeployer
{
private static final String destinationDirectory = 'modes'
private static final String destinationDirectoryTree = 'conf'
public DeployModes()
{
super(destinationDirectory, destinationDirectoryTree)
}
public void deploy(String edexRootDirectory, String plugin, String pluginFullPath)
{
super.deployExternalFilesystem(edexRootDirectory, pluginFullPath)
}
}

View file

@ -0,0 +1,118 @@
/**
* 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.
**/
import groovy.util.logging.*
import java.util.regex.Pattern
import java.util.regex.Matcher
import ProjectInformation
/**
* Deploys the Raytheon-maintained Python Packages when requested.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 4, 2014 3836 bkowal Initial Commit
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
@Log
class DeployPythonPackages {
private static final String PYTHON_VERSION_PATTERN_STRING = "python([0-9].+)"
private static final Pattern pythonVersionPattern =
Pattern.compile(PYTHON_VERSION_PATTERN_STRING)
private DeployPythonPackages() {
}
public static deploy(String pythonRootDirectory, ProjectInformation projectInformation,
String[] pythonPackagesToDeploy) {
if (projectInformation == null) {
log.log(java.util.logging.Level.WARNING,
"Unable to find pythonPackages in the workspace; skipping python deployment")
return
}
if (pythonPackagesToDeploy.length == 0) {
log.info "No python packages have been specified for deployment; skipping python deployment."
return
}
// determine what the python version directory is
// loop through all directories in the python lib directory; attempt to find
// the one that matches our pattern
final String pythonLibDirectory = pythonRootDirectory + File.separator + "lib"
String pythonVersion = null
for (String libFile : new File(pythonLibDirectory).list())
{
Matcher matcher = pythonVersionPattern.matcher(libFile)
if (matcher.matches())
{
pythonVersion = matcher.group(1)
}
}
if (pythonVersion == null)
{
log.log(java.util.logging.Level.SEVERE,
"Unable to find the python version directory in " + pythonLibDirectory)
System.exit(-1)
}
AntBuilder ant = new AntBuilder()
ant.project.getBuildListeners().firstElement().setMessageOutputLevel(0)
log.info "Deploying pythonPackages ..."
final String pythonSitePackagesDirectory = pythonLibDirectory + File.separator +
"python" + pythonVersion + File.separator + "site-packages"
for (String pythonPackage : pythonPackagesToDeploy)
{
String pythonPackageDirectory = projectInformation.projectFullLocation + File.separator + pythonPackage
if (pythonPackage == "pypies")
{
// special case for pypies
pythonPackageDirectory += File.separator + "pypies"
}
if (new File(pythonPackageDirectory).exists() == false)
{
log.log(java.util.logging.Level.WARNING,
"Unable to find the " + pythonPackage + " python package in the workspace")
continue
}
String pythonPackageDestination = pythonSitePackagesDirectory + File.separator +
pythonPackage
log.info "Deploying pythonPackage ... " + pythonPackage
// Remove the existing deployment
new File(pythonPackageDestination).deleteDir()
// Create an empty destination directory
new File(pythonPackageDestination).mkdirs()
ant.copy( todir : pythonPackageDestination )
{ fileset( dir : pythonPackageDirectory ) }
}
}
}

View file

@ -0,0 +1,119 @@
/**
* 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.
**/
import groovy.util.logging.*
import IPluginCustomDeployer
/**
* Deploys plugin-provided web applications as war files.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 4, 2014 3836 bkowal Initial Commit
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
@Log
class DeployWeb
extends AbstractAntBasedPluginCustomDeployer
{
private final String WEB_XML_PATH = "web" + File.separator + "WEB-INF" + File.separator + "web.xml"
public DeployWeb()
{
super()
}
public void deploy(String edexRootDirectory, String plugin, String pluginFullPath)
{
final String edexWebappsDirectory = edexRootDirectory + File.separator + "webapps"
// determine if the plugin encapsulates a web application
final String expectedWebXMLPath = pluginFullPath + File.separator + WEB_XML_PATH
if (new File(expectedWebXMLPath).exists() == false)
{
// no web application
return
}
String webAppRootKey = this.getWebAppRootKey(expectedWebXMLPath)
if (webAppRootKey == null)
{
log.log(java.util.logging.Level.WARNING,
"webAppRootKey not specified in web.xml for plugin - " + plugin + "; skipping web app deployment")
return
}
log.info "Deploying Web Application associated with plugin ... " + plugin
final String warFile = edexWebappsDirectory + File.separator + webAppRootKey + ".war"
final String unwarDirectory = edexWebappsDirectory + File.separator + webAppRootKey
this.cleanup(edexWebappsDirectory, warFile, unwarDirectory)
// produce the war file
this.ant.war( destfile : warFile,
webxml : expectedWebXMLPath )
{
fileset( dir : pluginFullPath + File.separator + "web",
excludes : "WEB-INF" + File.separator )
classes( dir : pluginFullPath + File.separator + "web" + File.separator +
"WEB-INF" + File.separator + "classes" )
webinf ( file : pluginFullPath + File.separator + "web" + File.separator +
"WEB-INF" + File.separator + "dwr.xml" )
}
// finally, unwar the war file
this.ant.unzip( src : warFile,
dest : unwarDirectory )
new File(warFile).delete()
}
private String getWebAppRootKey(String webXMLFile)
{
String webAppRootKey = null
def webXML = new XmlSlurper().parse(new File(webXMLFile))
webXML.'context-param'.each
{
String paramName = it.'param-name'.toString()
if (paramName == "webAppRootKey")
{
webAppRootKey = it.'param-value'.toString()
}
}
return webAppRootKey
}
private void cleanup(String edexWebappsDirectory, String warFile, String webAppDirectory)
{
// cleanup any previous deployments
new File(warFile).delete()
new File(webAppDirectory).deleteDir()
}
}

View file

@ -0,0 +1,42 @@
/**
* 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.
**/
/**
* Defines a customized plugin deployer. Customized Plugin deployers are
* used to deploy additional plugin-specific files that exist outside
* of a standard Java build.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 4, 2014 3836 bkowal Initial Commit
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
interface IPluginCustomDeployer {
void deploy(String edexRootDirectory, String plugin, String pluginFullPath)
}

View file

@ -0,0 +1,54 @@
/**
* 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.
**/
/**
* POJO representation of projects discovered in the Eclipse workspace.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 4, 2014 3836 bkowal Initial Commit
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
class ProjectInformation
{
// the name of the project as it is known to Eclipse
public String project
// the name of the project directory
// in most cases (not all) this will be the same as the project name
public String projectDirectory
// the full path to the plugin
public String projectFullLocation
public ProjectInformation()
{
this.project = null
this.projectDirectory = null
this.projectFullLocation = null
}
}

View file

@ -0,0 +1,15 @@
Run deploy-install.xml to execute the new groovy-based deployment mechanism.
The mechanism will need to remain ant-wrapped until the Groovy plugins are added
to the uframe Eclipse distribution.
One argument is required to run the script: -Dworkspace_loc=${workspace_loc}
Note: ENTER THE ARGUMENT EXACTLY AS IT IS WRITTEN ABOVE. ${workspace_loc} is
an Eclipse variable that references the actual location of the workspace.
deploy-install will deploy any EDEX features it finds in the workspace excluding:
com.raytheon.edex.wa.feature and com.raytheon.edex.feature.uframe
Currently, an EDEX feature is defined as a feature project that includes edex in
the name. Feature deployment options will most likely be more customizable when
the pure groovy version of this deployment can be used.

View file

@ -0,0 +1,563 @@
/**
* 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.
**/
import groovy.util.logging.*
import ProjectInformation
import Feature
import FeatureParser
import java.util.Properties
import java.util.List
import java.util.ArrayList
import java.util.regex.Matcher
import java.util.regex.Pattern
import DeployESB
import DeployPythonPackages
import DeployEdexSiteLocalization
import IPluginCustomDeployer
/**
* Initial version of the deploy-install driver. Temporarily
* wrapped by and executed by an ant script until the Groovy
* plugins become a standard part of the uframe Eclipse distribution.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 4, 2014 3836 bkowal Initial Commit
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
@Log
class DeployInstall
{
private static final String edexFeatureRegex = '^.*\\.edex\\..*\\.feature$'
private static final Pattern EDEX_FEATURE_PATTERN =
Pattern.compile(edexFeatureRegex)
// temporarily have to declare and add this feature to the list of deployed features
// manually. there are improvements that can be made in 15.1.
private static final String COMMON_BASE_FEATURE = "com.raytheon.uf.common.base.feature"
// temporary. maintain backwards compatibility until baseline cleanup
private final List<String> blacklistedEdexFeatures
private projectInformationMap = [:]
private List<String> edexFeaturesToDeploy
private String edexRootDirectory
private String[] localizationSitesToDeploy = []
private boolean deployPythonPackages
private String pythonRootDirectory
private String[] pythonPackagesToDeploy = []
private String architecture
private List<IPluginCustomDeployer> customPluginDeployers
// a list of features that have been deployed to ensure that a feature is not deployed
// more than once.
private List featuresDeployed = []
// a list of the plugins that we will be deploying.
private List pluginsToDeploy = []
// used to track which feature a plugin was discovered in; will be used to
// verify that a plugin is not listed in more than one feature.
private pluginToFeatureMap = [:]
public DeployInstall(final String workspaceDirectory,
final String localizationSites, final boolean deployPythonPackages,
final String edexRootDirectory, final String pythonRootDirectory, final String pythonPackages,
final String architecture)
{
blacklistedEdexFeatures = new ArrayList<String>()
// never deploy these features
blacklistedEdexFeatures.add("com.raytheon.edex.wa.feature")
blacklistedEdexFeatures.add("com.raytheon.edex.feature.uframe")
this.init(workspaceDirectory.trim())
if (localizationSites.trim() != "")
{
this.localizationSitesToDeploy = localizationSites.trim().split(":")
}
this.deployPythonPackages = deployPythonPackages
this.edexRootDirectory = edexRootDirectory.trim()
this.pythonRootDirectory = pythonRootDirectory.trim()
if (pythonPackages.trim() != "")
{
this.pythonPackagesToDeploy = pythonPackages.trim().split(":")
}
this.architecture = architecture.trim()
}
public void deploy()
{
// recursively build the list of plugins that will be deployed.
for (String featureToDeploy : edexFeaturesToDeploy)
{
this.buildPluginList(featureToDeploy)
}
log.info "Found " + this.pluginsToDeploy.size() + " Plugins To Deploy."
this.cleanup()
this.deployPlugins()
// complete the esb deployment
// we need to determine the location of the build.edex project
ProjectInformation projectInformation = this.projectInformationMap["build.edex"]
if (projectInformation == null)
{
log.log(java.util.logging.Level.SEVERE,
"Unable to find project - build.edex")
System.exit(-1)
}
final String esbDirectory = projectInformation.projectFullLocation + File.separator + "esb"
DeployESB.deploy(this.edexRootDirectory, esbDirectory, this.architecture)
DeployESB.deployEdexConfiguration(this.edexRootDirectory, esbDirectory)
if (this.deployPythonPackages)
{
DeployPythonPackages.deploy(this.pythonRootDirectory,
this.projectInformationMap["pythonPackages"], this.pythonPackagesToDeploy)
}
if (this.localizationSitesToDeploy.length > 0)
{
for (String localizationSite : this.localizationSitesToDeploy)
{
String localizationProject = "localization." + localizationSite
DeployEdexSiteLocalization.deploy(this.edexRootDirectory,
this.projectInformationMap[localizationProject], localizationSite)
}
}
}
// remove the existing deployment
private void cleanup()
{
// remove the contents of the edex lib directory (execluding native)
log.info "Cleaning EDEX lib directory ..."
final String EDEX_LIB_DIRECTORY = this.edexRootDirectory + File.separator + "lib"
for (File file : new File(EDEX_LIB_DIRECTORY).listFiles())
{
if (file.getName() == "native")
{
continue
}
file.deleteDir()
}
// remove the shell scripts and the yajsw sub-directory from the edex bin directory
log.info "Cleaning EDEX bin directory ..."
final String EDEX_BIN_DIRECTORY = this.edexRootDirectory + File.separator + "bin"
for (File file : new File(EDEX_BIN_DIRECTORY).listFiles())
{
if (file.getName() == "yajsw")
{
file.deleteDir()
}
// we really should be checking the file extension here instead of just doing a
// basic String comparison
if (file.getName().endsWith(".sh") || file.getName() == "setup.env")
{
file.delete()
}
}
// remove the contents of the edex conf directory
log.info "Cleaning EDEX conf directory ..."
final String EDEX_CONF_DIRECTORY = this.edexRootDirectory + File.separator + "conf"
for (File file : new File(EDEX_CONF_DIRECTORY).listFiles())
{
if (file.isDirectory())
{
file.deleteDir()
}
else
{
file.delete()
}
}
}
private void deployPlugins()
{
// we will need ant to complete this
AntBuilder ant = new AntBuilder()
ant.project.getBuildListeners().firstElement().setMessageOutputLevel(0)
log.info "Deploying plugins ..."
for (String plugin : this.pluginsToDeploy)
{
this.deployPlugin(plugin, ant)
}
}
// FOSS plugins are plugins that include jar files.
private boolean isFOSSPlugin(ProjectInformation projectInformation)
{
final String jarSuffix = ".jar"
// loop through the files in the plugin directory; true if a single
// jar file is found.
for (String pluginFile : new File(projectInformation.projectFullLocation).listFiles())
{
if (pluginFile.endsWith(".jar"))
{
return true
}
}
return false
}
private void deployPlugin(String plugin, AntBuilder ant)
{
// first, attempt to find the plugin in the plugin map
ProjectInformation projectInformation = this.projectInformationMap[plugin]
if (projectInformation == null)
{
log.log(java.util.logging.Level.SEVERE,
"Unable to find plugin - " + plugin)
System.exit(-1)
}
// next, attempt to access the build.properties file for the plugin
final String PLUGIN_BUILD_PROPERTIES = projectInformation.projectFullLocation + File.separator +
"build.properties"
if (new File(PLUGIN_BUILD_PROPERTIES).exists() == false)
{
log.log(java.util.logging.Level.SEVERE,
"Unable to find the build.properties file for plugin - " + plugin)
System.exit(-1)
}
log.info "Deploying plugin ... " + plugin
// read the plugin build.properties file
BufferedReader br =
new BufferedReader(new FileReader(PLUGIN_BUILD_PROPERTIES))
Properties properties = new Properties()
properties.load(br)
final String output = properties.getProperty("output..")
final String binIncludes = properties.getProperty("bin.includes")
if (output == null)
{
// we will not be producing a jar file and are most likely deploying a FOSS plugin
this.deployFOSSPlugin(projectInformation, binIncludes, ant)
return
}
// jar the plugin
final String pluginJarName = plugin + ".jar"
final String edexLibPlugins = this.edexRootDirectory + File.separator + "lib" + File.separator +
"plugins"
new File(edexLibPlugins).mkdirs()
final String fullJarPath = edexLibPlugins + File.separator + pluginJarName
ant.jar( destfile : fullJarPath,
manifest : projectInformation.projectFullLocation + File.separator + "META-INF" +
File.separator + "MANIFEST.MF" )
{
fileset( dir : projectInformation.projectFullLocation + File.separator + output )
}
// is the plugin FOSS?
if (this.isFOSSPlugin(projectInformation))
{
this.deployFOSSPlugin(projectInformation, binIncludes, ant)
return
}
// finish the plugin based on build.properties
for (String binInclude : binIncludes.split(","))
{
binInclude = binInclude.trim()
if (binInclude == ".")
{
continue
}
// ensure that the artifact exists
final String artifact = projectInformation.projectFullLocation + File.separator + binInclude
if (new File(artifact).exists() == false)
{
log.log(java.util.logging.Level.SEVERE,
artifact + " specified in build.properties for plugin " + projectInformation.project + " was not found")
System.exit(-1)
}
// add the artifact to the jar
if (new File(artifact).isDirectory())
{
ant.jar( destfile : fullJarPath,
update : true )
{
fileset( dir : projectInformation.projectFullLocation,
includes : binInclude )
}
}
else
{
ant.jar( destfile : fullJarPath,
update : true )
{
fileset( file : artifact )
}
}
}
// run "custom" deployment steps
for (IPluginCustomDeployer pluginCustomDeployer : this.customPluginDeployers)
{
pluginCustomDeployer.deploy(this.edexRootDirectory, projectInformation.project,
projectInformation.projectFullLocation)
}
}
private void deployFOSSPlugin(ProjectInformation projectInformation, String binIncludes, AntBuilder ant)
{
final String edexLibDependencies = this.edexRootDirectory + File.separator + "lib" + File.separator +
"dependencies" + File.separator + projectInformation.project
// create the destination directory
new File(edexLibDependencies).mkdirs()
for (String binInclude : binIncludes.split(","))
{
binInclude = binInclude.trim()
if (binInclude == ".")
{
continue
}
// ensure that the artifact exists
final String artifact = projectInformation.projectFullLocation + File.separator + binInclude
if (new File(artifact).exists() == false)
{
log.log(java.util.logging.Level.SEVERE,
artifact + " specified in build.properties for plugin " + projectInformation.project + " was not found")
System.exit(-1)
}
if (new File(artifact).isDirectory())
{
ant.copy( todir : edexLibDependencies )
{
fileset( dir : artifact )
}
}
else
{
ant.copy( todir : edexLibDependencies, file : artifact )
}
}
}
private void buildPluginList(String featureName)
{
if (this.featuresDeployed.contains(featureName))
{
log.log(java.util.logging.Level.WARNING,
"Feature " + featureName + " has been included more than once; skipping the duplicate.")
return
}
log.info "Analyzing feature ... " + featureName
// first, attempt to find the feature in the project map
ProjectInformation projectInformation = this.projectInformationMap[featureName]
// verify that the feature exists
if (projectInformation == null)
{
log.log(java.util.logging.Level.SEVERE,
"Unable to find the specified feature - " + featureName)
System.exit(-1)
}
final String featureFullPath = projectInformation.projectFullLocation + File.separator + "feature.xml"
// verify that the feature exists
if (new File(featureFullPath).exists() == false)
{
log.log(java.util.logging.Level.SEVERE,
"Unable to find the specified feature - " + featureName + "; '" + featureFullPath + "' does not exist")
System.exit(-1)
}
Feature feature = FeatureParser.parseFeature(featureFullPath, featureName)
// first, process any features that the feature includes
for (String featureInclude : feature.getIncludes())
{
this.buildPluginList(featureInclude)
}
// should we also check dependencies?
// complete an initial analysis of the plugins that we will be deploying
for (String plugin : feature.getPlugins())
{
final String featureWithPlugin = this.pluginToFeatureMap[plugin]
if (featureWithPlugin == null)
{
// we have not seen this plugin yet
this.pluginToFeatureMap[plugin] = featureName
}
else
{
// we have seen this plugin before, verify that the plugin
// is not in more than one feature
if (featureWithPlugin != featureName)
{
log.log(java.util.logging.Level.SEVERE,
"Plugin is listed in more than one feature - " + featureWithPlugin + " AND " + featureName)
}
}
if (this.pluginsToDeploy.contains(plugin) == false)
{
this.pluginsToDeploy.add(plugin)
}
}
}
private void init(final String workspaceDirectory)
{
this.edexFeaturesToDeploy = new ArrayList<String>()
final String metadataProjectsDirectory = workspaceDirectory + File.separator +
".metadata" + File.separator + ".plugins" + File.separator + "org.eclipse.core.resources" +
File.separator + ".projects"
for (String project : new File(metadataProjectsDirectory).list())
{
// determine if the project is an EDEX feature.
Matcher matcher = EDEX_FEATURE_PATTERN.matcher(project)
if (matcher.matches() || project == COMMON_BASE_FEATURE)
{
// this is an EDEX feature.
if (blacklistedEdexFeatures.contains(project) == false)
{
this.edexFeaturesToDeploy.add(project)
log.log(java.util.logging.Level.INFO, 'Found EDEX Feature: ' + project)
}
}
final String expectedLocationFile = metadataProjectsDirectory +
File.separator + project + File.separator + ".location"
if (new File(expectedLocationFile).exists())
{
this.catalogProject(expectedLocationFile)
}
}
/*
* previously this was dynamically loaded via spring. However, spring
* was removed from groovy.
*/
this.customPluginDeployers = new ArrayList<IPluginCustomDeployer>()
this.customPluginDeployers.add(new DeployWeb())
this.customPluginDeployers.add(new DeployEdexLocalization())
this.customPluginDeployers.add(new DeployEdexResources())
this.customPluginDeployers.add(new CustomDeploymentRunner())
this.customPluginDeployers.add(new DeployModes())
}
private void catalogProject(String locationFile)
{
byte[] contents = new File(locationFile).getBytes()
final String FILE_ = "file:"
StringBuilder stringBuilder = new StringBuilder()
boolean buildLocationString = false
for (int i = 0; i < contents.length; i++)
{
if (contents[i] < 0 || contents[i] > 127)
{
continue
}
if (buildLocationString)
{
if (contents[i] == 0)
{
// the end of the file path (ideally).
break
}
char c = (char) contents[i]
stringBuilder.append(c)
}
else
{
// first: we want to find the letter 'f'
char c = (char) contents[i]
if ( c == 'f')
{
stringBuilder.append(c)
// we have found 'f'; determine if we have found "file:"
int counter = 0
while (counter < 4)
{
++i
c = (char) contents[i]
stringBuilder.append(c)
++counter
}
if (FILE_ == stringBuilder.toString())
{
buildLocationString = true
}
stringBuilder = new StringBuilder()
}
}
}
String projectLocationString = stringBuilder.toString()
// get the .project file
File projectMetadataFile =
new File(projectLocationString + File.separator + ".project")
// ensure that the project metadata file actually exists
if (projectMetadataFile.exists() == false)
{
return
}
// read the file
def projectMetadataXML = new XmlSlurper().parse(projectMetadataFile)
// extract the plugin name (as Eclipse sees it)
final String projectName = projectMetadataXML.name
ProjectInformation projectInformation = new ProjectInformation()
projectInformation.project = projectName
projectInformation.projectDirectory = new File(projectLocationString).getName()
projectInformation.projectFullLocation = projectLocationString
this.projectInformationMap[projectName] = projectInformation
}
}
DeployInstall deployInstall =
new DeployInstall(args[0], args[1], Boolean.parseBoolean(args[2]),
args[3], args[4], args[5], args[6])
deployInstall.deploy()

View file

@ -0,0 +1,79 @@
<project default="main" basedir=".">
<property name="localization.sites" value="" />
<property name="deploy.python" value="true" />
<!--
The python packages to deploy - provided that
deploy.python is true
-->
<property name="python.packages"
value="pypies:ufpy:dynamicserialize" />
<!-- EDEX root directory - defaults to /awips2/edex -->
<property name="edex.root" value="/awips2/edex" />
<!-- Python root directory - defaults to /awips2/python -->
<property name="python.root" value="/awips2/python" />
<!--
if groovy.path is not manually set, groovy must be
on the PATH.
-->
<property name="groovy.path" value="" />
<property name="architecture" value="x86_64" />
<condition property="requiredPropertiesSet">
<and>
<isset property="workspace_loc" />
</and>
</condition>
<available property="groovyPathSet"
file="${groovy.path}/groovy" type="file" />
<target name="main">
<antcall target="usage" />
<antcall target="deploy-using-specific-groovy" />
<antcall target="deploy-using-environment-groovy" />
</target>
<target name="usage" unless="${requiredPropertiesSet}">
<echo message="Usage: the following parameters are available when running deploy-install.xml." />
<echo message="REQUIRED PARAMETERS:" />
<echo message=" -Dworkspace_loc the location of the Eclipse workspace; use the 'workspace_loc' variable provided by Eclipse" />
<echo message="OPTIONAL PARAMETERS:" />
<echo message=" -Dlocalization.sites a colon delimited list of sites to deploy localization for" />
<echo message=" -Dedex.root the root of the EDEX installation; defaults to /awips2/edex" />
<echo message=" -Ddeploy.python a boolean value {true, false} indicating if python should be deployed" />
<echo message=" -Dpython.root the root of the python installation; defaults to /awips2/python" />
<echo message=" -Dpython.packages a colon delimited list of python packages to deploy; defaults to pypies:ufpy:dynamicserialize" />
<echo message=" -Darchitecture used to override the deployment architecture; use one of: {x86_64, x86}." />
<fail message="All required parameters have not been specified. Refer to the usage message above." />
</target>
<target name="deploy-using-specific-groovy" if="${groovyPathSet}">
<deploy
groovy.executable="${groovy.path}/groovy" />
</target>
<target name="deploy-using-environment-groovy" unless="${groovyPathSet}">
<deploy
groovy.executable="groovy" />
</target>
<macrodef name="deploy">
<attribute name="groovy.executable" />
<sequential>
<exec executable="@{groovy.executable}">
<arg value="-cp" />
<arg value="${basedir}${path.separator}${basedir}/../build.core" />
<arg value="${basedir}/RunDeployInstall.groovy" />
<arg value="${workspace_loc}" />
<arg value="${localization.sites}" />
<arg value="${deploy.python}" />
<arg value="${edex.root}" />
<arg value="${python.root}" />
<arg value="${python.packages}" />
<arg value="${architecture}" />
</exec>
</sequential>
</macrodef>
</project>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="customPluginDeployersList" class="java.util.ArrayList">
<constructor-arg>
<list>
<ref bean="customLocalizationDeploy" />
<ref bean="customResourcesDeploy" />
<ref bean="customWebDeploy" />
<ref bean="customDeploymentRunner" />
</list>
</constructor-arg>
</bean>
<bean id="customWebDeploy" class="DeployWeb" />
<bean id="customLocalizationDeploy" class="DeployEdexLocalization" />
<bean id="customResourcesDeploy" class="DeployEdexResources" />
<bean id="customDeploymentRunner" class="CustomDeploymentRunner" />
</beans>

View file

@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: App Launcher Plug-in
Bundle-SymbolicName: com.raytheon.uf.viz.app.launcher;singleton:=true
Bundle-Version: 1.14.0.qualifier
Bundle-Activator: com.raytheon.uf.viz.app.launcher.Activator
Bundle-Vendor: RAYTHEON
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
@ -11,8 +10,7 @@ Require-Bundle: org.eclipse.ui,
com.raytheon.uf.common.localization;bundle-version="1.11.1",
com.raytheon.uf.viz.core;bundle-version="1.11.5"
Bundle-ActivationPolicy: lazy
Export-Package: com.raytheon.uf.viz.app.launcher,
com.raytheon.uf.viz.app.launcher.bundle,
Export-Package: com.raytheon.uf.viz.app.launcher.bundle,
com.raytheon.uf.viz.app.launcher.exception,
com.raytheon.uf.viz.app.launcher.handlers,
com.raytheon.uf.viz.app.launcher.runner,

View file

@ -1,69 +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.app.launcher;
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.app.launcher";
// 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;
}
}

View file

@ -1,23 +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.
**/
/**
* Contains the basic classes used by the Application Launcher facility.
*/
package com.raytheon.uf.viz.app.launcher;

View file

@ -1,8 +0,0 @@
#Wed May 01 15:01:03 CDT 2013
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

View file

@ -2,8 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Archive
Bundle-SymbolicName: com.raytheon.uf.viz.archive;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.raytheon.uf.viz.archive.Activator
Bundle-Version: 1.14.0.qualifier
Bundle-Vendor: RAYTHEON
Require-Bundle: org.eclipse.ui;bundle-version="3.8.2",
org.eclipse.core.runtime,
@ -18,7 +17,7 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.8.2",
com.raytheon.uf.viz.core;bundle-version="1.12.1174",
com.raytheon.uf.common.units;bundle-version="1.0.0",
com.raytheon.uf.common.auth;bundle-version="1.12.1174"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Import-Package: org.apache.commons.compress.archivers,
org.apache.commons.compress.archivers.tar

View file

@ -41,29 +41,25 @@
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="menu:CAVE?after=group1">
<command
commandId="com.raytheon.uf.viz.archive.retentionui"
id="archivetest"
label="Archive Retention..."
style="push">
</command>
</menuContribution>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="menu:CAVE?after=group1">
<command
commandId="com.raytheon.uf.viz.archive.casecreationui"
id="archivetest"
label="Archive Case Creation..."
style="push">
</command>
</menuContribution>
<menuContribution
locationURI="menu:CAVE?after=group1">
<menu
label="Archive"
id="archive">
<command
commandId="com.raytheon.uf.viz.archive.casecreationui"
id="archivetest"
label="Archive Case Creation..."
style="push">
</command>
<command
commandId="com.raytheon.uf.viz.archive.retentionui"
id="archivetest"
label="Archive Retention..."
style="push">
</command>
</menu>
</menuContribution>
</extension>
<extension
point="org.eclipse.ui.commands">

View file

@ -1,70 +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.archive;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
/**
* Activator class for Archive.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 13, 2013 1966 rferrel Initial creation
*
* </pre>
*
* @author rferrel
* @version 1.0
*/
public class Activator implements BundleActivator {
private static BundleContext context;
static BundleContext getContext() {
return context;
}
/*
* (non-Javadoc)
*
* @see
* org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext
* )
*/
public void start(BundleContext bundleContext) throws Exception {
Activator.context = bundleContext;
}
/*
* (non-Javadoc)
*
* @see
* org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext bundleContext) throws Exception {
Activator.context = null;
}
}

View file

@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: Aviation Advisory Plug-in
Bundle-SymbolicName: com.raytheon.uf.viz.aviation.advisory;singleton:=true
Bundle-Version: 1.14.0.qualifier
Bundle-Activator: com.raytheon.uf.viz.aviation.advisory.Activator
Bundle-Vendor: RAYTHEON
Require-Bundle: com.raytheon.uf.viz.core
Import-Package: com.raytheon.uf.common.dataplugin,

View file

@ -1,4 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
.,\
localization/

View file

@ -20,15 +20,15 @@
-->
<menuContributionFile>
<include installTo="menu:Aviation?after=ConvectionProductsStart"
fileName="menus/aviationadvisory/baseAviationConvectionProducts.xml" />
fileName="menus/upperair/baseAviationConvectionProducts.xml" />
<include installTo="menu:Aviation?before=IcingProductsEnd"
fileName="menus/aviationadvisory/baseAviationIcingProducts.xml" />
fileName="menus/upperair/baseAviationIcingProducts.xml" />
<include installTo="menu:Aviation?before=TurbulenceProductsEnd"
fileName="menus/aviationadvisory/baseAviationTurbulenceProducts.xml" />
fileName="menus/upperair/baseAviationTurbulenceProducts.xml" />
<include installTo="menu:Aviation?before=VisibilityProductsEnd"
fileName="menus/aviationadvisory/baseAviationVisibilityProducts.xml" />
fileName="menus/upperair/baseAviationVisibilityProducts.xml" />
<include installTo="menu:Aviation?before=TropicalCycloneEnd"
fileName="menus/aviationadvisory/baseAviationTropicalCyclone.xml" />
fileName="menus/upperair/baseAviationTropicalCyclone.xml" />
<include installTo="menu:Aviation?after=VolcanicAshStart"
fileName="menus/aviationadvisory/baseAviationVolcanicAsh.xml" />
fileName="menus/upperair/baseAviationVolcanicAsh.xml" />
</menuContributionFile>

View file

@ -1,69 +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.aviation.advisory;
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.aviation.advisory";
// 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;
}
}

View file

@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: Bufrsigwx Plug-in
Bundle-SymbolicName: com.raytheon.uf.viz.bufrsigwx;singleton:=true
Bundle-Version: 1.14.0.qualifier
Bundle-Activator: com.raytheon.uf.viz.bufrsigwx.Activator
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
@ -30,8 +29,7 @@ Import-Package: com.raytheon.uf.common.dataplugin,
org.eclipse.ui.plugin,
org.opengis.referencing.crs,
org.osgi.framework
Export-Package: com.raytheon.uf.viz.bufrsigwx,
com.raytheon.uf.viz.bufrsigwx.common,
Export-Package: com.raytheon.uf.viz.bufrsigwx.common,
com.raytheon.uf.viz.bufrsigwx.rsc,
com.raytheon.uf.viz.bufrsigwx.util
Require-Bundle: com.raytheon.uf.viz.core,

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<menuContributionFile>
<include installTo="menu:Aviation?before=SignificantWeatherEnd"
fileName="menus/upperair/baseAviationBufrSigWx.xml" />
</menuContributionFile>

View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<contribute xsi:type="bundleItem" file="bundles/BufrSigWx.xml"
menuText="Medium Level" id="SigWxMedium">
<substitute key="wxLayer" value="SWM" />
</contribute>
<contribute xsi:type="bundleItem" file="bundles/BufrSigWx.xml"
menuText="High Level" id="SigWxHigh">
<substitute key="wxLayer" value="SWH" />
</contribute>
</menuTemplate>

View file

@ -1,69 +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.bufrsigwx;
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.bufrsigwx";
// 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;
}
}

View file

@ -28,12 +28,10 @@ import com.raytheon.uf.common.dataplugin.bufrsigwx.common.SigWxType;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.viz.bufrsigwx.Activator;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
import com.raytheon.uf.viz.core.rsc.LoadProperties;
import com.raytheon.uf.viz.core.status.StatusConstants;
/**
* Generic resourceData for SigWx data
@ -52,8 +50,9 @@ import com.raytheon.uf.viz.core.status.StatusConstants;
*/
@XmlAccessorType(XmlAccessType.NONE)
public class SigWxResourceData extends AbstractRequestableResourceData {
private static final transient IUFStatusHandler statusHandler = UFStatus.getHandler(SigWxResourceData.class);
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(SigWxResourceData.class);
@Override
public boolean equals(Object obj) {
if (!super.equals(obj)) {
@ -63,9 +62,9 @@ public class SigWxResourceData extends AbstractRequestableResourceData {
if (obj instanceof SigWxResourceData == false) {
return false;
}
// SigWxCloudsResourceData other = (SigWxCloudsResourceData) obj;
return true;
}
@ -87,8 +86,7 @@ public class SigWxResourceData extends AbstractRequestableResourceData {
} else if (SigWxType.JETS == type) {
nr = new SigWxJetStreamResource(this, loadProperties);
} else {
throw new VizException("No Resource for SigWx Type: "
+ typeString);
throw new VizException("No Resource for SigWx Type: " + typeString);
}
for (PluginDataObject o : objects) {
if (o instanceof SigWxData) {
@ -101,6 +99,6 @@ public class SigWxResourceData extends AbstractRequestableResourceData {
}
}
return nr;
}
}
}

View file

@ -1,7 +0,0 @@
#Thu Sep 17 10:41:36 CDT 2009
eclipse.preferences.version=1
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

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.uf.viz.climo</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -1,7 +0,0 @@
#Tue Jun 01 09:57:08 CDT 2010
eclipse.preferences.version=1
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

View file

@ -1,10 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Climo Plug-in
Bundle-SymbolicName: com.raytheon.uf.viz.climo
Bundle-Version: 1.12.1174.qualifier
Bundle-Activator: com.raytheon.uf.viz.climo.Activator
Bundle-Vendor: RAYTHEON
Require-Bundle: org.eclipse.core.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy

View file

@ -1,4 +0,0 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.

View file

@ -1,50 +0,0 @@
package com.raytheon.uf.viz.climo;
import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends Plugin {
// The plug-in ID
public static final String PLUGIN_ID = "com.raytheon.uf.viz.climo";
// The shared instance
private static Activator plugin;
/**
* The constructor
*/
public Activator() {
}
/*
* (non-Javadoc)
* @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/*
* (non-Javadoc)
* @see org.eclipse.core.runtime.Plugin#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;
}
}

View file

@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: Cloudheight Plug-in
Bundle-SymbolicName: com.raytheon.uf.viz.cloudheight;singleton:=true
Bundle-Version: 1.14.0.qualifier
Bundle-Activator: com.raytheon.uf.viz.cloudheight.Activator
Bundle-Vendor: RAYTHEON
Require-Bundle: org.eclipse.ui;bundle-version="3.8.2",
org.eclipse.core.runtime,
@ -20,7 +19,6 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.8.2",
javax.measure;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Export-Package: com.raytheon.uf.viz.cloudheight,
com.raytheon.uf.viz.cloudheight.data,
Export-Package: com.raytheon.uf.viz.cloudheight.data,
com.raytheon.uf.viz.cloudheight.rsc
Import-Package: com.raytheon.viz.core.map

View file

@ -1,69 +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.cloudheight;
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.cloudheight";
// 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;
}
}

View file

@ -0,0 +1,133 @@
package com.raytheon.uf.viz.collaboration.ui;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.swt.graphics.RGB;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.LocalizationContext;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
import com.raytheon.uf.common.localization.LocalizationFile;
import com.raytheon.uf.common.localization.PathManager;
import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.common.serialization.SerializationException;
import com.raytheon.uf.common.serialization.SingleTypeJAXBManager;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
/**
* Abstract class collaboration chat coloring configuration managers
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 13, 2014 3709 mapeters Initial creation.
*
* </pre>
*
* @author mapeters
* @version 1.0
*/
public abstract class AbstractColorConfigManager {
private static final SingleTypeJAXBManager<ColorInfoMap> jaxb = SingleTypeJAXBManager
.createWithoutException(ColorInfoMap.class);
/**
* Set and store the color type of the given user/site to be the given rgb
* at the given file location. If creating new {@link ColorInfo} and setting
* background, set foreground to defaultForeground to prevent it from
* incorrectly defaulting.
*
* @param key
* @param type
* @param rgb
* @param defaultForeground
* @param filePath
*/
protected void setColor(String key, int type, RGB rgb,
RGB defaultForeground, String filePath) {
ColorInfoMap colorInfoMap = this.getColorInfoMap();
if (colorInfoMap == null) {
colorInfoMap = new ColorInfoMap();
this.setColorInfoMap(colorInfoMap);
}
Map<String, ColorInfo> colors = colorInfoMap.getColors();
if (colors == null) {
colorInfoMap.setColors(new HashMap<String, ColorInfo>());
colors = colorInfoMap.getColors();
}
ColorInfo colorInfo = colors.get(key);
if (colorInfo != null) {
colorInfo.setColor(type, rgb, defaultForeground);
} else {
ColorInfo color = new ColorInfo();
color.setColor(type, rgb, defaultForeground);
colors.put(key, color);
}
IPathManager pathMgr = PathManagerFactory.getPathManager();
LocalizationContext lContext = pathMgr.getContext(
LocalizationType.CAVE_STATIC, LocalizationLevel.USER);
LocalizationFile file = pathMgr.getLocalizationFile(lContext, filePath);
try {
jaxb.marshalToXmlFile(colorInfoMap, file.getFile().getPath());
file.save();
} catch (Exception e) {
Activator.statusHandler.error(
"Unable to write color information to file: "
+ file.getName() + " in context " + lContext, e);
}
}
/**
* Get the {@link ColorInfo} for the given user/site from memory.
*
* @param key
* @param filePath
* @return
*/
protected ColorInfo getColor(String key, String filePath) {
ColorInfoMap colorInfoMap = this.getColorInfoMap();
if (colorInfoMap == null) {
IPathManager pm = (PathManager) PathManagerFactory.getPathManager();
LocalizationContext locContext = pm.getContext(
LocalizationType.CAVE_STATIC, LocalizationLevel.USER);
LocalizationFile file = pm
.getLocalizationFile(locContext, filePath);
if (file != null && file.exists()) {
try {
colorInfoMap = jaxb.unmarshalFromXmlFile(file.getFile());
this.setColorInfoMap(colorInfoMap);
} catch (SerializationException e) {
Activator.statusHandler.error(
"Unable to read color information from file: "
+ file.getName() + " in level "
+ LocalizationLevel.USER, e);
}
}
}
if (colorInfoMap != null) {
Map<String, ColorInfo> colors = colorInfoMap.getColors();
if (colors != null) {
return colors.get(key);
}
}
return null;
}
public abstract void setColor(String key, int type, RGB rgb,
RGB defaultForeground);
public abstract ColorInfo getColor(String key);
protected abstract ColorInfoMap getColorInfoMap();
protected abstract void setColorInfoMap(ColorInfoMap colorInfo);
}

View file

@ -98,9 +98,7 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueId;
import com.raytheon.uf.viz.collaboration.ui.actions.AddNotifierAction;
import com.raytheon.uf.viz.collaboration.ui.actions.AddToGroupAction;
import com.raytheon.uf.viz.collaboration.ui.actions.ArchiveViewerAction;
import com.raytheon.uf.viz.collaboration.ui.actions.ChangeBackgroundColorAction;
import com.raytheon.uf.viz.collaboration.ui.actions.ChangeFontAction;
import com.raytheon.uf.viz.collaboration.ui.actions.ChangeForegroundColorAction;
import com.raytheon.uf.viz.collaboration.ui.actions.ChangePasswordAction;
import com.raytheon.uf.viz.collaboration.ui.actions.ChangeRoleAction;
import com.raytheon.uf.viz.collaboration.ui.actions.ChangeSiteAction;
@ -163,6 +161,7 @@ import com.raytheon.viz.ui.views.CaveWorkbenchPageManager;
* May 19, 2014 3180 bclement fixed inviting multiple users to session
* Oct 08, 2014 3705 bclement added room search and bookmarking
* Oct 14, 2014 3709 mapeters Added change background/foreground color actions to menu.
* Nov 14, 2014 3709 mapeters Removed change background/foreground color actions from menu.
*
* </pre>
*
@ -364,8 +363,6 @@ public class CollaborationGroupView extends CaveFloatingView implements
mgr.add(roomSearchAction);
mgr.add(new Separator());
mgr.add(new ChangeFontAction());
mgr.add(new ChangeForegroundColorAction());
mgr.add(new ChangeBackgroundColorAction());
mgr.add(new Separator());
mgr.add(new ChangeStatusAction());
mgr.add(new ChangeStatusMessageAction());

View file

@ -0,0 +1,215 @@
/**
* 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.collaboration.ui;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.RGB;
/**
* Contains foreground and background chat colors for a list of users or sites
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 13, 2014 3709 mapeters Initial creation.
* Nov 26, 2014 3709 mapeters Renamed from UserColorInformation, added fgSet getter.
*
* </pre>
*
* @author mapeters
* @version 1.0
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public class ColorInfoMap {
@XmlElement
private Map<String, ColorInfo> colors;
/**
* @return the colors
*/
public Map<String, ColorInfo> getColors() {
return colors;
}
/**
* @param colors
* the colors to set
*/
public void setColors(Map<String, ColorInfo> colors) {
this.colors = colors;
}
@XmlAccessorType(XmlAccessType.NONE)
public static class ColorInfo {
/**
* tells {@link #setColor()} when to use defaultForeground
*/
@XmlAttribute
private boolean fgSet;
@XmlAttribute
private int fgRed;
@XmlAttribute
private int fgGreen;
@XmlAttribute
private int fgBlue;
/**
* background should default to white
*/
@XmlAttribute
private int bgRed = 255;
@XmlAttribute
private int bgGreen = 255;
@XmlAttribute
private int bgBlue = 255;
public ColorInfo() {
}
/**
* @param type
* @return the red
*/
public int getRed(int type) {
return type == SWT.FOREGROUND ? fgRed : bgRed;
}
/**
* @param type
* @param red
* the red to set
*/
public void setRed(int type, int red) {
if (type == SWT.FOREGROUND) {
this.fgRed = red;
} else {
this.bgRed = red;
}
}
/**
* @param type
* @return the green
*/
public int getGreen(int type) {
return type == SWT.FOREGROUND ? fgGreen : bgGreen;
}
/**
* @param type
* @param green
* the green to set
*/
public void setGreen(int type, int green) {
if (type == SWT.FOREGROUND) {
this.fgGreen = green;
} else {
this.bgGreen = green;
}
}
/**
* @param type
* @return the blue
*/
public int getBlue(int type) {
return type == SWT.FOREGROUND ? fgBlue : bgBlue;
}
/**
* @param type
* @param blue
* the blue to set
*/
public void setBlue(int type, int blue) {
if (type == SWT.FOREGROUND) {
this.fgBlue = blue;
} else {
this.bgBlue = blue;
}
}
/**
* @param type
* @return the RGB color of the given type
*/
public RGB getColor(int type) {
if (type == SWT.FOREGROUND) {
return new RGB(fgRed, fgGreen, fgBlue);
} else {
return new RGB(bgRed, bgGreen, bgBlue);
}
}
/**
* Set the color of the given type to the given rgb
*
* @param type
* @param rgb
* @param defaultForeground
*/
public void setColor(int type, RGB rgb, RGB defaultForeground) {
if (type == SWT.FOREGROUND) {
fgRed = rgb.red;
fgGreen = rgb.green;
fgBlue = rgb.blue;
fgSet = true;
} else {
bgRed = rgb.red;
bgGreen = rgb.green;
bgBlue = rgb.blue;
if (!fgSet) {
/*
* if creating new UserColor, set fgColor to default
* foreground color, otherwise it defaults to black
*/
setColor(SWT.FOREGROUND, defaultForeground, null);
fgSet = false;
}
}
}
/**
* @return whether the foreground has been set
*/
public boolean isForegroundSet() {
return fgSet;
}
}
}

View file

@ -0,0 +1,87 @@
/**
* 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.collaboration.ui;
import org.eclipse.swt.graphics.RGB;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
/**
* Configuration manager for reading/writing colors for each site to/from a
* user-localized file
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 10, 2014 3708 bclement Moved color methods from SiteConfigurationManager
* Nov 26, 2014 3709 mapeters Abstracted out code to {@link AbstractColorConfigManager},
* renamed from SiteColorConfigManager.
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class FeedColorConfigManager extends AbstractColorConfigManager {
private static final String FILE_PATH = "collaboration"
+ IPathManager.SEPARATOR + "siteColorInfo.xml";
private static ColorInfoMap colorInfoMap;
/**
* Set and store the color type of the given site to be the given rgb.
*
* @param site
* @param type
* @param rgb
* @param defaultForeground
*/
@Override
public synchronized void setColor(String site, int type, RGB rgb,
RGB defaultForeground) {
super.setColor(site, type, rgb, defaultForeground, FILE_PATH);
}
/**
* Get the {@link ColorInfo} for the given site from memory.
*
* @param site
* @return
*/
@Override
public synchronized ColorInfo getColor(String site) {
return super.getColor(site, FILE_PATH);
}
@Override
protected ColorInfoMap getColorInfoMap() {
return colorInfoMap;
}
@Override
protected void setColorInfoMap(ColorInfoMap colorInfoMap) {
FeedColorConfigManager.colorInfoMap = colorInfoMap;
}
}

View file

@ -1,159 +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.collaboration.ui;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.LocalizationContext;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
import com.raytheon.uf.common.localization.LocalizationFile;
import com.raytheon.uf.common.localization.PathManager;
import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.viz.collaboration.ui.SiteColorInformation.SiteColor;
/**
* Site coloring configuration manager
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 10, 2014 3708 bclement Moved color methods from SiteConfigurationManager
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class SiteColorConfigManager {
private static SiteColorInformation colorInfo;
/**
*
*/
private SiteColorConfigManager() {
}
/**
* Write the colorInfo.xml file out to user localization so that the user
* can retrieve it on CAVE restart
*
* @param information
*/
public static void writeSiteColorInformation(
SiteColorInformation information) {
colorInfo = information;
IPathManager pathMgr = PathManagerFactory.getPathManager();
LocalizationContext lContext = pathMgr.getContext(
LocalizationType.CAVE_STATIC, LocalizationLevel.USER);
LocalizationFile file = pathMgr.getLocalizationFile(lContext,
"collaboration" + File.separator + "colorInfo.xml");
try {
JAXBContext context = JAXBContext
.newInstance(SiteColorInformation.class);
Marshaller marshaller = context.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,
new Boolean(true));
marshaller.marshal(information, file.getFile());
file.save();
} catch (Exception e) {
Activator.statusHandler.error(
"Unable to write color information to file: "
+ file.getName() + " in context " + lContext, e);
}
}
/**
* Instantiate the colorInfo object so that the colors can be read in from
* the colorInfo.xml file and retrieved from localization
*
* @return
*/
public static SiteColorInformation getSiteColorInformation() {
if (colorInfo == null) {
PathManager pm = (PathManager) PathManagerFactory.getPathManager();
Map<LocalizationLevel, LocalizationFile> files = pm
.getTieredLocalizationFile(LocalizationType.CAVE_STATIC,
"collaboration" + File.separator + "colorInfo.xml");
LocalizationLevel[] levels = LocalizationLevel.values();
for (int i = levels.length - 1; i >= 0 && colorInfo == null; --i) {
LocalizationLevel level = levels[i];
if (level == LocalizationLevel.SITE
|| level == LocalizationLevel.USER) {
LocalizationFile file = files.get(level);
if (file != null) {
InputStream in = null;
try {
in = file.openInputStream();
JAXBContext context = JAXBContext
.newInstance(SiteColorInformation.class);
Unmarshaller unmarshaller = context
.createUnmarshaller();
colorInfo = (SiteColorInformation) unmarshaller
.unmarshal(in);
} catch (Exception e) {
Activator.statusHandler.error(
"Unable to read color information from file: "
+ file.getName() + " in level "
+ level, e);
}
if (in != null) {
try {
in.close();
} catch (IOException e) {
Activator.statusHandler.error(
"Problem closing color information file: "
+ file.getName(), e);
}
}
}
}
}
}
return colorInfo;
}
/**
* @return list of colors from site information config
*/
public static List<SiteColor> getSiteColors() {
SiteColorInformation colorInfo = getSiteColorInformation();
if (colorInfo != null) {
return getSiteColorInformation().getColors();
} else {
return null;
}
}
}

View file

@ -1,173 +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.collaboration.ui;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.eclipse.swt.graphics.RGB;
/**
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 16, 2012 mnash Initial creation
*
* </pre>
*
* @author mnash
* @version 1.0
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public class SiteColorInformation {
@XmlElement
List<SiteColor> colors;
/**
* @return the colors
*/
public List<SiteColor> getColors() {
return colors;
}
/**
* @param colors
* the colors to set
*/
public void setColors(List<SiteColor> colors) {
this.colors = colors;
}
@XmlAccessorType(XmlAccessType.NONE)
public static class SiteColor {
@XmlAttribute
private String site;
@XmlAttribute
private int red;
@XmlAttribute
private int green;
@XmlAttribute
private int blue;
public SiteColor() {
}
/**
* @return the site
*/
public String getSite() {
return site;
}
/**
* @param site
* the site to set
*/
public void setSite(String site) {
this.site = site;
}
/**
* @return the red
*/
public int getRed() {
return red;
}
/**
* @param red
* the red to set
*/
public void setRed(int red) {
this.red = red;
}
/**
* @return the green
*/
public int getGreen() {
return green;
}
/**
* @param green
* the green to set
*/
public void setGreen(int green) {
this.green = green;
}
/**
* @return the blue
*/
public int getBlue() {
return blue;
}
/**
* @param blue
* the blue to set
*/
public void setBlue(int blue) {
this.blue = blue;
}
public RGB getColor() {
return new RGB(red, green, blue);
}
public void setColor(RGB rgb) {
red = rgb.red;
green = rgb.green;
blue = rgb.blue;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (obj instanceof SiteColor == false) {
return false;
} else {
return this.getSite().equals(((SiteColor) obj).getSite());
}
}
}
}

View file

@ -0,0 +1,85 @@
/**
* 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.collaboration.ui;
import org.eclipse.swt.graphics.RGB;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
/**
* User coloring configuration manager
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 13, 2014 3709 mapeters Initial creation.
* Nov 26, 2014 3709 mapeters Abstracted out code to {@link AbstractColorConfigManager}.
*
* </pre>
*
* @author mapeters
* @version 1.0
*/
public class UserColorConfigManager extends AbstractColorConfigManager {
private static final String FILE_PATH = "collaboration"
+ IPathManager.SEPARATOR + "userColorInfo.xml";
private static ColorInfoMap colorInfoMap;
/**
* Set and store the color type of the given user to be the given rgb.
*
* @param user
* @param type
* @param rgb
* @param defaultForeground
*/
@Override
public synchronized void setColor(String user, int type, RGB rgb,
RGB defaultForeground) {
super.setColor(user, type, rgb, defaultForeground, FILE_PATH);
}
/**
* Get the {@link ColorInfo} for the given user from memory.
*
* @param user
* @return
*/
@Override
public synchronized ColorInfo getColor(String user) {
return super.getColor(user, FILE_PATH);
}
@Override
protected ColorInfoMap getColorInfoMap() {
return colorInfoMap;
}
@Override
protected void setColorInfoMap(ColorInfoMap colorInfoMap) {
UserColorConfigManager.colorInfoMap = colorInfoMap;
}
}

View file

@ -1,73 +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.collaboration.ui.actions;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.ColorDialog;
import org.eclipse.swt.widgets.Display;
import com.raytheon.uf.viz.collaboration.comm.provider.connection.CollaborationConnection;
import com.raytheon.uf.viz.collaboration.ui.Activator;
import com.raytheon.uf.viz.collaboration.ui.actions.ChatDisplayChangeEvent.ChangeType;
import com.raytheon.uf.viz.core.preferences.PreferenceConverter;
/**
* Open change background color dialog
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 14, 2014 3709 mapeters Initial creation.
*
*
* </pre>
*
* @author mapeters
* @version 1.0
*/
public class ChangeBackgroundColorAction extends Action {
public ChangeBackgroundColorAction() {
super("Change Background Color...");
}
@Override
public void run() {
ColorDialog dialog = new ColorDialog(Display.getCurrent()
.getActiveShell());
IPreferenceStore store = Activator.getDefault().getPreferenceStore();
RGB data = PreferenceConverter.getRGB(store, "bg", "white");
dialog.setRGB(data);
RGB postData = dialog.open();
CollaborationConnection connection = CollaborationConnection
.getConnection();
if (postData != null && connection != null) {
PreferenceConverter.setValue(store, "bg", postData);
connection.postEvent(ChatDisplayChangeEvent.createColorEvent(
ChangeType.BACKGROUND, postData));
}
};
}

View file

@ -40,7 +40,8 @@ import com.raytheon.uf.viz.core.icon.IconUtil;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 6, 2012 bsteffen Initial creation
* Oct 14, 2014 3709 mapeters Post event using {@link ChatDisplayChangeEvent}.
* Oct 14, 2014 3709 mapeters Post event using ChatDisplayChangeEvent.
* Nov 14, 2014 3709 mapeters Changed back to posting event using FontData.
*
* </pre>
*
@ -67,8 +68,7 @@ public class ChangeFontAction extends Action {
.getConnection();
if (postData != null && connection != null) {
PreferenceConverter.setValue(store, "font", postData);
connection.postEvent(ChatDisplayChangeEvent
.createFontEvent(postData));
connection.postEvent(postData);
}
};
}

View file

@ -1,73 +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.collaboration.ui.actions;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.ColorDialog;
import org.eclipse.swt.widgets.Display;
import com.raytheon.uf.viz.collaboration.comm.provider.connection.CollaborationConnection;
import com.raytheon.uf.viz.collaboration.ui.Activator;
import com.raytheon.uf.viz.collaboration.ui.actions.ChatDisplayChangeEvent.ChangeType;
import com.raytheon.uf.viz.core.preferences.PreferenceConverter;
/**
* Open change foreground color dialog
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 14, 2014 3709 mapeters Initial creation.
*
*
* </pre>
*
* @author mapeters
* @version 1.0
*/
public class ChangeForegroundColorAction extends Action {
public ChangeForegroundColorAction() {
super("Change Foreground Color...");
}
@Override
public void run() {
ColorDialog dialog = new ColorDialog(Display.getCurrent()
.getActiveShell());
IPreferenceStore store = Activator.getDefault().getPreferenceStore();
RGB data = PreferenceConverter.getRGB(store, "fg", "black");
dialog.setRGB(data);
RGB postData = dialog.open();
CollaborationConnection connection = CollaborationConnection
.getConnection();
if (postData != null && connection != null) {
PreferenceConverter.setValue(store, "fg", postData);
connection.postEvent(ChatDisplayChangeEvent.createColorEvent(
ChangeType.FOREGROUND, postData));
}
};
}

View file

@ -0,0 +1,91 @@
package com.raytheon.uf.viz.collaboration.ui.actions;
/**
* 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.
**/
import org.eclipse.jface.action.Action;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.ColorDialog;
import org.eclipse.swt.widgets.Display;
import com.raytheon.uf.viz.collaboration.ui.Activator;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.ui.UserColorConfigManager;
import com.raytheon.uf.viz.core.icon.IconUtil;
/**
* Action to change the foreground/background chat color of a selected user.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 12/02/14 3709 mapeters Initial creation.
*
* </pre>
*
* @author mapeters
* @version 1.0
*/
public class ChangeUserColorAction extends Action {
private int type;
private String user;
private RGB defaultForeground;
private UserColorConfigManager colorConfigManager;
public ChangeUserColorAction(int type, String user, boolean me,
RGB defaultForeground, UserColorConfigManager colorConfigManager) {
super("Change " + (me ? "Your " : (user + "'s "))
+ (type == SWT.FOREGROUND ? "Foreground" : "Background")
+ " Color...", IconUtil.getImageDescriptor(Activator
.getDefault().getBundle(), "change_color.gif"));
this.type = type;
this.user = user;
this.defaultForeground = defaultForeground;
this.colorConfigManager = colorConfigManager;
}
@Override
public void run() {
ColorDialog dialog = new ColorDialog(Display.getCurrent()
.getActiveShell());
ColorInfo colorInfo = colorConfigManager.getColor(user);
if (colorInfo != null) {
dialog.setRGB(colorInfo.getColor(type));
} else if (type == SWT.FOREGROUND) {
/*
* set the dialog to display default foreground color as
* currently selected
*/
dialog.setRGB(defaultForeground);
}
RGB rgb = dialog.open();
if (rgb != null) {
colorConfigManager.setColor(user, type, rgb,
defaultForeground);
}
}
}

View file

@ -1,84 +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.collaboration.ui.actions;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.RGB;
/**
* Store font/color change information
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 14, 2014 3709 mapeters Initial creation.
*
* </pre>
*
* @author mapeters
* @version 1.0
*/
public class ChatDisplayChangeEvent {
private ChangeType type;
private RGB color;
private FontData font;
public enum ChangeType {
BACKGROUND, FOREGROUND, FONT;
}
private ChatDisplayChangeEvent(ChangeType type, RGB color) {
this.type = type;
this.color = color;
}
private ChatDisplayChangeEvent(ChangeType type, FontData font) {
this.type = type;
this.font = font;
}
public static ChatDisplayChangeEvent createColorEvent(ChangeType type,
RGB color) {
return new ChatDisplayChangeEvent(type, color);
}
public static ChatDisplayChangeEvent createFontEvent(FontData font) {
return new ChatDisplayChangeEvent(ChangeType.FONT, font);
}
public RGB getColor() {
return this.color;
}
public ChangeType getChangeType() {
return this.type;
}
public FontData getFont() {
return this.font;
}
}

View file

@ -48,7 +48,8 @@ import com.raytheon.viz.ui.views.CaveWorkbenchPageManager;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 8, 2014 3705 bclement Initial creation
* Oct 8, 2014 3705 bclement Initial creation
* Nov 12, 2014 3705 bclement fixed empty participant list problem
*
* </pre>
*
@ -106,11 +107,15 @@ public class JoinRoomAction extends Action {
try {
VenueSession session = connection.joinTextOnlyVenue(room,
handle);
/*
* connect to room before UI initializes so it gets the
* participant list
*/
session.connectToRoom();
CaveWorkbenchPageManager page = CaveWorkbenchPageManager
.getActiveInstance();
page.showView(SessionView.ID, session.getSessionId(),
IWorkbenchPage.VIEW_ACTIVATE);
session.connectToRoom();
} catch (CollaborationException | PartInitException e) {
log.error("Unable to join room " + room.getFQName(), e);
}

View file

@ -52,6 +52,7 @@ import com.raytheon.viz.ui.views.CaveWorkbenchPageManager;
* Jul 3, 2012 bsteffen Initial creation
* Jun 17, 2014 3078 bclement changed user type to IUser, added isAvailable()
* Jun 20, 2014 3281 bclement fixed secondary id bug by using user.getClientIndependentId()
* Nov 14, 2014 3709 mapeters upon creation of p2p chat, add color change menu actions
*
* </pre>
*
@ -140,6 +141,11 @@ public class PeerToPeerChatAction extends Action {
viewMode);
if (p2pView.getPeer() == null) {
p2pView.setPeer(user);
/*
* add color change actions to P2P right click menu upon first
* creation of P2P chat.
*/
p2pView.addChangeUserColorActions();
}
return p2pView;
} catch (PartInitException e) {

View file

@ -61,8 +61,6 @@ import com.raytheon.uf.viz.collaboration.comm.provider.connection.CollaborationC
import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
import com.raytheon.uf.viz.collaboration.ui.Activator;
import com.raytheon.uf.viz.collaboration.ui.CollaborationUtils;
import com.raytheon.uf.viz.collaboration.ui.actions.ChatDisplayChangeEvent;
import com.raytheon.uf.viz.collaboration.ui.actions.ChatDisplayChangeEvent.ChangeType;
import com.raytheon.uf.viz.collaboration.ui.actions.CopyTextAction;
import com.raytheon.uf.viz.collaboration.ui.actions.CutTextAction;
import com.raytheon.uf.viz.collaboration.ui.actions.PasteTextAction;
@ -97,6 +95,9 @@ import com.raytheon.viz.ui.views.CaveFloatingView;
* Jun 27, 2014 3323 bclement fixed disposed font issue
* Oct 09, 2014 3711 mapeters Display chat text in accordance with preferences.
* Oct 14, 2014 3709 mapeters Support changing foreground/background color.
* Nov 14, 2014 3709 mapeters Changing foreground/background colors no longer
* implemented here, added messagesTextMenuMgr.
* Nov 26, 2014 3709 mapeters Added {@link #getColorFromRGB()}.
* </pre>
*
* @author rferrel
@ -126,6 +127,8 @@ public abstract class AbstractSessionView<T extends IUser> extends
/** Font used with the messagesText control. */
private Font messagesTextFont;
protected MenuManager messagesTextMenuMgr;
private StyledText composeText;
protected SessionMsgArchive msgArchive;
@ -149,9 +152,9 @@ public abstract class AbstractSessionView<T extends IUser> extends
protected abstract void setMessageLabel(Composite comp);
public AbstractSessionView() {
imageMap = new HashMap<String, Image>();
fonts = new HashMap<String, Font>();
colors = new HashMap<RGB, Color>();
imageMap = new HashMap<>();
fonts = new HashMap<>();
colors = new HashMap<>();
}
protected void initComponents(Composite parent) {
@ -223,23 +226,13 @@ public abstract class AbstractSessionView<T extends IUser> extends
store, "font"));
messagesText.setFont(messagesTextFont);
// grab the background color from preferences (default to white)
RGB bgColor = com.raytheon.uf.viz.core.preferences.PreferenceConverter
.getRGB(store, "bg", "white");
messagesText.setBackground(new Color(Display.getCurrent(), bgColor));
// grab the foreground color from preferences (default to black)
RGB fgColor = com.raytheon.uf.viz.core.preferences.PreferenceConverter
.getRGB(store, "fg", "black");
messagesText.setForeground(new Color(Display.getCurrent(), fgColor));
searchComp.setSearchText(messagesText);
// adding a menu item so that Paste can be found when clicking on the
// composeText styledtext
MenuManager menuMgr = new MenuManager();
menuMgr.add(new CopyTextAction(messagesText));
Menu menu = menuMgr.createContextMenu(messagesText);
messagesTextMenuMgr = new MenuManager();
messagesTextMenuMgr.add(new CopyTextAction(messagesText));
Menu menu = messagesTextMenuMgr.createContextMenu(messagesText);
messagesText.setMenu(menu);
}
@ -410,15 +403,10 @@ public abstract class AbstractSessionView<T extends IUser> extends
RGB rgb = new RGB(keyword.getRed(), keyword
.getGreen(), keyword.getBlue());
Color color = null;
// using the stored colors so we don't leak
if (colors.containsKey(rgb)) {
color = colors.get(rgb);
} else {
color = new Color(Display.getCurrent(),
rgb);
colors.put(rgb, color);
}
Color color = getColorFromRGB(rgb);
TextStyle style = new TextStyle(font,
color, null);
StyleRange keywordRange = new StyleRange(
@ -591,20 +579,12 @@ public abstract class AbstractSessionView<T extends IUser> extends
}
@Subscribe
public void changeChatDisplay(ChatDisplayChangeEvent event) {
ChangeType type = event.getChangeType();
if (type == ChangeType.FOREGROUND) {
messagesText.setForeground(new Color(Display.getCurrent(), event.getColor()));
} else if (type == ChangeType.BACKGROUND) {
messagesText.setBackground(new Color(Display.getCurrent(), event
.getColor()));
} else if (type == ChangeType.FONT) {
Font oldFont = messagesTextFont;
messagesTextFont = new Font(Display.getCurrent(), event.getFont());
messagesText.setFont(messagesTextFont);
if (oldFont != null) {
oldFont.dispose();
}
public void changeFont(FontData data) {
Font oldFont = messagesTextFont;
messagesTextFont = new Font(Display.getCurrent(), data);
messagesText.setFont(messagesTextFont);
if (oldFont != null) {
oldFont.dispose();
}
}
@ -680,4 +660,18 @@ public abstract class AbstractSessionView<T extends IUser> extends
});
}
/**
* Get corresponding Color from map using RGB
*
* @param rgb
* @return
*/
protected Color getColorFromRGB(RGB rgb) {
Color color = colors.get(rgb);
if (color == null) {
color = new Color(Display.getCurrent(), rgb);
colors.put(rgb, color);
}
return color;
}
}

View file

@ -106,6 +106,7 @@ import com.raytheon.viz.ui.input.EditableManager;
* Apr 15, 2014 2822 bclement only allow transfer leader if participant is using shared display
* May 05, 2014 3076 bclement added clear all action
* Jun 30, 2014 1798 bclement added disableCurrentLayer()
* Dev 02, 2014 3709 mapeters added {@link #initComponents()} override
*
* </pre>
*
@ -234,6 +235,19 @@ public class CollaborationSessionView extends SessionView implements
}
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.viz.collaboration.ui.session.SessionView#initComponents
* (org.eclipse.swt.widgets.Composite)
*/
@Override
protected void initComponents(Composite parent) {
enableUserColors = false;
super.initComponents(parent);
}
@Override
protected void createActions() {
super.createActions();

View file

@ -31,6 +31,7 @@ import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.jivesoftware.smack.packet.Presence.Type;
@ -47,6 +48,9 @@ import com.raytheon.uf.viz.collaboration.comm.provider.connection.CollaborationC
import com.raytheon.uf.viz.collaboration.comm.provider.user.RosterItem;
import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.ui.UserColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.actions.ChangeUserColorAction;
import com.raytheon.uf.viz.collaboration.ui.actions.PrintLogActionContributionItem;
import com.raytheon.uf.viz.collaboration.ui.notifier.NotifierTask;
import com.raytheon.uf.viz.collaboration.ui.notifier.NotifierTools;
@ -66,6 +70,9 @@ import com.raytheon.uf.viz.core.sounds.SoundUtil;
* Feb 13, 2014 2751 bclement made parent generic
* Feb 28, 2014 2632 mpduff Override appendMessage for notifiers
* Jun 17, 2014 3078 bclement changed peer type to IUser
* Nov 14, 2014 3709 mapeters support foregound/background color
* settings for each user
* Nov 26, 2014 3709 mapeters add colorConfigManager, use parent's colors map
*
* </pre>
*
@ -81,21 +88,23 @@ public class PeerToPeerView extends AbstractSessionView<IUser> implements
public static final String ID = "com.raytheon.uf.viz.collaboration.PeerToPeerView";
private static Color userColor = null;
private static final Color DEFAULT_USER_FOREGROUND_COLOR = Display
.getCurrent().getSystemColor(SWT.COLOR_DARK_BLUE);
private static Color chatterColor = null;
private static final Color DEFAULT_PEER_FOREGROUND_COLOR = Display
.getCurrent().getSystemColor(SWT.COLOR_RED);
private static Color black = null;
private static final Color BLACK = Display.getCurrent().getSystemColor(
SWT.COLOR_BLACK);
private IUser peer;
private boolean online = true;
private static UserColorConfigManager colorConfigManager;
public PeerToPeerView() {
super();
userColor = Display.getCurrent().getSystemColor(SWT.COLOR_DARK_BLUE);
chatterColor = Display.getCurrent().getSystemColor(SWT.COLOR_RED);
black = Display.getCurrent().getSystemColor(SWT.COLOR_BLACK);
CollaborationConnection.getConnection().registerEventHandler(this);
}
@ -202,11 +211,11 @@ public class PeerToPeerView extends AbstractSessionView<IUser> implements
}
Color color = null;
if (userId == null) {
color = black;
color = BLACK;
} else if (!userId.equals(connection.getUser())) {
color = chatterColor;
color = DEFAULT_PEER_FOREGROUND_COLOR;
} else {
color = userColor;
color = DEFAULT_USER_FOREGROUND_COLOR;
}
styleAndAppendText(sb, offset, name, userId, ranges, color);
};
@ -214,22 +223,35 @@ public class PeerToPeerView extends AbstractSessionView<IUser> implements
@Override
public void styleAndAppendText(StringBuilder sb, int offset, String name,
IUser userId, List<StyleRange> ranges, Color color) {
StyleRange range = new StyleRange(messagesText.getCharCount(), offset,
color, null, SWT.NORMAL);
ranges.add(range);
Color fgColor = color;
Color bgColor = null;
if (userId != null) {
range = new StyleRange(messagesText.getCharCount() + offset,
name.length() + 1, color, null, SWT.BOLD);
} else {
range = new StyleRange(messagesText.getCharCount() + offset,
sb.length() - offset, color, null, SWT.BOLD);
// get user colors from config manager
ColorInfo userColor = colorConfigManager.getColor(userId
.getName());
if (userColor != null) {
fgColor = getColorFromRGB(userColor.getColor(SWT.FOREGROUND));
bgColor = getColorFromRGB(userColor.getColor(SWT.BACKGROUND));
}
}
StyleRange range = new StyleRange(messagesText.getCharCount(),
sb.length(), fgColor, null, SWT.NORMAL);
ranges.add(range);
range = new StyleRange(messagesText.getCharCount() + offset,
(userId != null ? name.length() + 1 : sb.length() - offset),
fgColor, null, SWT.BOLD);
ranges.add(range);
messagesText.append(sb.toString());
for (StyleRange newRange : ranges) {
messagesText.setStyleRange(newRange);
}
messagesText.setTopIndex(messagesText.getLineCount() - 1);
int lineNumber = messagesText.getLineCount() - 1;
messagesText.setLineBackground(lineNumber, 1, bgColor);
messagesText.setTopIndex(lineNumber);
}
@Override
@ -295,6 +317,7 @@ public class PeerToPeerView extends AbstractSessionView<IUser> implements
@Override
protected void initComponents(Composite parent) {
super.initComponents(parent);
colorConfigManager = new UserColorConfigManager();
// unfortunately this code cannot be a part of createToolbarButton
// because I cannot instantiate the ACI until after the messagesText
@ -351,4 +374,24 @@ public class PeerToPeerView extends AbstractSessionView<IUser> implements
return peer.getFQName();
}
}
/**
* add right-click menu options for changing foreground/background colors
* for each user
*/
public void addChangeUserColorActions() {
String myName = CollaborationConnection.getConnection().getUser()
.getName();
String peerName = peer.getName();
RGB defaultUserForeground = DEFAULT_USER_FOREGROUND_COLOR.getRGB();
RGB defaultPeerForeground = DEFAULT_PEER_FOREGROUND_COLOR.getRGB();
messagesTextMenuMgr.add(new ChangeUserColorAction(SWT.BACKGROUND,
myName, true, defaultUserForeground, colorConfigManager));
messagesTextMenuMgr.add(new ChangeUserColorAction(SWT.FOREGROUND,
myName, true, defaultUserForeground, colorConfigManager));
messagesTextMenuMgr.add(new ChangeUserColorAction(SWT.BACKGROUND,
peerName, false, defaultPeerForeground, colorConfigManager));
messagesTextMenuMgr.add(new ChangeUserColorAction(SWT.FOREGROUND,
peerName, false, defaultPeerForeground, colorConfigManager));
}
}

View file

@ -19,7 +19,6 @@
**/
package com.raytheon.uf.viz.collaboration.ui.session;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
@ -31,12 +30,12 @@ import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.ColorDialog;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.jivesoftware.smack.packet.Presence;
import org.osgi.framework.Bundle;
import com.google.common.eventbus.Subscribe;
import com.raytheon.uf.viz.collaboration.comm.identity.IMessage;
@ -44,9 +43,8 @@ import com.raytheon.uf.viz.collaboration.comm.identity.info.SiteConfigInformatio
import com.raytheon.uf.viz.collaboration.comm.provider.connection.CollaborationConnection;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
import com.raytheon.uf.viz.collaboration.ui.Activator;
import com.raytheon.uf.viz.collaboration.ui.SiteColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.SiteColorInformation;
import com.raytheon.uf.viz.collaboration.ui.SiteColorInformation.SiteColor;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.ui.FeedColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.SiteConfigurationManager;
import com.raytheon.uf.viz.collaboration.ui.prefs.CollabPrefConstants;
import com.raytheon.uf.viz.core.icon.IconUtil;
@ -77,6 +75,7 @@ import com.raytheon.uf.viz.core.icon.IconUtil;
* Apr 01, 2014 2938 mpduff Update logic for site and role changes.
* Apr 22, 2014 3038 bclement added initialized flag to differentiate between roster population and new joins
* Oct 10, 2014 3708 bclement SiteConfigurationManager refactor
* Nov 26, 2014 3709 mapeters support foreground/background color preferences for each site
*
* </pre>
*
@ -88,15 +87,17 @@ public class SessionFeedView extends SessionView {
public static final String ID = "com.raytheon.uf.viz.collaboration.SessionFeedView";
private Action colorChangeAction;
private Action autoJoinAction;
private Action userAddSiteAction;
private Action userRemoveSiteAction;
private List<SiteColor> colors;
private Action bgColorChangeAction;
private Action fgColorChangeAction;
private static FeedColorConfigManager colorConfigManager;
private String actingSite;
@ -126,15 +127,10 @@ public class SessionFeedView extends SessionView {
*/
@Override
protected void initComponents(Composite parent) {
enableUserColors = false;
super.initComponents(parent);
colors = SiteColorConfigManager.getSiteColors();
if (colors != null) {
for (VenueParticipant user : session.getVenue().getParticipants()) {
setColorForSite(user);
}
} else {
colors = new ArrayList<SiteColor>();
}
colorConfigManager = new FeedColorConfigManager();
usersTable.refresh();
}
@ -152,37 +148,10 @@ public class SessionFeedView extends SessionView {
@Override
protected void createActions() {
super.createActions();
Bundle bundle = Activator.getDefault().getBundle();
colorChangeAction = new Action("Change Site Color...",
IconUtil.getImageDescriptor(bundle, "change_color.gif")) {
@Override
public void run() {
ColorDialog dlg = new ColorDialog(Display.getCurrent()
.getActiveShell());
RGB rgb = dlg.open();
if (rgb != null) {
/*
* get the selected entry so we know what site to change the
* color for
*/
String site = getSelectedSite();
replaceSiteColor(site.toString(), rgb);
/*
* loop through all the entries in the list so we can set
* the color for all sites corresponding to "selectedSite"
*/
if (site != null) {
for (VenueParticipant user : session.getVenue()
.getParticipants()) {
setColorForSite(user);
}
}
bgColorChangeAction = new ChangeSiteColorAction(SWT.BACKGROUND);
usersTable.refresh();
}
}
};
fgColorChangeAction = new ChangeSiteColorAction(SWT.FOREGROUND);
autoJoinAction = new Action(CollabPrefConstants.AUTO_JOIN, SWT.TOGGLE) {
@Override
@ -238,7 +207,8 @@ public class SessionFeedView extends SessionView {
@Override
protected void fillContextMenu(IMenuManager manager) {
super.fillContextMenu(manager);
manager.add(colorChangeAction);
manager.add(bgColorChangeAction);
manager.add(fgColorChangeAction);
String site = getSelectedSite();
if (!SiteConfigurationManager.isVisible(actingSite, site)) {
userAddSiteAction
@ -299,14 +269,56 @@ public class SessionFeedView extends SessionView {
}
}
/**
* Get site's foreground/background colors from colorConfigManager to pass
* to parent method.
*
* @param sb
* @param offset
* @param name
* @param userId
* @param ranges
* @param fgColor
* @param bgColor
* @param subject
*/
@Override
protected void styleAndAppendText(StringBuilder sb, int offset,
String name, VenueParticipant userId, String subject,
List<StyleRange> ranges) {
String name, VenueParticipant userId, List<StyleRange> ranges,
Color fgColor, Color bgColor, String subject) {
String site = null;
if (subject != null) {
setColorForSite(userId, subject);
site = subject;
} else if (userId != null) {
Presence presence = session.getVenue().getPresence(userId);
if (presence != null) {
site = String.valueOf(presence
.getProperty(SiteConfigInformation.SITE_NAME));
}
}
super.styleAndAppendText(sb, offset, name, userId, subject, ranges);
if (site != null) {
ColorInfo siteColor = colorConfigManager.getColor(site);
if (siteColor != null) {
if (siteColor.isForegroundSet()) {
fgColor = getColorFromRGB(siteColor
.getColor(SWT.FOREGROUND));
}
bgColor = getColorFromRGB(siteColor.getColor(SWT.BACKGROUND));
}
}
super.styleAndAppendText(sb, offset, name, userId, ranges, fgColor,
bgColor, subject);
}
/**
* Get the selected user
*
* @return
*/
private VenueParticipant getSelectedParticipant() {
IStructuredSelection selection = (IStructuredSelection) usersTable
.getSelection();
return (VenueParticipant) selection.getFirstElement();
}
/**
@ -316,77 +328,12 @@ public class SessionFeedView extends SessionView {
* @return
*/
private String getSelectedSite() {
IStructuredSelection selection = (IStructuredSelection) usersTable
.getSelection();
VenueParticipant selectedEntry = (VenueParticipant) selection
.getFirstElement();
VenueParticipant selectedEntry = getSelectedParticipant();
Presence pres = session.getVenue().getPresence(selectedEntry);
Object selectedSite = pres.getProperty(SiteConfigInformation.SITE_NAME);
return selectedSite == null ? "" : selectedSite.toString();
}
/**
* Takes an IRosterEntry and sets their color in the SessionColorManager for
* the site that they belong to, calls into
* setColorForSite(UserId,IPresence)
*
* @param user
*/
private void setColorForSite(VenueParticipant user) {
Presence presence = session.getVenue().getPresence(user);
setColorForSite(user, presence);
}
/**
* Does the work for setting the color for each user that belongs to a site
*
* @param id
* @param presence
*/
private void setColorForSite(VenueParticipant id, Presence presence) {
if (presence == null) {
return;
}
Object site = presence.getProperty(SiteConfigInformation.SITE_NAME);
if (site != null) {
setColorForSite(id, site.toString());
}
}
private void setColorForSite(VenueParticipant id, String site) {
SiteColor siteColor = new SiteColor();
siteColor.setSite(site.toString());
int index = colors.indexOf(siteColor);
if (index >= 0) {
SiteColor actualColor = colors.get(index);
colorManager.setColorForUser(id, actualColor.getColor());
}
}
/**
* Removes the color from the map if the site exists in the list
*
* @param site
* @param rgb
*/
private void replaceSiteColor(String site, RGB rgb) {
// now that the users have their color set, we need to add
// to the list that has the site color information
SiteColor color = new SiteColor();
color.setSite(site);
color.setColor(rgb);
boolean exists = false;
for (SiteColor col : SessionFeedView.this.colors) {
if (col.getSite().equals(site)) {
exists = true;
}
}
if (exists) {
SessionFeedView.this.colors.remove(color);
}
SessionFeedView.this.colors.add(color);
}
/*
* (non-Javadoc)
*
@ -450,11 +397,6 @@ public class SessionFeedView extends SessionView {
}
}
/*
* Presence changed is triggered for participant's site being changed.
* Need to set the color to handle this situation.
*/
setColorForSite(participant, presence);
refreshParticipantList();
}
@ -541,16 +483,45 @@ public class SessionFeedView extends SessionView {
}
/*
* (non-Javadoc)
*
* @see com.raytheon.uf.viz.collaboration.ui.session.SessionView#dispose()
* action for changing foreground/background color for a selected site
*/
@Override
public void dispose() {
super.dispose();
SiteColorInformation information = new SiteColorInformation();
information.setColors(this.colors);
// TODO should color config be written more often?
SiteColorConfigManager.writeSiteColorInformation(information);
private class ChangeSiteColorAction extends Action {
private int type;
private ChangeSiteColorAction(int type) {
super("Change Site "
+ (type == SWT.FOREGROUND ? "Foreground" : "Background")
+ " Color...", IconUtil.getImageDescriptor(Activator
.getDefault().getBundle(), "change_color.gif"));
this.type = type;
}
@Override
public void run() {
ColorDialog dialog = new ColorDialog(Display.getCurrent()
.getActiveShell());
RGB defaultForeground = colorManager
.getColorForUser(getSelectedParticipant());
String site = getSelectedSite();
ColorInfo colorInfo = colorConfigManager.getColor(site);
if (colorInfo != null
&& (type != SWT.FOREGROUND || colorInfo.isForegroundSet())) {
/*
* don't set dialog from colorInfo if null or type is foreground
* and foreground hasn't been set (use default)
*/
dialog.setRGB(colorInfo.getColor(type));
} else if (type == SWT.FOREGROUND) {
dialog.setRGB(defaultForeground);
}
RGB rgb = dialog.open();
if (rgb != null) {
colorConfigManager.setColor(site, type, rgb,
defaultForeground);
}
usersTable.refresh();
}
}
}

View file

@ -23,9 +23,7 @@ package com.raytheon.uf.viz.collaboration.ui.session;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.IMenuListener;
@ -83,6 +81,9 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
import com.raytheon.uf.viz.collaboration.display.data.SessionColorManager;
import com.raytheon.uf.viz.collaboration.ui.Activator;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.ui.UserColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.actions.ChangeUserColorAction;
import com.raytheon.uf.viz.collaboration.ui.actions.PeerToPeerChatAction;
import com.raytheon.uf.viz.collaboration.ui.actions.PrintLogActionContributionItem;
import com.raytheon.uf.viz.collaboration.ui.prefs.CollabPrefConstants;
@ -115,6 +116,9 @@ import com.raytheon.uf.viz.core.sounds.SoundUtil;
* negative weights - set to zero if negative.
* Jun 17, 2014 3078 bclement added private chat to menu and double click
* Jul 03, 2014 3342 bclement added count to participants label
* Nov 26, 2014 3709 mapeters added styleAndAppendText() taking fg and bg colors,
* use parent's colors map.
* Dec 02, 2014 3709 mapeters added color actions for group chats without shared display.
*
* </pre>
*
@ -148,7 +152,9 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
protected SessionColorManager colorManager;
protected Map<RGB, Color> mappedColors;
private static UserColorConfigManager colorConfigManager;
protected boolean enableUserColors = true;
public SessionView() {
super();
@ -159,7 +165,6 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
super.createPartControl(parent);
createActions();
createContextMenu();
mappedColors = new HashMap<RGB, Color>();
}
/*
@ -172,6 +177,9 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
protected void initComponents(Composite parent) {
initColorManager();
super.initComponents(parent);
if (enableUserColors) {
colorConfigManager = new UserColorConfigManager();
}
// unfortunately this code cannot be a part of createToolbarButton
// because I cannot instantiate the ACI until after the messagesText
@ -221,9 +229,19 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
IStructuredSelection selection = (IStructuredSelection) usersTable
.getSelection();
VenueParticipant entry = (VenueParticipant) selection.getFirstElement();
if (!entry.isSameUser(session.getUserID())) {
boolean me = entry.isSameUser(session.getUserID());
if (!me) {
manager.add(new PeerToPeerChatAction(entry));
}
if (enableUserColors) {
// add color actions if in group chat room without shared display
String user = entry.getName();
RGB defaultForeground = colorManager.getColorForUser(entry);
manager.add(new ChangeUserColorAction(SWT.BACKGROUND, user,
me, defaultForeground, colorConfigManager));
manager.add(new ChangeUserColorAction(SWT.FOREGROUND, user,
me, defaultForeground, colorConfigManager));
}
}
@Subscribe
@ -408,12 +426,6 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
disposeArrow(downArrow);
disposeArrow(rightArrow);
if (mappedColors != null) {
for (Color col : mappedColors.values()) {
col.dispose();
}
mappedColors.clear();
}
if (colorManager != null) {
colorManager.clearColors();
}
@ -471,12 +483,8 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
String name, VenueParticipant userId, String subject,
List<StyleRange> ranges) {
RGB rgb = colorManager.getColorForUser(userId);
if (mappedColors.get(rgb) == null) {
Color col = new Color(Display.getCurrent(), rgb);
mappedColors.put(rgb, col);
}
styleAndAppendText(sb, offset, name, userId, ranges,
mappedColors.get(rgb));
getColorFromRGB(rgb), null, subject);
}
/*
@ -491,22 +499,34 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
protected void styleAndAppendText(StringBuilder sb, int offset,
String name, VenueParticipant userId, List<StyleRange> ranges,
Color color) {
StyleRange range = new StyleRange(messagesText.getCharCount(), offset,
color, null, SWT.NORMAL);
ranges.add(range);
if (userId != null) {
range = new StyleRange(messagesText.getCharCount() + offset,
name.length() + 1, color, null, SWT.BOLD);
} else {
range = new StyleRange(messagesText.getCharCount() + offset,
sb.length() - offset, color, null, SWT.BOLD);
styleAndAppendText(sb, offset, name, userId, ranges, color, null, null);
}
protected void styleAndAppendText(StringBuilder sb, int offset,
String name, VenueParticipant userId, List<StyleRange> ranges,
Color fgColor, Color bgColor, String subject) {
if (enableUserColors && name != null) {
// Color text by user if in group chat room without shared display
ColorInfo userColor = colorConfigManager.getColor(name);
if (userColor != null) {
fgColor = getColorFromRGB(userColor.getColor(SWT.FOREGROUND));
bgColor = getColorFromRGB(userColor.getColor(SWT.BACKGROUND));
}
}
StyleRange range = new StyleRange(messagesText.getCharCount(),
sb.length(), fgColor, null, SWT.NORMAL);
ranges.add(range);
range = new StyleRange(messagesText.getCharCount() + offset,
(userId != null ? name.length() + 1 : sb.length() - offset),
fgColor, null, SWT.BOLD);
ranges.add(range);
messagesText.append(sb.toString());
for (StyleRange newRange : ranges) {
messagesText.setStyleRange(newRange);
}
messagesText.setTopIndex(messagesText.getLineCount() - 1);
int lineNumber = messagesText.getLineCount() - 1;
messagesText.setLineBackground(lineNumber, 1, bgColor);
messagesText.setTopIndex(lineNumber);
}
public String getRoom() {

View file

@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: Coopprecip
Bundle-SymbolicName: com.raytheon.uf.viz.coopprecip
Bundle-Version: 1.14.0.qualifier
Bundle-Activator: com.raytheon.uf.viz.coopprecip.Activator
Bundle-Vendor: RAYTHEON
Require-Bundle: org.eclipse.core.runtime,
com.raytheon.uf.viz.datacube

View file

@ -1,30 +0,0 @@
package com.raytheon.uf.viz.coopprecip;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
public class Activator implements BundleActivator {
private static BundleContext context;
static BundleContext getContext() {
return context;
}
/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext bundleContext) throws Exception {
Activator.context = bundleContext;
}
/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext bundleContext) throws Exception {
Activator.context = null;
}
}

View file

@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: Cwa Plug-in
Bundle-SymbolicName: com.raytheon.uf.viz.cwa
Bundle-Version: 1.14.0.qualifier
Bundle-Activator: com.raytheon.uf.viz.cwa.Activator
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
@ -29,8 +28,7 @@ Import-Package: com.raytheon.uf.common.dataplugin,
org.eclipse.ui.plugin,
org.opengis.referencing.crs,
org.osgi.framework
Export-Package: com.raytheon.uf.viz.cwa,
com.raytheon.uf.viz.cwa.rsc
Export-Package: com.raytheon.uf.viz.cwa.rsc
Require-Bundle: com.raytheon.uf.viz.core,
org.apache.batik,
com.raytheon.uf.viz.core,

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<menuContributionFile>
<include installTo="menu:Aviation?before=CenterWeatherEnd"
fileName="menus/upperair/baseAviationCWA.xml" />
</menuContributionFile>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<contribute xsi:type="bundleItem" file="bundles/CWA.xml"
menuText="Center Weather Advisories" id="cwa">
</contribute>
</menuTemplate>

View file

@ -1,69 +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.cwa;
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.cwa";
// 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;
}
}

View file

@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: Plug-in
Bundle-SymbolicName: com.raytheon.uf.viz.cwat;singleton:=true
Bundle-Version: 1.14.0.qualifier
Bundle-Activator: com.raytheon.uf.viz.cwat.Activator
Bundle-Vendor: RAYTHEON
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
@ -15,4 +14,3 @@ Require-Bundle: org.eclipse.ui,
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Export-Package: com.raytheon.uf.viz.cwat

View file

@ -1,69 +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.cwat;
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.cwat";
// 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;
}
}

View file

@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: Core Plug-in
Bundle-SymbolicName: com.raytheon.uf.viz.d2d.core;singleton:=true
Bundle-Version: 1.14.0.qualifier
Bundle-Activator: com.raytheon.uf.viz.d2d.core.Activator
Bundle-Vendor: RAYTHEON
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui,

View file

@ -1,69 +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.d2d.core;
import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends Plugin {
// The plug-in ID
public static final String PLUGIN_ID = "com.raytheon.uf.viz.d2d.core";
// The shared instance
private static Activator plugin;
/**
* The constructor
*/
public Activator() {
}
/*
* (non-Javadoc)
* @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/*
* (non-Javadoc)
* @see org.eclipse.core.runtime.Plugin#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;
}
}

View file

@ -1,8 +0,0 @@
#Thu Feb 17 14:26:57 CST 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

View file

@ -1,8 +0,0 @@
#Sat Apr 09 08:47:34 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

View file

@ -2,9 +2,9 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: D2D Nsharp
Bundle-SymbolicName: com.raytheon.uf.viz.d2d.nsharp;singleton:=true
Bundle-Version: 1.14.0.qualifier
Bundle-Version: 1.14.1.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Require-Bundle: com.raytheon.uf.viz.core;bundle-version="1.14.0",
com.raytheon.viz.core.graphing,

View file

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<menuContributionFile>
<include subMenu="US Western" installTo="menu:upperAir?before=RAOBMenuEnd"
fileName="menus/upperair/baseUSWestern.xml" />
<include subMenu="US Central" installTo="menu:upperAir?before=RAOBMenuEnd"
fileName="menus/upperair/baseUSCentral.xml" />
<include subMenu="US Eastern" installTo="menu:upperAir?before=RAOBMenuEnd"
fileName="menus/upperair/baseUSEastern.xml" />
<include subMenu="Canada North" installTo="menu:upperAir?before=RAOBMenuEnd"
fileName="menus/upperair/baseCanadaNorth.xml" />
<include subMenu="Canada Western" installTo="menu:upperAir?before=RAOBMenuEnd"
fileName="menus/upperair/baseCanadaWestern.xml" />
<include subMenu="Canada Central" installTo="menu:upperAir?before=RAOBMenuEnd"
fileName="menus/upperair/baseCanadaCentral.xml" />
<include subMenu="Canada Eastern" installTo="menu:upperAir?before=RAOBMenuEnd"
fileName="menus/upperair/baseCanadaEastern.xml" />
<include subMenu="Mexico" installTo="menu:upperAir?before=RAOBMenuEnd"
fileName="menus/upperair/baseMexico.xml" />
<include subMenu="Atlantic" installTo="menu:upperAir?before=RAOBMenuEnd"
fileName="menus/upperair/baseAtlantic.xml" />
<include subMenu="Japan/South Asia" installTo="menu:upperAir?before=RAOBMenuEnd"
fileName="menus/upperair/baseJapan.xml" />
<include subMenu="Australia" installTo="menu:upperAir?before=RAOBMenuEnd"
fileName="menus/upperair/baseAustralia.xml" />
<include subMenu="China" installTo="menu:upperAir?before=RAOBMenuEnd"
fileName="menus/upperair/baseChina.xml" />
<include subMenu="Russia" installTo="menu:upperAir?before=RAOBMenuEnd"
fileName="menus/upperair/baseRussia.xml" />
<include subMenu="Pacific East" installTo="menu:upperAir?before=RAOBMenuEnd"
fileName="menus/upperair/basePacificEast.xml" />
<include subMenu="Pacific West" installTo="menu:upperAir?before=RAOBMenuEnd"
fileName="menus/upperair/basePacificWest.xml" />
<include subMenu="Alaska" installTo="menu:upperAir?before=RAOBMenuEnd"
fileName="menus/upperair/baseAlaska.xml" />
</menuContributionFile>

Some files were not shown because too many files have changed in this diff Show more