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.
Product Version: NetBeans IDE Dev (Build 090911) Java: 1.5.0_20; Java HotSpot(TM) Client VM 1.5.0_20-141 System: Mac OS X version 10.5.8 running on i386; MacRoman; en_US (nb) Userdir: /tmp/ud1 -------- - built with ant clean && ant - start ide with fresh userdir - create ruby app - type a="hello" - type a.| and invoke CC - does not work (no suggestion) - activate java (e.g. create j2se project) - go back to ruby file and invoke CC on the same place, now it works
Seems like FoD related, I'll give this a try with a fresh build (my build from yesterday's sources doesn't exhibit this problem).
Unfortunately I can't reproduce with build 090914 (e8b4a4ca8d01 to be exact). Based on the description I have a reason to believe that the problem is FoD related though. Does CC work for you normally in the Ruby only distribution (or if you build just the ruby cluster)?
reproduced with 20090914, with full IDE by the original steps. However, seems to be some kind of random, reproduced on the second attempt:( will try to reproduce with just ruby cluster.
Created attachment 87674 [details] screenshot
btw while comparing indexes between successful and unsuccessful attempt, found that: in both is s7 s7=file\:/space/ruby-main/nbbuild/netbeans/ruby2/jruby-1.3.1/lib/ruby/1.8/ but while listing s7 dir, the unsuccessful attempt userdir is missing folder 'ruby', which might be the root cause. drwxr-xr-x 3 tomas wheel 102 Sep 15 11:55 TLIndexer drwxr-xr-x 3 tomas wheel 102 Sep 15 11:55 TaskListIndexer drwxr-xr-x 3 tomas wheel 102 Sep 15 11:55 javascript drwxr-xr-x 3 tomas wheel 102 Sep 15 11:55 org-netbeans-modules-jumpto-file-FileIndexer drwxr-xr-x 3 tomas wheel 102 Sep 15 11:55 ruby -rw-r--r-- 1 tomas wheel 22841 Sep 15 11:55 timestamps.properties drwxr-xr-x 3 tomas wheel 102 Sep 15 11:55 void-indexer
I was able to reproduce after a couple of attempts. The ruby class path provider and indexer don't get called at all until Java is activated. Not sure where to pass this (as I wrote above FoD may play a role here), perhaps java/ classpath as per the problem with the class path provider.
Seems as FOD problem, I will try it and reassign to correct module.
While debugging the problem the ruby ClasspathProvider (from Ruby project) is called when invoking the code completion. The code completion return nothing. Even the PathRecognizer seems is in the main lookup. When a new Ruby project was created the roots were correctly recognized by the PathRegistry. The problem is in the editor lib. The MimeLookup.getLookup("text/x-ruby").lookup(type) returns the [EmbeddingIndexerFactory,TLIndexer] but neither the tracker.results nor the infosBy.* contain indexer for "text/x-ruby". This is a result of the fact the the Util.getAllMimeTipes() and EditorSettings.getDefault().getAllMimeTypes() do not contain the ruby mime type. Seems as some bug in order of firing (handling of events) caused by FOD. EditorSettings.getDefault().getAllMimeTypes: "[text/x-el, text/x-sql, text/x-javascript-string, text/xml, text/xhtml, application/xml-dtd, text/html, text/x-json, text/x-java, text/plain, text/x-jsp, text/javascript, text/x-diff, text/x-javascript-comment, text/x-css, text/x-yaml, text/x-dialog-binding, text/x-properties, text/xml-external-parsed- entity]" MimeLookup.getLookup("text/x-ruby").lookupAll(type): "[org.netbeans.modules.csl.core.EmbeddingIndexerFactoryImpl@80b260, org.netbeans.modules.csl.core.TLIndexerFactory@3ef5d0]"
The problem is that the MimeTypesTracker does not hold the subfolders which causes lazy fs not to fire.
Created attachment 87825 [details] Patch of the fix, please review before apply.
Thanks for the patch Tomasi - http://hg.netbeans.org/jet-main/rev/e1aa8a733585
Integrated into 'main-golden', will be available in build *200909181401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/e1aa8a733585 User: Vita Stejskal <vstejskal@netbeans.org> Log: #172043: hard reference all traversed folder FileObjects in order to get reliable filesystem events