Closed plorenz closed 9 years ago
Indeed, status of Nested Project is currently stored in memory, cf https://github.com/mickaelistria/jbosstools-eclipse/blob/master/plugins/org.jboss.tools.eclipse/src/org/jboss/tools/eclipse/nestedProjects/NestedProjectManager.java#L34 This data could be stored in the memento of package explorer or in some other configuration file.
I don't plan to fix this soon, but I'd be glad to welcome a patch if you're ok with providing one in an Eclipse-friendly format (mainly agreeing with terms of EPL license).
I'd love to hack on this, but don't have the time. My eclipse plugin skills haven't been exercised in years. Hopefully the eclipse project picks up your work and fleshes it out.
Thank you.
I have a solution proposal based on (yet unaccepted) PR #23 I'll submit it as a PR just after #23 gets closed. For the record, this is what I have now: https://github.com/ppalaga/jbosstools-playground/commits/141110-nestor-flat-hierarchical-pref
This commit looks good. However, I've seen that in many places, CNF extension tend to use Memento instead of/additionally to preferences (so that 2 different instance of the navigator can have different settings. How important do you think it is to support this use-case? My feeling is that preference is a good enough solution for now, but it might become necessary to also use mementos when moving to Eclipse Platform UI.
I do not insist on using a preference and I vote for doing it as usual in the CNF domain. If you could please point me to a an example with a memento (or a couple of keywords for finding similar code), I can try to do it with a memento.
The main example that comes to my mind are most implementation of IWorkingSetManager that relies on Memento. I also believe that filter activation is stored as memento as well.
Note that for the sake of iterative development, I don't find that using Preferences for that is a blocker, and it is still better than current state, so I'd be ok to merge your patch based on Preferences and keep the move on Memento for later. It's up to you to decide how much priority you want to give to mementos ;)
I find the hierarchical rendering of projects so ultra important for the whole Eclipse galaxy that I'll simply do my best to do this in the right way ASAP.
I can see some IMemento
handling in org.eclipse.ui.internal.AbstractWorkingSetManager
but I still have not understood how the memento code gets invoked by the platform. Are any plugin.xml hooks for that? I know that Views and Editors have (re)storing from/to a IMemento in their interfaces. Is there something like that for Commands?
This has been implemented with a property. I don't think IMemento is necessary at that time, so I'll close the issue. I'll keep you in touch in case this becomes more important.
I noticed that whenever I restart eclipse I have to re-nest projects. Is there a way to make the configuration persistent?
Thank you.