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 can not define XML as an XML Object extension so that my files that end in XML will be seen as proper XML files. it is only allowing 'xml' but will not allow the upper case 'XML' to be entered. Perhaps the parsing should be case insensitive and recognize both XML and xml as XML files???
I tried it in Tools -> Options and it works fine. I have now "XML, application/xml, text/xml, xml" value in "XML Objects" node, "Extensions and MIME Types" property. My file "extras.XML" is recognized as XML file. I am on Linux. I just added "XML" extension either directly appended ",XML" to text of using dialog if you press "..." button to invoke property editor. Is behaviour different on Win 2000? I tried dev build, 3.4 and last 3.4.1 build. All works for me.
Yes you are right. It is not allowed on Windows but both "xml" and "XML" are recognized as XML files. I think it is because Windows filesystem is not case sensitive. Actually I do not know what code is responsible for such difference. Is it enough or should I investigate it further? Or are you using case sensitive file system under Windows? Is it possible? You say that IDE does not recognize files with "XML" extension as XML files. What filesystem is at your disk? For me it works fine on Win 2000 on local disk (probably with FAT32).
Win2000 sp3 -ui com.sun.java.swing.plaf.windows.WindowsLookAndFeel 1.3.1_06 I gave a bad description. It is recognized as a plain xml file, but it is not recognized as the "ant" file it is, unless it has a lowercase xml. I just reverified this on my computer at work.
AFAIK recognition of ant script is done by data loader in ant module. So I reassign to ant module. Please ant module could you give us some explanation?
The problem (or limitation?) is in implementation of MIMEResolver. The definition of <MIME-resolver> for Ant script contains "<ext name="xml"/>" and implementation of MIMEResolver is case sensitive. Therefore only files ending with ".xml" are accepted for MIME recognition.
Agreed w/ David; MIMEResolverImpl.Type.accept should contain logic similar to that in ExtensionList and automatically be insensitive to case on OS's which do not grok file case: currently listed as Windows + OpenVMS, though ideally this would be controlled by some kind of configuration elsewhere.
Soooo.. Its a matter of cut and paste code?
If you point me in the right direction, I will make the change myself and hand it off to you.
Cool! Jesse mentioned relevant source code. The extension comparison is done in core/src/org.netbeans.core.filesystems.MIMEResolverImpl.Type.accept() Example how correctly it is handled is for example in: openide/src/org.openide.loaders.ExtensionList - search for "CASE_INSENSITIVE".
Is their any way for me to run this code in the debugger? can I start NB and connect the debugger to it???
Check <http://debuggercore.netbeans.org/> - there are two useful docs: * How to debug NetBeans * How to debug an application by attaching to it from NetBeans I'm debugging NB from time to time and it works fine.
Fixed against 3.4.1 release. 2 files. org.netbeans.core.filesystems.MimeResolverImpl org.netbeans.core.filesystems.Util
Created attachment 8968 [details] patched java file1
Created attachment 8969 [details] Util.java - patched java file 2
Need validation of this fix, expecially on non-windows platforms.
dnoyeB - you probably want to read http://www.netbeans.org/devhome/community/contrib-patches.html Specifically, best format is one patch (can cover multiple files), diff -u format (not changed copy of files), and relative to trunk sources (not older files). Otherwise someone has to "reverse-engineer" your submitted files to figure out what the patch is before it can be used.
Yes, yes...I knew better but I didn't feel like checking out the whole CVS thing...I suppose I'll do this now as an exercise since I have yet to actually produce a patch file successfully. ...in progress...
I recall their was either some bug with the patch file creation from netbeans, or I had to have checkin access to create the patch file from the netbeans CVS. do you know anything about that?
I don't know anything about patch creation from inside NB. From the command-line, you certainly don't need commit access. Just check out the sources (or some of them), make changes, then run "cvs diff -u" to get a patch. If you were *adding* files then "cvs add" refuses to work on working sources, even though you are not touching the repository. However added files can be easily zipped up (cvs diff -N will include them if they have been cvs add'ed). Or if you know the trick, get the effect of cvs add directly: rather than cvs add Foo.java use (Unix syntax here) echo /Foo.java/0/whenever// >> CVS/Entries
Ill use command line from dos prompt. The fix works but I'm dying trying to integrate in dev build. For some reason the core.jar I make is smaller than the core.jar with today's (2/14/02) build. Then when I put it in, 1/2 the modules get mad. So after I remove it, and restart, only 3 modules load and I have like 2 menu items and am dead in the water :D Does only the core's source affect the core's size, or are their files creeping in from elsewhere I need to DL too? What modules do I need? I just got the ones the build process complained were not there.
all the class files in the downloaded build are bigger than the ones I am building. baffled.
Created attachment 8975 [details] attempted patch file
THANX! I skimed the patch and it looks good. I did not try it however. One cosmetic comment: we are not using tab characters in the source code.
Cool. I managed to turn on whitespace so to speak by changing the color of it. Is their a way to change the color of specific whitespace characters? In codewright each character gets a specific visible char like a space is '~' and a tab is '_' or something like that... If I could tell at a glance I would have erased all the tab chars.
I'm not aware of this feature in NB editor. I'm using external editor for this. (scite)
Patch applied in trunk with tiny modifications. /cvs/core/src/org/netbeans/core/filesystems/MIMEResolverImpl.java,v new revision: 1.11; previous revision: 1.10 /cvs/core/src/org/netbeans/core/filesystems/Util.java,v <-- new revision: 1.3; previous revision: 1.2
closed