Issue #2033 Fixed aviation plugin issues
Change-Id: I911e5424b3d269fdc6138c7113d9de18badc85ba Former-commit-id:11cdb2e0fd
[formerly578ad148f4
] [formerly6abf647f04
[formerly a8f6a4f58ee2c89e56d6fdfface15379ef7b9bad]] Former-commit-id:6abf647f04
Former-commit-id:1a558d247b
This commit is contained in:
parent
6dfb31d1c3
commit
930ec1706d
3 changed files with 12 additions and 8 deletions
|
@ -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());
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue