Skip to content

Allow user select default editor per content type #1665

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

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

iloveeclipse
Copy link
Member

Extended "Content Types" preference page with possibility to set one of the editors configured for a content type to "default" editor.

The preference will be saved into org.eclipse.ui.workbench preference store.

The key is a combination of a prefix with content type id, the value is the editor id, for example to associate base XML content type with generic editor, following is saved:

defaultEditorForContentType_org.eclipse.core.runtime.xml=org.eclipse.ui.genericeditor.GenericEditor

By default nothing is changed for IDE, but products can set defaults using the product customization, e.g. for the example above it would be:

org.eclipse.ui.workbench/defaultEditorForContentType_org.eclipse.core.runtime.xml=org.eclipse.ui.genericeditor.GenericEditor

image

Fixes #1659

Copy link
Contributor

github-actions bot commented Feb 10, 2024

Test Results

   918 files  +    1     918 suites  +1   50m 43s ⏱️ + 11m 7s
 7 434 tests +    1   7 282 ✅ ±    0  150 💤 ±  0  2 ❌ +1 
23 451 runs  +1 575  22 947 ✅ +1 455  502 💤 +119  2 ❌ +1 

For more details on these failures, see this check.

Results for commit b3137d1. ± Comparison against base commit f61769f.

♻️ This comment has been updated with latest results.

Extended "Content Types" preference page with possibility to set one of
the editors configured for a content type to "default" editor.

The preference will be saved into org.eclipse.ui.workbench preference
store.

The key is a combination of a prefix with content type id, the value is
the editor id, for example to associate base XML content type with
generic editor, following is saved:

`defaultEditorForContentType_org.eclipse.core.runtime.xml=org.eclipse.ui.genericeditor.GenericEditor`

By default nothing is changed for IDE, but products can set defaults
using the product customization, e.g. for the example above it would be:

`org.eclipse.ui.workbench/defaultEditorForContentType_org.eclipse.core.runtime.xml=org.eclipse.ui.genericeditor.GenericEditor`

Fixes eclipse-platform#1659
@iloveeclipse
Copy link
Member Author

@mickaelistria , @travkin79: if there are no objections, I would like to merge that now.

@travkin79
Copy link
Contributor

No objections from my side. Thank you very much, @iloveeclipse!

@mickaelistria
Copy link
Contributor

I have not looked at the implementation detail, but I think the feature and the implementation make a lot of sense to be added. So no objection from my side, all the contrary!

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.

Extend editor specification with editor precedence based on content type bindings
3 participants