Community
Participate
Working Groups
In Bug 537176 I added an "Update references..." checkbox to CDT projects rename resource action. To do this required quite a bit of copying code. The "Update references" logic already existed in all the data classes, but did not appear in the UI anywhere. Therefore I would like a way to extend the rename resource dialog to be able to customize the UI area. If fully customizing the dialog/wizard page is too much, at least a way to turn on the "Update references..." without having to write lots of code. For now in CDT's case, rather than duplicating the code, I am referencing some internal LTK classes and extending classes with @noextend.
Jonah, please propose a minimal working patch via Gerrit. CDT has enough duplicated code :)
New Gerrit change created: https://git.eclipse.org/r/127820
New Gerrit change created: https://git.eclipse.org/r/127821
> New Gerrit change created: https://git.eclipse.org/r/127820 > New Gerrit change created: https://git.eclipse.org/r/127821 These changes provide the minimum level change I am looking for, it allows CDT to show the "Update references" checkbox. I need more time to think about how to contribute a bigger customisation. In CDT's case, in addition to "Update references" we have a link to the preferences page that is relevant. PyDev also has a UI like this that they could have taken advantage of, they have a couple of checkboxes/buttons to contribute too. See https://bugs.eclipse.org/bugs/attachment.cgi?id=275049 for some screenshots.
Kalyan, if you have time, you can look at this during 4.10.
New Gerrit change created: https://git.eclipse.org/r/162679
(In reply to Eclipse Genie from comment #6) > New Gerrit change created: https://git.eclipse.org/r/162679 @Jonah, Can you please confirm if the above change set helps you in extending the RenameResourceWizard.
New Gerrit change created: https://git.eclipse.org/r/162772
(In reply to Kalyan Prasad Tatavarthi from comment #7) > (In reply to Eclipse Genie from comment #6) > > New Gerrit change created: https://git.eclipse.org/r/162679 > > @Jonah, Can you please confirm if the above change set helps you in > extending the RenameResourceWizard. This change achieves the goal of not having to use the internal class you added an interface for. Thanks, I will merge https://git.eclipse.org/r/#/c/162772/ into CDT once your commit is in platform. However, it does not prevent most of what I raised in Comment 0. For example, I still have to have a whole bunch of LTK's UI copied into CDT. See my original CDT commit that made the copy - https://git.eclipse.org/r/#/c/127738/
(In reply to Jonah Graham from comment #9) > (In reply to Kalyan Prasad Tatavarthi from comment #7) > > (In reply to Eclipse Genie from comment #6) > > > New Gerrit change created: https://git.eclipse.org/r/162679 > > > > @Jonah, Can you please confirm if the above change set helps you in > > extending the RenameResourceWizard. > > This change achieves the goal of not having to use the internal class you > added an interface for. Thanks, I will merge > https://git.eclipse.org/r/#/c/162772/ into CDT once your commit is in > platform. > > However, it does not prevent most of what I raised in Comment 0. For > example, I still have to have a whole bunch of LTK's UI copied into CDT. See > my original CDT commit that made the copy - > https://git.eclipse.org/r/#/c/127738/ I have made storeSettings() and initializeRefactoring() as protected methods in RenameResourceRefactoringConfigurationPage and the Class RenameResourceRefactoringConfigurationPage is public . So Now CResourceRenameRefactoringInputPage can extend RenameResourceRefactoringConfigurationPage and override the above two methods to store and read custom dialog settings. Also createControl() is a public function in RenameResourceRefactoringConfigurationPage which can be overridden in the subclass. Top get the control created by the super class to add additional dialog settings in subclass there is a getControl() function available too. This will be needed to be used to extend the existing dialog. }
(In reply to Kalyan Prasad Tatavarthi from comment #10) :-) Thank you for being explicit - yes this change does address fully the duplication originally addressed in this bug. I updated CDT's corresponding change https://git.eclipse.org/r/#/c/162772/ Thank you.
Gerrit change https://git.eclipse.org/r/162679/ was merged to [master]. Commit: https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=c384fefe236dee91353ea4db42c9330f86331c17