Merge "Issue #343 remove extra perspectives when in thinclient component" into 4-Thin_Client
Former-commit-id:c20df8b229
[formerlybdb08a9f4c
] [formerlyc20df8b229
[formerlybdb08a9f4c
] [formerly642ad4e9b0
[formerly 712f278a25a67d3d05375213b4d5bc8e7743aaa9]]] Former-commit-id:642ad4e9b0
Former-commit-id:9a8dd201c5
[formerly051e8faf55
] Former-commit-id:f7767084b6
This commit is contained in:
commit
f30073312c
6 changed files with 86 additions and 19 deletions
|
@ -107,7 +107,7 @@ public class BundleScanner {
|
|||
String pathToLookFor, Map<String, Bundle> toSearch) {
|
||||
File file = null;
|
||||
Bundle b = toSearch.get(bundleToSearch);
|
||||
if (b != null) {
|
||||
if (b != null && b.getState() != Bundle.UNINSTALLED) {
|
||||
URL url = FileLocator.find(b, new Path(basePath + File.separator
|
||||
+ pathToLookFor), null);
|
||||
if (url != null) {
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
# Warngen
|
||||
com.raytheon.viz.warngen
|
||||
# GFe Perspective
|
||||
com.raytheon.viz.gfe
|
||||
com.raytheon.viz.ghg
|
||||
# AvnFPS
|
||||
com.raytheon.viz.aviation
|
||||
com.raytheon.viz.avnconfig
|
||||
# MPE
|
||||
com.raytheon.viz.mpe
|
||||
com.raytheon.viz.mpe.ui
|
||||
# Hydro
|
||||
com.raytheon.viz.hydrobase
|
||||
com.raytheon.viz.hydrocommon
|
||||
com.raytheon.viz.hydro
|
||||
# ncep
|
||||
gov.noaa.nws.ncep.viz.ui.perspectives
|
||||
gov.noaa.nws.ncep.ui.nctextui
|
||||
gov.noaa.nws.ncep.viz.cloudHeight
|
||||
gov.noaa.nws.ncep.viz.rsc.airmet
|
||||
gov.noaa.nws.ncep.viz.rsc.atcf
|
||||
gov.noaa.nws.ncep.viz.rsc.convsigmet
|
||||
gov.noaa.nws.ncep.viz.rsc.ffa
|
||||
gov.noaa.nws.ncep.viz.rsc.ffg
|
||||
gov.noaa.nws.ncep.viz.rsc.idft
|
||||
gov.noaa.nws.ncep.viz.rsc.intlsig
|
||||
gov.noaa.nws.ncep.viz.rsc.lightning
|
||||
gov.noaa.nws.ncep.viz.rsc.mosaic
|
||||
gov.noaa.nws.ncep.viz.rsc.ncscat
|
||||
gov.noaa.nws.ncep.viz.rsc.nonconvsigmet
|
||||
gov.noaa.nws.ncep.viz.rsc.plotdata
|
||||
gov.noaa.nws.ncep.viz.rsc.satellite
|
||||
gov.noaa.nws.ncep.viz.rsc.svrl
|
||||
gov.noaa.nws.ncep.viz.rsc.warn
|
||||
gov.noaa.nws.ncep.viz.rsc.wcn
|
||||
gov.noaa.nws.ncep.viz.rsc.wcp
|
||||
gov.noaa.nws.ncep.viz.rsc.wstm
|
||||
gov.noaa.nws.ncep.viz.rsc.wou
|
||||
#localization
|
||||
com.raytheon.uf.viz.localization.perspective
|
||||
org.eclipse.wst.xml.ui
|
|
@ -2,4 +2,5 @@ source.. = src/
|
|||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
plugin.xml
|
||||
plugin.xml,\
|
||||
ThinClientPluginBlacklist.txt
|
||||
|
|
|
@ -19,6 +19,12 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.thinclient.cave;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.JAXBException;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
|
@ -30,6 +36,7 @@ import com.raytheon.uf.common.serialization.SerializationUtil;
|
|||
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.localization.BundleScanner;
|
||||
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
||||
import com.raytheon.uf.viz.thinclient.Activator;
|
||||
import com.raytheon.uf.viz.thinclient.IThinClientComponent;
|
||||
|
@ -105,11 +112,23 @@ public class ThinClientComponent extends CAVE implements IThinClientComponent {
|
|||
Activator.getDefault().setComponent(this);
|
||||
|
||||
ThinClientURICatalog.getInstance();
|
||||
List<String> pluginBlacklist = new ArrayList<String>();
|
||||
File blacklistFile = BundleScanner.searchInBundle(
|
||||
com.raytheon.uf.viz.thinclient.cave.Activator.PLUGIN_ID, "",
|
||||
"ThinClientPluginBlacklist.txt");
|
||||
if (blacklistFile != null && blacklistFile.exists()) {
|
||||
BufferedReader reader = new BufferedReader(new FileReader(
|
||||
blacklistFile));
|
||||
String line = null;
|
||||
while (null != (line = reader.readLine())) {
|
||||
pluginBlacklist.add(line.trim());
|
||||
}
|
||||
}
|
||||
try {
|
||||
for (Bundle b : Activator.getDefault().getContext().getBundles()) {
|
||||
if ("com.raytheon.viz.warngen".equals(b.getSymbolicName())) {
|
||||
if (pluginBlacklist.contains(b.getSymbolicName())) {
|
||||
b.stop();
|
||||
b.uninstall();
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
|
|
|
@ -20,6 +20,26 @@
|
|||
-->
|
||||
<?eclipse version="3.3"?>
|
||||
<plugin>
|
||||
<extension
|
||||
point="org.eclipse.ui.menus">
|
||||
<menuContribution
|
||||
locationURI="menu:file.new.Aviation">
|
||||
<command
|
||||
commandId="com.raytheon.viz.aviation.openaviation"
|
||||
label="AvnFPS Menu ..."
|
||||
style="push">
|
||||
</command>
|
||||
<separator
|
||||
name="xxx"
|
||||
visible="true">
|
||||
</separator>
|
||||
<command
|
||||
commandId="com.raytheon.viz.aviation.openavnconfig"
|
||||
label="Configuration GUI ..."
|
||||
style="push">
|
||||
</command>
|
||||
</menuContribution>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.commands">
|
||||
<command
|
||||
|
|
|
@ -50,21 +50,7 @@
|
|||
label="Text Workstation"
|
||||
style="push">
|
||||
</command>
|
||||
<menu label="Aviation">
|
||||
<command
|
||||
commandId="com.raytheon.viz.aviation.openaviation"
|
||||
label="AvnFPS Menu ..."
|
||||
style="push">
|
||||
</command>
|
||||
<separator
|
||||
name="xxx"
|
||||
visible="true">
|
||||
</separator>
|
||||
<command
|
||||
commandId="com.raytheon.viz.aviation.openavnconfig"
|
||||
label="Configuration GUI ..."
|
||||
style="push">
|
||||
</command>
|
||||
<menu id="file.new.Aviation" label="Aviation">
|
||||
</menu>
|
||||
</menu>
|
||||
<menu id="perspectives" label="Perspective">
|
||||
|
|
Loading…
Add table
Reference in a new issue