Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » RefactoringUI should be able to be subclassed?
RefactoringUI should be able to be subclassed? [message #259314] Fri, 03 April 2009 12:39 Go to next message
Eclipse UserFriend
Hi

I am trying to work on my phd project related with eclipse refactoring.

trying to overload the nextPressed method of RefactoringWizardDialog in my
CustomRefactoringWizardDialog.

In order to use it - I have to subClass RefactoringUI which is the start
point
of the whole refactoring wizard..but it is not intended to be subclassed
(constructor is private)

can you give me any suggestions?

Thanks a lot.

Liming
Re: RefactoringUI should be able to be subclassed? [message #259349 is a reply to message #259314] Mon, 06 April 2009 05:01 Go to previous messageGo to next message
Eclipse UserFriend
Liming Zhao wrote:
> Hi
>
> I am trying to work on my phd project related with eclipse refactoring.
>
> trying to overload the nextPressed method of RefactoringWizardDialog
> in my CustomRefactoringWizardDialog.
>
> In order to use it - I have to subClass RefactoringUI
Why? Even if you could subclass it, it wouldn't help much as the methods
are static.

Dani
> which is the start point
> of the whole refactoring wizard..but it is not intended to be
> subclassed (constructor is private)
>
> can you give me any suggestions?
>
> Thanks a lot.
>
> Liming
>
>
Re: RefactoringUI should be able to be subclassed? [message #259379 is a reply to message #259349] Mon, 06 April 2009 23:23 Go to previous messageGo to next message
Eclipse UserFriend
Yeah - I might write a standalone CustomRefactoringUI like RefactoringUI
having a method to return my own RefactoringWizardDialog.

Another question is I like the design of RefactoringWizard.java in package
org.eclipse.ltk.ui.refactoring, however, it only allows to add one
predefined PreviewPage. I know we can add more input pages which are cool.
trying to figure out how to add my own customized preview pages...seems
not allowed by the current design..

Thanks

Liming
Re: RefactoringUI should be able to be subclassed? [message #259396 is a reply to message #259379] Tue, 07 April 2009 10:20 Go to previous message
Eclipse UserFriend
On 2009-04-07 05:23, Liming Zhao wrote:
> Another question is I like the design of RefactoringWizard.java in
> package org.eclipse.ltk.ui.refactoring, however, it only allows to add
> one predefined PreviewPage. I know we can add more input pages which are
> cool. trying to figure out how to add my own customized preview
> pages...seems not allowed by the current design..

I think having two preview pages would be confusing. But if you really
need another one, you have to implement it as a new user input page.

But normally, your refactoring should just generate Change objects which
will then be shown on the standard preview page. If your Change
objects are not instances of TextEditBasedChange, you also need to
contribute to the org.eclipse.ltk.ui.refactoring.changePreviewViewers
extension point if you want to show special previews for them.

Markus
Previous Topic:refactoring a group of constants in enum
Next Topic:Doubt about ITypeHierarchy.getRootClasses()
Goto Forum:
  


Current Time: Thu Apr 24 22:18:58 EDT 2025

Powered by FUDForum. Page generated in 0.03463 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top