Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » LTK - Cusotmize the preview page
LTK - Cusotmize the preview page [message #753968] Mon, 31 October 2011 05:13
teddyclaw is currently offline teddyclaw
Messages: 9
Registered: July 2009
Junior Member
hello everyone,

i hope this is the right place for a question regarding LTK. If not please forgive and just close and / or move this.

So, i have the following task:

I have a Wizard which extends LTK's RefactoringWizard. This Wizard has a PreviewPage which is also inherited from LTK. I was given the task to add a Button to the preview page which opens a dialog that contains some statistics about the changes. Btw the we are talking about refactorings / changes on EMF models.
So far i was unable to add that button. I tried to write my own Wizard extending the one i started with and adding a custom preview page extending LTKs PreviewPage. Both those extension are discouraged because of restriced access but semm to work nonetheless.

My custom preview page basically does only override the createControl(...) method like this:

@Override
public void createControl(Composite parent) {
  super.createControl(parent);
  Button statisticsButton = new Button((Composite)getControl(), SWT.PUSH);
  statisticsButton.setText("Button");
  statisticsButton.setVisible(true);
  statisticsButton.addListener(...);
}


When i debug this the control of the wizard page contains my button but it is nowhere to be seen. So what i need to know is this:

- Am I on the right track at all or is there a completely different way to customize this dialog?
- If so, how can I make that button actually appear?

- Will the discouraged access come to haunt me later on?

- Is there possibly a more elegant solution to this?


Thanks in advance
Matt


PS: the wizard has no next() button, it uses the DIALOG_BASED_USER_INTERFACE, which I am not supposed to change. So far this kept me from adding the statistics as an additional wizard page. If that would be possible / easier i would also try that path, so tipps are welcome.


Previous Topic:Feature request: More lines for task description in IProgressMonitor
Next Topic:Forms - create vertical sections
Goto Forum:
  


Current Time: Thu Jul 24 11:21:30 EDT 2014

Powered by FUDForum. Page generated in 0.01842 seconds