Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » how to use CompareUI and Differencer
how to use CompareUI and Differencer [message #147995] Tue, 09 March 2004 23:29
Jan-Friedrich Mutter is currently offline Jan-Friedrich MutterFriend
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.
Previous Topic:Custom builder problem
Next Topic:[plugin classloader] IllegalArgument: class not visible
Goto Forum:
  


Current Time: Fri Aug 23 05:50:11 GMT 2024

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

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

Back to the top