Issue #2602 Switch around the order of some things on startup to make thinclient better.
Former-commit-id:922674273e
[formerly 41f4a0a6050319adf27f3656b665a2fb011b849c] Former-commit-id:a37db9d1b4
This commit is contained in:
parent
85bc26b5a3
commit
bf508b4455
23 changed files with 536 additions and 481 deletions
|
@ -69,9 +69,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="arguments" ref="recordFactory" />
|
<property name="arguments" ref="recordFactory" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="procedureXmlManagerInit" class="com.raytheon.uf.viz.core.procedures.ProcedureXmlManager" factory-method="inititializeAsync"/>
|
|
||||||
|
|
||||||
<bean id="vizSubClassLocator" class="com.raytheon.uf.viz.core.reflect.SubClassLocator"/>
|
<bean id="vizSubClassLocator" class="com.raytheon.uf.viz.core.reflect.SubClassLocator"/>
|
||||||
<bean class="com.raytheon.uf.common.style.StyleManager" factory-method="getInstance">
|
<bean class="com.raytheon.uf.common.style.StyleManager" factory-method="getInstance">
|
||||||
<property name="subClassLocator" ref="vizSubClassLocator" />
|
<property name="subClassLocator" ref="vizSubClassLocator" />
|
||||||
|
|
|
@ -52,8 +52,10 @@ import com.raytheon.uf.viz.core.Activator;
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------- -------- ----------- --------------------------
|
* ------------- -------- ----------- -----------------------------------------
|
||||||
* Oct 18, 2013 2491 bsteffen Initial creation
|
* Oct 18, 2013 2491 bsteffen Initial creation
|
||||||
|
* Dec 10, 2013 2602 bsteffen Add null checks to detect unloaded
|
||||||
|
* bundles.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -256,7 +258,13 @@ public class SubClassLocator implements ISubClassLocator {
|
||||||
private Set<Class<?>> loadClassesFromCache(Bundle bundle,
|
private Set<Class<?>> loadClassesFromCache(Bundle bundle,
|
||||||
Collection<String> classNames) {
|
Collection<String> classNames) {
|
||||||
BundleWiring bundleWiring = bundle.adapt(BundleWiring.class);
|
BundleWiring bundleWiring = bundle.adapt(BundleWiring.class);
|
||||||
|
if (bundleWiring == null) {
|
||||||
|
return Collections.emptySet();
|
||||||
|
}
|
||||||
ClassLoader loader = bundleWiring.getClassLoader();
|
ClassLoader loader = bundleWiring.getClassLoader();
|
||||||
|
if (loader == null) {
|
||||||
|
return Collections.emptySet();
|
||||||
|
}
|
||||||
HashSet<Class<?>> result = new HashSet<Class<?>>(classNames.size(),
|
HashSet<Class<?>> result = new HashSet<Class<?>>(classNames.size(),
|
||||||
1.0f);
|
1.0f);
|
||||||
for (String className : classNames) {
|
for (String className : classNames) {
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<?eclipse version="3.4"?>
|
<?eclipse version="3.4"?>
|
||||||
<plugin>
|
<plugin>
|
||||||
<extension-point id="tearoffperspective" name="tearoffperspective" schema="schema/tearoffperspective.exsd"/>
|
<extension-point id="tearoffperspective" name="tearoffperspective" schema="schema/tearoffperspective.exsd"/>
|
||||||
|
<extension-point id="com.raytheon.uf.viz.ui.menus.contribItemProvider" name="contribItemProvider" schema="schema/com.raytheon.uf.viz.ui.menus.contribItemProvider.exsd"/>
|
||||||
<extension
|
<extension
|
||||||
point="com.raytheon.uf.viz.localization.localizationpath">
|
point="com.raytheon.uf.viz.localization.localizationpath">
|
||||||
<path
|
<path
|
||||||
|
|
|
@ -0,0 +1,112 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<!-- Schema file written by PDE -->
|
||||||
|
<schema targetNamespace="com.raytheon.uf.viz.ui.menus" xmlns="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<annotation>
|
||||||
|
<appinfo>
|
||||||
|
<meta.schema plugin="com.raytheon.uf.viz.ui.menus" id="com.raytheon.uf.viz.ui.menus.contribItemProvider" name="contribItemProvider"/>
|
||||||
|
</appinfo>
|
||||||
|
<documentation>
|
||||||
|
[Enter description of this extension point.]
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
|
||||||
|
<element name="extension">
|
||||||
|
<annotation>
|
||||||
|
<appinfo>
|
||||||
|
<meta.element />
|
||||||
|
</appinfo>
|
||||||
|
</annotation>
|
||||||
|
<complexType>
|
||||||
|
<sequence minOccurs="1" maxOccurs="unbounded">
|
||||||
|
<element ref="contributionItemProvider"/>
|
||||||
|
</sequence>
|
||||||
|
<attribute name="point" type="string" use="required">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="id" type="string">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="name" type="string">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
|
||||||
|
</documentation>
|
||||||
|
<appinfo>
|
||||||
|
<meta.attribute translatable="true"/>
|
||||||
|
</appinfo>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
|
</complexType>
|
||||||
|
</element>
|
||||||
|
|
||||||
|
<element name="contributionItemProvider">
|
||||||
|
<complexType>
|
||||||
|
<attribute name="contribution" type="string" use="required">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
|
||||||
|
</documentation>
|
||||||
|
<appinfo>
|
||||||
|
<meta.attribute kind="java" basedOn="com.raytheon.uf.common.menus.xml.CommonAbstractMenuContribution:"/>
|
||||||
|
</appinfo>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="itemProvider" type="string" use="required">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
|
||||||
|
</documentation>
|
||||||
|
<appinfo>
|
||||||
|
<meta.attribute kind="java" basedOn=":com.raytheon.uf.viz.ui.menus.xml.IContribItemProvider"/>
|
||||||
|
</appinfo>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
|
</complexType>
|
||||||
|
</element>
|
||||||
|
|
||||||
|
<annotation>
|
||||||
|
<appinfo>
|
||||||
|
<meta.section type="since"/>
|
||||||
|
</appinfo>
|
||||||
|
<documentation>
|
||||||
|
[Enter the first release in which this extension point appears.]
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
|
||||||
|
<annotation>
|
||||||
|
<appinfo>
|
||||||
|
<meta.section type="examples"/>
|
||||||
|
</appinfo>
|
||||||
|
<documentation>
|
||||||
|
[Enter extension point usage example here.]
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
|
||||||
|
<annotation>
|
||||||
|
<appinfo>
|
||||||
|
<meta.section type="apiinfo"/>
|
||||||
|
</appinfo>
|
||||||
|
<documentation>
|
||||||
|
[Enter API information here.]
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
|
||||||
|
<annotation>
|
||||||
|
<appinfo>
|
||||||
|
<meta.section type="implementation"/>
|
||||||
|
</appinfo>
|
||||||
|
<documentation>
|
||||||
|
[Enter information about supplied implementation of this extension point.]
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
|
||||||
|
|
||||||
|
</schema>
|
|
@ -37,7 +37,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||||
import com.raytheon.uf.viz.core.VariableSubstitutionUtil;
|
import com.raytheon.uf.viz.core.VariableSubstitutionUtil;
|
||||||
import com.raytheon.uf.viz.core.exception.VizException;
|
import com.raytheon.uf.viz.core.exception.VizException;
|
||||||
import com.raytheon.uf.viz.core.jobs.JobPool;
|
import com.raytheon.uf.viz.core.jobs.JobPool;
|
||||||
import com.raytheon.uf.viz.ui.menus.xml.AbstractMenuContributionItem;
|
import com.raytheon.uf.viz.ui.menus.xml.IContribItemProvider;
|
||||||
import com.raytheon.uf.viz.ui.menus.xml.MenuXMLMap;
|
import com.raytheon.uf.viz.ui.menus.xml.MenuXMLMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,11 +46,12 @@ import com.raytheon.uf.viz.ui.menus.xml.MenuXMLMap;
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
*
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------- -------- ----------- -----------------------------------------
|
||||||
* Mar 26, 2009 chammack Initial creation
|
* Mar 26, 2009 chammack Initial creation
|
||||||
* May 08, 2013 1978 bsteffen Perform variable substitution on subMenu
|
* May 08, 2013 1978 bsteffen Perform variable substitution on subMenu
|
||||||
* IDs.
|
* IDs.
|
||||||
|
* Dec 11, 2013 2602 bsteffen Update MenuXMLMap.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -120,8 +121,8 @@ public class SubmenuContributionItem extends MenuManager {
|
||||||
|
|
||||||
for (int i = 0; i < contribs.length; i++) {
|
for (int i = 0; i < contribs.length; i++) {
|
||||||
try {
|
try {
|
||||||
AbstractMenuContributionItem<?> amc = MenuXMLMap.xmlMapping
|
IContribItemProvider amc = MenuXMLMap
|
||||||
.get(contribs[i].getClass());
|
.getProvider(contribs[i].getClass());
|
||||||
contributionItems[i] = amc.getContributionItems(
|
contributionItems[i] = amc.getContributionItems(
|
||||||
contribs[i], this.subs, this.removals);
|
contribs[i], this.subs, this.removals);
|
||||||
|
|
||||||
|
|
|
@ -42,14 +42,16 @@ import com.raytheon.uf.viz.ui.menus.DiscoverMenuContributions;
|
||||||
import com.raytheon.uf.viz.ui.menus.widgets.SubmenuContributionItem;
|
import com.raytheon.uf.viz.ui.menus.widgets.SubmenuContributionItem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO Add Description
|
* Providex ability to include menus from other localization files.
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
*
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------- -------- ----------- -----------------------------------------
|
||||||
* Apr 27, 2009 chammack Initial creation
|
* Apr 27, 2009 chammack Initial creation
|
||||||
|
* Dec 11, 2013 2602 bsteffen Update MenuXMLMap.
|
||||||
|
*
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -103,8 +105,8 @@ public class IncludeMenuContribution extends
|
||||||
|
|
||||||
if (mtf.contributions != null) {
|
if (mtf.contributions != null) {
|
||||||
for (CommonAbstractMenuContribution c : mtf.contributions) {
|
for (CommonAbstractMenuContribution c : mtf.contributions) {
|
||||||
AbstractMenuContributionItem<?> amc = MenuXMLMap.xmlMapping
|
IContribItemProvider amc = MenuXMLMap.getProvider(c
|
||||||
.get(c.getClass());
|
.getClass());
|
||||||
IContributionItem[] contribItems = amc
|
IContributionItem[] contribItems = amc
|
||||||
.getContributionItems(c, combinedSub, removals);
|
.getContributionItems(c, combinedSub, removals);
|
||||||
if (contribItems != null && contribItems.length > 0) {
|
if (contribItems != null && contribItems.length > 0) {
|
||||||
|
|
|
@ -52,9 +52,10 @@ import com.raytheon.uf.viz.ui.menus.widgets.SubmenuContributionItem;
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
*
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------- -------- ----------- -----------------------------------------
|
||||||
* Mar 12, 2009 chammack Initial creation
|
* Mar 12, 2009 chammack Initial creation
|
||||||
|
* Dec 11, 2013 2602 bsteffen Update MenuXMLMap.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -136,8 +137,8 @@ public class IncludeMenuItem extends CommonIncludeMenuItem implements
|
||||||
|
|
||||||
if (mtf.contributions != null) {
|
if (mtf.contributions != null) {
|
||||||
for (CommonAbstractMenuContribution c : mtf.contributions) {
|
for (CommonAbstractMenuContribution c : mtf.contributions) {
|
||||||
AbstractMenuContributionItem<?> amc = MenuXMLMap.xmlMapping
|
IContribItemProvider amc = MenuXMLMap.getProvider(c
|
||||||
.get(c.getClass());
|
.getClass());
|
||||||
if (removalsSet.contains(c.id))
|
if (removalsSet.contains(c.id))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,14 @@ package com.raytheon.uf.viz.ui.menus.xml;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
import org.eclipse.core.runtime.IConfigurationElement;
|
||||||
|
import org.eclipse.core.runtime.IExtension;
|
||||||
|
import org.eclipse.core.runtime.IExtensionPoint;
|
||||||
|
import org.eclipse.core.runtime.IExtensionRegistry;
|
||||||
|
import org.eclipse.core.runtime.Platform;
|
||||||
|
|
||||||
|
import com.raytheon.uf.common.menus.xml.CommonAbstractMenuContribution;
|
||||||
import com.raytheon.uf.common.menus.xml.CommonBundleMenuContribution;
|
import com.raytheon.uf.common.menus.xml.CommonBundleMenuContribution;
|
||||||
import com.raytheon.uf.common.menus.xml.CommonCommandContribution;
|
import com.raytheon.uf.common.menus.xml.CommonCommandContribution;
|
||||||
import com.raytheon.uf.common.menus.xml.CommonDynamicMenuContribution;
|
import com.raytheon.uf.common.menus.xml.CommonDynamicMenuContribution;
|
||||||
|
@ -31,6 +39,9 @@ import com.raytheon.uf.common.menus.xml.CommonSeparatorMenuContribution;
|
||||||
import com.raytheon.uf.common.menus.xml.CommonSubmenuContribution;
|
import com.raytheon.uf.common.menus.xml.CommonSubmenuContribution;
|
||||||
import com.raytheon.uf.common.menus.xml.CommonTitleContribution;
|
import com.raytheon.uf.common.menus.xml.CommonTitleContribution;
|
||||||
import com.raytheon.uf.common.menus.xml.CommonToolbarSubmenuContribution;
|
import com.raytheon.uf.common.menus.xml.CommonToolbarSubmenuContribution;
|
||||||
|
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||||
|
import com.raytheon.uf.common.status.UFStatus;
|
||||||
|
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO Add Description
|
* TODO Add Description
|
||||||
|
@ -38,10 +49,11 @@ import com.raytheon.uf.common.menus.xml.CommonToolbarSubmenuContribution;
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
*
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------- -------- ----------- -----------------------------------------
|
||||||
* Jun 28, 2010 mnash Initial creation
|
* Jun 28, 2010 mnash Initial creation
|
||||||
* Jul 31, 2012 875 rferrel Added DynamicMenuContribution.
|
* Jul 31, 2012 875 rferrel Added DynamicMenuContribution.
|
||||||
|
* Dec 11, 2013 2602 bsteffen Load providers from extension point.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -50,9 +62,16 @@ import com.raytheon.uf.common.menus.xml.CommonToolbarSubmenuContribution;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class MenuXMLMap {
|
public class MenuXMLMap {
|
||||||
public static final Map<Class<?>, AbstractMenuContributionItem<?>> xmlMapping = new HashMap<Class<?>, AbstractMenuContributionItem<?>>();
|
|
||||||
|
|
||||||
static {
|
private static final IUFStatusHandler statusHandler = UFStatus
|
||||||
|
.getHandler(DynamicMenuContribution.class);
|
||||||
|
|
||||||
|
private static final String EXTENSION_ID = "com.raytheon.uf.viz.ui.menus.contribItemProvider";
|
||||||
|
|
||||||
|
private static final Map<Class<? extends CommonAbstractMenuContribution>, IContribItemProvider> xmlMapping = init();
|
||||||
|
|
||||||
|
private static Map<Class<? extends CommonAbstractMenuContribution>, IContribItemProvider> init() {
|
||||||
|
Map<Class<? extends CommonAbstractMenuContribution>, IContribItemProvider> xmlMapping = new HashMap<Class<? extends CommonAbstractMenuContribution>, IContribItemProvider>();
|
||||||
xmlMapping.put(CommonBundleMenuContribution.class,
|
xmlMapping.put(CommonBundleMenuContribution.class,
|
||||||
new BundleMenuContribution());
|
new BundleMenuContribution());
|
||||||
xmlMapping.put(CommonCommandContribution.class,
|
xmlMapping.put(CommonCommandContribution.class,
|
||||||
|
@ -70,10 +89,31 @@ public class MenuXMLMap {
|
||||||
new ToolbarSubmenuContribution());
|
new ToolbarSubmenuContribution());
|
||||||
xmlMapping.put(CommonDynamicMenuContribution.class,
|
xmlMapping.put(CommonDynamicMenuContribution.class,
|
||||||
new DynamicMenuContribution());
|
new DynamicMenuContribution());
|
||||||
|
IExtensionRegistry registry = Platform.getExtensionRegistry();
|
||||||
|
IExtensionPoint point = registry.getExtensionPoint(EXTENSION_ID);
|
||||||
|
if (point != null) {
|
||||||
|
IExtension[] extensions = point.getExtensions();
|
||||||
|
for (IExtension extension : extensions) {
|
||||||
|
for (IConfigurationElement element : extension
|
||||||
|
.getConfigurationElements()) {
|
||||||
|
try {
|
||||||
|
CommonAbstractMenuContribution contrib = (CommonAbstractMenuContribution) element
|
||||||
|
.createExecutableExtension("contribution");
|
||||||
|
IContribItemProvider provider = (IContribItemProvider) element
|
||||||
|
.createExecutableExtension("itemProvider");
|
||||||
|
xmlMapping.put(contrib.getClass(), provider);
|
||||||
|
} catch (CoreException e) {
|
||||||
|
statusHandler.handle(Priority.PROBLEM,
|
||||||
|
"Error preparing menu contributions.", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return xmlMapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerMapping(Class<?> clazz,
|
public static IContribItemProvider getProvider(
|
||||||
AbstractMenuContributionItem<?> item) {
|
Class<? extends CommonAbstractMenuContribution> contribClass) {
|
||||||
xmlMapping.put(clazz, item);
|
return xmlMapping.get(contribClass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,23 @@ import com.raytheon.uf.common.menus.xml.VariableSubstitution;
|
||||||
import com.raytheon.uf.viz.core.exception.VizException;
|
import com.raytheon.uf.viz.core.exception.VizException;
|
||||||
import com.raytheon.uf.viz.ui.menus.widgets.ToolbarSubmenuContributionItem;
|
import com.raytheon.uf.viz.ui.menus.widgets.ToolbarSubmenuContributionItem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Contribution for adding submenus to a tool bar.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
*
|
||||||
|
* SOFTWARE HISTORY
|
||||||
|
*
|
||||||
|
* Date Ticket# Engineer Description
|
||||||
|
* ------------- -------- ----------- -----------------------------------------
|
||||||
|
* Dec 11, 2013 2602 bsteffen Update MenuXMLMap.
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author unknown
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
public class ToolbarSubmenuContribution extends
|
public class ToolbarSubmenuContribution extends
|
||||||
AbstractMenuContributionItem<CommonToolbarSubmenuContribution> {
|
AbstractMenuContributionItem<CommonToolbarSubmenuContribution> {
|
||||||
|
|
||||||
|
@ -52,8 +69,8 @@ public class ToolbarSubmenuContribution extends
|
||||||
List<IContributionItem> contribItemList = new ArrayList<IContributionItem>();
|
List<IContributionItem> contribItemList = new ArrayList<IContributionItem>();
|
||||||
|
|
||||||
for (CommonAbstractMenuContribution amc : item.contributions) {
|
for (CommonAbstractMenuContribution amc : item.contributions) {
|
||||||
AbstractMenuContributionItem<?> common = MenuXMLMap.xmlMapping
|
IContribItemProvider common = MenuXMLMap
|
||||||
.get(amc.getClass());
|
.getProvider(amc.getClass());
|
||||||
contribItemList.addAll(Arrays.asList(common.getContributionItems(
|
contribItemList.addAll(Arrays.asList(common.getContributionItems(
|
||||||
amc, subs, removals)));
|
amc, subs, removals)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,29 @@
|
||||||
Manifest-Version: 1.0
|
Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: Satellite Plug-in
|
Bundle-Name: Satellite Visualization Plug-in
|
||||||
Bundle-SymbolicName: com.raytheon.viz.satellite;singleton:=true
|
Bundle-SymbolicName: com.raytheon.viz.satellite;singleton:=true
|
||||||
Bundle-Version: 1.12.1174.qualifier
|
Bundle-Version: 1.13.0.qualifier
|
||||||
Bundle-Activator: com.raytheon.viz.satellite.Activator
|
|
||||||
Bundle-Vendor: Raytheon
|
Bundle-Vendor: Raytheon
|
||||||
Eclipse-RegisterBuddy: com.raytheon.viz.core, com.raytheon.uf.viz.core, com.raytheon.viz.ui
|
Eclipse-RegisterBuddy: com.raytheon.viz.core, com.raytheon.uf.viz.core, com.raytheon.viz.ui
|
||||||
Eclipse-BuddyPolicy: ext, global
|
Eclipse-BuddyPolicy: ext, global
|
||||||
Require-Bundle: org.eclipse.ui,
|
Require-Bundle: org.eclipse.ui,
|
||||||
org.eclipse.core.runtime,
|
org.eclipse.core.runtime,
|
||||||
com.raytheon.uf.viz.core,
|
com.raytheon.uf.viz.core,
|
||||||
com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174",
|
com.raytheon.uf.common.dataplugin,
|
||||||
com.raytheon.uf.common.dataplugin.satellite;bundle-version="1.0.0",
|
com.raytheon.uf.common.dataplugin.satellite,
|
||||||
com.raytheon.uf.common.datastorage;bundle-version="1.12.1174",
|
com.raytheon.uf.common.datastorage,
|
||||||
com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1174",
|
com.raytheon.uf.common.serialization.comm,
|
||||||
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
|
com.raytheon.uf.common.geospatial,
|
||||||
com.raytheon.uf.common.colormap;bundle-version="1.12.1174",
|
com.raytheon.uf.common.colormap,
|
||||||
com.raytheon.uf.common.pointdata;bundle-version="1.12.1174",
|
com.raytheon.uf.common.pointdata,
|
||||||
com.raytheon.uf.common.message;bundle-version="1.12.1174",
|
com.raytheon.uf.common.message,
|
||||||
com.raytheon.uf.viz.productbrowser;bundle-version="1.11.31",
|
com.raytheon.uf.viz.productbrowser,
|
||||||
com.raytheon.uf.viz.derivparam;bundle-version="1.12.1174",
|
com.raytheon.uf.viz.derivparam,
|
||||||
com.raytheon.uf.viz.ui.menus;bundle-version="1.12.1174",
|
com.raytheon.uf.viz.ui.menus,
|
||||||
com.raytheon.viz.ui;bundle-version="1.12.1174",
|
com.raytheon.uf.common.style,
|
||||||
com.raytheon.viz.core;bundle-version="1.12.1174",
|
com.raytheon.viz.ui,
|
||||||
javax.measure,
|
com.raytheon.viz.core,
|
||||||
com.raytheon.uf.common.style;bundle-version="1.0.0"
|
javax.measure
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Export-Package: com.raytheon.viz.satellite,
|
Export-Package: com.raytheon.viz.satellite,
|
||||||
com.raytheon.viz.satellite.rsc
|
com.raytheon.viz.satellite.rsc
|
||||||
|
|
|
@ -48,4 +48,11 @@
|
||||||
name="Satellite"
|
name="Satellite"
|
||||||
category="com.raytheon.uf.viz.productbrowser.productbrowserpreferencespage"/>
|
category="com.raytheon.uf.viz.productbrowser.productbrowserpreferencespage"/>
|
||||||
</extension>
|
</extension>
|
||||||
|
<extension
|
||||||
|
point="com.raytheon.uf.viz.ui.menus.contribItemProvider">
|
||||||
|
<contributionItemProvider
|
||||||
|
contribution="com.raytheon.uf.common.menus.xml.CommonSatBundleMenuContribution"
|
||||||
|
itemProvider="com.raytheon.viz.satellite.menu.SatBundleMenuContribution">
|
||||||
|
</contributionItemProvider>
|
||||||
|
</extension>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
|
@ -1,81 +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.viz.satellite;
|
|
||||||
|
|
||||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
|
||||||
import org.osgi.framework.BundleContext;
|
|
||||||
|
|
||||||
import com.raytheon.uf.common.menus.xml.CommonSatBundleMenuContribution;
|
|
||||||
import com.raytheon.uf.viz.ui.menus.xml.MenuXMLMap;
|
|
||||||
import com.raytheon.viz.satellite.menu.SatBundleMenuContribution;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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.viz.satellite";
|
|
||||||
|
|
||||||
// The shared instance
|
|
||||||
private static Activator plugin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The constructor
|
|
||||||
*/
|
|
||||||
public Activator() {
|
|
||||||
plugin = this;
|
|
||||||
MenuXMLMap.registerMapping(CommonSatBundleMenuContribution.class,
|
|
||||||
new SatBundleMenuContribution());
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
|
|
||||||
* )
|
|
||||||
*/
|
|
||||||
public void start(BundleContext context) throws Exception {
|
|
||||||
super.start(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -58,6 +58,7 @@ import com.raytheon.uf.viz.core.localization.LocalizationConstants;
|
||||||
import com.raytheon.uf.viz.core.localization.LocalizationInitializer;
|
import com.raytheon.uf.viz.core.localization.LocalizationInitializer;
|
||||||
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
||||||
import com.raytheon.uf.viz.core.notification.jobs.NotificationManagerJob;
|
import com.raytheon.uf.viz.core.notification.jobs.NotificationManagerJob;
|
||||||
|
import com.raytheon.uf.viz.core.procedures.ProcedureXmlManager;
|
||||||
import com.raytheon.uf.viz.core.status.VizStatusHandlerFactory;
|
import com.raytheon.uf.viz.core.status.VizStatusHandlerFactory;
|
||||||
import com.raytheon.uf.viz.personalities.cave.workbench.VizWorkbenchAdvisor;
|
import com.raytheon.uf.viz.personalities.cave.workbench.VizWorkbenchAdvisor;
|
||||||
import com.raytheon.viz.alerts.jobs.AutoUpdater;
|
import com.raytheon.viz.alerts.jobs.AutoUpdater;
|
||||||
|
@ -75,25 +76,29 @@ import com.raytheon.viz.core.units.UnitRegistrar;
|
||||||
*
|
*
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------- -------- ----------- -----------------------------------------
|
||||||
* Apr 28, 2011 mschenke Initial creation
|
* Apr 28, 2011 mschenke Initial creation
|
||||||
* May 16, 2012 #636 dgilling Ensure exception is thrown
|
* May 16, 2012 636 dgilling Ensure exception is thrown and CAVE
|
||||||
* and CAVE immediately exits
|
* immediately exits if connection cannot be
|
||||||
* if connection cannot be made to
|
* made to localization server.
|
||||||
* localization server.
|
* May 31, 2012 674 dgilling Allow SimulatedTime to be set from the
|
||||||
* May 31, 2012 #674 dgilling Allow SimulatedTime to be set from
|
* command line.
|
||||||
* the command line.
|
* Oct 02, 2012 1236 dgilling Allow SimulatedTime to be set from the
|
||||||
* Oct 02, 2012 #1236 dgilling Allow SimulatedTime to be set from
|
* command line even if practice mode is
|
||||||
* the command line even if practice
|
* off.
|
||||||
* mode is off.
|
* Jan 09, 2013 1442 rferrel Changes to notify SimultedTime listeners.
|
||||||
* Jan 09, 2013 #1442 rferrel Changes to notify SimultedTime listeners.
|
* Apr 17, 2013 1786 mpduff startComponent now sets
|
||||||
* Apr 17, 2013 1786 mpduff startComponent now sets StatusHandlerFactory
|
* StatusHandlerFactory
|
||||||
* Apr 23, 2013 #1939 randerso Allow serialization to complete initialization
|
* Apr 23, 2013 1939 randerso Allow serialization to complete
|
||||||
* before connecting to JMS to avoid deadlock
|
* initialization before connecting to JMS
|
||||||
* May 23, 2013 #2005 njensen Shutdown on spring initialization errors
|
* to avoid deadlock
|
||||||
* Oct 15, 2013 2361 njensen Added startupTimer
|
* May 23, 2013 2005 njensen Shutdown on spring initialization errors
|
||||||
* Nov 14, 2013 2361 njensen Removed initializing serialization at startup
|
* Oct 15, 2013 2361 njensen Added startupTimer
|
||||||
|
* Nov 14, 2013 2361 njensen Removed initializing serialization at
|
||||||
|
* startup
|
||||||
|
* Dec 10, 2013 2602 bsteffen Start loading ProcedureXmlManager in
|
||||||
|
* startComponent.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -254,6 +259,8 @@ public abstract class AbstractCAVEComponent implements IStandaloneComponent {
|
||||||
startInternal(componentName);
|
startInternal(componentName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ProcedureXmlManager.inititializeAsync();
|
||||||
|
|
||||||
if (workbenchAdvisor != null) {
|
if (workbenchAdvisor != null) {
|
||||||
returnCode = PlatformUI.createAndRunWorkbench(display,
|
returnCode = PlatformUI.createAndRunWorkbench(display,
|
||||||
workbenchAdvisor);
|
workbenchAdvisor);
|
||||||
|
|
|
@ -2,40 +2,44 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: Volume Browser Plug-in
|
Bundle-Name: Volume Browser Plug-in
|
||||||
Bundle-SymbolicName: com.raytheon.viz.volumebrowser;singleton:=true
|
Bundle-SymbolicName: com.raytheon.viz.volumebrowser;singleton:=true
|
||||||
Bundle-Version: 1.12.1174.qualifier
|
Bundle-Version: 1.13.0.qualifier
|
||||||
Bundle-Activator: com.raytheon.viz.volumebrowser.Activator
|
|
||||||
Bundle-Vendor: Raytheon
|
Bundle-Vendor: Raytheon
|
||||||
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization, com.raytheon.uf.viz.ui.menus
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||||
|
Bundle-ActivationPolicy: lazy
|
||||||
Require-Bundle: org.eclipse.ui,
|
Require-Bundle: org.eclipse.ui,
|
||||||
org.eclipse.core.runtime,
|
org.eclipse.core.runtime,
|
||||||
com.raytheon.viz.core,
|
net.sf.swtaddons,
|
||||||
|
com.raytheon.uf.viz.core,
|
||||||
com.raytheon.viz.ui,
|
com.raytheon.viz.ui,
|
||||||
com.raytheon.viz.pointdata,
|
com.raytheon.uf.viz.d2d.core,
|
||||||
|
com.raytheon.uf.viz.d2d.ui,
|
||||||
|
com.raytheon.uf.viz.core.maps,
|
||||||
|
com.raytheon.viz.core.graphing,
|
||||||
|
com.raytheon.uf.common.time,
|
||||||
|
com.raytheon.uf.common.localization,
|
||||||
|
com.raytheon.uf.common.style,
|
||||||
|
com.raytheon.uf.common.geospatial,
|
||||||
|
com.raytheon.viz.awipstools,
|
||||||
|
com.raytheon.uf.viz.points,
|
||||||
|
com.raytheon.uf.viz.xy,
|
||||||
|
com.raytheon.uf.viz.ui.menus,
|
||||||
com.raytheon.uf.viz.xy.crosssection,
|
com.raytheon.uf.viz.xy.crosssection,
|
||||||
com.raytheon.uf.viz.xy.timeheight,
|
com.raytheon.uf.viz.xy.timeheight,
|
||||||
com.raytheon.uf.viz.xy.varheight,
|
com.raytheon.uf.viz.xy.varheight,
|
||||||
com.raytheon.viz.awipstools,
|
|
||||||
com.raytheon.viz.grid,
|
|
||||||
com.raytheon.uf.viz.xy.timeseries,
|
com.raytheon.uf.viz.xy.timeseries,
|
||||||
|
com.raytheon.uf.viz.d2d.nsharp,
|
||||||
|
gov.noaa.nws.ncep.ui.nsharp,
|
||||||
|
com.raytheon.uf.viz.derivparam,
|
||||||
|
com.raytheon.uf.common.dataplugin,
|
||||||
|
com.raytheon.viz.grid,
|
||||||
|
com.raytheon.uf.common.dataplugin.grid,
|
||||||
com.raytheon.uf.viz.objectiveanalysis,
|
com.raytheon.uf.viz.objectiveanalysis,
|
||||||
|
com.raytheon.viz.pointdata,
|
||||||
com.raytheon.uf.common.pointdata,
|
com.raytheon.uf.common.pointdata,
|
||||||
net.sf.swtaddons;bundle-version="1.0.0",
|
com.raytheon.uf.common.comm
|
||||||
com.raytheon.uf.viz.points;bundle-version="1.0.0",
|
|
||||||
com.raytheon.uf.viz.d2d.nsharp;bundle-version="1.0.0",
|
|
||||||
gov.noaa.nws.ncep.ui.nsharp;bundle-version="1.0.0",
|
|
||||||
com.raytheon.uf.common.comm;bundle-version="1.12.1174",
|
|
||||||
com.raytheon.uf.viz.core.maps;bundle-version="1.12.1174",
|
|
||||||
com.raytheon.uf.viz.d2d.core;bundle-version="1.12.1174",
|
|
||||||
com.raytheon.uf.viz.d2d.ui;bundle-version="1.12.1174",
|
|
||||||
com.raytheon.uf.viz.derivparam;bundle-version="1.12.1174",
|
|
||||||
com.raytheon.uf.common.dataplugin.grid;bundle-version="1.0.0",
|
|
||||||
com.raytheon.uf.viz.ui.menus;bundle-version="1.12.1174",
|
|
||||||
com.raytheon.uf.viz.xy;bundle-version="1.12.1174",
|
|
||||||
com.raytheon.viz.core.graphing;bundle-version="1.12.1174",
|
|
||||||
com.raytheon.uf.common.style;bundle-version="1.0.0"
|
|
||||||
Bundle-ActivationPolicy: lazy
|
|
||||||
Export-Package: com.raytheon.viz.volumebrowser,
|
Export-Package: com.raytheon.viz.volumebrowser,
|
||||||
com.raytheon.viz.volumebrowser.datacatalog,
|
com.raytheon.viz.volumebrowser.datacatalog,
|
||||||
com.raytheon.viz.volumebrowser.vbui,
|
com.raytheon.viz.volumebrowser.vbui,
|
||||||
com.raytheon.viz.volumebrowser.xml
|
com.raytheon.viz.volumebrowser.xml
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
Import-Package: com.raytheon.viz.core.map,
|
||||||
|
com.raytheon.viz.core.rsc
|
||||||
|
|
|
@ -42,10 +42,10 @@
|
||||||
</handler>
|
</handler>
|
||||||
</extension>
|
</extension>
|
||||||
<extension point="com.raytheon.uf.viz.core.alterBundle">
|
<extension point="com.raytheon.uf.viz.core.alterBundle">
|
||||||
<alterBundle id="tools" class="com.raytheon.viz.volumebrowser.ToolsAlterBundleContributor"/>
|
<alterBundle class="com.raytheon.viz.volumebrowser.ToolsAlterBundleContributor"/>
|
||||||
</extension>
|
</extension>
|
||||||
<extension point="com.raytheon.uf.viz.core.alterBundle">
|
<extension point="com.raytheon.uf.viz.core.alterBundle">
|
||||||
<alterBundle id="grids" class="com.raytheon.viz.volumebrowser.GridAlterBundleContributor"/>
|
<alterBundle class="com.raytheon.viz.volumebrowser.GridAlterBundleContributor"/>
|
||||||
</extension>
|
</extension>
|
||||||
<extension
|
<extension
|
||||||
point="com.raytheon.uf.viz.localization.localizationpath">
|
point="com.raytheon.uf.viz.localization.localizationpath">
|
||||||
|
@ -79,4 +79,19 @@
|
||||||
<separator name="StdEnvDataPackageFamilies" visible="true"/>
|
<separator name="StdEnvDataPackageFamilies" visible="true"/>
|
||||||
</menuContribution>
|
</menuContribution>
|
||||||
</extension>
|
</extension>
|
||||||
|
<extension
|
||||||
|
point="com.raytheon.uf.viz.ui.menus.contribItemProvider">
|
||||||
|
<contributionItemProvider
|
||||||
|
contribution="com.raytheon.uf.common.menus.xml.CommonToolBarContribution"
|
||||||
|
itemProvider="com.raytheon.viz.volumebrowser.xml.ToolBarContribution">
|
||||||
|
</contributionItemProvider>
|
||||||
|
<contributionItemProvider
|
||||||
|
contribution="com.raytheon.uf.common.menus.xml.CommonMenuContribution"
|
||||||
|
itemProvider="com.raytheon.viz.volumebrowser.xml.MenuContribution">
|
||||||
|
</contributionItemProvider>
|
||||||
|
<contributionItemProvider
|
||||||
|
contribution="com.raytheon.uf.common.menus.xml.CommonTitleImgContribution"
|
||||||
|
itemProvider="com.raytheon.viz.volumebrowser.xml.TitleImgContribution">
|
||||||
|
</contributionItemProvider>
|
||||||
|
</extension>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
|
@ -1,89 +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.viz.volumebrowser;
|
|
||||||
|
|
||||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
|
||||||
import org.osgi.framework.BundleContext;
|
|
||||||
|
|
||||||
import com.raytheon.uf.common.menus.xml.CommonMenuContribution;
|
|
||||||
import com.raytheon.uf.common.menus.xml.CommonTitleImgContribution;
|
|
||||||
import com.raytheon.uf.common.menus.xml.CommonToolBarContribution;
|
|
||||||
import com.raytheon.uf.viz.ui.menus.xml.MenuXMLMap;
|
|
||||||
import com.raytheon.viz.volumebrowser.xml.MenuContribution;
|
|
||||||
import com.raytheon.viz.volumebrowser.xml.TitleImgContribution;
|
|
||||||
import com.raytheon.viz.volumebrowser.xml.ToolBarContribution;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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.viz.volumebrowser";
|
|
||||||
|
|
||||||
// The shared instance
|
|
||||||
private static Activator plugin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The constructor
|
|
||||||
*/
|
|
||||||
public Activator() {
|
|
||||||
plugin = this;
|
|
||||||
MenuXMLMap.registerMapping(CommonToolBarContribution.class,
|
|
||||||
new ToolBarContribution());
|
|
||||||
MenuXMLMap.registerMapping(CommonMenuContribution.class,
|
|
||||||
new MenuContribution());
|
|
||||||
MenuXMLMap.registerMapping(CommonTitleImgContribution.class,
|
|
||||||
new TitleImgContribution());
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
|
|
||||||
* )
|
|
||||||
*/
|
|
||||||
public void start(BundleContext context) throws Exception {
|
|
||||||
super.start(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -29,12 +29,8 @@ import com.raytheon.uf.common.dataplugin.grid.GridConstants;
|
||||||
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfo;
|
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfo;
|
||||||
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfoLookup;
|
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfoLookup;
|
||||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||||
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.core.drawables.AbstractRenderableDisplay;
|
import com.raytheon.uf.viz.core.drawables.AbstractRenderableDisplay;
|
||||||
import com.raytheon.uf.viz.core.drawables.ResourcePair;
|
import com.raytheon.uf.viz.core.drawables.ResourcePair;
|
||||||
import com.raytheon.uf.viz.core.exception.VizException;
|
|
||||||
import com.raytheon.uf.viz.core.procedures.AlterBundleContributorAdapter;
|
import com.raytheon.uf.viz.core.procedures.AlterBundleContributorAdapter;
|
||||||
import com.raytheon.uf.viz.core.procedures.Bundle;
|
import com.raytheon.uf.viz.core.procedures.Bundle;
|
||||||
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
|
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
|
||||||
|
@ -55,10 +51,11 @@ import com.raytheon.viz.volumebrowser.xml.VbSourceList;
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
*
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------- -------- ----------- -----------------------------------------
|
||||||
* Jan 4, 2010 mschenke Initial creation
|
* Jan 04, 2010 mschenke Initial creation
|
||||||
* Oct 3, 2012 #1248 rferrel Change to use adapter.
|
* Oct 03, 2012 1248 rferrel Change to use adapter.
|
||||||
|
* Dec 11, 2013 2602 bsteffen Remove dead catch block.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -67,8 +64,6 @@ import com.raytheon.viz.volumebrowser.xml.VbSourceList;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GridAlterBundleContributor extends AlterBundleContributorAdapter {
|
public class GridAlterBundleContributor extends AlterBundleContributorAdapter {
|
||||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
|
||||||
.getHandler(GridAlterBundleContributor.class);
|
|
||||||
|
|
||||||
private static final String GRID_KEY = "Grid";
|
private static final String GRID_KEY = "Grid";
|
||||||
|
|
||||||
|
@ -78,26 +73,20 @@ public class GridAlterBundleContributor extends AlterBundleContributorAdapter {
|
||||||
|
|
||||||
if (modelTitleToNameMap == null) {
|
if (modelTitleToNameMap == null) {
|
||||||
modelTitleToNameMap = new HashMap<String, String>();
|
modelTitleToNameMap = new HashMap<String, String>();
|
||||||
try {
|
for (VbSource source : VbSourceList.getInstance().getEntries()) {
|
||||||
for (VbSource source : VbSourceList.getInstance().getEntries()) {
|
if (source.getName() != null) {
|
||||||
if (source.getName() != null) {
|
modelTitleToNameMap.put(source.getName(), source.getKey());
|
||||||
modelTitleToNameMap.put(source.getName(),
|
} else {
|
||||||
|
DatasetInfo info = DatasetInfoLookup.getInstance().getInfo(
|
||||||
|
source.getKey());
|
||||||
|
if (info == null) {
|
||||||
|
modelTitleToNameMap.put(source.getKey(),
|
||||||
source.getKey());
|
source.getKey());
|
||||||
} else {
|
} else {
|
||||||
DatasetInfo info = DatasetInfoLookup.getInstance()
|
modelTitleToNameMap.put(info.getTitle(),
|
||||||
.getInfo(source.getKey());
|
source.getKey());
|
||||||
if (info == null) {
|
|
||||||
modelTitleToNameMap.put(source.getKey(),
|
|
||||||
source.getKey());
|
|
||||||
} else {
|
|
||||||
modelTitleToNameMap.put(info.getTitle(),
|
|
||||||
source.getKey());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (VizException e) {
|
|
||||||
statusHandler.handle(Priority.PROBLEM,
|
|
||||||
"Cannot load grid sources.", e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return modelTitleToNameMap;
|
return modelTitleToNameMap;
|
||||||
|
|
|
@ -49,7 +49,6 @@ import com.raytheon.uf.viz.points.PointUtilities;
|
||||||
import com.raytheon.uf.viz.points.PointsDataManager;
|
import com.raytheon.uf.viz.points.PointsDataManager;
|
||||||
import com.raytheon.uf.viz.points.data.IPointNode;
|
import com.raytheon.uf.viz.points.data.IPointNode;
|
||||||
import com.raytheon.uf.viz.xy.crosssection.rsc.CrossSectionResourceData;
|
import com.raytheon.uf.viz.xy.crosssection.rsc.CrossSectionResourceData;
|
||||||
|
|
||||||
import com.raytheon.viz.awipstools.ToolsDataManager;
|
import com.raytheon.viz.awipstools.ToolsDataManager;
|
||||||
import com.raytheon.viz.volumebrowser.datacatalog.AbstractDataCatalog;
|
import com.raytheon.viz.volumebrowser.datacatalog.AbstractDataCatalog;
|
||||||
import com.raytheon.viz.volumebrowser.datacatalog.DataCatalogManager;
|
import com.raytheon.viz.volumebrowser.datacatalog.DataCatalogManager;
|
||||||
|
@ -64,12 +63,13 @@ import com.vividsolutions.jts.geom.LineString;
|
||||||
*
|
*
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------- -------- -------------- --------------------------------------
|
||||||
* Initial creation
|
* Aug 08, 2012 875 rferrel Generate menu entries for points.
|
||||||
* Aug 08, 2012 #875 rferrel Generate menu entries for points.
|
* Oct 03, 2012 1248 rferrel Added listener for when points change.
|
||||||
* Oct 03, 2012 #1248 rferrel Added listener for when points change.
|
* May 03, 2013 14824 mgamazaychikov Added alterResource method
|
||||||
* May 03, 2013 DR14824 mgamazaychikov Added alterResource method
|
* Dec 11, 2013 2602 bsteffen Fix compiler warnings and format.
|
||||||
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
|
@ -86,9 +86,9 @@ public class ToolsAlterBundleContributor extends AlterBundleContributorAdapter {
|
||||||
private static final String POINTS_KEY = "point";
|
private static final String POINTS_KEY = "point";
|
||||||
|
|
||||||
private static final String LINES_KEY = "line";
|
private static final String LINES_KEY = "line";
|
||||||
|
|
||||||
private static final String PLUGIN_KEY = "pluginName";
|
private static final String PLUGIN_KEY = "pluginName";
|
||||||
|
|
||||||
private static final String REPORTYPE_KEY = "reportType";
|
private static final String REPORTYPE_KEY = "reportType";
|
||||||
|
|
||||||
private IPointChangedListener pointChangedListener;
|
private IPointChangedListener pointChangedListener;
|
||||||
|
@ -255,9 +255,9 @@ public class ToolsAlterBundleContributor extends AlterBundleContributorAdapter {
|
||||||
for (ResourcePair rp : list) {
|
for (ResourcePair rp : list) {
|
||||||
AbstractResourceData rData = rp.getResourceData();
|
AbstractResourceData rData = rp.getResourceData();
|
||||||
if (rData instanceof AbstractRequestableResourceData) {
|
if (rData instanceof AbstractRequestableResourceData) {
|
||||||
alterResource((AbstractRequestableResourceData) rData, POINTS_KEY,
|
alterResource((AbstractRequestableResourceData) rData,
|
||||||
selectedString);
|
POINTS_KEY, selectedString);
|
||||||
alterContainer((IPointsToolContainer) rData, selectedString);
|
alterContainer((IPointsToolContainer) rData, selectedString);
|
||||||
} else if (rData instanceof IResourceGroup) {
|
} else if (rData instanceof IResourceGroup) {
|
||||||
alterResourceList(((IResourceGroup) rData).getResourceList(),
|
alterResourceList(((IResourceGroup) rData).getResourceList(),
|
||||||
selectedString);
|
selectedString);
|
||||||
|
@ -265,76 +265,73 @@ public class ToolsAlterBundleContributor extends AlterBundleContributorAdapter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void alterResource(AbstractRequestableResourceData data, String selectedKey,
|
private void alterResource(AbstractRequestableResourceData data,
|
||||||
String selectedString) {
|
String selectedKey, String selectedString) {
|
||||||
if (selectedString == null) {
|
if (selectedString == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
HashMap<String, RequestConstraint> metadataMap = data.getMetadataMap();
|
HashMap<String, RequestConstraint> metadataMap = data.getMetadataMap();
|
||||||
HashMap<String, RequestConstraint> metadataMapOld = new HashMap<String, RequestConstraint>();
|
HashMap<String, RequestConstraint> metadataMapOld = new HashMap<String, RequestConstraint>();
|
||||||
// make a copy of original matedata map
|
// make a copy of original matedata map
|
||||||
metadataMapOld.putAll(metadataMap);
|
metadataMapOld.putAll(metadataMap);
|
||||||
// obtain data catalog
|
// obtain data catalog
|
||||||
AbstractDataCatalog ac = getDataCatalog (metadataMap);
|
AbstractDataCatalog ac = getDataCatalog(metadataMap);
|
||||||
if ( ac == null ) {
|
if (ac == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// change the parameters in the original metadata map
|
// change the parameters in the original metadata map
|
||||||
ac.alterProductParameters(selectedKey, selectedString,
|
ac.alterProductParameters(selectedKey, selectedString, metadataMap);
|
||||||
(HashMap<String, RequestConstraint>) metadataMap);
|
|
||||||
|
|
||||||
// in addition to metadata map resource data needs to be modified
|
|
||||||
// for CrossSectionResourceData
|
|
||||||
if (data instanceof CrossSectionResourceData) {
|
|
||||||
String theKeyToChange = null;
|
|
||||||
Iterator<Map.Entry<String, RequestConstraint>> it = metadataMap
|
|
||||||
.entrySet().iterator();
|
|
||||||
while (it.hasNext()) {
|
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
|
||||||
Map.Entry<String, RequestConstraint> pairs = (Map.Entry) it
|
|
||||||
.next();
|
|
||||||
String currentKey = (String) pairs.getKey();
|
|
||||||
String currentValue = metadataMap.get(currentKey)
|
|
||||||
.getConstraintValue();
|
|
||||||
if (metadataMapOld.containsKey(currentKey)) {
|
|
||||||
String oldValue = metadataMapOld.get(currentKey)
|
|
||||||
.getConstraintValue();
|
|
||||||
if (!oldValue.equalsIgnoreCase(currentValue)) {
|
|
||||||
theKeyToChange = currentKey;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
String stationID = metadataMap.get(theKeyToChange)
|
|
||||||
.getConstraintValue();
|
|
||||||
List<String> stationIDs = Arrays.asList(stationID
|
|
||||||
.split("\\s*,\\s*"));
|
|
||||||
((CrossSectionResourceData) data).setStationIDs(stationIDs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private AbstractDataCatalog getDataCatalog(
|
// in addition to metadata map resource data needs to be modified
|
||||||
HashMap<String, RequestConstraint> metadataMap) {
|
// for CrossSectionResourceData
|
||||||
String pluginName = null;
|
if (data instanceof CrossSectionResourceData) {
|
||||||
String reportType = null;
|
String theKeyToChange = null;
|
||||||
if (metadataMap.containsKey(PLUGIN_KEY)) {
|
Iterator<Map.Entry<String, RequestConstraint>> it = metadataMap
|
||||||
pluginName = metadataMap.get(PLUGIN_KEY).getConstraintValue();
|
.entrySet().iterator();
|
||||||
} else {
|
while (it.hasNext()) {
|
||||||
return null;
|
Map.Entry<String, RequestConstraint> pairs = it.next();
|
||||||
}
|
String currentKey = pairs.getKey();
|
||||||
if (metadataMap.containsKey(REPORTYPE_KEY)) {
|
String currentValue = metadataMap.get(currentKey)
|
||||||
reportType = metadataMap.get(REPORTYPE_KEY).getConstraintValue();
|
.getConstraintValue();
|
||||||
} else {
|
if (metadataMapOld.containsKey(currentKey)) {
|
||||||
return null;
|
String oldValue = metadataMapOld.get(currentKey)
|
||||||
}
|
.getConstraintValue();
|
||||||
String sourcesKey = pluginName + reportType;
|
if (!oldValue.equalsIgnoreCase(currentValue)) {
|
||||||
|
theKeyToChange = currentKey;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String stationID = metadataMap.get(theKeyToChange)
|
||||||
|
.getConstraintValue();
|
||||||
|
List<String> stationIDs = Arrays.asList(stationID
|
||||||
|
.split("\\s*,\\s*"));
|
||||||
|
((CrossSectionResourceData) data).setStationIDs(stationIDs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SelectedData sd = new SelectedData(null, sourcesKey, null, null, null,
|
private AbstractDataCatalog getDataCatalog(
|
||||||
null, null);
|
HashMap<String, RequestConstraint> metadataMap) {
|
||||||
return (AbstractDataCatalog) DataCatalogManager
|
String pluginName = null;
|
||||||
.getDataCatalogManager().getDataCatalog(sd);
|
String reportType = null;
|
||||||
}
|
if (metadataMap.containsKey(PLUGIN_KEY)) {
|
||||||
|
pluginName = metadataMap.get(PLUGIN_KEY).getConstraintValue();
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (metadataMap.containsKey(REPORTYPE_KEY)) {
|
||||||
|
reportType = metadataMap.get(REPORTYPE_KEY).getConstraintValue();
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
String sourcesKey = pluginName + reportType;
|
||||||
|
|
||||||
/**
|
SelectedData sd = new SelectedData(null, sourcesKey, null, null, null,
|
||||||
|
null, null);
|
||||||
|
return (AbstractDataCatalog) DataCatalogManager.getDataCatalogManager()
|
||||||
|
.getDataCatalog(sd);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
* @param rData
|
* @param rData
|
||||||
* @param selectedString
|
* @param selectedString
|
||||||
*/
|
*/
|
||||||
|
@ -357,11 +354,11 @@ public class ToolsAlterBundleContributor extends AlterBundleContributorAdapter {
|
||||||
line);
|
line);
|
||||||
ResourceList rl = display.getDescriptor().getResourceList();
|
ResourceList rl = display.getDescriptor().getResourceList();
|
||||||
for (ResourcePair rp : rl) {
|
for (ResourcePair rp : rl) {
|
||||||
AbstractResourceData rData = rp.getResourceData();
|
AbstractResourceData rData = rp.getResourceData();
|
||||||
if (rData instanceof AbstractRequestableResourceData) {
|
if (rData instanceof AbstractRequestableResourceData) {
|
||||||
alterResource((AbstractRequestableResourceData) rData, LINES_KEY,
|
alterResource((AbstractRequestableResourceData) rData,
|
||||||
line);
|
LINES_KEY, line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,11 +50,7 @@ import org.eclipse.swt.widgets.Label;
|
||||||
|
|
||||||
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfo;
|
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfo;
|
||||||
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfoLookup;
|
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfoLookup;
|
||||||
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.core.VizApp;
|
import com.raytheon.uf.viz.core.VizApp;
|
||||||
import com.raytheon.uf.viz.core.exception.VizException;
|
|
||||||
import com.raytheon.uf.viz.points.IPointChangedListener;
|
import com.raytheon.uf.viz.points.IPointChangedListener;
|
||||||
import com.raytheon.uf.viz.points.PointsDataManager;
|
import com.raytheon.uf.viz.points.PointsDataManager;
|
||||||
import com.raytheon.viz.awipstools.IToolChangedListener;
|
import com.raytheon.viz.awipstools.IToolChangedListener;
|
||||||
|
@ -78,16 +74,19 @@ import com.raytheon.viz.volumebrowser.xml.VbSourceList;
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
*
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------- -------- ----------- -----------------------------------------
|
||||||
* May 12, 2009 #2161 lvenable Initial creation
|
* May 12, 2009 2161 lvenable Initial creation
|
||||||
* Jul 31, 2012 #875 rferrel Now uses markers.
|
* Jul 31, 2012 875 rferrel Now uses markers.
|
||||||
* Sep 26, 2012 #1216 rferrel Change listener added to update
|
* Sep 26, 2012 1216 rferrel Change listener added to update points
|
||||||
* points menu.
|
* menu.
|
||||||
* Jan 14, 2013 #1516 rferrel Remove listeners on dispose and specify
|
* Jan 14, 2013 1516 rferrel Remove listeners on dispose and specify
|
||||||
* Data Selection in Points Tool Action.
|
* Data Selection in Points Tool Action.
|
||||||
* Dec 06, 2013 #2271 mpduff Save the selected plane points so the menu's are
|
* Dec 06, 2013 2271 mpduff Save the selected plane points so the
|
||||||
* recreated correctly on a pointChange action.
|
* menu's are recreated correctly on a
|
||||||
|
* pointChange action.
|
||||||
|
* Dec 11, 2013 2602 bsteffen Remove dead catch block.
|
||||||
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author lvenable
|
* @author lvenable
|
||||||
|
@ -95,8 +94,6 @@ import com.raytheon.viz.volumebrowser.xml.VbSourceList;
|
||||||
*/
|
*/
|
||||||
public class DataListsProdTableComp extends Composite implements
|
public class DataListsProdTableComp extends Composite implements
|
||||||
IDataMenuAction {
|
IDataMenuAction {
|
||||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
|
||||||
.getHandler(DataListsProdTableComp.class);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listener to update planes current point menu.
|
* Listener to update planes current point menu.
|
||||||
|
@ -137,7 +134,7 @@ public class DataListsProdTableComp extends Composite implements
|
||||||
* #getMatchingProposals(java.lang.String[], java.lang.String)
|
* #getMatchingProposals(java.lang.String[], java.lang.String)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected List getMatchingProposals(String[] proposals,
|
protected List<?> getMatchingProposals(String[] proposals,
|
||||||
String contents) {
|
String contents) {
|
||||||
return super.getMatchingProposals(
|
return super.getMatchingProposals(
|
||||||
getMatches(proposals, contents), "");
|
getMatches(proposals, contents), "");
|
||||||
|
@ -671,82 +668,76 @@ public class DataListsProdTableComp extends Composite implements
|
||||||
* items/menus.
|
* items/menus.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
try {
|
// Linked HashMap used to preserve the ordering of categories
|
||||||
// Linked HashMap used to preserve the ordering of categories
|
Map<String, List<IContributionItem>> catMap = new LinkedHashMap<String, List<IContributionItem>>();
|
||||||
Map<String, List<IContributionItem>> catMap = new LinkedHashMap<String, List<IContributionItem>>();
|
Map<String, Map<String, List<IContributionItem>>> subCatMap = new LinkedHashMap<String, Map<String, List<IContributionItem>>>();
|
||||||
Map<String, Map<String, List<IContributionItem>>> subCatMap = new LinkedHashMap<String, Map<String, List<IContributionItem>>>();
|
for (VbSource source : VbSourceList.getInstance().getEntries()) {
|
||||||
for (VbSource source : VbSourceList.getInstance().getEntries()) {
|
if (source.getViews() != null
|
||||||
if (source.getViews() != null
|
&& !source.getViews().contains(setting)) {
|
||||||
&& !source.getViews().contains(setting)) {
|
continue;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
List<IContributionItem> catList = null;
|
|
||||||
if (source.getSubCategory() != null) {
|
|
||||||
catList = catMap.get(source.getCategory());
|
|
||||||
if (catList == null) {
|
|
||||||
catList = new ArrayList<IContributionItem>();
|
|
||||||
catMap.put(source.getCategory(), catList);
|
|
||||||
}
|
|
||||||
Map<String, List<IContributionItem>> subMap = subCatMap
|
|
||||||
.get(source.getCategory());
|
|
||||||
if (subMap == null) {
|
|
||||||
subMap = new LinkedHashMap<String, List<IContributionItem>>();
|
|
||||||
subCatMap.put(source.getCategory(), subMap);
|
|
||||||
}
|
|
||||||
catList = subMap.get(source.getSubCategory());
|
|
||||||
if (catList == null) {
|
|
||||||
catList = new ArrayList<IContributionItem>();
|
|
||||||
subMap.put(source.getSubCategory(), catList);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
catList = catMap.get(source.getCategory());
|
|
||||||
if (catList == null) {
|
|
||||||
catList = new ArrayList<IContributionItem>();
|
|
||||||
catMap.put(source.getCategory(), catList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MenuContribution mContrib = new MenuContribution();
|
|
||||||
mContrib.xml.key = source.getKey();
|
|
||||||
if (source.getName() != null) {
|
|
||||||
mContrib.xml.menuText = source.getName();
|
|
||||||
} else {
|
|
||||||
// Attempt a lookup in the grib model table
|
|
||||||
DatasetInfo info = DatasetInfoLookup.getInstance().getInfo(
|
|
||||||
source.getKey());
|
|
||||||
if (info != null) {
|
|
||||||
mContrib.xml.menuText = info.getTitle();
|
|
||||||
} else {
|
|
||||||
mContrib.xml.menuText = source.getKey();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catList.add(new MenuContributionItem(mContrib));
|
|
||||||
}
|
}
|
||||||
for (Entry<String, List<IContributionItem>> entry : catMap
|
List<IContributionItem> catList = null;
|
||||||
.entrySet()) {
|
if (source.getSubCategory() != null) {
|
||||||
ToolBarContribution tbContrib = new ToolBarContribution();
|
catList = catMap.get(source.getCategory());
|
||||||
tbContrib.xml.toolItemText = entry.getKey();
|
if (catList == null) {
|
||||||
tbContrib.xml.id = setting.toString() + entry.getKey();
|
catList = new ArrayList<IContributionItem>();
|
||||||
|
catMap.put(source.getCategory(), catList);
|
||||||
|
}
|
||||||
Map<String, List<IContributionItem>> subMap = subCatMap
|
Map<String, List<IContributionItem>> subMap = subCatMap
|
||||||
.get(entry.getKey());
|
.get(source.getCategory());
|
||||||
if (subMap != null) {
|
if (subMap == null) {
|
||||||
for (Entry<String, List<IContributionItem>> subEntry : subMap
|
subMap = new LinkedHashMap<String, List<IContributionItem>>();
|
||||||
.entrySet()) {
|
subCatMap.put(source.getCategory(), subMap);
|
||||||
TitleImgContribution tContrib = new TitleImgContribution();
|
}
|
||||||
tContrib.xml.titleText = subEntry.getKey();
|
catList = subMap.get(source.getSubCategory());
|
||||||
tContrib.xml.displayDashes = true;
|
if (catList == null) {
|
||||||
tContrib.xml.displayImage = true;
|
catList = new ArrayList<IContributionItem>();
|
||||||
entry.getValue().add(
|
subMap.put(source.getSubCategory(), catList);
|
||||||
new TitleImgContributionItem(tContrib));
|
}
|
||||||
entry.getValue().addAll(subEntry.getValue());
|
} else {
|
||||||
}
|
catList = catMap.get(source.getCategory());
|
||||||
|
if (catList == null) {
|
||||||
|
catList = new ArrayList<IContributionItem>();
|
||||||
|
catMap.put(source.getCategory(), catList);
|
||||||
}
|
}
|
||||||
sourceControl.toolbar.add(new ToolBarContributionItem(
|
|
||||||
tbContrib, entry.getValue().toArray(
|
|
||||||
new IContributionItem[0])));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (VizException e) {
|
MenuContribution mContrib = new MenuContribution();
|
||||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
|
mContrib.xml.key = source.getKey();
|
||||||
|
if (source.getName() != null) {
|
||||||
|
mContrib.xml.menuText = source.getName();
|
||||||
|
} else {
|
||||||
|
// Attempt a lookup in the grib model table
|
||||||
|
DatasetInfo info = DatasetInfoLookup.getInstance().getInfo(
|
||||||
|
source.getKey());
|
||||||
|
if (info != null) {
|
||||||
|
mContrib.xml.menuText = info.getTitle();
|
||||||
|
} else {
|
||||||
|
mContrib.xml.menuText = source.getKey();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catList.add(new MenuContributionItem(mContrib));
|
||||||
|
}
|
||||||
|
for (Entry<String, List<IContributionItem>> entry : catMap.entrySet()) {
|
||||||
|
ToolBarContribution tbContrib = new ToolBarContribution();
|
||||||
|
tbContrib.xml.toolItemText = entry.getKey();
|
||||||
|
tbContrib.xml.id = setting.toString() + entry.getKey();
|
||||||
|
Map<String, List<IContributionItem>> subMap = subCatMap.get(entry
|
||||||
|
.getKey());
|
||||||
|
if (subMap != null) {
|
||||||
|
for (Entry<String, List<IContributionItem>> subEntry : subMap
|
||||||
|
.entrySet()) {
|
||||||
|
TitleImgContribution tContrib = new TitleImgContribution();
|
||||||
|
tContrib.xml.titleText = subEntry.getKey();
|
||||||
|
tContrib.xml.displayDashes = true;
|
||||||
|
tContrib.xml.displayImage = true;
|
||||||
|
entry.getValue()
|
||||||
|
.add(new TitleImgContributionItem(tContrib));
|
||||||
|
entry.getValue().addAll(subEntry.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sourceControl.toolbar.add(new ToolBarContributionItem(tbContrib,
|
||||||
|
entry.getValue().toArray(new IContributionItem[0])));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -39,6 +39,23 @@ import com.raytheon.viz.volumebrowser.xml.TitleImgContribution;
|
||||||
import com.raytheon.viz.volumebrowser.xml.ToolBarContribution;
|
import com.raytheon.viz.volumebrowser.xml.ToolBarContribution;
|
||||||
import com.vividsolutions.jts.geom.Coordinate;
|
import com.vividsolutions.jts.geom.Coordinate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Contribution item for tool bar buttons.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
*
|
||||||
|
* SOFTWARE HISTORY
|
||||||
|
*
|
||||||
|
* Date Ticket# Engineer Description
|
||||||
|
* ------------- -------- ----------- -----------------------------------------
|
||||||
|
* Dec 11, 2013 2602 bsteffen Set the id of menu items.
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author unkown
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
public class ToolBarContributionItem extends ContributionItem {
|
public class ToolBarContributionItem extends ContributionItem {
|
||||||
|
|
||||||
protected Menu menu;
|
protected Menu menu;
|
||||||
|
@ -116,6 +133,7 @@ public class ToolBarContributionItem extends ContributionItem {
|
||||||
GeoUtil.formatCoordinate(new Coordinate(i, i))
|
GeoUtil.formatCoordinate(new Coordinate(i, i))
|
||||||
.split(" ")[coordinateIndex]);
|
.split(" ")[coordinateIndex]);
|
||||||
menuContribution.xml.key = keyPrefixString + i;
|
menuContribution.xml.key = keyPrefixString + i;
|
||||||
|
menuContribution.xml.id = idPrefixString + i;
|
||||||
|
|
||||||
MenuContributionItem menuContributionItem = new MenuContributionItem(
|
MenuContributionItem menuContributionItem = new MenuContributionItem(
|
||||||
menuContribution);
|
menuContribution);
|
||||||
|
|
|
@ -31,9 +31,27 @@ import com.raytheon.uf.common.menus.xml.CommonToolBarContribution;
|
||||||
import com.raytheon.uf.common.menus.xml.VariableSubstitution;
|
import com.raytheon.uf.common.menus.xml.VariableSubstitution;
|
||||||
import com.raytheon.uf.viz.core.exception.VizException;
|
import com.raytheon.uf.viz.core.exception.VizException;
|
||||||
import com.raytheon.uf.viz.ui.menus.xml.AbstractMenuContributionItem;
|
import com.raytheon.uf.viz.ui.menus.xml.AbstractMenuContributionItem;
|
||||||
|
import com.raytheon.uf.viz.ui.menus.xml.IContribItemProvider;
|
||||||
import com.raytheon.uf.viz.ui.menus.xml.MenuXMLMap;
|
import com.raytheon.uf.viz.ui.menus.xml.MenuXMLMap;
|
||||||
import com.raytheon.viz.volumebrowser.widget.ToolBarContributionItem;
|
import com.raytheon.viz.volumebrowser.widget.ToolBarContributionItem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Contribution Item for tool bars.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
*
|
||||||
|
* SOFTWARE HISTORY
|
||||||
|
*
|
||||||
|
* Date Ticket# Engineer Description
|
||||||
|
* ------------- -------- ----------- -----------------------------------------
|
||||||
|
* Dec 11, 2013 2602 bsteffen Update MenuXMLMap.
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author unknown
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
public class ToolBarContribution extends
|
public class ToolBarContribution extends
|
||||||
AbstractMenuContributionItem<CommonToolBarContribution> {
|
AbstractMenuContributionItem<CommonToolBarContribution> {
|
||||||
|
|
||||||
|
@ -49,8 +67,8 @@ public class ToolBarContribution extends
|
||||||
List<IContributionItem> contribItemList = new ArrayList<IContributionItem>();
|
List<IContributionItem> contribItemList = new ArrayList<IContributionItem>();
|
||||||
|
|
||||||
for (CommonAbstractMenuContribution amc : item.contributions) {
|
for (CommonAbstractMenuContribution amc : item.contributions) {
|
||||||
AbstractMenuContributionItem<?> common = MenuXMLMap.xmlMapping
|
IContribItemProvider common = MenuXMLMap
|
||||||
.get(amc.getClass());
|
.getProvider(amc.getClass());
|
||||||
contribItemList.addAll(Arrays.asList(common.getContributionItems(
|
contribItemList.addAll(Arrays.asList(common.getContributionItems(
|
||||||
amc, subs, removals)));
|
amc, subs, removals)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,28 +6,29 @@ import javax.xml.bind.annotation.XmlAccessType;
|
||||||
import javax.xml.bind.annotation.XmlAccessorType;
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
import javax.xml.bind.annotation.XmlAttribute;
|
||||||
|
|
||||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
|
||||||
import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu;
|
import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* TODO Add Description
|
* Description of a single source for the volume browser.
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
*
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------- -------- ----------- -----------------------------------------
|
||||||
* Jan 6, 2011 bsteffen Initial creation
|
* Jan 06, 2011 bsteffen Initial creation
|
||||||
|
* Dec 11, 2013 2602 bsteffen Remove ISerializableObject.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author bsteffen
|
* @author bsteffen
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
|
* @see VbSourceList
|
||||||
*/
|
*/
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
@XmlAccessorType(XmlAccessType.NONE)
|
||||||
public class VbSource implements ISerializableObject {
|
public class VbSource {
|
||||||
|
|
||||||
@XmlAttribute(required = true)
|
@XmlAttribute(required = true)
|
||||||
private String key;
|
private String key;
|
||||||
|
|
|
@ -12,20 +12,19 @@ import com.raytheon.uf.common.localization.FileUpdatedMessage;
|
||||||
import com.raytheon.uf.common.localization.ILocalizationFileObserver;
|
import com.raytheon.uf.common.localization.ILocalizationFileObserver;
|
||||||
import com.raytheon.uf.common.localization.LocalizationFile;
|
import com.raytheon.uf.common.localization.LocalizationFile;
|
||||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
|
||||||
import com.raytheon.uf.viz.core.exception.VizException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* TODO Add Description
|
* List of sources for populating the volume browser tool bar menus
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
*
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------- -------- ----------- -----------------------------------------
|
||||||
* Jan 6, 2011 bsteffen Initial creation
|
* Jan 06, 2011 bsteffen Initial creation
|
||||||
|
* Dec 11, 2013 2602 bsteffen Remove ISerializableObject.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -34,7 +33,7 @@ import com.raytheon.uf.viz.core.exception.VizException;
|
||||||
*/
|
*/
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
@XmlAccessorType(XmlAccessType.NONE)
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
public class VbSourceList implements ISerializableObject {
|
public class VbSourceList {
|
||||||
|
|
||||||
private final static String VB_SOURCE_FILE = "volumebrowser/VbSources.xml";
|
private final static String VB_SOURCE_FILE = "volumebrowser/VbSources.xml";
|
||||||
|
|
||||||
|
@ -78,7 +77,7 @@ public class VbSourceList implements ISerializableObject {
|
||||||
this.entries = entries;
|
this.entries = entries;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static VbSourceList getInstance() throws VizException {
|
public static VbSourceList getInstance() {
|
||||||
synchronized (VB_SOURCE_FILE) {
|
synchronized (VB_SOURCE_FILE) {
|
||||||
if (instance == null) {
|
if (instance == null) {
|
||||||
LocalizationFile file = PathManagerFactory.getPathManager()
|
LocalizationFile file = PathManagerFactory.getPathManager()
|
||||||
|
|
Loading…
Add table
Reference in a new issue