Issue #2861 Rewrote HierarchicalPreferenceStore to be more efficient and thread safe when reading values.
Amend: Added comments and cleaned up preference store Change-Id: Iac708c0988fc1b8f552d3bccf76b1706d6324b8d Former-commit-id:dbc6cc3fc6
[formerly59434c8a60
] [formerlya01a6d68d0
] [formerlydbc6cc3fc6
[formerly59434c8a60
] [formerlya01a6d68d0
] [formerlycbf8b9249c
[formerlya01a6d68d0
[formerly cc34e3dbebe13ec4f63b7529f5053391135837ef]]]] Former-commit-id:cbf8b9249c
Former-commit-id:d85fd52c26
[formerly39e1c4fa46
] [formerly d886f6a0f4f81e75f3b006fbf72cebc9033f58c2 [formerly654da3c0a2
]] Former-commit-id: 22a289abbef9ce66bd6d9f68b9610a2b65dc9258 [formerlyf509321134
] Former-commit-id:c6cf08db73
This commit is contained in:
parent
6a958c0c14
commit
7c66cf792b
23 changed files with 872 additions and 1072 deletions
|
@ -22,24 +22,36 @@ package com.raytheon.uf.viz.alertviz;
|
|||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
/**
|
||||
*
|
||||
* The activator class controls the plug-in life cycle
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 3, 2014 2861 mschenke Create preference store immediately
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author unknown
|
||||
* @version 1.0
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
private HierarchicalPreferenceStore prefs;
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "com.raytheon.uf.viz.alertviz";
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
private HierarchicalPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
|
@ -86,17 +98,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
*/
|
||||
@Override
|
||||
public HierarchicalPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
}
|
||||
} catch (LocalizationException e) {
|
||||
UFStatus.getHandler().handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
return prefs;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,10 +25,8 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
|
|||
import org.jivesoftware.smack.packet.Presence.Mode;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
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.collaboration.ui.prefs.CollabPrefConstants;
|
||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
|
@ -109,36 +107,26 @@ public class Activator extends AbstractUIPlugin {
|
|||
|
||||
@Override
|
||||
public IPersistentPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
prefs.setDefault(CollabPrefConstants.P_SERVER, "");
|
||||
prefs.setDefault(CollabPrefConstants.AUTO_JOIN, true);
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
prefs.setDefault(CollabPrefConstants.P_SERVER, "");
|
||||
prefs.setDefault(CollabPrefConstants.AUTO_JOIN, true);
|
||||
|
||||
// TODO better default?
|
||||
prefs.setDefault(CollabPrefConstants.P_USERNAME,
|
||||
System.getProperty("user.name"));
|
||||
// TODO better default?
|
||||
prefs.setDefault(CollabPrefConstants.P_USERNAME,
|
||||
System.getProperty("user.name"));
|
||||
|
||||
prefs.setDefault(CollabPrefConstants.P_STATUS,
|
||||
Mode.available.toString());
|
||||
prefs.setDefault(CollabPrefConstants.P_MESSAGE, "");
|
||||
prefs.setDefault(CollabPrefConstants.AWAY_ON_IDLE, true);
|
||||
prefs.setDefault(CollabPrefConstants.AWAY_TIMEOUT,
|
||||
CollabPrefConstants.AWAY_TIMEOUT_DEFAULT);
|
||||
prefs.setDefault(CollabPrefConstants.AUTO_ACCEPT_SUBSCRIBE,
|
||||
false);
|
||||
prefs.setDefault(CollabPrefConstants.DEFAULT_HANDLE,
|
||||
CollabPrefConstants.HandleOption.USERNAME.name());
|
||||
prefs.setDefault(CollabPrefConstants.CUSTOM_HANDLE, "");
|
||||
}
|
||||
|
||||
} catch (LocalizationException e) {
|
||||
UFStatus.getHandler().handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
prefs.setDefault(CollabPrefConstants.P_STATUS,
|
||||
Mode.available.toString());
|
||||
prefs.setDefault(CollabPrefConstants.P_MESSAGE, "");
|
||||
prefs.setDefault(CollabPrefConstants.AWAY_ON_IDLE, true);
|
||||
prefs.setDefault(CollabPrefConstants.AWAY_TIMEOUT,
|
||||
CollabPrefConstants.AWAY_TIMEOUT_DEFAULT);
|
||||
prefs.setDefault(CollabPrefConstants.AUTO_ACCEPT_SUBSCRIBE, false);
|
||||
prefs.setDefault(CollabPrefConstants.DEFAULT_HANDLE,
|
||||
CollabPrefConstants.HandleOption.USERNAME.name());
|
||||
prefs.setDefault(CollabPrefConstants.CUSTOM_HANDLE, "");
|
||||
}
|
||||
|
||||
return prefs;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Viz Core Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.uf.viz.core;singleton:=true
|
||||
Bundle-Version: 1.14.1.qualifier
|
||||
Bundle-Version: 1.14.2.qualifier
|
||||
Bundle-Activator: com.raytheon.uf.viz.core.Activator
|
||||
Bundle-Vendor: Raytheon
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
|
|
|
@ -26,9 +26,6 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
|
|||
import org.eclipse.ui.services.IDisposable;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
/**
|
||||
|
@ -38,8 +35,9 @@ import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
|||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* chammack Initial Creation.
|
||||
* Mar 5, 2013 1753 njensen Added printout to stop()
|
||||
* chammack Initial Creation.
|
||||
* Mar 5, 2013 1753 njensen Added printout to stop()
|
||||
* Mar 3, 2014 2861 mschenke Create preference store immediately
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -54,7 +52,8 @@ public class Activator extends AbstractUIPlugin {
|
|||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
private HierarchicalPreferenceStore prefs;
|
||||
private HierarchicalPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
private BundleContext ctx;
|
||||
|
||||
|
@ -116,17 +115,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
*/
|
||||
@Override
|
||||
public HierarchicalPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
}
|
||||
} catch (LocalizationException e) {
|
||||
UFStatus.getHandler().handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
return prefs;
|
||||
}
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ public class CAVELocalizationAdapter implements ILocalizationAdapter {
|
|||
if (file.exists()) {
|
||||
return file;
|
||||
} else {
|
||||
File bundleFile = null;
|
||||
File bundleFile = file; // Default to base location
|
||||
boolean containsKey = false;
|
||||
synchronized (caveStaticBaseFiles) {
|
||||
containsKey = caveStaticBaseFiles.containsKey(fileName);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -22,18 +22,26 @@ package com.raytheon.uf.viz.d2d.ui;
|
|||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
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.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
/**
|
||||
*
|
||||
* The activator class controls the plug-in life cycle
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 3, 2014 2861 mschenke Create preference store immediately
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author unknown
|
||||
* @version 1.0
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(Activator.class);
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "com.raytheon.uf.viz.d2d.ui";
|
||||
|
@ -42,7 +50,8 @@ public class Activator extends AbstractUIPlugin {
|
|||
private static Activator plugin;
|
||||
|
||||
// pref store
|
||||
private HierarchicalPreferenceStore prefs;
|
||||
private HierarchicalPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
|
@ -88,17 +97,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
*/
|
||||
@Override
|
||||
public HierarchicalPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
}
|
||||
} catch (LocalizationException e) {
|
||||
statusHandler.handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
return prefs;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,10 +23,8 @@ import org.eclipse.jface.preference.IPersistentPreferenceStore;
|
|||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
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.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
/**
|
||||
|
@ -38,7 +36,8 @@ import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 12, 2012 #1326 randerso Initial creation
|
||||
* Nov 12, 2012 #1326 randerso Initial creation
|
||||
* Mar 3, 2014 #2861 mschenke Create preference store immediately
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -49,15 +48,16 @@ public class Activator extends AbstractUIPlugin {
|
|||
public static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(Activator.class);
|
||||
|
||||
// pref store
|
||||
private HierarchicalPreferenceStore prefs;
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "com.raytheon.uf.viz.gisdatastore.directory"; //$NON-NLS-1$
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
// pref store
|
||||
private HierarchicalPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
|
@ -106,17 +106,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
*/
|
||||
@Override
|
||||
public IPersistentPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
}
|
||||
} catch (LocalizationException e) {
|
||||
statusHandler.handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
return prefs;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,10 +23,8 @@ import org.eclipse.jface.preference.IPersistentPreferenceStore;
|
|||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
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.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
/**
|
||||
|
@ -38,7 +36,8 @@ import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 12, 2012 #1326 randerso Initial creation
|
||||
* Nov 12, 2012 #1326 randerso Initial creation
|
||||
* Mar 3, 2014 #2861 mschenke Create preference store immediately
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -49,15 +48,16 @@ public class Activator extends AbstractUIPlugin {
|
|||
public static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(Activator.class);
|
||||
|
||||
// pref store
|
||||
private HierarchicalPreferenceStore prefs;
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "com.raytheon.uf.viz.gisdatastore"; //$NON-NLS-1$
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
// pref store
|
||||
private HierarchicalPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
|
@ -106,17 +106,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
*/
|
||||
@Override
|
||||
public IPersistentPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
}
|
||||
} catch (LocalizationException e) {
|
||||
statusHandler.handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
return prefs;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,13 +22,24 @@ package com.raytheon.uf.viz.monitor.scan;
|
|||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
/**
|
||||
*
|
||||
* The activator class controls the plug-in life cycle
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 3, 2014 2861 mschenke Create preference store immediately
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author unknown
|
||||
* @version 1.0
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
|
@ -38,7 +49,8 @@ public class Activator extends AbstractUIPlugin {
|
|||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
private HierarchicalPreferenceStore prefs;
|
||||
private HierarchicalPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
|
@ -88,17 +100,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
*/
|
||||
@Override
|
||||
public HierarchicalPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
}
|
||||
} catch (LocalizationException e) {
|
||||
UFStatus.getHandler().handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
return prefs;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,24 +23,36 @@ import org.eclipse.jface.resource.ImageDescriptor;
|
|||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
/**
|
||||
*
|
||||
* The activator class controls the plug-in life cycle
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 3, 2014 2861 mschenke Create preference store immediately
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author unknown
|
||||
* @version 1.0
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
private HierarchicalPreferenceStore prefs;
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "com.raytheon.uf.viz.monitor";
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
private HierarchicalPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
|
@ -101,17 +113,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
*/
|
||||
@Override
|
||||
public HierarchicalPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
}
|
||||
} catch (LocalizationException e) {
|
||||
UFStatus.getHandler().handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
return prefs;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,9 +23,6 @@ import org.eclipse.jface.preference.IPersistentPreferenceStore;
|
|||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
/**
|
||||
|
@ -37,7 +34,8 @@ import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 21, 2009 mfegan Initial creation
|
||||
* Apr 21, 2009 mfegan Initial creation
|
||||
* Mar 3, 2014 2861 mschenke Create preference store immediately
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -52,7 +50,8 @@ public class Activator extends AbstractUIPlugin {
|
|||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
private IPersistentPreferenceStore prefs;
|
||||
private IPersistentPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
@ -95,17 +94,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
*/
|
||||
@Override
|
||||
public IPersistentPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
}
|
||||
} catch (LocalizationException e) {
|
||||
UFStatus.getHandler().handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
return prefs;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,9 +25,6 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
|
|||
import org.eclipse.ui.preferences.ScopedPreferenceStore;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
/**
|
||||
|
@ -39,7 +36,9 @@ import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 20, 2011 mschenke Initial creation
|
||||
* Oct 20, 2011 mschenke Initial creation
|
||||
* Mar 3, 2014 2861 mschenke Create preference store immediately
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -58,7 +57,8 @@ public class Activator extends AbstractUIPlugin {
|
|||
private BundleContext ctx;
|
||||
|
||||
// General preference store
|
||||
private IPersistentPreferenceStore prefs;
|
||||
private IPersistentPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
// Preferences for UI
|
||||
private HierarchicalPreferenceStore uiPrefs;
|
||||
|
@ -134,14 +134,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
* @return
|
||||
*/
|
||||
public HierarchicalPreferenceStore getUiPreferenceStore() {
|
||||
if (uiPrefs == null) {
|
||||
try {
|
||||
uiPrefs = new HierarchicalPreferenceStore(this);
|
||||
} catch (LocalizationException e) {
|
||||
UFStatus.getHandler(Activator.class).handle(Priority.PROBLEM,
|
||||
"Error constructing hierarchical preferences", e);
|
||||
}
|
||||
}
|
||||
return uiPrefs;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,27 +23,39 @@ import org.eclipse.jface.preference.IPersistentPreferenceStore;
|
|||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
/**
|
||||
*
|
||||
* The activator class controls the plug-in life cycle
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 3, 2014 2861 mschenke Create preference store immediately
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author unknown
|
||||
* @version 1.0
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
public static final String MAP_DISPLAY_DENSITY = "mapDisplayDensity";
|
||||
|
||||
|
||||
public static final String MAP_DISPLAY_WIDTH = "mapDisplayWidth";
|
||||
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "com.raytheon.uf.viz.xy";
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
private IPersistentPreferenceStore prefs = null;
|
||||
private IPersistentPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
|
@ -91,17 +103,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
*/
|
||||
@Override
|
||||
public IPersistentPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
}
|
||||
} catch (LocalizationException e) {
|
||||
UFStatus.getHandler().handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
return prefs;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,9 +23,6 @@ package com.raytheon.viz.aviation.activator;
|
|||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
/**
|
||||
|
@ -38,6 +35,7 @@ import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 1/21/2008 817 grichard Initial creation.
|
||||
* Mar 3, 2014 2861 mschenke Create preference store immediately
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -54,7 +52,8 @@ public class Activator extends AbstractUIPlugin {
|
|||
private static Activator plugin;
|
||||
|
||||
/** preference store to read in the config XML */
|
||||
private HierarchicalPreferenceStore prefs;
|
||||
private HierarchicalPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
|
@ -102,17 +101,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
*/
|
||||
@Override
|
||||
public HierarchicalPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
}
|
||||
} catch (LocalizationException e) {
|
||||
UFStatus.getHandler().handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
return prefs;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,24 +22,36 @@ package com.raytheon.viz.avnconfig;
|
|||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
/**
|
||||
*
|
||||
* The activator class controls the plug-in life cycle
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 3, 2014 2861 mschenke Create preference store immediately
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author unknown
|
||||
* @version 1.0
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
private HierarchicalPreferenceStore prefs;
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "com.raytheon.viz.avnconfig";
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
private HierarchicalPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
|
@ -88,17 +100,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
*/
|
||||
@Override
|
||||
public HierarchicalPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
}
|
||||
} catch (LocalizationException e) {
|
||||
UFStatus.getHandler().handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
return prefs;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,14 +23,26 @@ import org.eclipse.jface.preference.IPersistentPreferenceStore;
|
|||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
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.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
/**
|
||||
*
|
||||
* The activator class controls the plug-in life cycle
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 3, 2014 2861 mschenke Create preference store immediately
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author unknown
|
||||
* @version 1.0
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
|
@ -44,7 +56,8 @@ public class Activator extends AbstractUIPlugin {
|
|||
private static Activator plugin;
|
||||
|
||||
// The preference store
|
||||
private IPersistentPreferenceStore prefs;
|
||||
private IPersistentPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
|
@ -92,17 +105,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
*/
|
||||
@Override
|
||||
public IPersistentPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
}
|
||||
} catch (LocalizationException e) {
|
||||
statusHandler.handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
return prefs;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,13 +22,9 @@ package com.raytheon.viz.core;
|
|||
|
||||
import javax.media.jai.ParameterBlockJAI;
|
||||
|
||||
import org.eclipse.jface.preference.IPersistentPreferenceStore;
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
/**
|
||||
|
@ -41,6 +37,7 @@ import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 7/1/06 chammack Initial Creation.
|
||||
* Mar 3, 2014 2861 mschenke Create preference store immediately
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -54,7 +51,8 @@ public class CorePlugin extends AbstractUIPlugin {
|
|||
// The shared instance.
|
||||
private static CorePlugin plugin;
|
||||
|
||||
private IPersistentPreferenceStore prefs;
|
||||
private HierarchicalPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
private BundleContext ctx;
|
||||
|
||||
|
@ -109,18 +107,7 @@ public class CorePlugin extends AbstractUIPlugin {
|
|||
*/
|
||||
@Override
|
||||
public HierarchicalPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
}
|
||||
} catch (LocalizationException e) {
|
||||
UFStatus.getHandler().handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
return (HierarchicalPreferenceStore) prefs;
|
||||
return prefs;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,13 +22,24 @@ package com.raytheon.viz.radar;
|
|||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
/**
|
||||
*
|
||||
* The activator class controls the plug-in life cycle
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 3, 2014 2861 mschenke Create preference store immediately
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author unknown
|
||||
* @version 1.0
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
|
@ -38,7 +49,8 @@ public class Activator extends AbstractUIPlugin {
|
|||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
private HierarchicalPreferenceStore prefs;
|
||||
private HierarchicalPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
|
@ -86,17 +98,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
*/
|
||||
@Override
|
||||
public HierarchicalPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
}
|
||||
} catch (LocalizationException e) {
|
||||
UFStatus.getHandler().handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
return prefs;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,9 +25,6 @@ import org.eclipse.jface.resource.ImageDescriptor;
|
|||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
||||
import com.raytheon.viz.ui.jobs.MemoryMonitorJob;
|
||||
import com.raytheon.viz.ui.panes.DrawCoordinatorJob;
|
||||
|
@ -44,7 +41,7 @@ import com.raytheon.viz.ui.panes.DrawCoordinatorJob;
|
|||
* Oct 24, 2012 2491 bsteffen Do not start DrawCoordinatorJob during
|
||||
* activation to allow activation before
|
||||
* localization is set.
|
||||
*
|
||||
* Mar 3, 2014 2861 mschenke Create preference store immediately
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -58,7 +55,8 @@ public class UiPlugin extends AbstractUIPlugin {
|
|||
// The shared instance.
|
||||
private static UiPlugin plugin;
|
||||
|
||||
private HierarchicalPreferenceStore prefs;
|
||||
private HierarchicalPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
private final Job memoryWatchJob = new MemoryMonitorJob();
|
||||
|
||||
|
@ -116,17 +114,6 @@ public class UiPlugin extends AbstractUIPlugin {
|
|||
*/
|
||||
@Override
|
||||
public HierarchicalPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
}
|
||||
} catch (LocalizationException e) {
|
||||
UFStatus.getHandler().handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
return prefs;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,9 +23,6 @@ import org.eclipse.jface.preference.IPersistentPreferenceStore;
|
|||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
/**
|
||||
|
@ -36,6 +33,7 @@ import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 26, 2007 chammack Initial Creation.
|
||||
* Mar 3, 2014 2861 mschenke Create preference store immediately
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -50,7 +48,8 @@ public class Activator extends AbstractUIPlugin {
|
|||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
private IPersistentPreferenceStore prefs;
|
||||
private IPersistentPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
|
@ -98,17 +97,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
*/
|
||||
@Override
|
||||
public IPersistentPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
}
|
||||
} catch (LocalizationException e) {
|
||||
UFStatus.getHandler().handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
return prefs;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,13 +4,24 @@ import org.eclipse.jface.preference.IPersistentPreferenceStore;
|
|||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
/**
|
||||
*
|
||||
* The activator class controls the plug-in life cycle
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 3, 2014 2861 mschenke Create preference store immediately
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author unknown
|
||||
* @version 1.0
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
|
@ -20,7 +31,8 @@ public class Activator extends AbstractUIPlugin {
|
|||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
private IPersistentPreferenceStore prefs;
|
||||
private IPersistentPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
|
@ -70,17 +82,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
*/
|
||||
@Override
|
||||
public IPersistentPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
}
|
||||
} catch (LocalizationException e) {
|
||||
UFStatus.getHandler().handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
return prefs;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,13 +3,24 @@ package gov.noaa.nws.ncep.viz.rsc.ncradar;
|
|||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
||||
|
||||
/**
|
||||
*
|
||||
* The activator class controls the plug-in life cycle
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 3, 2014 2861 mschenke Create preference store immediately
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author unknown
|
||||
* @version 1.0
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
|
@ -19,7 +30,8 @@ public class Activator extends AbstractUIPlugin {
|
|||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
private HierarchicalPreferenceStore prefs;
|
||||
private HierarchicalPreferenceStore prefs = new HierarchicalPreferenceStore(
|
||||
this);
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
|
@ -67,17 +79,6 @@ public class Activator extends AbstractUIPlugin {
|
|||
*/
|
||||
@Override
|
||||
public HierarchicalPreferenceStore getPreferenceStore() {
|
||||
try {
|
||||
if (prefs == null) {
|
||||
prefs = new HierarchicalPreferenceStore(this);
|
||||
}
|
||||
} catch (LocalizationException e) {
|
||||
UFStatus.getHandler().handle(
|
||||
Priority.PROBLEM,
|
||||
"Error reading preference store: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
return prefs;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue