Workspace Templates


Currently, workspace templates are the way to provide a new bnd workspace creator the repositories, project templates, macros, etc. for working on a particular kind of OSGi project…e.g. ECF has a Remote Services workspace template: GitHub - ECF/bndtools.workspace: Bndtools Workspace Template for ECF Remote Services Development

For some time, ECF has had tooling for debugging and testing Remote Services…both in Eclipse alone (e.g. Eclipse views for building/monitoring/testing: Remote Service Admin, or discovery, or endpoint descriptions views), and/or in bndtools in Eclipse (e.g. bnd osgi service wizards for gRPC or other distribution providers, or other remote services views/wizards/perspectives, etc.

It would be nice to be able to have workspace templates somehow include Eclipse plugins that can be (optionally?) installed into Eclipse as part of the use of the workspace template. I fully understand that installing Eclipse plugins is not at the same ‘scope’ as creating a workspace, but I still think it would make the usefulness of using a workspace template if plugin install and workspace template usage were not so completely separate as they are now…and it makes the use of bndtools workspace templates along with Eclipse-based tooling very awkward and error prone to do them separately…i.e. by installing the tooling plugins first, and then creating a workspace that can use those tools.

Is there something in bndtools that would allow easier installation of Eclipse and/or bndtools plugins that are connected to a workspace?

What about extending the bndtools workspace concept to include some optional plugin install?..e.g. via p2 UI?

As far as I understand, bndtools workspace templates cannot have/install Eclipse bundles

You can install templates via the Eclipse install. As far as I know, we pickup any templates in bundles in the Eclipse set of installed bundles.

I think it is more logical to deliver your material via the standard Eclipse mechanism (Marketplace?) then creating an alternative plugin deliver method? Especially for template and any non-ci related activity, this seems the optimal way to go?

The Eclipse OSGi framework is our oyster … if we miss functionality to make this more easy I’d gladly support adding it.

Overall, I am leaning to a model where we have as base an empty workspace and provide a more gradual model to install extensions via the cnf/ext/ folder. I.e. installing an extension is dropping a file in that folder. Again, if we need bnd functionality to optimize that functionality I am with you!

Hi Peter,

I appreciate the thoughts.

The bndtools user still has to explicitly do two separate operations: 1) Install plugins; 2) Create bndtools workspace (and choose the right template). I’ve already created a plugin that, once installed, shows up as one of the bndtools workspace templates. For the new, end-user of eclipse, bndtools, workspace templates and other OSGi tooling based upon both Eclipse and bndtools, I would say this makes for a high barrier to entry.

For those of us building tools that include previous Eclipse plugins (e.g. views), bnd dependent tooling (e.g. extensions), workspace template needs (repositories, project templates), and now enhancements that mix resources through both plugins and templates (e.g. OSGI Service Wizards) this makes it difficult to ‘creatie a proper tooling environment’ for, in my case, OSGi Remote Services development.

An example alternative: Couldn’t the p2/ui extension mechanisms (under right conditions) be used to create a bndtools workspace (or just initiate UI wizard creation) after installing plugins that have workspace template meta-data?

I feel that addressing this ‘new OSGi dev user’ use case could help bndtools adoption.

Why do you need an extension?

This is a few lines in a bundle:

  • Create a where you want your workspace to be
  • Copy your template files from your bundle (or github?)
  • Get the bnd Workspace object from the registry
  • Set the properties file to the cnf/build.bnd file.
  • Call the WorkspaceSynchronizer.createProject for each project to reify the projects in Eclipse


Really, it probably sounds scary but the bnd API is quite high level for those thing and better and better evented.

Not scary at all. Thanks.

Shall I open a new feature request? This seems like something that should be in bndtools since it would be valuable for a lot of use cases (not just me wrt remote services tooling+templates).

Hmm, what you want in bndtools? The idea is that you make a bundle, which you can limit to the bndlib, that sets up your project. Since the Workspace is already registered as a service (and it will never change) you can easily manage if from your bundle to setup the workspace as you want. I.e. you can set the directory of the workspace create projects through the Wokspace/Project API.

So not sure what you need more?

Thanks…yes I can do this myself…this isn’t a test. It’s about making something easier to a potentially valuable (for bndtools) group of folks (bnd-based tools creators) by generalizing things via a small addition to bndtools (and p2 via existing mechanisms) that would then open up new use cases combining bndtools-based tooling (plugins) with template-based workspace configuration.

It would probably take you and/or other bndtools devs a few minutes to implement this via a p2 custom p2 touchpoint (in bndtools)…which could then be easily called at appropriate spot during third-party tool install via p2. It’s been a long time for me wrt p2 touchpoints so I’m not sure what how it’s changed over the years, and who knows…maybe bndtools already has bndtools custom touchpoints. I don’t know the existing codebase well enough.

