Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » My own Compare Editor...(Need your help)
My own Compare Editor... [message #484121] Fri, 04 September 2009 07:39
No real name is currently offline No real name
Messages: 2
Registered: September 2009
Junior Member
Hi,
I must use eclipse tool to compare two texts.

I found some informations but not enough.

What I do:
- I have EditorInput class which extends CompareEditorInput:

class EditorInput extends CompareEditorInput { 
	String text1;
	String text2;

	
	public EditorInput(CompareConfiguration configuration, String Text1, String Text2) {
		super(configuration);
		text1 = Text1;
		text2 = Text2;
	}

	protected Object prepareInput(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
		Differencer d = new Differencer();
		Object diff = d.findDifferences(false, new NullProgressMonitor(), null, null, new Input(text1), new Input(text2));
		return diff;
	}


Next:

CompareConfiguration cfg = new CompareConfiguration();
cfg.setLeftEditable(true);
cfg.setRightEditable(true);

CompareUI.openCompareEditor(new EditorInput(cfg, text1, text2));


text1, text2 - String variables

And now here is my problem:
In CompareEditor windows I cant edit this texts.
I cant use options:
- Copy All From Left To Right
- Copy All Non-Conflicting Changes from Right To Left
- Copy Current Change From Left To Right
- Copy Current Change From Right To Left

Both sites aren`t editable Sad
It`s very important for me to solve this problem.

So if someone knows solution, please for help.

[Updated on: Fri, 04 September 2009 07:39]

Report message to a moderator

Previous Topic:Dont show a view under Windows->Show View
Next Topic:Search for variable values during debugging ?
Goto Forum:
  


Current Time: Fri Aug 22 02:01:07 EDT 2014

Powered by FUDForum. Page generated in 0.24164 seconds