GithubHelp home page GithubHelp logo

Comments (10)

HannesWell avatar HannesWell commented on June 2, 2024

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.

laeubi avatar laeubi commented on June 2, 2024

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.

bjhargrave avatar bjhargrave commented on June 2, 2024

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.

laeubi avatar laeubi commented on June 2, 2024

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.

bjhargrave avatar bjhargrave commented on June 2, 2024

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.

laeubi avatar laeubi commented on June 2, 2024

Sounds obvious, thanks for the example!

from eclipse.pde.

kwin avatar kwin commented on June 2, 2024

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.

HannesWell avatar HannesWell commented on June 2, 2024

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.

laeubi avatar laeubi commented on June 2, 2024

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.

laeubi avatar laeubi commented on June 2, 2024

Test execution requires

from eclipse.pde.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.