How to extend javascript editor in JSDT in Eclipse with adding new functions

心已入冬 提交于 2019-12-06 10:07:29

问题


I am using RCP to create special javascripts editor with special functions and want to extends js editor from JSDT by adding new functions in context menu and in content assistant. But how can I start. Here is my thinking: 1) rewrite a jscript editor which extends CompilationUnitEditor by import org.eclipse.wst.jsdt.internal.ui.javaeditor.CompilationUnitEditor; But it seems not working, it only has part of functions from JSDT, no colored squiggly marks in the text.

import org.eclipse.wst.jsdt.internal.ui.javaeditor.CompilationUnitEditor;

public class Jscript extends CompilationUnitEditor {

    public static final String ID="com.test.scripteditor.editor3";
    public Jscript(){
            super();        
    }   
}

2) Any possibles ways to add exentsions directly from plugin.xml to make this process quick?

Thanks for any suggestions. I do really do not know how to do it.

来源:https://stackoverflow.com/questions/10294199/how-to-extend-javascript-editor-in-jsdt-in-eclipse-with-adding-new-functions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!