[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-team-dev] CompareEditor changes document of JavaEditor

we have a strange behavior of the CompareEditor in our Git Team provider project. Maybe you have an idea what we do wrong.
We have an Java editor open for a Class X. We then open the Compare Editor for two old revisions of X.
When the CompareEditor is opened via CompareUI.openCompareEditor the content of the left element is put into the Java Editor of X, which then becomes dirty.
Details of our implementation:
We use a SaveableCompareEditorInput. Its method prepareCompareInput  returns a DiffNode with two FileRevisionTypedElements. We set the CompareConfiguration.setLeftEditable and CompareConfiguration.setLeftEditable to false. The IFileRevision of the left element does not return an instance of IFile in method getStorage.
There is also a bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=302145
The reporter states: “This behaviour is only since I use eclipse 3.5 . In eclipse 3.4 it worked as it should.”
Any help is highly appreciated. If this is not the right newsgroup, could you please point me to the correct one?