You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ui/org.eclipse.pde.bnd.ui/README.MD
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ One problem for such a reusable component is that it usually needs to get holds
18
18
To mitigate we use the [Eclipse Adapter Pattern](https://www.eclipse.org/articles/Article-Adapters/) as it is widely used in Eclipse, flexible and allows
19
19
the use of [OSGi services / Dependency Injection](https://eclipse.dev/eclipse/news/4.18/platform_isv.php#dialog-adapterfactory-as-service) already.
20
20
21
-
### The IProject adapter
21
+
### The `IProject` adapter
22
22
23
23
Components need to learn the project and workspace of a bndlib backed project, for this the very first step for an integration is to provide an adapter that can
24
24
transform an (Eclipse) `IProject` into a (bndlib) `Project` (from were the Workspace then can be derived), an example might look like this:
@@ -46,6 +46,18 @@ public class MyBndPluginAdapter implements IAdapterFactory {
46
46
}
47
47
```
48
48
49
+
## The `Resource` Adapter
50
+
51
+
Some components might want to learn about an (OSGi) `Resource` (e.g. a Bundle) for a particular object.
52
+
To support such use-case one should provide an Adapter from tooling specific objects to (OSGi) `Resource`.
53
+
54
+
For example the previous Adapter might be enhanced to support an adaption from an (Eclipse) `IProject` to an
55
+
(OSGi) `Resource` if it represents a bundle and the tolling knows how to transform the specific project metadata into an universal
56
+
`Resource` representation. That way it is possible to select the project and show its requirements and
57
+
capabilities in the OSGi Resolution View without specific knowledge on how this process works.
58
+
59
+
### Further Information
60
+
49
61
Some relevant 'glue' classes for Bnd <-> PDE interaction, to have a look at:
50
62
51
63
-`org.eclipse.pde.bnd.ui.Central`
@@ -63,6 +75,7 @@ it currently offers these components:
0 commit comments