Community
Participate
Working Groups
It would be nice if we could multi-select things in the site editor to be consistent with our other editors.
you're supposed to be closing bugs, not opening new ones ;)
I believe this is something that I want to take care during bug day. Could you explain me in more details what do U mean by site editor (update site editor or sth else) ?
Hi Bartosz, it's yours. This basically means that you can't multiselect things on the Site Map page. For example, say you add a ton of features... and you want to delete some... you have to do it one at a time. Pretty much of all of our editors allow multi-select so you can delete multiple entries. See IncludedFeaturesSection for an example.
there is couple things to consider (and there will be more when i know the code). first of all what should be displayed in features properties environment tabs ? i believe that information about the first element from selection. should the remove button should be added ? I assume that if we want to be consistent with other parts of pde we should do that. If I'm wrong please correct me. Will this change (adding multiselect affect of revert save etc. behaviour) ?
I think enabling multi-select similar to how the Included Features page on the Feature Editor (org.eclipse.pde.internal.ui.editor.feature.IncludedFeaturesSection.java). 1) Allow for ctrl+a and shift multi select on the tree (SWT.MULTI) 2) handle deletes properly 3) The SynchronizeAction needs to be update to handle multiple selections That's all, don't worry about other issues.
I have some question about handling 2) what should happen if one of handleRemove... fails ? next object from selection should be processed then? what result should be returned if one of removals fails ?
Created attachment 77571 [details] patch proposal almost all specified function covered The only thing left to discus is how to treat categories in selection during build. There are two options: - add all features from selected category to build set - filter categories from selection I've also left updateButtons unchanged for now. And another question appears: if any category is selected should Build button be enabled or not ?
Lets keep it simple now and like it was before, if a category is selected, we will disable the build button. The most common use case is for people to usually build the whole update site. Sometimes people also desire just to build a feature versus everything. This should be sufficient. Attach a new patch and I will review and commit it. Thanks Bartosz!
Created attachment 77627 [details] updateButtons changed No problem :) . there is also place to optimize. due to Build button enablement we can remove all safe checks from handleBulid and add all elements from selection to build elements list. but in my opinion this can make code less readable.
Almost there :) I forgot about one thing... the Synchronize button (aka handleImportEnvironment). The message should be changed to "Synchronize selected features only" and the code needs to be modified to support the case of a multiple selection. Currently the code only works for the first selection, not multiple selections. Thanks Bartosz! I attached a context to help you navigate the various classes related to the Synchornize action.
Created attachment 77647 [details] mylyn/context/zip
Created attachment 77654 [details] sync action updated I've refactored code a bit and updated synchronize action. I've also added some cache optimization which can be removed if you don't like it.
Good stuff Bartosz. I just updated the NLS messages to be more accurate on what is actually going on now. I also updated the copyright headers with the proper information.
Created attachment 77656 [details] mylyn/context/zip