Skip to content

Allow to open different kinds of diff-editors #15401

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

Open
rsoika opened this issue Apr 4, 2025 · 9 comments · May be fixed by #15422
Open

Allow to open different kinds of diff-editors #15401

rsoika opened this issue Apr 4, 2025 · 9 comments · May be fixed by #15422

Comments

@rsoika
Copy link

rsoika commented Apr 4, 2025

This feature request is about this pullrequest: #13916

See also the discussion here: #15347

@msujew has expressed the suspicion that simply a merge is missing here?

@msujew
Copy link
Member

msujew commented Apr 4, 2025

No, I said we simply forgot about the feature when reviewing the original contribution. I would've expected that this feature would be part of the original contribution, but it wasn't, and so the feature is currently missing :)

@msujew msujew changed the title Provide a way to controll the Diff-Editor Allow to open different kinds of diff-editors Apr 4, 2025
@JonasHelming
Copy link
Contributor

@pisv FYI

@pisv
Copy link
Contributor

pisv commented Apr 7, 2025

@JonasHelming Thank you for letting me know about the issue.

FWIW, when #13916 was merged, there was no support for editor associations in Theia.

It was added later on in #14139.

I'll take a look and try to fix it.

@pisv
Copy link
Contributor

pisv commented Apr 7, 2025

Is it just me, or support for custom editors looks completely broken on the current master? I mean ordinary custom editors, not just side-by-side diff ones... Can someone please check?

Image Image Image

@JonasHelming
Copy link
Contributor

@tsmaeder

@tsmaeder
Copy link
Contributor

tsmaeder commented Apr 7, 2025

@pisv Could you opena separate issue and what do you have in the log when opening those editors?

@pisv
Copy link
Contributor

pisv commented Apr 7, 2025

@tsmaeder I've opened #15416. No errors in the logs. Really nothing.

@pisv
Copy link
Contributor

pisv commented Apr 7, 2025

Coming back to the issue with editor associations not taking effect for diff editors, it looks like the culprit is that EditorManager.canHandle currently always returns 100 in case of a diff-URI. A matching custom editor will by default have a higher priority (200), which causes a custom side-by-side editor to open instead of the text compare editor, regardless of editor associations.

I'll submit a PR once #15416 is fixed.

pisv added a commit to pisv/theia that referenced this issue Apr 8, 2025
@pisv pisv linked a pull request Apr 8, 2025 that will close this issue
2 tasks
pisv added a commit to pisv/theia that referenced this issue Apr 8, 2025
@pisv
Copy link
Contributor

pisv commented Apr 8, 2025

The PR #15422 is ready for review. (There are some tests failing, which don't seem to be related to the PR.)

pisv added a commit to 1C-Company/theia that referenced this issue Apr 28, 2025
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 a pull request may close this issue.

5 participants