Comments (10)
When enabling 1.4 I think it would be best to include 1.5 as well (unless there are major additional difficulties, I have not yet looked into the details):
https://search.maven.org/artifact/org.osgi/org.osgi.service.component.annotations
from eclipse.pde.
Sure I have not yet checked what has changed between 1.3 -> 1.4 -> 1.5 maybe @tjwatson or @bjhargrave can give a short summary.
from eclipse.pde.
DS 1.3 -> 1.4: https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#d0e46608
DS 1.4 -> 1.5: https://docs.osgi.org/specification/osgi.cmpn/8.0.0/service.component.html#d0e39795
from eclipse.pde.
thanks for the doc reference, I have one question regarding constructor injection (maybe also just overseen that):
Ho is this supposed to work with annotation? Should a annotation processor simply assume that constructor injection is desired if there is a public non-default constructor?
from eclipse.pde.
The constructor must be annotated @Activate
and the constructor arguments which are not activation object types must be annotated @Reference
.
See https://github.com/osgi/osgi/blob/b9f994ed76c755ebe2634465a27e46429ee0b836/org.osgi.impl.bundle.component.annotations/src/org/osgi/impl/bundle/component/annotations/ConstructorInjection.java#L49-L58 for a test example.
from eclipse.pde.
Sounds obvious, thanks for the example!
from eclipse.pde.
Particularly useful are https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#org.osgi.service.component.propertytypes. Unfortunately there is no warning from PDE when those non-supported property type annotations are found. They are just silently ignored.
from eclipse.pde.
As suggested in #269 we could consider to use the PDE DS processor internally to generate the component XML.
But only if it is possible to get back errors/warnings from the BND-processor, so that they can be displayed in the java files.
This might be more work in the beginning but for future versions we can inherit the implementation work from BND.
from eclipse.pde.
One limitation currently is that BND works on class-files only (I'm currently experimenting with using AST Parser and source files instead), so errors will only be reported after safe/compile/generate of the XML. Another drawback is that BND is currently not really very configurable in this regard, at Tycho I "trick" BND by generate the manifest and data into a intermediate directory and then analyze the Manifest to find the generated XMLs... far from optimal.
So having real Eclipse "while you type" support and suggestions, JDT/PDE is much more superior in this regards.
from eclipse.pde.
Test execution requires
from eclipse.pde.
Related Issues (20)
- Attempted to beginRule: MultiRule[], does not match outer scope rule: R/ HOT 1
- class org.eclipse.jdt.internal.core.JavaNature cannot be cast to class org.eclipse.jdt.core.IJavaProject HOT 7
- [scr 1.4] constructor for injection must be public
- commons-jxpath CVE-2022-41852 vulnerabiltiy
- Target definition file contribution is missing for compare editor HOT 1
- Validation errors starting Eclipse launch with Java 23 HOT 1
- PDE errors on all bundles that use system packages since I20240412-1800 HOT 18
- API tooling warnings mismatch IDE vs github HOT 1
- Error validating SDK launch due missing JRE 1.1 support HOT 8
- Expensive operations running on initialization of tabs HOT 2
- Failure of tests in org.eclipse.pde.core.tests.internal.classpath.ClasspathResolutionTest for I-BUILD I20240414-1800 HOT 1
- Invalid generation of SCR component xml after update to 2403 HOT 20
- Access restrictions of package-private elements in dependencies is not respected HOT 10
- TargetDefinition leak
- Unable to run plug-in tests after opening Plugins tab HOT 10
- Modifying the software site "Included Software" settings in the Target Editor doesn't do anything
- 2 ApiFilterStoreTests failed in I20240513-1800 HOT 2
- [win] NewFeatureProjectTestCase randomly failed HOT 1
- API tools doesn't properly report error in IDE HOT 1
- ExportBundleTests.testExport14Environment fails since I20240515-1800 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eclipse.pde.