Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2006-07-13 14:28:59 +0000
committerDJ Houghton2006-07-13 14:28:59 +0000
commit1ceeac4d252dd32a677f1a0d32eab56e859b87e6 (patch)
tree8ea833a1e127d3fa3bcb1f769ccc81951212a60c
parentee989aad71ac6444c69a4387b162f75f2d460715 (diff)
downloadrt.equinox.bundles-1ceeac4d252dd32a677f1a0d32eab56e859b87e6.tar.gz
rt.equinox.bundles-1ceeac4d252dd32a677f1a0d32eab56e859b87e6.tar.xz
rt.equinox.bundles-1ceeac4d252dd32a677f1a0d32eab56e859b87e6.zip
Bug 150288 - [prefs] Should avoid messages printed to the consoler32x_v20060713
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/Activator.java3
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesOSGiUtils.java15
2 files changed, 12 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/Activator.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/Activator.java
index 88df616b9..6440d8935 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/Activator.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/Activator.java
@@ -59,8 +59,9 @@ public class Activator implements BundleActivator, ServiceTrackerCustomizer {
*/
public void start(BundleContext context) throws Exception {
bundleContext = context;
- processCommandLine();
+ // Open the services first before processing the command-line args, order is important! (Bug 150288)
PreferencesOSGiUtils.getDefault().openServices();
+ processCommandLine();
boolean shouldRegister = !"false".equalsIgnoreCase(context.getProperty(PROP_REGISTER_PERF_SERVICE)); //$NON-NLS-1$
if (shouldRegister) {
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesOSGiUtils.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesOSGiUtils.java
index 93bc1f13e..a0299c030 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesOSGiUtils.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesOSGiUtils.java
@@ -52,7 +52,8 @@ public class PreferencesOSGiUtils {
void openServices() {
BundleContext context = Activator.getContext();
if (context == null) {
- PrefsMessages.message("PreferencesOSGiUtils called before plugin started"); //$NON-NLS-1$
+ if (EclipsePreferences.DEBUG_PREFERENCE_GENERAL)
+ PrefsMessages.message("PreferencesOSGiUtils called before plugin started"); //$NON-NLS-1$
return;
}
@@ -118,20 +119,23 @@ public class PreferencesOSGiUtils {
public ILegacyPreferences getLegacyPreferences() {
if (initTracker != null)
return (ILegacyPreferences) initTracker.getService();
- PrefsMessages.message("Legacy preference tracker is not set"); //$NON-NLS-1$
+ if (EclipsePreferences.DEBUG_PREFERENCE_GENERAL)
+ PrefsMessages.message("Legacy preference tracker is not set"); //$NON-NLS-1$
return null;
}
public FrameworkLog getFrameworkLog() {
if (logTracker != null)
return (FrameworkLog) logTracker.getService();
- PrefsMessages.message("Log tracker is not set"); //$NON-NLS-1$
+ if (EclipsePreferences.DEBUG_PREFERENCE_GENERAL)
+ PrefsMessages.message("Log tracker is not set"); //$NON-NLS-1$
return null;
}
public boolean getBooleanDebugOption(String option, boolean defaultValue) {
if (debugTracker == null) {
- PrefsMessages.message("Debug tracker is not set"); //$NON-NLS-1$
+ if (EclipsePreferences.DEBUG_PREFERENCE_GENERAL)
+ PrefsMessages.message("Debug tracker is not set"); //$NON-NLS-1$
return defaultValue;
}
DebugOptions options = (DebugOptions) debugTracker.getService();
@@ -145,7 +149,8 @@ public class PreferencesOSGiUtils {
public Bundle getBundle(String bundleName) {
if (bundleTracker == null) {
- PrefsMessages.message("Bundle tracker is not set"); //$NON-NLS-1$
+ if (EclipsePreferences.DEBUG_PREFERENCE_GENERAL)
+ PrefsMessages.message("Bundle tracker is not set"); //$NON-NLS-1$
return null;
}
PackageAdmin packageAdmin = (PackageAdmin) bundleTracker.getService();

Back to the top