Issue #2620 Fixed viz base feature dependency issues.
Change-Id: Ia3db09b101f800d77d0d95932a7abb69fc110aec Former-commit-id: 520e22dd848cf6472232d60789e1f6938db7c776
This commit is contained in:
parent
d883f8dbb1
commit
987d4b3a30
37 changed files with 535 additions and 445 deletions
17
cave/com.raytheon.uf.viz.application.feature/.project
Normal file
17
cave/com.raytheon.uf.viz.application.feature/.project
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.raytheon.uf.viz.application.feature</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.FeatureBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.FeatureNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1 @@
|
|||
bin.includes = feature.xml
|
247
cave/com.raytheon.uf.viz.application.feature/feature.xml
Normal file
247
cave/com.raytheon.uf.viz.application.feature/feature.xml
Normal file
|
@ -0,0 +1,247 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature
|
||||
id="com.raytheon.uf.viz.application.feature"
|
||||
label="Viz Base Application Feature"
|
||||
version="1.0.0.qualifier"
|
||||
provider-name="RAYTHEON">
|
||||
|
||||
<description url="http://www.example.com/description">
|
||||
[Enter Feature Description here.]
|
||||
</description>
|
||||
|
||||
<copyright url="http://www.example.com/copyright">
|
||||
[Enter Copyright Description here.]
|
||||
</copyright>
|
||||
|
||||
<license url="http://www.example.com/license">
|
||||
[Enter License Description here.]
|
||||
</license>
|
||||
|
||||
<includes
|
||||
id="org.eclipse.rcp"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.viz.application"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.core"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.engine"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.metadata"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.metadata.repository"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.repository"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.security"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.ecf"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.ecf.filetransfer"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.ecf.provider.filetransfer"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.ecf.identity"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.touchpoint.eclipse"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.touchpoint.natives"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.garbagecollector"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.frameworkadmin"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.simpleconfigurator"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.simpleconfigurator.manipulator"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.frameworkadmin.equinox"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.common"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.ds"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.publisher"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.jarprocessor"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.launcher"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.artifact.repository"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.console"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.publisher.eclipse"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.operations"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.director"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.director.app"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.sat4j.core"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.sat4j.pb"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.hamcrest.core"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
|
@ -39,6 +39,7 @@ import com.raytheon.uf.viz.application.component.IStandaloneComponent;
|
|||
* Apr 18, 2007 chammack Initial Creation.
|
||||
* Dec 03, 2007 461 bphillip Added persistence of workstation time to localization
|
||||
* Oct 07, 2008 1433 chammack Added alertviz startup
|
||||
* Nov 27, 2013 mschenke Removed ProgramArguments to make dependencies cleaner
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -55,9 +56,16 @@ public class VizApplication implements IApplication {
|
|||
* IApplicationContext)
|
||||
*/
|
||||
public Object start(IApplicationContext context) throws Exception {
|
||||
|
||||
String appToRun = ProgramArguments.getInstance()
|
||||
.getString("-component");
|
||||
String appToRun = null;
|
||||
String[] arguments = Platform.getApplicationArgs();
|
||||
for (int i = 0; i < arguments.length; ++i) {
|
||||
if ("-component".equals(arguments[i])) {
|
||||
if (i < (arguments.length - 1)) {
|
||||
appToRun = arguments[i + 1];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
IStandaloneComponent component = null;
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
<requires>
|
||||
<import feature="com.raytheon.uf.common.base.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="org.eclipse.rcp" version="3.8.2.v20130118-180157-96BuGOZFxwOAeG8Ofmqicz0tPK"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
|
@ -33,13 +34,6 @@
|
|||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.viz.personalities.cave"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.apache.activemq"
|
||||
download-size="0"
|
||||
|
@ -66,13 +60,6 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.ui.ide"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.ui.workbench"
|
||||
download-size="0"
|
||||
|
|
|
@ -127,6 +127,12 @@
|
|||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.viz.personalities.cave"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.viz.truecolor"
|
||||
|
|
|
@ -30,7 +30,6 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.uf.common.dataplugin,
|
||||
com.raytheon.uf.common.dataplugin.level,
|
||||
com.raytheon.uf.common.dataquery;visibility:=reexport,
|
||||
com.raytheon.uf.viz.application;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.units;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.colormap;bundle-version="1.12.1174",
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.viz.application;
|
||||
package com.raytheon.uf.viz.core;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
@ -25,7 +25,7 @@ import java.util.Map;
|
|||
import org.eclipse.core.runtime.Platform;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Class that parses application arguments and provides easy access to them
|
||||
*
|
||||
* <pre>
|
||||
*
|
|
@ -69,7 +69,7 @@ import com.raytheon.uf.common.localization.stream.LocalizationStreamPutRequest;
|
|||
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.application.ProgramArguments;
|
||||
import com.raytheon.uf.viz.core.ProgramArguments;
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.raytheon.uf.viz.core.VizServers;
|
||||
import com.raytheon.uf.viz.core.comm.ConnectivityManager;
|
||||
|
@ -221,8 +221,8 @@ public class LocalizationManager implements IPropertyChangeListener {
|
|||
}
|
||||
|
||||
try {
|
||||
GetServersResponse resp = ConnectivityManager.checkLocalizationServer(
|
||||
currentServer, false);
|
||||
GetServersResponse resp = ConnectivityManager
|
||||
.checkLocalizationServer(currentServer, false);
|
||||
VizApp.setHttpServer(resp.getHttpServer());
|
||||
VizApp.setJmsConnectionString(resp.getJmsConnectionString());
|
||||
VizApp.setPypiesServer(resp.getPypiesServer());
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
<requires>
|
||||
<import feature="com.raytheon.uf.common.base.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.base.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.application.feature" version="1.0.0.qualifier"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
|
@ -375,4 +376,11 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.ui.ide"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
|
|
|
@ -22,8 +22,8 @@ Require-Bundle: org.python.pydev,
|
|||
org.eclipse.wst.xml.ui;bundle-version="1.1.102",
|
||||
com.raytheon.uf.common.colormap;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.viz.localization;bundle-version="1.12.1174",
|
||||
org.eclipse.equinox.p2.director.app;bundle-version="1.0.201",
|
||||
com.raytheon.uf.common.util;bundle-version="1.12.1174",
|
||||
com.python.pydev.analysis;bundle-version="2.7.3"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Export-Package: com.raytheon.uf.viz.localization.perspective.editor
|
||||
|
|
|
@ -40,7 +40,7 @@ import com.raytheon.uf.common.localization.LocalizationFile;
|
|||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.localization.LocalizationEditorInput;
|
||||
import com.raytheon.uf.viz.localization.perspective.editor.LocalizationEditorInput;
|
||||
|
||||
/**
|
||||
* Constructs LocalizationEditorInput objects saved to an IMemento
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.viz.localization;
|
||||
package com.raytheon.uf.viz.localization.perspective.editor;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
|
@ -47,7 +47,8 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 3, 2010 mschenke Initial creation
|
||||
* Nov 3, 2010 mschenke Initial creation
|
||||
* Nov 27, 2013 mschenke Moved into localization.perspective project
|
||||
*
|
||||
* </pre>
|
||||
*
|
|
@ -0,0 +1,198 @@
|
|||
/**
|
||||
* 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.localization.perspective.editor;
|
||||
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.ui.IEditorDescriptor;
|
||||
import org.eclipse.ui.IEditorInput;
|
||||
import org.eclipse.ui.IEditorPart;
|
||||
import org.eclipse.ui.IEditorReference;
|
||||
import org.eclipse.ui.IEditorRegistry;
|
||||
import org.eclipse.ui.IWorkbenchPage;
|
||||
import org.eclipse.ui.PartInitException;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
|
||||
import com.raytheon.uf.common.localization.LocalizationFile;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
|
||||
/**
|
||||
* Provides utility class for interacting with editors in the Localization
|
||||
* perspective
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 27, 2013 mschenke Methods extracted from LocalizationPerspectiveUtils
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class LocalizationEditorUtils {
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(LocalizationEditorUtils.class);
|
||||
|
||||
private static final String DEFAULT_TEXT_EDITOR = "org.eclipse.ui.DefaultTextEditor";
|
||||
|
||||
/**
|
||||
* Get the editor descriptors for the localization file input
|
||||
*
|
||||
* @param input
|
||||
* @return
|
||||
*/
|
||||
public static IEditorDescriptor[] getEditorsForInput(
|
||||
LocalizationEditorInput input) {
|
||||
IEditorRegistry reg = getEditorRegistry();
|
||||
if (reg == null) {
|
||||
return new IEditorDescriptor[0];
|
||||
}
|
||||
return reg.getEditors(input.getLocalizationFile().getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default editor for the localization editor input
|
||||
*
|
||||
* @param input
|
||||
* @return the default editor descriptor or null if none
|
||||
*/
|
||||
public static IEditorDescriptor getDefaultEditorForInput(
|
||||
LocalizationEditorInput input) {
|
||||
IEditorRegistry reg = getEditorRegistry();
|
||||
if (reg == null) {
|
||||
return null;
|
||||
}
|
||||
return reg.getDefaultEditor(input.getLocalizationFile().getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the text editor descriptor
|
||||
*
|
||||
* @return the text editor descriptor or null if none
|
||||
*/
|
||||
public static IEditorDescriptor getTextEditorDescriptor() {
|
||||
IEditorRegistry reg = getEditorRegistry();
|
||||
if (reg == null) {
|
||||
return null;
|
||||
}
|
||||
return reg.findEditor(DEFAULT_TEXT_EDITOR);
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens an editor using the editor input and default editor associated with
|
||||
* file extension
|
||||
*
|
||||
* @param page
|
||||
* page to open in
|
||||
* @param input
|
||||
* input to open with
|
||||
* @return null the opened editor or null no editor opened
|
||||
*/
|
||||
public static IEditorPart openInEditor(IWorkbenchPage page,
|
||||
LocalizationEditorInput input) {
|
||||
IEditorRegistry reg = getEditorRegistry();
|
||||
if (reg != null) {
|
||||
IEditorDescriptor desc = reg.getDefaultEditor(input
|
||||
.getLocalizationFile().getName());
|
||||
String id = DEFAULT_TEXT_EDITOR;
|
||||
if (desc != null) {
|
||||
id = desc.getId();
|
||||
}
|
||||
return openInEditor(page, input, id);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Open an editor given the input and editor id, activate editor if already
|
||||
* opened
|
||||
*
|
||||
* @param page
|
||||
* @param input
|
||||
* @param editorId
|
||||
* @return
|
||||
*/
|
||||
public static IEditorPart openInEditor(IWorkbenchPage page,
|
||||
LocalizationEditorInput input, String editorId) {
|
||||
IEditorPart rval = null;
|
||||
IEditorPart existingPart = null;
|
||||
try {
|
||||
input.getFile().refreshLocal(IResource.DEPTH_ZERO, null);
|
||||
existingPart = getEditorForFile(page, input.getLocalizationFile());
|
||||
if ((existingPart != null)
|
||||
&& existingPart.getEditorSite().getId().equals(editorId)) {
|
||||
page.activate(existingPart);
|
||||
rval = existingPart;
|
||||
} else {
|
||||
rval = page.openEditor(input, editorId, true);
|
||||
}
|
||||
} catch (PartInitException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error opening editor for file: " + input.getName(), e);
|
||||
} catch (CoreException e) {
|
||||
// Ignore exception from refreshing the file
|
||||
}
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the workbench editor registry
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static IEditorRegistry getEditorRegistry() {
|
||||
return PlatformUI.getWorkbench().getEditorRegistry();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the open editor editing the file
|
||||
*
|
||||
* @param file
|
||||
* @return the open editor part or null if not being edited
|
||||
*/
|
||||
public static IEditorPart getEditorForFile(IWorkbenchPage page,
|
||||
LocalizationFile file) {
|
||||
for (IEditorReference ref : page.getEditorReferences()) {
|
||||
IEditorPart part = ref.getEditor(false);
|
||||
if (part != null) {
|
||||
IEditorInput input = part.getEditorInput();
|
||||
if (input instanceof LocalizationEditorInput) {
|
||||
LocalizationFile editedFile = ((LocalizationEditorInput) input)
|
||||
.getLocalizationFile();
|
||||
if (editedFile.getContext().equals(file.getContext())
|
||||
&& editedFile.getName().equals(file.getName())) {
|
||||
return part;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -55,8 +55,8 @@ 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.localization.LocalizationManager;
|
||||
import com.raytheon.uf.viz.localization.LocalizationEditorInput;
|
||||
import com.raytheon.uf.viz.localization.LocalizationPerspectiveUtils;
|
||||
import com.raytheon.uf.viz.localization.perspective.editor.LocalizationEditorInput;
|
||||
import com.raytheon.uf.viz.localization.service.ILocalizationService;
|
||||
import com.raytheon.viz.ui.EditorUtil;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.eclipse.compare.ResourceNode;
|
|||
import org.eclipse.compare.structuremergeviewer.DiffNode;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
|
||||
import com.raytheon.uf.viz.localization.LocalizationEditorInput;
|
||||
import com.raytheon.uf.viz.localization.perspective.editor.LocalizationEditorInput;
|
||||
|
||||
/**
|
||||
* Comparing editor input for localization files
|
||||
|
|
|
@ -100,14 +100,14 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
|
|||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
||||
import com.raytheon.uf.viz.localization.LocalizationEditorInput;
|
||||
import com.raytheon.uf.viz.localization.LocalizationPerspectiveUtils;
|
||||
import com.raytheon.uf.viz.localization.adapter.LocalizationPerspectiveAdapter;
|
||||
import com.raytheon.uf.viz.localization.filetreeview.FileTreeEntryData;
|
||||
import com.raytheon.uf.viz.localization.filetreeview.LocalizationFileEntryData;
|
||||
import com.raytheon.uf.viz.localization.filetreeview.LocalizationFileGroupData;
|
||||
import com.raytheon.uf.viz.localization.filetreeview.PathData;
|
||||
import com.raytheon.uf.viz.localization.perspective.Activator;
|
||||
import com.raytheon.uf.viz.localization.perspective.editor.LocalizationEditorInput;
|
||||
import com.raytheon.uf.viz.localization.perspective.editor.LocalizationEditorUtils;
|
||||
import com.raytheon.uf.viz.localization.perspective.ui.compare.LocalizationCompareEditorInput;
|
||||
import com.raytheon.uf.viz.localization.perspective.view.actions.CopyToAction;
|
||||
import com.raytheon.uf.viz.localization.perspective.view.actions.DeleteAction;
|
||||
|
@ -1371,7 +1371,7 @@ public class FileTreeView extends ViewPart implements IPartListener2,
|
|||
if (filePath == null) {
|
||||
return directoryImage;
|
||||
}
|
||||
ImageDescriptor desc = LocalizationPerspectiveUtils.getEditorRegistry()
|
||||
ImageDescriptor desc = LocalizationEditorUtils.getEditorRegistry()
|
||||
.getImageDescriptor(filePath);
|
||||
if (desc != null) {
|
||||
Image img = imageMap.get(desc);
|
||||
|
@ -1746,7 +1746,7 @@ public class FileTreeView extends ViewPart implements IPartListener2,
|
|||
if (item.getData() instanceof LocalizationFileEntryData) {
|
||||
LocalizationFileEntryData fileData = (LocalizationFileEntryData) item
|
||||
.getData();
|
||||
LocalizationPerspectiveUtils.openInEditor(
|
||||
LocalizationEditorUtils.openInEditor(
|
||||
page,
|
||||
new LocalizationEditorInput(file, fileData
|
||||
.getResource()));
|
||||
|
|
|
@ -41,7 +41,7 @@ import com.raytheon.uf.common.localization.PathManagerFactory;
|
|||
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.localization.LocalizationEditorInput;
|
||||
import com.raytheon.uf.viz.localization.perspective.editor.LocalizationEditorInput;
|
||||
|
||||
/**
|
||||
* Deletes the selected localation file
|
||||
|
|
|
@ -23,9 +23,9 @@ import org.eclipse.jface.action.Action;
|
|||
import org.eclipse.ui.IEditorDescriptor;
|
||||
import org.eclipse.ui.IWorkbenchPage;
|
||||
|
||||
import com.raytheon.uf.viz.localization.LocalizationEditorInput;
|
||||
import com.raytheon.uf.viz.localization.LocalizationPerspectiveUtils;
|
||||
import com.raytheon.uf.viz.localization.filetreeview.LocalizationFileEntryData;
|
||||
import com.raytheon.uf.viz.localization.perspective.editor.LocalizationEditorInput;
|
||||
import com.raytheon.uf.viz.localization.perspective.editor.LocalizationEditorUtils;
|
||||
|
||||
/**
|
||||
* Action to open a localization file in the default editor (based on file
|
||||
|
@ -76,19 +76,19 @@ public class OpenAction extends Action {
|
|||
public void run() {
|
||||
if (descriptor == null) {
|
||||
for (LocalizationFileEntryData file : files) {
|
||||
LocalizationPerspectiveUtils.openInEditor(
|
||||
LocalizationEditorUtils.openInEditor(
|
||||
page,
|
||||
new LocalizationEditorInput(file.getFile(), file
|
||||
.getResource()));
|
||||
}
|
||||
} else {
|
||||
for (LocalizationFileEntryData file : files) {
|
||||
LocalizationPerspectiveUtils.openInEditor(
|
||||
LocalizationEditorUtils.openInEditor(
|
||||
page,
|
||||
new LocalizationEditorInput(file.getFile(), file
|
||||
.getResource()), descriptor.getId());
|
||||
LocalizationPerspectiveUtils.getEditorRegistry()
|
||||
.setDefaultEditor(file.getName(), descriptor.getId());
|
||||
LocalizationEditorUtils.getEditorRegistry().setDefaultEditor(
|
||||
file.getName(), descriptor.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,10 +33,10 @@ import org.eclipse.ui.IEditorRegistry;
|
|||
import org.eclipse.ui.IWorkbenchPage;
|
||||
|
||||
import com.raytheon.uf.common.localization.LocalizationFile;
|
||||
import com.raytheon.uf.viz.localization.LocalizationEditorInput;
|
||||
import com.raytheon.uf.viz.localization.LocalizationPerspectiveUtils;
|
||||
import com.raytheon.uf.viz.localization.adapter.LocalizationPerspectiveAdapter;
|
||||
import com.raytheon.uf.viz.localization.filetreeview.LocalizationFileEntryData;
|
||||
import com.raytheon.uf.viz.localization.perspective.editor.LocalizationEditorInput;
|
||||
import com.raytheon.uf.viz.localization.perspective.editor.LocalizationEditorUtils;
|
||||
|
||||
/**
|
||||
* Action to open a localization file in a specified editor, lists available
|
||||
|
@ -136,11 +136,11 @@ public class OpenWithAction extends Action implements IMenuCreator {
|
|||
LocalizationEditorInput input = new LocalizationEditorInput(file,
|
||||
this.file.getResource());
|
||||
IEditorDescriptor[] adapterDescriptors = adapter.getLoadableEditors(
|
||||
LocalizationPerspectiveUtils.getEditorRegistry(), file);
|
||||
IEditorDescriptor[] descriptors = LocalizationPerspectiveUtils
|
||||
LocalizationEditorUtils.getEditorRegistry(), file);
|
||||
IEditorDescriptor[] descriptors = LocalizationEditorUtils
|
||||
.getEditorsForInput(input);
|
||||
|
||||
IEditorDescriptor defaultEditor = LocalizationPerspectiveUtils
|
||||
IEditorDescriptor defaultEditor = LocalizationEditorUtils
|
||||
.getDefaultEditorForInput(input);
|
||||
IEditorDescriptor systemEditor = new SystemEditorDescriptor(
|
||||
"System Editor");
|
||||
|
@ -148,7 +148,7 @@ public class OpenWithAction extends Action implements IMenuCreator {
|
|||
defaultEditor = new SystemEditorDescriptor("Default Editor");
|
||||
}
|
||||
if (descriptors.length == 0) {
|
||||
descriptors = new IEditorDescriptor[] { LocalizationPerspectiveUtils
|
||||
descriptors = new IEditorDescriptor[] { LocalizationEditorUtils
|
||||
.getTextEditorDescriptor() };
|
||||
}
|
||||
|
||||
|
|
|
@ -49,8 +49,8 @@ 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.common.time.SimulatedTime;
|
||||
import com.raytheon.uf.viz.application.ProgramArguments;
|
||||
import com.raytheon.uf.viz.application.component.IStandaloneComponent;
|
||||
import com.raytheon.uf.viz.core.ProgramArguments;
|
||||
import com.raytheon.uf.viz.core.RecordFactory;
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.raytheon.uf.viz.core.localization.CAVELocalizationNotificationObserver;
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.eclipse.ui.application.WorkbenchWindowAdvisor;
|
|||
import org.eclipse.ui.contexts.IContextService;
|
||||
|
||||
import com.raytheon.uf.common.time.util.ITimer;
|
||||
import com.raytheon.uf.viz.application.ProgramArguments;
|
||||
import com.raytheon.uf.viz.core.ProgramArguments;
|
||||
import com.raytheon.uf.viz.core.globals.VizGlobalsManager;
|
||||
import com.raytheon.uf.viz.ui.menus.DiscoverMenuContributions;
|
||||
import com.raytheon.viz.ui.VizWorkbenchManager;
|
||||
|
|
|
@ -38,8 +38,8 @@ import com.raytheon.uf.viz.alertviz.AlertvizJob;
|
|||
import com.raytheon.uf.viz.alertviz.Container;
|
||||
import com.raytheon.uf.viz.alertviz.SystemStatusHandler;
|
||||
import com.raytheon.uf.viz.alertviz.ui.dialogs.AlertVisualization;
|
||||
import com.raytheon.uf.viz.application.ProgramArguments;
|
||||
import com.raytheon.uf.viz.application.component.IStandaloneComponent;
|
||||
import com.raytheon.uf.viz.core.ProgramArguments;
|
||||
import com.raytheon.uf.viz.core.localization.CAVELocalizationNotificationObserver;
|
||||
import com.raytheon.uf.viz.core.localization.LocalizationConstants;
|
||||
import com.raytheon.uf.viz.core.localization.LocalizationInitializer;
|
||||
|
|
|
@ -14,7 +14,6 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.uf.common.colormap;bundle-version="1.0.0",
|
||||
com.raytheon.uf.viz.core,
|
||||
com.raytheon.uf.common.util;bundle-version="1.0.0",
|
||||
com.raytheon.uf.viz.application;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
|
||||
javax.measure;bundle-version="1.0.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
|
|
|
@ -58,7 +58,6 @@ import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
|
|||
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.application.ProgramArguments;
|
||||
import com.raytheon.uf.viz.core.AbstractGraphicsTarget;
|
||||
import com.raytheon.uf.viz.core.Activator;
|
||||
import com.raytheon.uf.viz.core.DrawableCircle;
|
||||
|
@ -68,6 +67,7 @@ import com.raytheon.uf.viz.core.DrawableString;
|
|||
import com.raytheon.uf.viz.core.IExtent;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
import com.raytheon.uf.viz.core.IView;
|
||||
import com.raytheon.uf.viz.core.ProgramArguments;
|
||||
import com.raytheon.uf.viz.core.data.IRenderedImageCallback;
|
||||
import com.raytheon.uf.viz.core.drawables.IDescriptor;
|
||||
import com.raytheon.uf.viz.core.drawables.IFont;
|
||||
|
|
|
@ -27,7 +27,6 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.uf.common.colormap;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.serialization.comm,
|
||||
org.eclipse.core.expressions,
|
||||
com.raytheon.uf.viz.application;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.topo;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.style;bundle-version="1.0.0"
|
||||
Eclipse-BuddyPolicy: ext, registered, global
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.eclipse.swt.graphics.Color;
|
|||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.viz.application.ProgramArguments;
|
||||
import com.raytheon.uf.viz.core.ProgramArguments;
|
||||
|
||||
/**
|
||||
* CAVEMode.
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
id="com.raytheon.viz.feature.awips.developer"
|
||||
label="AWIPS Developer Feature"
|
||||
version="1.9.0.qualifier"
|
||||
provider-name="Raytheon"
|
||||
plugin="com.raytheon.viz.ui.personalities.awips">
|
||||
provider-name="Raytheon">
|
||||
|
||||
<description>
|
||||
Contains the AWIPS feature set
|
||||
|
@ -183,7 +182,7 @@
|
|||
version="0.0.0"/>
|
||||
|
||||
<requires>
|
||||
<import feature="com.raytheon.viz.feature.awips" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.application.feature" version="1.0.0.qualifier"/>
|
||||
</requires>
|
||||
|
||||
</feature>
|
||||
|
|
|
@ -22,8 +22,7 @@
|
|||
id="com.raytheon.viz.feature.awips"
|
||||
label="AWIPS Feature"
|
||||
version="1.9.0.qualifier"
|
||||
provider-name="Raytheon"
|
||||
plugin="com.raytheon.viz.ui.personalities.awips">
|
||||
provider-name="Raytheon">
|
||||
|
||||
<description>
|
||||
Contains the AWIPS feature set
|
||||
|
@ -34,7 +33,7 @@
|
|||
</license>
|
||||
|
||||
<includes
|
||||
id="org.eclipse.rcp"
|
||||
id="com.raytheon.uf.viz.application.feature"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
|
@ -44,227 +43,4 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.viz.application"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.core"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.engine"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.metadata"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.metadata.repository"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.repository"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.security"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.ecf"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.ecf.filetransfer"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.ecf.provider.filetransfer"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.ecf.identity"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.touchpoint.eclipse"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.touchpoint.natives"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.garbagecollector"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.frameworkadmin"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.simpleconfigurator"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.simpleconfigurator.manipulator"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.frameworkadmin.equinox"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.common"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.ds"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.publisher"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.jarprocessor"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.launcher"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.artifact.repository"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.console"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.publisher.eclipse"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.operations"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.director"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.equinox.p2.director.app"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.sat4j.core"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.sat4j.pb"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.hamcrest.core"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
|
|
|
@ -11,7 +11,6 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.6.0",
|
|||
org.eclipse.ui;bundle-version="3.6.1",
|
||||
com.raytheon.uf.viz.core;bundle-version="1.12.1174",
|
||||
com.raytheon.viz.ui;bundle-version="1.12.1174",
|
||||
org.eclipse.ui.ide;bundle-version="3.6.1",
|
||||
org.eclipse.core.resources;bundle-version="3.6.0",
|
||||
org.eclipse.ui.workbench.texteditor;bundle-version="3.6.1",
|
||||
org.eclipse.team.core;bundle-version="3.5.100"
|
||||
|
|
|
@ -19,21 +19,12 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.localization;
|
||||
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.ui.IEditorDescriptor;
|
||||
import org.eclipse.ui.IEditorInput;
|
||||
import org.eclipse.ui.IEditorPart;
|
||||
import org.eclipse.ui.IEditorReference;
|
||||
import org.eclipse.ui.IEditorRegistry;
|
||||
import org.eclipse.ui.IViewReference;
|
||||
import org.eclipse.ui.IWorkbenchPage;
|
||||
import org.eclipse.ui.IWorkbenchWindow;
|
||||
import org.eclipse.ui.PartInitException;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.eclipse.ui.WorkbenchException;
|
||||
|
||||
import com.raytheon.uf.common.localization.LocalizationFile;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
|
@ -43,15 +34,15 @@ import com.raytheon.viz.ui.VizWorkbenchManager;
|
|||
/**
|
||||
* Utility class for the localization perspective
|
||||
*
|
||||
* TODO: See LocalizationPerspectiveManager static block
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 2, 2010 mschenke Initial creation
|
||||
* Nov 2, 2010 mschenke Initial creation
|
||||
* Nov 27, 2013 mschenke Moved editor based utility methods to
|
||||
* perspective project
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -65,143 +56,6 @@ public class LocalizationPerspectiveUtils {
|
|||
|
||||
public static final String ID_PERSPECTIVE = "com.raytheon.uf.viz.ui.LocalizationPerspective"; //$NON-NLS-1$
|
||||
|
||||
private static final String DEFAULT_TEXT_EDITOR = "org.eclipse.ui.DefaultTextEditor";
|
||||
|
||||
/**
|
||||
* Get the editor descriptors for the localization file input
|
||||
*
|
||||
* @param input
|
||||
* @return
|
||||
*/
|
||||
public static IEditorDescriptor[] getEditorsForInput(
|
||||
LocalizationEditorInput input) {
|
||||
IEditorRegistry reg = getEditorRegistry();
|
||||
if (reg == null) {
|
||||
return new IEditorDescriptor[0];
|
||||
}
|
||||
return reg.getEditors(input.getLocalizationFile().getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default editor for the localization editor input
|
||||
*
|
||||
* @param input
|
||||
* @return the default editor descriptor or null if none
|
||||
*/
|
||||
public static IEditorDescriptor getDefaultEditorForInput(
|
||||
LocalizationEditorInput input) {
|
||||
IEditorRegistry reg = getEditorRegistry();
|
||||
if (reg == null) {
|
||||
return null;
|
||||
}
|
||||
return reg.getDefaultEditor(input.getLocalizationFile().getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the text editor descriptor
|
||||
*
|
||||
* @return the text editor descriptor or null if none
|
||||
*/
|
||||
public static IEditorDescriptor getTextEditorDescriptor() {
|
||||
IEditorRegistry reg = getEditorRegistry();
|
||||
if (reg == null) {
|
||||
return null;
|
||||
}
|
||||
return reg.findEditor(DEFAULT_TEXT_EDITOR);
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens an editor using the editor input and default editor associated with
|
||||
* file extension
|
||||
*
|
||||
* @param page
|
||||
* page to open in
|
||||
* @param input
|
||||
* input to open with
|
||||
* @return null the opened editor or null no editor opened
|
||||
*/
|
||||
public static IEditorPart openInEditor(IWorkbenchPage page,
|
||||
LocalizationEditorInput input) {
|
||||
IEditorRegistry reg = getEditorRegistry();
|
||||
if (reg != null) {
|
||||
IEditorDescriptor desc = reg.getDefaultEditor(input
|
||||
.getLocalizationFile().getName());
|
||||
String id = DEFAULT_TEXT_EDITOR;
|
||||
if (desc != null) {
|
||||
id = desc.getId();
|
||||
}
|
||||
return openInEditor(page, input, id);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Open an editor given the input and editor id, activate editor if already
|
||||
* opened
|
||||
*
|
||||
* @param page
|
||||
* @param input
|
||||
* @param editorId
|
||||
* @return
|
||||
*/
|
||||
public static IEditorPart openInEditor(IWorkbenchPage page,
|
||||
LocalizationEditorInput input, String editorId) {
|
||||
IEditorPart rval = null;
|
||||
IEditorPart existingPart = null;
|
||||
try {
|
||||
input.getFile().refreshLocal(IResource.DEPTH_ZERO, null);
|
||||
existingPart = getEditorForFile(page, input.getLocalizationFile());
|
||||
if ((existingPart != null)
|
||||
&& existingPart.getEditorSite().getId().equals(editorId)) {
|
||||
page.activate(existingPart);
|
||||
rval = existingPart;
|
||||
} else {
|
||||
rval = page.openEditor(input, editorId, true);
|
||||
}
|
||||
} catch (PartInitException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error opening editor for file: " + input.getName(), e);
|
||||
} catch (CoreException e) {
|
||||
// Ignore exception from refreshing the file
|
||||
}
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the workbench editor registry
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static IEditorRegistry getEditorRegistry() {
|
||||
return PlatformUI.getWorkbench().getEditorRegistry();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the open editor editing the file
|
||||
*
|
||||
* @param file
|
||||
* @return the open editor part or null if not being edited
|
||||
*/
|
||||
public static IEditorPart getEditorForFile(IWorkbenchPage page,
|
||||
LocalizationFile file) {
|
||||
for (IEditorReference ref : page.getEditorReferences()) {
|
||||
IEditorPart part = ref.getEditor(false);
|
||||
if (part != null) {
|
||||
IEditorInput input = part.getEditorInput();
|
||||
if (input instanceof LocalizationEditorInput) {
|
||||
LocalizationFile editedFile = ((LocalizationEditorInput) input)
|
||||
.getLocalizationFile();
|
||||
if (editedFile.getContext().equals(file.getContext())
|
||||
&& editedFile.getName().equals(file.getName())) {
|
||||
return part;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a localization service object from the active window
|
||||
*
|
||||
|
|
|
@ -35,8 +35,8 @@ import org.eclipse.ui.contexts.IContextService;
|
|||
import com.raytheon.uf.common.menus.MenuCreationRequest;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.application.ProgramArguments;
|
||||
import com.raytheon.uf.viz.core.Activator;
|
||||
import com.raytheon.uf.viz.core.ProgramArguments;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
||||
import com.raytheon.uf.viz.core.preferences.PreferenceConstants;
|
||||
|
|
|
@ -49,8 +49,8 @@ import com.raytheon.uf.common.time.util.ITimer;
|
|||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.viz.alertviz.SystemStatusHandler;
|
||||
import com.raytheon.uf.viz.alertviz.ui.dialogs.AlertVisualization;
|
||||
import com.raytheon.uf.viz.application.ProgramArguments;
|
||||
import com.raytheon.uf.viz.application.component.IStandaloneComponent;
|
||||
import com.raytheon.uf.viz.core.ProgramArguments;
|
||||
import com.raytheon.uf.viz.core.RecordFactory;
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.raytheon.uf.viz.core.localization.CAVELocalizationNotificationObserver;
|
||||
|
|
|
@ -7,8 +7,7 @@ Bundle-Activator: gov.noaa.nws.ncep.viz.localization.Activator
|
|||
Require-Bundle: org.eclipse.core.runtime,
|
||||
org.eclipse.ui;bundle-version="3.6.1",
|
||||
com.raytheon.viz.ui;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.viz.core;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.viz.application;bundle-version="1.0.0"
|
||||
com.raytheon.uf.viz.core;bundle-version="1.12.1174"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Export-Package: gov.noaa.nws.ncep.viz.localization
|
||||
|
|
|
@ -1,18 +1,12 @@
|
|||
package gov.noaa.nws.ncep.viz.localization;
|
||||
|
||||
//import gov.noaa.nws.ncep.viz.localization.adapter.NcepCAVELocalizationAdapter;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.core.runtime.Plugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.viz.core.ProgramArguments;
|
||||
//import com.raytheon.uf.common.localization.IPathManager;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.viz.application.ProgramArguments;
|
||||
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
||||
|
||||
/**
|
||||
* The activator class controls the plug-in life cycle
|
||||
|
|
|
@ -19,7 +19,6 @@ Require-Bundle: org.eclipse.ui,
|
|||
gov.noaa.nws.ncep.viz.overlays;bundle-version="1.0.0",
|
||||
com.raytheon.viz.alerts,
|
||||
com.raytheon.uf.common.dataplugin.satellite;bundle-version="1.0.0",
|
||||
com.raytheon.uf.viz.application;bundle-version="1.0.0",
|
||||
gov.noaa.nws.ncep.viz.resourceManager;bundle-version="1.0.0",
|
||||
gov.noaa.nws.ncep.staticdataprovider;bundle-version="1.0.0",
|
||||
com.raytheon.viz.ui.personalities.awips
|
||||
|
|
|
@ -45,7 +45,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.application.ProgramArguments;
|
||||
import com.raytheon.uf.viz.core.ProgramArguments;
|
||||
import com.raytheon.uf.viz.core.IDisplayPane;
|
||||
import com.raytheon.uf.viz.core.IDisplayPaneContainer;
|
||||
import com.raytheon.uf.viz.core.IVizEditorChangedListener;
|
||||
|
|
Loading…
Add table
Reference in a new issue