简体   繁体   English

Eclipse插件-XML编辑器

[英]Eclipse Plugin - XML Editor

I've followed this tutorial: 我遵循了本教程:

Eclipse Plugin Eclipse插件

This tutorial explain why create a HTML Editor. 本教程说明了为什么创建HTML编辑器。

I need a Text editor,just for auto-highlight some words, anyway I thought this tuto should be a good one to start with. 我需要一个文本编辑器,仅用于自动突出显示某些单词,无论如何,我认为此tuto应该是一个很好的入门。

The thing is that I created the Plugin project and the only thing that I changed it was the extension " pat " instead " html, htm ", just that. 问题是我创建了Plugin项目 ,唯一更改的是扩展名“ pat ”而不是“ html,htm ”。 After that I created a .pat file, but eclipse doesn't open it with my plugin, and my text editor is not in the editor's list. 之后,我创建了一个.pat文件,但是eclipse不能用我的插件打开它,并且我的文本编辑器不在编辑器列表中。

Any suggestion?? 有什么建议吗?

Let me know if you need more information. 如果您需要更多信息,请与我们联系。

My guess is that you have just created the plugin, but aren't running it in your current Eclipse instance. 我的猜测是您刚刚创建了插件,但是没有在当前的Eclipse实例中运行它。 That can be verified by opening the view "Plugin registry". 可以通过打开视图“插件注册表”来验证。 That will show a list of all plugins, see if the plugin you have created is in that list. 这将显示所有插件的列表,请查看您创建的插件是否在该列表中。

If you click on the run button in Eclipse you will open a run configuration dialog. 如果在Eclipse中单击运行按钮,将打开一个运行配置对话框。 In one of the tabs, you get to choose what plugins should be available. 在其中一个标签中,您可以选择应该使用哪些插件。 Make sure your plug-in is selected. 确保已选择您的插件。 This will start up a new Eclipse instance that will run your plugin. 这将启动一个新的Eclipse实例,该实例将运行您的插件。

To make your plugin be a part of your ordinary Eclipse installation, you will need to export it to a jar and copy that jar to the dropins catalog. 为了使您的插件成为普通Eclipse安装的一部分,您需要将其导出到jar中,然后将该jar复制到dropins目录中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM