| Summary: | [ds tooling] Cannot add a Class as a Provided Service | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Simon Archer <sja.eclipse> | ||||||
| Component: | UI | Assignee: | Chris Aniszczyk <caniszczyk> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | caniszczyk | ||||||
| Version: | 3.5 | ||||||||
| Target Milestone: | 3.5 M3 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Simon Archer
Having pondered this for a while I feel that we should: - Allow you to add both classes and interfaces as provided service. - Add a PDE compiler preference that flags the case where a class is a provided service. The default should probably be Warning and both the form-based editor and the source editor should be decorated appropriately. What's an example of a class as a provided service? I'm trying to think of the use case here :) Well, a class as a provided service is typically a class that does not implement an interface. Imagine if you were OSGi-ifying a Java library and you wanted to provide services for classes that you do not own... In this case you'd likely have to just provide a class as a service. It's also a technique for saying "This is the ONLY implementation of the service, period!", which I realize is rare and should not be encouraged since it implies tight coupling. Nobody should be registering classes as services, unless they have no choice. I'm only suggesting that the DS tooling support it because the OSGi spec allows it. Should I implement this change? I will add: doOpenSelectionDialog(IJavaElementSearchConstants.CONSIDER_CLASSES_AND_INTERFACES); is that ok? yap, seems like a fair change. We can open another bug report to deal with reporting messages if people indeed select a class. Rafael, you have this one? Created attachment 113802 [details]
org.eclipse.pde.ds.ui.patch
Simple fix.
Created attachment 113804 [details]
mylyn/context/zip
done.
> 20090929
|