Issue #2033 Fixed aviation plugin issues
Change-Id: I911e5424b3d269fdc6138c7113d9de18badc85ba Former-commit-id:a3db693c09
[formerlyecf702ae8d
] [formerly11cdb2e0fd
] [formerly11cdb2e0fd
[formerly578ad148f4
]] [formerly6abf647f04
[formerly11cdb2e0fd
[formerly578ad148f4
] [formerly6abf647f04
[formerly a8f6a4f58ee2c89e56d6fdfface15379ef7b9bad]]]] Former-commit-id:6abf647f04
Former-commit-id: 2901a5156c7569ddb5cb99b52d870444ab63bd03 [formerly 96289a5ff59078a1d57fabf113aaafc84fce16d1] [formerly930ec1706d
[formerly1a558d247b
]] Former-commit-id:930ec1706d
Former-commit-id:52334d9efb
This commit is contained in:
parent
33972e3465
commit
4e435893ee
3 changed files with 12 additions and 8 deletions
|
@ -119,14 +119,18 @@ public class BundleScanner {
|
||||||
File file = null;
|
File file = null;
|
||||||
Bundle bundle = getBundle(bundleToSearch);
|
Bundle bundle = getBundle(bundleToSearch);
|
||||||
if (bundle != null && bundle.getState() != Bundle.UNINSTALLED) {
|
if (bundle != null && bundle.getState() != Bundle.UNINSTALLED) {
|
||||||
URL url = FileLocator.find(bundle, new Path(basePath
|
String path = basePath;
|
||||||
+ IPathManager.SEPARATOR + pathToLookFor), null);
|
if (pathToLookFor != null
|
||||||
|
&& pathToLookFor.trim().isEmpty() == false) {
|
||||||
|
path += IPathManager.SEPARATOR + pathToLookFor;
|
||||||
|
}
|
||||||
|
URL url = FileLocator.find(bundle, new Path(path), null);
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
URL resolvedURL = null;
|
URL resolvedURL = null;
|
||||||
try {
|
try {
|
||||||
resolvedURL = FileLocator.toFileURL(url);
|
resolvedURL = FileLocator.toFileURL(url);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
if (resolvedURL != null) {
|
if (resolvedURL != null) {
|
||||||
file = new File(resolvedURL.getPath());
|
file = new File(resolvedURL.getPath());
|
||||||
|
|
|
@ -76,10 +76,11 @@ public class LocalizationInitializer {
|
||||||
LocalizationContext baseContext = pm.getContext(
|
LocalizationContext baseContext = pm.getContext(
|
||||||
LocalizationType.CAVE_CONFIG, LocalizationLevel.BASE);
|
LocalizationType.CAVE_CONFIG, LocalizationLevel.BASE);
|
||||||
String filePath = "config.xml";
|
String filePath = "config.xml";
|
||||||
for (String bundle : BundleScanner.getListOfBundles()) {
|
BundleScanner scanner = new BundleScanner(filePath);
|
||||||
File copyFrom = BundleScanner.searchInBundle(bundle, "", filePath);
|
for (String bundle : scanner.getContributingBundles()) {
|
||||||
|
File copyFrom = scanner.searchInBundle(bundle, null);
|
||||||
if (copyFrom != null) {
|
if (copyFrom != null) {
|
||||||
String searchPath = bundle + File.separator + filePath;
|
String searchPath = bundle + IPathManager.SEPARATOR + filePath;
|
||||||
File copyTo = pm.getFile(baseContext, searchPath);
|
File copyTo = pm.getFile(baseContext, searchPath);
|
||||||
if (copyTo.exists() == false
|
if (copyTo.exists() == false
|
||||||
|| copyFrom.lastModified() != copyTo.lastModified()) {
|
|| copyFrom.lastModified() != copyTo.lastModified()) {
|
||||||
|
|
|
@ -33,8 +33,7 @@
|
||||||
id="com.raytheon.viz.aviation"
|
id="com.raytheon.viz.aviation"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
install-size="0"
|
install-size="0"
|
||||||
version="0.0.0"
|
version="0.0.0"/>
|
||||||
unpack="false"/>
|
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="com.raytheon.viz.avnconfig"
|
id="com.raytheon.viz.avnconfig"
|
||||||
|
|
Loading…
Add table
Reference in a new issue