netbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Lenz (Jira)" <>
Subject [jira] [Commented] (NETBEANS-5087) Add functionality to change mimetype of an open file
Date Wed, 02 Dec 2020 22:33:00 GMT


Christian Lenz commented on NETBEANS-5087:

What you did, is not what I was searching for and not what it should be. So please tell me
how I can temporary change the mimetype (not filetype) of a file, which is open in the editor.
This is not implemented.

> Add functionality to change mimetype of an open file
> ----------------------------------------------------
>                 Key: NETBEANS-5087
>                 URL:
>             Project: NetBeans
>          Issue Type: Improvement
>          Components: ide - Code
>            Reporter: Christian Lenz
>            Priority: Major
>         Attachments: changing-mimetype.gif
> It is quite common to see it in other IDEs to change the MimeType from a file which is
open. For example creating a txt file as a temp file to discuss APIs.
> That means you have not only JSON or XML but also comments and stuff which is not supported
in that file and make errors.
> But that doesn't matter, the created txt file is just a collection of all information.
> So it must be possible to change the mimetype of a file which is currently open to change
the content/text to text/json. This is not possible in NetBeans. It is just possible to change
the mimetype for a whole filetype and that means global. But this is not the case here.
> I created a plugin where I can read out the mimetype of a file and shows it in the statusbar.
I wanted to change the mimetype, but the mimeType file property is just read only or is only
changable when the file was created in memory whie the MemoryFileSystem.
> I had a look into the code, at the end, NetBeans just take the extension and looks into
the mapping where it was mapped against. So we need a functionality where we can change the
mimetype temporarily.

This message was sent by Atlassian Jira

To unsubscribe, e-mail:
For additional commands, e-mail:

For further information about the NetBeans mailing lists, visit:

View raw message