Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a new viewer for the Restore from Local History action #1879 #1880

Merged

Conversation

oleosterhagen
Copy link
Contributor

Fixes #1879

The new viewer implementation is used when the viewer factory is invoked without a compare configuration. This is the case when it is called from the Restore from Local History action. The existing merge viewer cannot be used in this situation.

Implementation notes:

Normally a custom IEditorInput implementation is not needed and creating a document with new Document(contentString) would be enough.

But here, tm4e needs a file buffer or an editor input object derived from IStorageEditorInput in order to determine the content type (see: ContentTypeHelper.java#L55-L63). So the HistoryInput object from the Eclipse platform has to be adapted to IStorageEditorInput in this viewer implementation.

…e-platform#1879

The new viewer implementation is used when the viewer factory is invoked
without a compare configuration. This is the case when it is called from
the "Restore from Local History" action. The existing merge viewer
cannot be used in this situation.
Copy link
Contributor

github-actions bot commented May 9, 2024

Test Results

 1 812 files  ±0   1 812 suites  ±0   1h 30m 58s ⏱️ - 2m 5s
 7 613 tests ±0   7 385 ✅ +1  228 💤 ±0  0 ❌  - 1 
23 991 runs  ±0  23 242 ✅ +1  749 💤 ±0  0 ❌  - 1 

Results for commit cda74ca. ± Comparison against base commit 033234f.

@mickaelistria mickaelistria merged commit 28f0a63 into eclipse-platform:master May 11, 2024
15 of 16 checks passed
@mickaelistria
Copy link
Contributor

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Generic Editor] Restore from Local History shows no file content and throws an exception
2 participants