Merge "Issue #2033 Fixed aviation plugin issues" into development

Former-commit-id: 1a0a88f72d [formerly af0128db87] [formerly fe375bd802] [formerly 1a0a88f72d [formerly af0128db87] [formerly fe375bd802] [formerly 3a86a74ea4 [formerly fe375bd802 [formerly a2d1f2330c81757b44b2a1c8a46bfd757829e127]]]]
Former-commit-id: 3a86a74ea4
Former-commit-id: bbb8004710 [formerly 4012bde731] [formerly 60b58a6d2924f24283ab517f81694facd1ce696e [formerly f2de5f9f62]]
Former-commit-id: f3f7c900a0305c06efb8bef8e2b2ef0c76140786 [formerly 60388cc063]
Former-commit-id: 77d69fec42
This commit is contained in:
Nate Jensen 2013-08-28 11:43:05 -05:00 committed by Gerrit Code Review
commit 491c961e4f
3 changed files with 12 additions and 8 deletions

View file

@ -119,14 +119,18 @@ public class BundleScanner {
File file = null;
Bundle bundle = getBundle(bundleToSearch);
if (bundle != null && bundle.getState() != Bundle.UNINSTALLED) {
URL url = FileLocator.find(bundle, new Path(basePath
+ IPathManager.SEPARATOR + pathToLookFor), null);
String path = basePath;
if (pathToLookFor != null
&& pathToLookFor.trim().isEmpty() == false) {
path += IPathManager.SEPARATOR + pathToLookFor;
}
URL url = FileLocator.find(bundle, new Path(path), null);
if (url != null) {
URL resolvedURL = null;
try {
resolvedURL = FileLocator.toFileURL(url);
} catch (IOException e) {
}
if (resolvedURL != null) {
file = new File(resolvedURL.getPath());

View file

@ -76,10 +76,11 @@ public class LocalizationInitializer {
LocalizationContext baseContext = pm.getContext(
LocalizationType.CAVE_CONFIG, LocalizationLevel.BASE);
String filePath = "config.xml";
for (String bundle : BundleScanner.getListOfBundles()) {
File copyFrom = BundleScanner.searchInBundle(bundle, "", filePath);
BundleScanner scanner = new BundleScanner(filePath);
for (String bundle : scanner.getContributingBundles()) {
File copyFrom = scanner.searchInBundle(bundle, null);
if (copyFrom != null) {
String searchPath = bundle + File.separator + filePath;
String searchPath = bundle + IPathManager.SEPARATOR + filePath;
File copyTo = pm.getFile(baseContext, searchPath);
if (copyTo.exists() == false
|| copyFrom.lastModified() != copyTo.lastModified()) {

View file

@ -33,8 +33,7 @@
id="com.raytheon.viz.aviation"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
version="0.0.0"/>
<plugin
id="com.raytheon.viz.avnconfig"