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.
I'm using 3.3 beta 1 with JDK 1.3.1_01 on Windows NT. I have a couple of files with unknown file extensions (.idl & .j) in a mounted file system which (because it's a version-controller filesystem and they're not checked out) are read only. When I double-click on them nothing happens, and the right-click menu option "Convert to Text" is greyed out. This means I am unable to view the files. If I make them read-write by checking them out, the Convert to Text option becomes available, and I am then able to open them. Comparing the file to the previous version, however, shows no differences. Since they're identical, the Convert to Text option obviously didn't need to write to the file itself, it just updated the corresponding .nbattrs entry. If I then undo the checkout, making the file read-only again, I am still able to open the file (read only) in the editor subsequently. It would be nice if I could have done this without having to mess around with checking out the file and undoing the checkout afterwards i.e. even if a file is read only, perhaps Netbeans could still allow the convert to text option if that can be done by just updating .nbattrs?
Passing to Yarda to comment this - architect. issue. BTW now this isn't possible due to writting into nbattrs files and when the file is read we cannot do this change. Maybe that this can be somehow handled by the owner of this action - the text module.
>BTW now this isn't possible due to writting into nbattrs >files and when the file is read we cannot do this change. I'm not sure I understand what you mean - there's no problem with it writing to the .nbattrs file, since that's not under source control and so is read-write all the time. It's the versioned (.idl & .j) files that are the problem, as Clearcase makes them read-only unless I have them checked out. They don't get altered at all by the Convert to Text process (they're already text files, just not with a recognised file extension), but because they're RO Netbeans won't let me select the option.
You are right. One quick solution is to go to the Tools, Options, IDE Configuration, System, Object Types, Textual Objects node and change its Extensions property to contain the 'idl' and 'j' extensions. From this change will the ide recognize these files as text files.
Jan is right the problem is with .nbattr and the way how the access to them is implemented. I think that the easiest solution would be to put another support action to text module that would allow to open editor window over a foreign data object. Thus no writing to .nbattrs would be necessary.
*** Issue 17210 has been marked as a duplicate of this issue. ***
taking beans from the BDK requires users to modify the read only text in the manifest...converting manifest from read only to read/write would be a great step forward
Target milestone -> 3.3.1.
Does issue #11334 help here?
I have uncommented additional checks for read-onliness in the ConvertToTextAction and it appears that it works. I'll continue on Monday and close the bug.
Fixed. Checking in src/org/netbeans/modules/text/ConvertToDefaultAction.java; /cvs/text/src/org/netbeans/modules/text/ConvertToDefaultAction.java,v <-- ConvertToDefaultAction.java new revision: 1.3; previous revision: 1.2 done Checking in src/org/netbeans/modules/text/ConvertToTextAction.java; /cvs/text/src/org/netbeans/modules/text/ConvertToTextAction.java,v <-- ConvertToTextAction.java new revision: 1.9; previous revision: 1.8 done