This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 426256 - @OSGiBundle javadoc should specify what class it uses
Summary: @OSGiBundle javadoc should specify what class it uses
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 4.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.4 M6   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-21 09:35 EST by Paul Webster CLA
Modified: 2014-03-04 12:39 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2014-01-21 09:35:28 EST
When retrieving the bundle or bundle context, OSGiBundle should make it clear that it will use the class from the object instance.

class A {
@Inject
@OSGiBundle
BundleContext context;
}

Class B {
... whatever...
}

ContextInjectionFactory.make(B.class) will inject the BundleContext for the bundle that contains B, not A

PW
Comment 1 Markus Kuppe CLA 2014-01-21 09:59:04 EST
IMO comment #1 is exactly what should go into the javadoc. Paul, do you want me to create a gerrit change or do you add this right away?
Comment 2 Paul Webster CLA 2014-01-21 10:28:08 EST
If comment #1 is what we want, I'll just add it tomorrow.

Thanks Markus,
PW
Comment 4 Paul Webster CLA 2014-01-31 15:38:26 EST
(In reply to Paul Webster from comment #3)
> Released as
> http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/
> ?id=c1cd356b6a072e10770c8062579b7c3a068b183b

That's not it at all :-)

http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?id=192e8adce3ef9230fb8072ec67aa41e2a9c23012

PW
Comment 5 Paul Webster CLA 2014-03-04 12:39:45 EST
In 4.4.0.I20140303-2000

PW