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

[explorer] Pin cnf project in explorer view #4394

Closed kriegfrj closed 3 years ago

kriegfrj commented 3 years ago

I don't know how easy or feasible this is, but I think it would be an extremely nice usability feature if the cnf project was locked in position and always visible in the Bndtools explorer, so that no matter where you've scrolled to in your workspace you can always get to it easily.

pkriens commented 3 years ago

Hmm, maybe we need 'pin' project. That should be easy.

kriegfrj commented 3 years ago

That would be cool - then you could pin not only cnf but any project that you happened to be working on frequently (eg, a utility library used across all projects in the workspace).

pkriens commented 3 years ago

I took a hack at it. The state is not persisted for the pinned projects. take a look and let me know.

pkriens commented 3 years ago

@kriegfrj What do you think?

kriegfrj commented 3 years ago

So sorry - I'll have a look tomorrow!

kriegfrj commented 3 years ago

Ok, I gave this a try - it doesn't seem to work for me. I can see that the pinned state is remembered for each project, but pinning a project doesn't seem to have an effect - I scroll my project window and all the projects scroll as normal. What is supposed to happen?

pkriens commented 3 years ago

I might have misunderstood you. It will not hide the project when put in a search filter. I generally filter on the projects I am working by name. You can use an or expression like cnf|test but that gets bothersome. The pin will never filter some projects.

I did not realize you wanted it to stop scrolling :-) With the filter feature that is not really a concern for me since I tend to keep the list small

gamerson commented 3 years ago

I don't believe the TreePart SWT control has a way to "pin" a tree node. I think if you wanted to have the "cnf" always "on top" you could do some creative ViewPart arrangement and place another view like "resource" or "package" explorer on top of the "bndtools explorer" and use filters and working sets to "pin" the project to the top. Not exactly what you were hoping for, but it may be worth a try.

Screen Shot 2020-11-11 at 7 49 16 AM

On Wed, Nov 11, 2020 at 4:43 AM Peter Kriens notifications@github.com wrote:

I might have misunderstood you. It will not hide the project when put in a search filter. I generally filter on the projects I am working by name. You can use an or expression like cnf|test but that gets bothersome. The pin will never filter some projects.

I did not realize you wanted it to stop scrolling :-) With the filter feature that is not really a concern for me since I tend to keep the list small

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bndtools/bnd/issues/4394#issuecomment-725348818, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAERKFPC2ZPXND2SCAPKAGDSPJTERANCNFSM4TKT2BOQ .

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

kriegfrj commented 3 years ago

I don't believe the TreePart SWT control has a way to "pin" a tree node. I think if you wanted to have the "cnf" always "on top" you could do some creative ViewPart arrangement and place another view like "resource" or "package" explorer on top of the "bndtools explorer" and use filters and working sets to "pin" the project to the top. Not exactly what you were hoping for, but it may be worth a try. Screen Shot 2020-11-11 at 7 49 16 AM

Yes, I was thinking perhaps another treepart that shows the pinned projects. Perhaps taking this a step further - the ability to have multiple independent Bndtools Explorers open (each with its own independent filter) might be a solution?

Anyway, @pkriens' solution (especially with his helpful tip on how to use it!) will probably do for now. I'll see how it affects my workflow and how I can adapt to it (there'll probably be other benefits to me using the features of the BndtoolsExplorer more effectively).

pkriens commented 3 years ago

I will not do more so I move it to abeyance

kriegfrj commented 3 years ago

Having used this for a couple of weeks, I think the feature (as currently implemented) is kind-of redundant.

To use it in the way that @pkriens suggests is basically equivalent to using the '|' syntax in your the search filter. I'm not sure that having the "pin" feature adds much value over using the plain search. The advantage of using the search box is that you don't have to scroll to & find your target project to pin it.

On the bright side, using the search feature to filter my project list has proven to be a good way of getting around my issue, and so the full-featured "pinning" that I originally had in mind is probably not a high priority.

pkriens commented 3 years ago

I started to kind of like it and we still have icon space (and the icon was improved!). So lets close.