Community
Participate
Working Groups
Hi, I am using ltk framework for providing Refactoring feature to my IDE. There after reaching the preview page if the user unchecked all the items which are supposed to move : still the finish button is enabled; so on clicking of finish move does not happen as none of the objects were selected to move.Actually the finish button should be disabled in such case. The PreviewWizardPage class has createSelectionChangedListener() method which adds a selection change listener to the page, but here they are not disabling the finish button and that method is private so I am not able to do it from my end. Thanks & Regards, Jansi
Do you mean the 'OK' button in preview page? Please provide an example code to reproduce it. And if possible, you can also provide a patch for the fix.
In the PreviewWizardPage class method I have added the comment where I feel would help to fix this : private ISelectionChangedListener createSelectionChangedListener() { return new ISelectionChangedListener(){ public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection sel= (IStructuredSelection) event.getSelection(); if (sel.size() == 1) { PreviewNode newSelection= (PreviewNode)sel.getFirstElement(); if (newSelection != fCurrentSelection) { fCurrentSelection= newSelection; showPreview(newSelection); } } else { showPreview(null); /* here if the selected elements size is '0' then the finish button should be disabled */ } } }; } If I am able to fix it I would add the code for that and update you. Thanks & Regards, Jansi
(In reply to valmiki jansi from comment #2) > > /* here if the selected elements size is '0' then the finish button should > be disabled */ The variable 'sel' will not contain only the checked items from the tree viewer, hence the proposed fix will not solve the issue. fTreeViewer.getCheckedElements() has the list of checked items.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.