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.
The action changes the file's extension. There is no way to view/edit an existing file with unknown extension in a text editor in netbeans without first changing its ext.
Please could you provide me with more info? Where is this action (Convert to Text) available?
Sorry I putted in wrong name, the label on action is Treat as Text. It is available on node of default data object, I believe.
Assigning to Tim
Adding Jesse to cc, since I remember him saying something about some plans for this, something involving a hex editor, and it's his code. Since the behaviour was a little strange (typically you want to treat it as text because you want to open it, so making it a two step operation seems pretty unnecessary), I've done the following: - Treat as Text > Open as Text - Convert to Default > Stop Treating as Text - No confirmation dialog on treat as text action - Confirmation dialog on Stop treating as Text only if the file is open - ConvertToTextAction will now try to open the file if, after doing the change, it has an OpenCookie (the open attempt is invokeLatered to get it out of the way of any machinations that might be going on in the meantime). I'll attach the diff.
Created attachment 14562 [details] changes made
I think what we actually wanted to do was kill this action (and maybe the whole text module) altogether, and just add an Edit cookie directly to DefaultDataObject. If it's a binary file, obviously editing it as text won't be very useful, but nothing ought to *break* as a result of trying. This patch is definitely an improvement, though (based on your description - did not read code patch).