Issue #2954 - Handle missing scale files at cave startup.
Change-Id: I3f7159b7a48e74fc9ad7a4220d6c30b67240aca1 Former-commit-id:33efdb9588
[formerlya3bf92988a
] [formerly39cb0ac9e3
] [formerly39cb0ac9e3
[formerly372e9dc80f
]] [formerly33efdb9588
[formerlya3bf92988a
] [formerly39cb0ac9e3
] [formerly39cb0ac9e3
[formerly372e9dc80f
]] [formerly9334bc2b00
[formerly39cb0ac9e3
[formerly372e9dc80f
] [formerly9334bc2b00
[formerly 4b7a68aeca0346f41965b98626e2c728b1a0e532]]]]] Former-commit-id:9334bc2b00
Former-commit-id:a2862142ed
[formerlyf2c11bd688
] [formerlyfb0073c74b
] [formerly f47bb5e8526b23e0659a1b890c09b318591a92d2 [formerly 8d4152bf8316554ef4fe24d94ae4d45059ccf75e] [formerlyfb0073c74b
[formerly6de201d3f8
]]] Former-commit-id: 00d57110654485eb25c4b4a62f396a670a3c114c [formerly 57ca440faa2e175864b84fff01d646ec63369f80] [formerlye33813eef9
[formerly9c80493102
]] Former-commit-id:e33813eef9
Former-commit-id:44321505fb
This commit is contained in:
parent
19b9b87d8a
commit
7fc6cf1248
1 changed files with 14 additions and 7 deletions
|
@ -61,6 +61,7 @@ import com.raytheon.viz.ui.actions.LoadSerializedXml;
|
||||||
* Oct 08, 2013 mschenke Initial creation
|
* Oct 08, 2013 mschenke Initial creation
|
||||||
* Oct 22, 2013 2491 bsteffen Change from SerializationUtil to
|
* Oct 22, 2013 2491 bsteffen Change from SerializationUtil to
|
||||||
* ProcedureXmlManager
|
* ProcedureXmlManager
|
||||||
|
* Mar 24, 2014 2954 mpduff Check for missing map scale files and handle the situation.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -99,16 +100,22 @@ public class MapScalesManager {
|
||||||
|
|
||||||
private String bundleXml;
|
private String bundleXml;
|
||||||
|
|
||||||
private boolean isCustom;
|
private final boolean isCustom;
|
||||||
|
|
||||||
private ManagedMapScale(String baseDir, MapScale scale)
|
private ManagedMapScale(String baseDir, MapScale scale)
|
||||||
throws SerializationException {
|
throws SerializationException {
|
||||||
this.isCustom = false;
|
this.isCustom = false;
|
||||||
this.scaleFile = new AutoUpdatingLocalizationFile(
|
LocalizationFile file = PathManagerFactory.getPathManager()
|
||||||
PathManagerFactory.getPathManager()
|
.getStaticLocalizationFile(
|
||||||
.getStaticLocalizationFile(
|
baseDir + IPathManager.SEPARATOR
|
||||||
baseDir + IPathManager.SEPARATOR
|
+ scale.getFileName());
|
||||||
+ scale.getFileName()));
|
|
||||||
|
if (file == null || !file.exists()) {
|
||||||
|
throw new IllegalStateException(
|
||||||
|
"scalesInfo.xml references missing file "
|
||||||
|
+ scale.getFileName());
|
||||||
|
}
|
||||||
|
this.scaleFile = new AutoUpdatingLocalizationFile(file);
|
||||||
this.scaleFile.addListener(listener);
|
this.scaleFile.addListener(listener);
|
||||||
this.partIds = scale.getPartIds();
|
this.partIds = scale.getPartIds();
|
||||||
this.displayName = scale.getDisplayName();
|
this.displayName = scale.getDisplayName();
|
||||||
|
@ -200,7 +207,7 @@ public class MapScalesManager {
|
||||||
|
|
||||||
// TODO: Need to figure out best way to create custom scales (depends on
|
// TODO: Need to figure out best way to create custom scales (depends on
|
||||||
// maps loaded so it can't be at the projection dialog level)
|
// maps loaded so it can't be at the projection dialog level)
|
||||||
private Collection<ManagedMapScale> customScales = new ArrayList<ManagedMapScale>();
|
private final Collection<ManagedMapScale> customScales = new ArrayList<ManagedMapScale>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a MapScalesManager for the given scales file. File must be
|
* Construct a MapScalesManager for the given scales file. File must be
|
||||||
|
|
Loading…
Add table
Reference in a new issue