[jira] [Comment Edited] (NETBEANS-5087) Add functionality to change mimetype of an open file
[ https://issues.apache.org/jira/browse/NETBEANS-5087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17242778#comment-17242778 ] Christian Lenz edited comment on NETBEANS-5087 at 12/2/20, 10:37 PM: - I didn't say where to do that. There is the thing with "Open file as" and this is where you open a specific filetype with another mimetype. You just change the filetype not the mimetype. It is not true to change the mimetype of a file which will not affect all filetypes mapped to the mimetype. What you change inside of the properties window is the extension as it is written. If I do a right-click on a foo.java file and change the extension to md, it becomes a foo.md file. It changes the filetype and again this is not the case. I want to switch the mimetype of a specific file, not the extension. It affects for example the VCS if I change the extension. was (Author: chrizzly): I didn't say where to do that. There is the thing with "Open file as" and this is where you open a specific filetype with another mimetype. You just change the filetype not the mimetype. It is not true to change the mimetype of a file which will not affect all filetypes mapped to the mimetype. What you change inside of the properties window is the extension as it is written. If I do a right-click on a foo.java file and change the extension, it is a foo.md file. It changes the filetype and again this is not the case. I want to switch the mimetype of a specific file, not the extension. It affects for example the VCS if I change the extension. > Add functionality to change mimetype of an open file > > > Key: NETBEANS-5087 > URL: https://issues.apache.org/jira/browse/NETBEANS-5087 > 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 (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Comment Edited] (NETBEANS-5087) Add functionality to change mimetype of an open file
[ https://issues.apache.org/jira/browse/NETBEANS-5087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17242778#comment-17242778 ] Christian Lenz edited comment on NETBEANS-5087 at 12/2/20, 10:33 PM: - I didn't say where to do that. There is the thing with "Open file as" and this is where you open a specific filetype with another mimetype. You just change the filetype not the mimetype. It is not true to change the mimetype of a file which will not affect all filetypes mapped to the mimetype. What you change inside of the properties window is the extension as it is written. If I do a right-click on a foo.java file and change the extension, it is a foo.md file. It changes the filetype and again this is not the case. I want to switch the mimetype of a specific file, not the extension. It affects for example the VCS if I change the extension. was (Author: chrizzly): I didn't say where to do that. There is the thing with "Open file as" and this is where you open a specific filetype with another mimetype. You just change the filetype not the mimetype. It is not true to change the mimetype of a file which will not affect all filetypes mapped to the mimetype. What you change inside of the properties window is the extension is it is written. If I do a right-click on a foo.java file and change the extension, it is a foo.md file. It changes the filetype and again this is not the case. I want to switch the mimetype of a specific file, not the extension. It affects for example the VCS if I change the extension. > Add functionality to change mimetype of an open file > > > Key: NETBEANS-5087 > URL: https://issues.apache.org/jira/browse/NETBEANS-5087 > 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 (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists