Bug 574800 - Troubles with Eclipse command "Previous Edit Location"
Summary: Troubles with Eclipse command "Previous Edit Location"
Status: CLOSED DUPLICATE of bug 567321
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.17   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-07-12 07:33 EDT by Maksim Dzyuba CLA
Modified: 2021-07-24 12:43 EDT (History)
3 users (show)

See Also:


Attachments
Example project (1.07 KB, application/zip)
2021-07-12 07:33 EDT, Maksim Dzyuba CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maksim Dzyuba CLA 2021-07-12 07:33:52 EDT
Created attachment 286769 [details]
Example project

Hello. I have some troubles with Eclipse command "Previous Edit Location". This command in some cases does not open text editor with last edit. 
For reproducing:
1) Open attached project
2) Open file "t1" and add any symbol to 1st line
3) Open file "t2" and add any symbol to 3rd line
4) Open file "t3" and add any symbol to 5th line
5) Open file "t4" and add any symbol to 15th line
6) Save changes in editor for "t4" and close it
7) Call command "Previous Edit Location".
I suppose that editor for "t4" will be opened but activate editor for "t1"

I can reproduce that in Eclipse 2020-12 (4.18) and 2021-06 (4.20.0)

PS. I think, that problem at org.eclipse.ui.texteditor.AbstractTextEditor.TextListener.inputDocumentAboutToBeChanged(IDocument, IDocument) and org.eclipse.ui.texteditor.AbstractTextEditor.TextListener.discardHistoryFor(IDocument)
In this methods, calling when editor close, method "org.eclipse.ui.internal.texteditor.HistoryTracker.browseBackward()" is called in cycle
Comment 1 Andrey Loskutov CLA 2021-07-13 15:12:43 EDT
Maksim, thanks for report. Do you want to provide a patch? https://wiki.eclipse.org/Platform/How_to_Contribute
Comment 2 Andrey Loskutov CLA 2021-07-24 11:19:43 EDT
@Ari, Lars: please check this, also see bug 567321 which seem to be related.
Comment 3 Andrey Loskutov CLA 2021-07-24 12:43:40 EDT
This is exact duplicate of bug 567321 comment 3. But the example here is clearer to understand, thanks.

*** This bug has been marked as a duplicate of bug 567321 ***