Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Hooking into ltk refactoring lifecycle and own PreviewPage
Hooking into ltk refactoring lifecycle and own PreviewPage [message #605476] Tue, 06 April 2010 17:17
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

I want to do some modifications on an EMF model which I use very often
in my daily work. Therefore I create a copy of it to present the
differences to the user before executing the real changes. To present
the changes I want to open the compare editor as preview page in a
RefactoringWizard of the ltk. Therefore I subclassed
org.eclipse.ltk.core.refactoring.Change to register my implementation of
IChangePreviewViewer with this change. MyChangePreviewer then creates
the EMF diff model within its setInput(ChangePreviewViewerInput input)
method. For the integration of the composite of the compare editor I
tried the following.
I subclassed org.eclipse.compare.CompareEditorInput to take control of
the creation process. I pass the desired new parent composite in the
constructor and call 'control = super.createContents(parent)' there. So
I can do this:

MyCompareEditorInput compare = new MyCompareEditorInput(parent);

and always return compare.getComposite() in the getControl() method of
MyChangePreviewer. The third method which has to be implemented is

public void createControl(Composite parent) {
control = new ViewForm(parent, SWT.BORDER);
compare = new RefactoringCompareEditorInput(control);
}
But when I click on 'Preview' in the refactoring wizard I only see the
upper tree where the change object is contained and an empty ViewForm.
But where is the compare dialog? How can I achieve to present it embeded
in the refactoring wizard? Maybe this isn't the adequate newsgroup and I
would appreciate a right pointer. I couldn't find a lot of information
about the ltk except this
http://www.eclipse.org/articles/Article-LTK/ltk.html


best regards,
Gilbert
Previous Topic:FileEditorInput
Next Topic:Basic Editor Question
Goto Forum:
  


Current Time: Tue Mar 19 04:46:00 GMT 2024

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

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

Back to the top