Summary: | [Generic Editor] Specify IPresentationReconcilier without extension point | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Angelo ZERR <azerr> |
Component: | Text | Assignee: | Mickael Istria <mistria> |
Status: | NEW --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | daniel_megert, gautier.desaintmartinlacaze, mistria |
Version: | 4.7 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Whiteboard: | |||
Bug Depends on: | 507772 | ||
Bug Blocks: |
Description
Angelo ZERR
2016-11-18 07:59:22 EST
You can associate directly with the 'org.eclipse.core.runtime.text' content type, so it will associate with all types. At the moment, there is an issue that only the 1st (with an unspecified order...) presentationReconcilier is used. So doing so would disable other presentation reconciliers... There is room for improvement about it in the Generic Editor, for example by ignoring the current presentation reconcilier if it doesn't change anything and by using the "next" one. I've opened bug 507772 to track this specific idea. Do you think it would be a good solution for your use-case? > You can associate directly with the 'org.eclipse.core.runtime.text' I understand your suggestion, I could do just: ----------------------- <extension point="org.eclipse.ui.genericeditor.presentationReconcilers"> <presentationReconciler class="org.eclipse.language.textmate.eclipse.text.TMPresentationReconciler" contentType="org.eclipse.core.runtime.text"> ----------------------- And it will work for any languages C#, JSON, CSS, other. But it doesn't work (perhaps you don't use IContentType.isKindOf)? After if I will able to do that, it means that I must check in my code that grammar doesn't exists and don't throw an error, but it's OK for me. > I've opened bug 507772 to track this specific idea. Do you think it would be a good solution for your use-case? Yes I think if I can declare just for any content types: ----------------------- <extension point="org.eclipse.ui.genericeditor.presentationReconcilers"> <presentationReconciler class="org.eclipse.language.textmate.eclipse.text.TMPresentationReconciler" contentType="org.eclipse.core.runtime.text"> ----------------------- |