Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2022-01-28 17:52:27 +0000
committerThomas Watson2022-01-28 19:19:40 +0000
commitc90261ba3ee990bce8f6f136b370781245c845eb (patch)
tree82fe81e814e68b89b9d1c377d9ed333d81563c70
parentd74e6eaad4e361f8636aa57ab382cabbd97d91c7 (diff)
downloadrt.equinox.framework-c90261ba3ee990bce8f6f136b370781245c845eb.tar.gz
rt.equinox.framework-c90261ba3ee990bce8f6f136b370781245c845eb.tar.xz
rt.equinox.framework-c90261ba3ee990bce8f6f136b370781245c845eb.zip
Setting osgi.console.enable.builtin=true long ago would enable the built-in console in the Framework. This console got removed long ago. Today if you set osgi.console.enable.builtin=true you will get a useless message about not being able to find the "unknown" bundle. This fix is to look for the equinox.consolve bundle if the osgi.console.enable.builtin configuration property is set to true or false. Change-Id: Icae4481d55babd7e2a31c665ac66d1937558918c Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/190126
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/ConsoleManager.java24
1 files changed, 16 insertions, 8 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/ConsoleManager.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/ConsoleManager.java
index ef4a32087..d5de74590 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/ConsoleManager.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/ConsoleManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2013 IBM Corporation and others.
+ * Copyright (c) 2008, 2022 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -14,7 +14,10 @@
package org.eclipse.core.runtime.internal.adaptor;
import org.eclipse.osgi.internal.framework.EquinoxConfiguration;
-import org.osgi.framework.*;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.ServiceReference;
public class ConsoleManager {
@@ -34,13 +37,18 @@ public class ConsoleManager {
port = consolePropValue.substring(index + 1);
}
this.consolePort = port != null ? port.trim() : port;
- String enabled = equinoxConfig.getConfiguration(PROP_CONSOLE_ENABLED, CONSOLE_BUNDLE);
- this.context = context;
- if (!"true".equals(enabled) || "none".equals(consolePort)) { //$NON-NLS-1$ //$NON-NLS-2$
- this.consoleBundle = "false".equals(enabled) ? CONSOLE_BUNDLE : enabled; //$NON-NLS-1$
- return;
+ String enabled = equinoxConfig.getConfiguration(PROP_CONSOLE_ENABLED, CONSOLE_BUNDLE).trim();
+ if ("true".equals(enabled) || "false".equals(enabled)) { //$NON-NLS-1$ //$NON-NLS-2$
+ // Note the osgi.console.enable.builtin property is a legacy setting that would
+ // enable the internal built-in console if set to true.
+ // There no longer is any built-in console in the framework.
+ // It makes no sense to support values true or false.
+ // If "true" or "false" is used then we just default to the
+ // equinox.console bundle.
+ enabled = CONSOLE_BUNDLE;
}
- this.consoleBundle = "unknown"; //$NON-NLS-1$
+ this.consoleBundle = enabled;
+ this.context = context;
}
public static ConsoleManager startConsole(BundleContext context, EquinoxConfiguration equinoxConfig) {

Back to the top