how to use CompareUI and Differencer [message #147995] |
Tue, 09 March 2004 23:29 |
Jan-Friedrich Mutter Messages: 26 Registered: July 2009 |
Junior Member |
|
|
Hi,
I'm writing my first Eclipse 2.1.2 Plug-In which modifies Java source code.
I'd like to provide a wizard where the user can preview and confirm the
changes like the RenamePlugin does.
I found the org.eclipse.compare API which looks very promising. But I
coudn't find the entry point even though the API documentation says that
CompareUI is the class where I have to start...
In my naive imagination it should work like that (but it doesn't):
ICompilationUnit compilationUnit;
IWorkingCopy workingCopy = (IWorkingCopy) compilationUnit.getWorkingCopy();
// returns null ....
DiffNode diffNode= (DiffNode) differencer.findDifferences(false,
progressmonitor, null, null, workingCopy, compilationUnit);
CompareUI.findContentViewer(..., diffNode, ...);
I can't put the pieces together. Could anybody send me an example, please?
Cheers,
Jan.
|
|
|
Powered by
FUDForum. Page generated in 0.02629 seconds