This commit was manufactured by cvs2svn to create tag
'R1_0_RC2_N20060920-1805'.
diff --git a/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/EPFVersion.java b/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/EPFVersion.java
index 207d1e2..97cf85a 100755
--- a/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/EPFVersion.java
+++ b/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/EPFVersion.java
@@ -75,7 +75,7 @@
*
*/
public int compareToolVersionTo(Version toolVersion) {
- if (VersionUtil.isVersionCheckingEnabled())
+ if (!VersionUtil.isVersionCheckingDisabled())
return getToolVersion().compareTo(toolVersion);
else
return 0;
@@ -93,7 +93,7 @@
*
*/
public int compareLibraryVersionTo(Version libraryVersion) {
- if (VersionUtil.isVersionCheckingEnabled())
+ if (!VersionUtil.isVersionCheckingDisabled())
return getLibraryVersion().compareTo(libraryVersion);
else
return 0;
@@ -111,7 +111,7 @@
*
*/
public int compareXMLSchemaVersionTo(Version XMLSchemaVersion) {
- if (VersionUtil.isVersionCheckingEnabled())
+ if (!VersionUtil.isVersionCheckingDisabled())
return getXMLSchemaVersion().compareTo(XMLSchemaVersion);
else
return 0;
diff --git a/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/VersionUtil.java b/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/VersionUtil.java
index e2c4e27..574ccfb 100755
--- a/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/VersionUtil.java
+++ b/plugins/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/VersionUtil.java
@@ -18,7 +18,6 @@
import java.util.List;
import java.util.Map;
import java.util.MissingResourceException;
-import java.util.ResourceBundle;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -74,12 +73,13 @@
public static final String EXTENSION_VERSIONS_INFO = "versions"; //$NON-NLS-1$
public static final String EXTENSION_LIB_EXTENSION_CHECK = "libraryExtensionVersionCheck"; //$NON-NLS-1$
+ private static final String DISABLE_VERSION_CHECKING_PREF = "disable_version_checking"; //$NON-NLS-1$
public static Map versions = new LinkedHashMap();
public static Map libExtCheckers = new LinkedHashMap();
- protected static boolean versionCheckingEnabled = true;
+ protected static boolean versionCheckingDisabled = false;
/**
* List of toolIDs to check, in order
@@ -91,13 +91,13 @@
// read properties file
try {
- ResourceBundle resourceBundle = ResourceBundle.getBundle(VersionUtil.class.getPackage().getName()
- + ".VersionUtil"); //$NON-NLS-1$
- versionCheckingEnabled = Boolean.valueOf(resourceBundle.getString("versionCheckingEnabled")).booleanValue(); //$NON-NLS-1$
+ String valueStr = CommonPlugin.getDefault().getPreferenceStore().getString(DISABLE_VERSION_CHECKING_PREF);
+ versionCheckingDisabled = Boolean.valueOf(valueStr).booleanValue();
}
catch (MissingResourceException e) {
- versionCheckingEnabled = true;
+ versionCheckingDisabled = false;
}
+
// Process the "org.eclipse.epf.common.version" extension point
// contributors.
IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
@@ -169,10 +169,10 @@
/**
*
- * @return true iff version checking is enabled
+ * @return true iff version checking is disabled
*/
- public static boolean isVersionCheckingEnabled() {
- return versionCheckingEnabled;
+ public static boolean isVersionCheckingDisabled() {
+ return versionCheckingDisabled;
}
public static final Pattern p_XMIVersionPattern = Pattern.compile("(\\w+?):version=\"(.+?)\"", Pattern.DOTALL); //$NON-NLS-1$