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'd like to have my fjscripts(*.scr) file recognized as JavaDataObjects because the script is almost java. Other DataObject allow to specify extension but JavaDO do not.
Implemented in 2012, waiting for approval for 107*
*** Bug 4446 has been marked as a duplicate of this bug. ***
Integrated for 1074
This feature is still not integrated in [1077].
[1094] Feature is working now, but there is a new bug: It is possible to set Tools | Global Options | Object Types | Java source object | Extensions to <Empty> (Simply by clicking Add button). IDE can't now correctly recognize DataObjects and becomes unusable. There is no way back! java.lang.IllegalArgumentException and java.lang.ClassCastException are thrown.
Created attachment 137 [details] IllegalArgumentException
ExtensionListEditor in the core accepts empty strings as valid extensions. Is it correct ? It seems that enabling JavaDataObject handling empty extensions will clash fith DataFolder representation object. The behaviour of ExtensionList PE and the custom PE is incosistent. in-place PE prohibits entering empty extensions while the custom one allows it.
IMO, the problem is in the JavaDataLoader.findPrimaryFile() method, which allows folders to be recognized as JavaDataObject's primary files. Adding the following line: if (fo.isFolder()) return null; at the very beginning of the findPrimaryFile() method fixed the problem for me. Please note that UniFileLoader.findPrimaryFile() does the same thing.
Changing assignee. Please note: yes, ExtensionListEditor does not permit empty extensions in setAsText, while it does in the custom editor. But many propeds provide more options in the custom editor where it is possible to make the GUI reasonable (I doubt any user would understand the correct way to enter an empty extension as text). So I don't consider this a bug in core. I think there was some other bug report along these lines, please search for it if you disagree. Please specify Version on this bug, it is not clear what it applies to.
Fixed in trunk-79, rel31-17/
BUG also appears in version : FFJ20 In FFJ20: some Exceptions are thrown, if add button is pressed (due to <Empty>)
Resolved for 3.4.x or earlier, no new info since then -> closing.