0
votes

I've created a plugin from wizard "Plugin with a mutli tab Editor".

Problem: In Project Configuration if I set the File Extension field to html, the plugin not works. If I leave it mpe (pre-inserted field) or I insert another unknown file extension, then it works.

What can cause this problem and how can I activate the plugin for html files?

EDIT: Ok, I'll try to describe step by step my problem.

I create a new Plugin Project new plugin project

I set project name:

project base settings

...and the project properties

project properties

I create a plugin using template "multi page editor"

templates plugin

Now, I must choose the class names and File Extension (mpe is pre-inserted from eclipse, I leave it for now).

enter image description here

Ok. Eclipse generate all files and a project that works. So, if I test it:

run eclipse

and I create a test project with a test.mpe files

test project

I can see 3 tabs (because 3 tabs are configured in template code) and a default icon on file name test.mpe on Project Explorer. The plugin WORKS!

Now... I close all and I repeat EXACTLY all steps, I using HTML instead of MPE, I test it and... there is no tabs and there is no icon.

test html

Why? And How can I solve it?

2
What "problem" are you referring to? In what way does it not "work"?nitind
it not works if I insert "html" in extensions attribute of extension->editor tag in plugin.xml file. If I insert, for example "rrr" or another unknown extension, then it works.Luca Rainone
It not works also if I configure the project with wizard. With html still not works. With other extensions (r1t, mpe etc) then it works.Luca Rainone
Are you saying the file's just not opening in your editor? Do you already have an HTML editor installed? Have you checked the Open With context menu on the file to make sure your editor is available?nitind
As I mentioned above, check the file's Open With context menu. Your new editor may not be the default when there's another one already installed.nitind

2 Answers

1
votes

Your editor is not set as the default, and the one you have installed is being chosen instead. See the full documentation and example at http://help.eclipse.org/juno/topic/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_ui_editors.html?cp=2_1_1_143 .

0
votes

The problem is what nitind said. So simple solution is right click on your created .html file and select Open with and select the editor plugin you installed to open the .html file. So then the file will be opened in your created editor, but not with the default html editor.