Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove the lock in file association in eclipse

IN Eclipse i want to chnage the default editor of some .htm files.

If i try to go to FIle Association and assiciate the default editor then file gets opened in that new editor but i don't get the syntax highlighting.

The solution is that the file association is locked ny some plugin editor

Preferences -- Context type----text ----Your editor -- reomve the extension

But i get the .htm(locked) so i cant remove it.

http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Freference%2Fref-content-type.htm

Note: Certain items will be marked as "locked". An item is locked if it is one of the associations provided by the plug-in that declares the content type. In other words, you can remove only user-contributed associations.

Is there any way to remove those locks even thought it can be hackish way but i want to do it

like image 451
Mirage Avatar asked Oct 12 '12 00:10

Mirage


3 Answers

You don't need to "unlock" an existing association to add a new association and make it the default.

  1. Add a new association via the "Add" button
  2. Select the new entry
  3. Hit the "Default" button to make your new entry the default editor

enter image description here

like image 141
Stuart Berg Avatar answered Oct 31 '22 22:10

Stuart Berg


Could it be, that you want to change the "File Association"? This can be done in General / Editors / File Associations. BUT Eclipse uses at least one default-editor and this is the reason for the "locked"-message in the "Content Types". You could set the "Text Editor" to all unwanted types. Looks like a workaround, but makes sense, because it is the same as the file associations of your operating system, that asks you for the program to display the file.

Another question is, why do you want to unlock or remove the "Content Type"? Does it change anything in the Eclipse logic?

like image 38
Sven Avatar answered Oct 31 '22 22:10

Sven


Go see this answer from "Greg Desmarais" (assign the desired editor to "default")

https://stackoverflow.com/a/15642583/162094

like image 1
Mark Avatar answered Oct 31 '22 22:10

Mark