Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose the url of a location as service properties #38

Closed
laeubi opened this issue Apr 15, 2022 · 1 comment · Fixed by #39
Closed

Expose the url of a location as service properties #38

laeubi opened this issue Apr 15, 2022 · 1 comment · Fixed by #39
Milestone

Comments

@laeubi
Copy link
Member

laeubi commented Apr 15, 2022

Currently SystemBundleActivator registers all Locations with a specific type, but there is one important property that is missing the URL of the location.

As an example the instance location currently could be acquired by (&(objectClass=org.eclipse.osgi.service.datalocation.Location)(type=osgi.instance.area)) but then the user is quite lost if the location is currently not set. As the URL might later change, a component wanted to access the location as soon as it is initialized is out of luck...

My proposal would be to simply expose the URL as a service property, that means when the URL is initial not set there is no url property and when it is set the service properties are updated.

That way one might filter for (&(objectClass=org.eclipse.osgi.service.datalocation.Location)(type=osgi.instance.area)(url=*))

this is related to eclipse-platform/eclipse.platform.resources#52 where the resources plugin need the instance area to be initialized. At the moment this leads to a NPE when accessing the location for example here: eclipse-platform/eclipse.platform.runtime#23

laeubi pushed a commit to laeubi/equinox.framework that referenced this issue Apr 15, 2022
laeubi added a commit to laeubi/equinox.framework that referenced this issue Apr 15, 2022
laeubi added a commit to laeubi/equinox.framework that referenced this issue Apr 16, 2022
laeubi added a commit to laeubi/equinox.framework that referenced this issue Apr 16, 2022
laeubi added a commit to laeubi/equinox.framework that referenced this issue Apr 17, 2022
laeubi added a commit to laeubi/equinox.framework that referenced this issue Apr 17, 2022
laeubi added a commit to laeubi/equinox.framework that referenced this issue Apr 17, 2022
laeubi added a commit to laeubi/equinox.framework that referenced this issue Apr 18, 2022
laeubi added a commit to laeubi/equinox.framework that referenced this issue Apr 18, 2022
laeubi added a commit to laeubi/equinox.framework that referenced this issue Apr 18, 2022
@laeubi
Copy link
Member Author

laeubi commented Apr 18, 2022

Thanks for the review and merges :-)

@HannesWell HannesWell added this to the 4.24 M2 milestone Apr 26, 2022
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 a pull request may close this issue.

2 participants