-
Notifications
You must be signed in to change notification settings - Fork 105
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
Add support for "editor" content types for compare editor #1277
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iloveeclipse
force-pushed
the
issue_1747
branch
from
March 29, 2024 17:57
196b3d2
to
740b08a
Compare
iloveeclipse
added a commit
to iloveeclipse/eclipse.platform.ui
that referenced
this pull request
Mar 29, 2024
This allows GenericEditorMergeViewer be used by compare editor for content types associated with the generic editor. Additionally implemented getTitle() to provide more specific compare editor description, so instead of default "Text Compare" one would see "XML Compare" etc. This avoids the problem of duplicated "Text Compare" options shown for different compare viewers (default one for plain text and the one for generic editor). See eclipse-platform#1747 See eclipse-platform/eclipse.platform#1277
iloveeclipse
force-pushed
the
issue_1747
branch
from
March 31, 2024 10:05
740b08a
to
bfa3850
Compare
|
Extend `contentMergeViewers` extension point: add an attribute to consider "linked" editor content type associations. The code checks if contentMergeViewers contribution refers to such "linked" editor id in extension, and check if editor supports other content types. In case there are more content types supported by same "linked" editor, these would be automatically considered as valid contentTypes for the contentMergeViewers. Updated CompareViewerSwitchingPane to consider more precise title calculations for ContentMergeViewer instances (where concrete type info is available after instantiation of a particular viewer). Fixes eclipse-platform/eclipse.platform.ui#1747
iloveeclipse
added a commit
to eclipse-platform/eclipse.platform.ui
that referenced
this pull request
Apr 3, 2024
This allows GenericEditorMergeViewer be used by compare editor for content types associated with the generic editor. Additionally implemented getTitle() to provide more specific compare editor description, so instead of default "Text Compare" one would see "XML Compare" etc. This avoids the problem of duplicated "Text Compare" options shown for different compare viewers (default one for plain text and the one for generic editor). See #1747 See eclipse-platform/eclipse.platform#1277
This seems to have caused some test failures in I-build https://download.eclipse.org/eclipse/downloads/drops4/I20240403-1800/testresults/html/org.eclipse.team.tests.core_ep432I-unit-cen64-gtk3-java17_linux.gtk.x86_64_17.html |
I'm on it, I have a fix but have meetings all the day. |
iloveeclipse
added a commit
to iloveeclipse/eclipse.platform
that referenced
this pull request
Apr 4, 2024
TextMergeViewer was expected by SaveableCompareEditorInputTest but more specific implementation (subclass of it) - GenericEditorMergeViewer was seen by the test after changes made to allow more specific viewer to "win" in the compare editor for text content. See eclipse-platform/eclipse.platform.ui#1747 See eclipse-platform#1277
See #1283 |
akurtakov
pushed a commit
that referenced
this pull request
Apr 4, 2024
TextMergeViewer was expected by SaveableCompareEditorInputTest but more specific implementation (subclass of it) - GenericEditorMergeViewer was seen by the test after changes made to allow more specific viewer to "win" in the compare editor for text content. See eclipse-platform/eclipse.platform.ui#1747 See #1277
RedeemerSK
reviewed
Jun 30, 2024
team/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
Show resolved
Hide resolved
iloveeclipse
added a commit
to iloveeclipse/eclipse.platform
that referenced
this pull request
Jul 2, 2024
As noted on PR eclipse-platform#1277, the code looks weird and I can't explain what I smoke while writing it. Fixed the code to do what actually was meant. This is mostly paranoia code, as usually input.getName() is not null. See eclipse-platform#1277 See eclipse-platform/eclipse.platform.ui#1747
iloveeclipse
added a commit
that referenced
this pull request
Jul 2, 2024
As noted on PR #1277, the code looks weird and I can't explain what I smoke while writing it. Fixed the code to do what actually was meant. This is mostly paranoia code, as usually input.getName() is not null. See #1277 See eclipse-platform/eclipse.platform.ui#1747
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Extend
contentMergeViewers
extension point: add an attribute to consider "linked" editor content type associations. The code checks if contentMergeViewers contribution refers to such "linked" editor id in extension, and check if editor supports other content types. In case there are more content types supported by same "linked" editor, these would be automatically considered as valid contentTypes for the contentMergeViewers.Updated CompareViewerSwitchingPane to consider more precise title calculations for ContentMergeViewer instances (where concrete type info is available after instantiation of a particular viewer).
Fixes eclipse-platform/eclipse.platform.ui#1747