This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Please add mime type for nbm files | ||
---|---|---|---|
Product: | platform | Reporter: | Christian Lenz <chrizzly> |
Component: | Plugin Manager | Assignee: | Libor Fischmeistr <lfischmeistr> |
Status: | CLOSED INVALID | ||
Severity: | normal | CC: | jhavlin, markiewb |
Priority: | P3 | ||
Version: | 8.0.2 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
Christian Lenz
2015-06-17 13:37:38 UTC
Here is my example code to add a custom mime type to an extension, but it doesn't work correct. In my IDE, nbm files can be expanded like zip archives. After adding those code to a nbm file I can't expand the nbm file anymore. So smth worked, but there is no action. Here is my code example: http://pastebin.com/Jh3ssw3h I used now this tutorial: https://platform.netbeans.org/tutorials/nbm-filetype.html and removed all classes, which I not used. For example the template files to add a new file to the "New File" Wizard. Now it works. For me we can close the ticket maybe? I added a new mime type called application/nbm to nbm, NBM files. And I will add a action to it. Would be nice to have it, but I created a plugin with adding a mime type to a nbm file: https://github.com/Netbeans-Modules/NbInstallPlugin you can see it here, how I handled this: https://github.com/Netbeans-Modules/NbInstallPlugin/blob/develop/src/org/chrisle/netbeans/plugins/nbinstallplugin/actions/InstallPluginDataObject.java Works like a charm and now I can add new stuff, like context menu entries to it. Great job, thank you very much! Can you please also publish your plugin at http://plugins.netbeans.org/ ? Reassigning to platform/Plugin Manager. Should this feature be integrated into default NetBeans distribution? (I think that having it in optional plugin is quite OK.) Would be great to have in default distribution. The plugin is still in development. It is not finished yet. My intention was to implement logic to install plugins (nbm files) right from the projects, files or favorites window. This logic is missing atm. Benno helped me to give me some hint for the API, but I have to dive into to finish it. And atm, there is a little new behavior. Usually you can exband/collapse nbm files like archive files, where you can see some stuff inside. This is not possible atm, because of the new mime-type that I created. I will close it, because it will handled now at the JIRA board: https://issues.apache.org/jira/browse/NETBEANS-929. Please discuss it there for further information. |