Skip to content

Conversation

@kwin
Copy link
Contributor

@kwin kwin commented Apr 29, 2025

This closes #684

What it does

How to test

Author checklist

return null;
}
try {
InstanceScope.INSTANCE.getNode(ID_PLUGIN).addPreferenceChangeListener(LaunchingPlugin.this);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iloveeclipse What is the proper way to defer calling this until it has been set? The default eclipse.ini sets -Dosgi.dataAreaRequiresExplicitInit=true i.e. may run into https://github.com/eclipse-equinox/equinox/blob/c6f8e3aab8d4f107d7836f21a2fc76823756ad73/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/DataArea.java#L64

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok meanwhile found the relevant OSGi services:

g! services org.eclipse.osgi.service.datalocation.Location
{org.eclipse.osgi.service.datalocation.Location}={service.id=7, service.bundleid=0, service.scope=singleton, defaultUrl=file:/Users/715508/user/, url=file:/Users/715508/user/, type=osgi.user.area}
  "Registered by bundle:" org.eclipse.osgi_3.23.0.v20250228-0640 [0]
  "Bundles using service"
    org.eclipse.core.runtime_3.33.0.v20250206-0919 [199]
{org.eclipse.osgi.service.datalocation.Location}={service.id=8, service.bundleid=0, service.scope=singleton, defaultUrl=file:/Users/715508/eclipse-workspace/, url=file:/Users/715508/eclipse-workspaces/maven/, type=osgi.instance.area}
  "Registered by bundle:" org.eclipse.osgi_3.23.0.v20250228-0640 [0]
  "Bundles using service"
    org.eclipse.core.runtime_3.33.0.v20250206-0919 [199]
    org.eclipse.equinox.preferences_3.11.300.v20250130-0533 [457]
    org.eclipse.equinox.common_3.20.0.v20250129-1348 [413]
    org.eclipse.core.resources_3.22.100.v20250206-1238 [198]
    org.eclipse.e4.ui.workbench.swt_0.17.700.v20250123-0706 [355]
    org.eclipse.core.net_1.5.600.v20250124-0919 [197]
{org.eclipse.osgi.service.datalocation.Location}={service.id=9, service.bundleid=0, service.scope=singleton, url=file:/Users/715508/Applications/Eclipse/aem-2025-03/Eclipse.app/Contents/Eclipse/configuration/, type=osgi.configuration.area}
  "Registered by bundle:" org.eclipse.osgi_3.23.0.v20250228-0640 [0]
  "Bundles using service"
    org.eclipse.core.runtime_3.33.0.v20250206-0919 [199]
    org.eclipse.equinox.registry_3.12.300.v20250129-1129 [458]
    org.eclipse.equinox.preferences_3.11.300.v20250130-0533 [457]
    org.eclipse.equinox.app_1.7.300.v20250130-0528 [411]
    org.eclipse.update.configurator_3.5.600.v20241215-0811 [897]
{org.eclipse.osgi.service.datalocation.Location}={service.id=10, service.bundleid=0, service.scope=singleton, url=file:/Users/715508/Applications/Eclipse/aem-2025-03/Eclipse.app/Contents/Eclipse/, type=osgi.install.area}
  "Registered by bundle:" org.eclipse.osgi_3.23.0.v20250228-0640 [0]
  "Bundles using service"
    org.eclipse.osgi_3.23.0.v20250228-0640 [0]
    org.eclipse.equinox.common_3.20.0.v20250129-1348 [413]
    org.eclipse.core.runtime_3.33.0.v20250206-0919 [199]
    org.eclipse.update.configurator_3.5.600.v20241215-0811 [897]
{org.eclipse.osgi.service.datalocation.Location}={service.id=11, service.bundleid=0, service.scope=singleton, url=file:/Users/715508/Applications/Eclipse/aem-2025-03/Eclipse.app/Contents/Eclipse/, type=eclipse.home.location}
  "Registered by bundle:" org.eclipse.osgi_3.23.0.v20250228-0640 [0]
  "No bundles using service."

Seems we need to wait for service org.eclipse.osgi.service.datalocation.Location of type type=osgi.instance.area until it is safe to call InstanceScope.INSTANCE.getNode(...)

@kwin
Copy link
Contributor Author

kwin commented Apr 30, 2025

Superseded by #686.

@kwin kwin closed this Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

java.lang.IllegalStateException: The instance data location has not been specified yet.

1 participant