Luca Rainone
Luca Rainone

Reputation: 16468

Eclipse Plugin Development: multipage editor with html extension

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?

Upvotes: 0

Views: 2014

Answers (2)

Samitha Chathuranga
Samitha Chathuranga

Reputation: 1749

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.

Upvotes: 0

nitind
nitind

Reputation: 20003

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 .

Upvotes: 1

Related Questions