I feel we’re not communicating on the same frequency … :slight_smile:

I suggest you implement your template in a bundle. This bundle, when started, will register a Template OSGi service. We pick it up and show it the user. I think in most case you never have to touch the Eclipse API.

You can then add this bundle to the Eclipse Marketplace as a bndtools template. When people drop it on their eclipse, voila, they have your template in the list. Today, this might

Undoubtedly there are some functions we might miss, but I am willing to work with you to make this strategy work well.

You could even register a Template service remotely with ECF? :slight_smile: kidding.

I think that’s an understatement lol.

Yeah, I got that the first time. I think a bundle is both unnecessarily technically cumbersome, and doesn’t meet my needs wrt adding tooling that is connected to workspace (or other bndtools) templates.

Here’s my specific use case: I have a workspace template that provides a number of project templates + repositories for doing remote services development via ECF’s RSA impl…and the various distribution and discovery providers. I also have a number of Eclipse plugins that add views, RS tooling, etc.

With the new bndtools OSGi service wizard I provided (which is implemented with/uses bndtools templates) it’s possible to add a new service wizard by a) creating bndtools project templates; b) Adding an eclipse newWizard extension (that points to the 3 project templates).

Because of this templates/plugin/tooling connection…and the more general desire to have bndtools-based tooling and workspace creation (e.g. remote services) be simpler for the tooling install + bndtools workspace setup and configuration…I would like to reduce the workflow: install /plugins tools with p2 then create associated bndtools workspace… to one user action (e.g. install plugins tools and extend p2 to create/install/uninstall the associated bndtools workspace). I would also like to provide more tooling that uses/takes advantage of templates and other resources (more/other repos, workspace config, etc).

p2 native and osgi touchpoints and custom touchpoints have been used by Eclipse plugins (and commercial/non-commercial third-party tools providers) to extend p2 so that the non-bundle-based Eclipse config and/or other install/uninstall operations can be integrated with p2 (both what it does and the UI).

For reference: Help - Eclipse Platform

You appear to be saying (reflection) that you will help me implement this strategy (bundle-based custom install operations). Although appreciated, that’s not what I want…I can do that completely on my own, but I don’t want to do that because I would likely find myself re-implementing (or reusing the same bundle) multiple times in the future…as I create and distribute (for example) distribution-provider specific tooling + templates (e.g. gRPC distribution provider, or etcd discovery provider, etc). This isn’t theoretical…I already have both Eclipse tooling (e.g. proto3 editor) and service/project/bndtools templates specifically for gRPC distribution provider.

So…the way that looks easiest to me, and meets my needs for both repeated usage of this mechanism, and user install/workspace setup simplification appears to me to create a custom touchpoint(s) for bndtools, include it with bndtools (so it’s there when needed for remote services tooling+templates install/uninstall).

If there is another way in bndtools to meet these needs then I’m open to it. I’ve looked for existing bndtools touchpoints and haven’t found any. I agree that including tooling install into workspaces is probably not the way to go.

I will consider implementing a custom touchpoint (with your help) and contributing it to bndtools, but I looked over bndtools code yesterday and couldn’t immediately figure out the best bndtools bundle to include it. There will be static dependencies to ProvisioningAction (custom actions are subclasses of ProvisioningAction) so the location of this dependency will be important I expect.

Thought of that…but since we are talking about installing tooling for remote services development we’ve got to get the horses (tooling plugins and workspace template) before the carts.

But if you are suggesting distributing Remote Services tooling with bndtools I would be happy to consider it. :slight_smile:

I’m working on oomph setups for bndtools, ecf and bndtools workspaces.
@scottslewis Can you try this

Encircled red are an Eclipse IDE setup with bndtools, ecf workspace template pre-configured.
Encircled green are an Eclipse IDE setup with bndtools, bndtools project setup

I would like to make contributions of this to your repos…
You can give them a try and I offer to configure more if you are lacking something.
goal is official PRs.

1 Like

Hi @peterkir

Can you try this

Yes! I will try them both and provide feedback/comments (here or somewhere else)?

Thanks for doing this…and for your offer to contribute to bndtools. I think this can/will help both bndtools and ecf/my projects. And since I/ecf is now offering some really cool stuff based upon Eclipse and bndtools capabilities (e.g. gRPC for OSGi remote services) this could make things much more accessible (OSGi services, remote services, gRPC-based services). Actually I have an OSS project in mind (signal) to contribute to that’s already making gRPC-based services and could really use modularity, dynamics, security that comes with OSGi (remote) services.


You can also write directly to me. name(at)
I would also like to make your ECF setup easier to consume :slight_smile:

1 Like