| Summary: | Equinox console is still required via ConsoleManager | ||
|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Lars Vogel <Lars.Vogel> |
| Component: | Framework | Assignee: | equinox.framework-inbox <equinox.framework-inbox> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | alex.blewitt, Lars.Vogel, tjwatson |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=371101 | ||
| Whiteboard: | |||
(In reply to Lars Vogel from comment #0) > IIRC we deprecated the org.eclipse.equinox.console a while ago, N o we did not, we just replaced the actual console implementation with gogo. The equinox.console bundle is still there to provide console commands to gogo that we have had from the start which are specific to equinox. Things like the 'diag' command. > but OSGi > still contains code which try to start this plug-in throws an exception if > this bundle is not available. > > Is this code still required? In its current state, yes. This is what eagerly activates the console bundles based on of the -console option was used. Thanks, Tom for the info. |
IIRC we deprecated the org.eclipse.equinox.console a while ago, but OSGi still contains code which try to start this plug-in throws an exception if this bundle is not available. Is this code still required? From /org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/ConsoleManager.java line 52 @SuppressWarnings("deprecation") public void checkForConsoleBundle() throws BundleException { if ("none".equals(consolePort)) //$NON-NLS-1$ return; // otherwise we need to check for the equinox console bundle and start it ServiceReference<org.osgi.service.packageadmin.PackageAdmin> paRef = context.getServiceReference(org.osgi.service.packageadmin.PackageAdmin.class); org.osgi.service.packageadmin.PackageAdmin pa = paRef == null ? null : context.getService(paRef); Bundle[] consoles = pa.getBundles(consoleBundle, null); if (consoles == null || consoles.length == 0) { if (consolePort != null) throw new BundleException("Could not find bundle: " + consoleBundle, BundleException.UNSUPPORTED_OPERATION); //$NON-NLS-1$ return; } try { consoles[0].start(Bundle.START_TRANSIENT); } catch (BundleException e) { throw new BundleException("Could not start bundle: " + consoleBundle, BundleException.UNSUPPORTED_OPERATION, e); //$NON-NLS-1$ } }