rostanek / freemarker-support-for-netbeans

FreeMarker support for NetBeans including syntax coloring, parsing etc. new features will be added soon.
GNU General Public License v3.0
19 stars 7 forks source link

Provide a button to activate it on files without extension #9

Closed Git-GT closed 8 years ago

Git-GT commented 8 years ago

Hi, I tried this plugin to have help editing the Netbeans templates. Unfortunately it doesn't work, I suppose because those have not a FreeMarker extension so Netbeans doesn't recognize them. Could you provide a button to "force" the activation in those cases? Thanks and best regards,

Giuseppe Tino

rostanek commented 8 years ago

In NetBeans, right click on a file without extension, choose "Open As...". In modal window select "Files of FreeMarker" and click Open. Voilà :smiley:

Git-GT commented 8 years ago

Thanks a lot for your quick reply, I didn't notice it before. But could you add also a button in the template dialog? (the one that is opened via Tools -> Templates) Usually the templates are opened from there, it is a bit complex to have their file into the left panel to select "Open as.." It is not very necessary now that I now how to open them but maybe consider it as an enhancement suggestion. Thanks, best

Giuseppe

EDIT: I just found the template files and noticed that it is not possible to open them using the "Open as.." command because they have an extension. For example the template relative to new classes is:

..\Netbeans\8.1\userdir\config\Templates\Classes\Class.java

rostanek commented 8 years ago

It would be hard or even impossible to create button like that, because NetBeans manages associations between file types and MIME types. I suggest to copy contents of template to another file with ftl extension and edit template there. In my opinion editing templates is done hardly ever and creating such button is too much effort for that rare case.

Git-GT commented 8 years ago

Ok no problem, I understand. I supposed was more easy. I can use your workaround! Thanks in any case for the answer! Best regards,