Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Custom compare
Custom compare [message #636651] Tue, 02 November 2010 10:54 Go to next message
Gabriele Mising name is currently offline Gabriele Mising nameFriend
Messages: 3
Registered: November 2010
Junior Member
Hi all.
I have developed a plugin that store in text files (the file extension is .ABSClass) some definitions used by a generator to generate the real .java sources.

Those .ABSClass files has more section, one of them
is the methods description.

The Eclipse's text compare works fine when comparing different version using svn or cvs plugin but it compares (correctly!) the whole file.

But now I need to build my custom "compare view" to
display to user the differences between two .ABSClass version when files are different in methos's description only, so, in other works, I need to compare only a piece of my .ABSClass file

I need that view to be displayed when
1) The file extension is .ABSClass
2) The user double clicks in SVN or CVS history view
3) The user performs "team -> compare with..." action

I have made several searches to find out how to start this kind of job, but I have not found something that may help
me in this activity.

Could someone give me some documentation link, tip,
or any other suggestion that may my help?
Thank you very much in advance.

[Updated on: Tue, 02 November 2010 10:56]

Report message to a moderator

Re: Custom compare [message #637098 is a reply to message #636651] Thu, 04 November 2010 08:15 Go to previous message
Gabriele Mising name is currently offline Gabriele Mising nameFriend
Messages: 3
Registered: November 2010
Junior Member
Hi, at least I have found a solution.
I do not know if is the best way to solve my problem, but works.

I post here because I hope that might be useful for other users

In my plugin I have added two news extension points:

here I have added my custom class MyViewerCreator (as viewer) , providing as extensions: myextxml
here I have added my custom Class MyStructureCreator (as structureCreator), providing as extensions: myext

The new two custom classes basically do so:
1) MyStructureCreator (implements IStructureCreator)
in method: public IStructureComparator getStructure(Object aInput)
I've parsed my custom source file and returned the piece of source code to be evaluated by compare engine in an IStructureComparator object

2) MyViewerCreator (implements IViewerCreator)
in method: public Viewer createViewer(Composite aParent, CompareConfiguration aCC)
I return a new istance of

Hope it's enough clear

Previous Topic:How to enable a command for popups if the children of the selected element have an certain type
Next Topic:Cannot launch product configuration
Goto Forum:

Current Time: Sun May 27 21:57:19 GMT 2018

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

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

Back to the top