bndtools / bnd

Bnd/Bndtools. Tooling to build OSGi bundles including Eclipse, Maven, and Gradle plugins.
https://bndtools.org
Other
527 stars 305 forks source link

Syncing the Eclipse Workspace with the disk workspace #4413

Closed pkriens closed 3 years ago

pkriens commented 3 years ago

I want to make a sync button in the Bndtools explorer that deletes projects not in the bnd workspace and adds any that are there.

@gamerson Can you give me a pointer how to import the bnd project as an Eclipse project? And any special things how to delete a project?

gamerson commented 3 years ago

Hey Peter, I have a branch where I was trying to build a "sync" that happened as a part of the BndtoolsBuilder loop. However, I was running into a problem of "querying the bnd model to determine the correct set of bnd projects". But all of the code that opens/closes/syncs the projects is in there. I could send you what I have and see if you could use it.

On Fri, Nov 13, 2020 at 2:49 AM Peter Kriens notifications@github.com wrote:

I want to make a sync button in the Bndtools explorer that deletes projects not in the bnd workspace and adds any that are there.

@gamerson https://github.com/gamerson Can you give me a pointer how to import the bnd project as an Eclipse project? And any special things how to delete a project?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bndtools/bnd/issues/4413, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAERKFIH3TXWNOJFRDEU55LSPTXKNANCNFSM4TUJ5PNQ .

-- Greg Amerson Liferay Developer Tools Liferay, Inc. www.liferay.com

gamerson commented 3 years ago

Here you go: https://github.com/pkriens/bnd/pull/13

kriegfrj commented 3 years ago

bndtools.core.test also has a WorkspaceImporter class that is used by BuildpathQuickFixProcessorTest to programmatically imports bnd projects into the workspace.

kriegfrj commented 3 years ago

And it also deletes projects.

kriegfrj commented 3 years ago

Has there been any progress on this issue?

pkriens commented 3 years ago

Unfortunately not. Customers keep me too busy and during the holidays a home automation project took away any other ambition to program :-( But my heater can now be controlled through Alexa with my own software!

kriegfrj commented 3 years ago

I see this has been marked as 5.4. I really think we should consider getting this fix out ASAP, particularly as it is so close. I sympathise with rants like this: https://bnd.discourse.group/t/import-a-bnd-workspace-from-github/49 (I remember the import not working out-of-the-box) and as this is often the entry point for a new user (first impressions and all that) it can leave a sour taste in people's mouths. I know that I nearly gave up in the early days (in fact, I think I did give up but came back only because the alternative was worse...).

bjhargrave commented 3 years ago

This was not a fix but rather a large-ish change. And during the call last Friday, we agree to defer it out of 5.3 as we are not shutting down 5.3 to get to release in 2 weeks.

pkriens commented 3 years ago

I agree, but I need some more work on it. If we postpone 5.3 then I can have a reasonable PR in before Wednesday.

I absolutely do agree what this PR fixes is going to be huge for Workspace users.