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.
Summary: | org.netbeans.api.ruby.platform.RubyPlatform is loaded on NetBeans startup with LimeWire project | ||
---|---|---|---|
Product: | ruby | Reporter: | Alexander Kouznetsov <mrkam> |
Component: | Project | Assignee: | Erno Mononen <emononen> |
Status: | RESOLVED INCOMPLETE | ||
Severity: | blocker | CC: | issues, jtulach, pjiricka |
Priority: | P3 | Keywords: | PERFORMANCE, TEST |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://wiki.netbeans.org/FitnessViaWhiteAndBlackList | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Stacktraces |
Description
Alexander Kouznetsov
2008-09-23 18:14:30 UTC
Created attachment 70351 [details]
Stacktraces
Tor, BootClassPathProvider (which scans all Ruby platforms) is in the global lookup, thus is 'seen' by o.n.m.gsfpath.api.classpath.ClassPath. Likely this is for Go To Type alike functionality to work for Ruby platform classes/modules (core/gems)? So should be moved to white-list? I'm not sure. We want to support the use case that if you are in a Java SE project, and you open a Ruby file, and you try to use code completion, you find SOME of the related Ruby apis -- at least the core library stuff (from rubystubs). Ditto for JavaScript files. I think that relies upon the boot class path provider. But it would be good if this was only initialized when necessary. If you move it, make sure you test functionality of that sort, along with the Go To Type/Symbol dialogs with open Ruby projects etc. to make sure things are working as expected. This specific part (code completion of gems/platform stuff outside of the rubystubs) is not tested well by the testing infrastructure because I haven't gotten indices working properly from unit tests. What BootClassPathProvider does is that it: - registers itself to the default lookup since it is not project sensitive - replies to request about core libraries (likely gems as well - I did not check) when somebody asked it. In this case it is asked by GSF (not sure in what context) It: - could probably check whether there is some Ruby project opened (through OpenProjects) and in the case it is not, ignore the request (until the result are cached by the above layers). - could move the logic to the project sensitive ClassPathProvider. I'm not sure here, since it was provided in this (global lookup) way for some reason Likely the former is the right way. This seems to be rather general problem. Since during e.g. creating PHP project, there are flows like this: "GSF Source Worker Thread" daemon prio=1 tid=0x08296a80 nid=0x6655 runnable [0x89219000..0x8921a140] at org.netbeans.modules.ruby.RubyLanguage.getCoreLibraries(RubyLanguage.java:117) at org.netbeans.modules.gsf.LanguageRegistry.getLibraryFos(LanguageRegistry.java:275) at org.netbeans.modules.gsfret.source.usages.Index.getPreindexRoots(Index.java:260) at org.netbeans.modules.gsfret.source.usages.Index.getDataFolder(Index.java:303) where GSF iterates through all registered languages which triggers loading of a bunch of classes specific to each language implementations. *** Issue 148181 has been marked as a duplicate of this issue. *** In addition the following classes are listed in issue 148181 (closed as a duplicate of this): org.netbeans.modules.ruby.RubyIndexer org.netbeans.modules.ruby.RubyLanguage org.netbeans.modules.ruby.modules.project.rake.FileChangeSupport org.netbeans.modules.ruby.modules.project.rake.FileChangeSupport$Holder org.netbeans.modules.ruby.modules.project.rake.FileChangeSupportEvent org.netbeans.modules.ruby.platform.gems.GemManager org.netbeans.modules.ruby.rhtml.RhtmlLanguage org.netbeans.modules.ruby.rhtml.editor.completion.RubyEmbeddingModel org.netbeans.modules.ruby.rubyproject.BootClassPathProvider org.netbeans.modules.ruby.spi.project.support.rake.PropertyEvaluator org.netbeans.modules.ruby.spi.project.support.rake.PropertyProvider org.netbeans.modules.ruby.spi.project.support.rake.PropertyUtils org.netbeans.modules.ruby.spi.project.support.rake.PropertyUtils$FilePropertyProvider org.netbeans.modules.ruby.spi.project.support.rake.PropertyUtils$SequentialPropertyEvaluator See desc6 for reasoning on why these issues are duplicates. The following class was not loaded with 080929: org.netbeans.modules.ruby.modules.project.rake.FileChangeSupportEvent The following class were not loaded with 081004: org.netbeans.api.ruby.platform.RubyPlatform org.netbeans.api.ruby.platform.RubyPlatform$Info org.netbeans.api.ruby.platform.RubyPlatformManager org.netbeans.modules.ruby.RubyIndexer org.netbeans.modules.ruby.modules.project.rake.FileChangeSupport org.netbeans.modules.ruby.modules.project.rake.FileChangeSupport$Holder org.netbeans.modules.ruby.platform.gems.GemManager org.netbeans.modules.ruby.rhtml.editor.completion.RubyEmbeddingModel org.netbeans.modules.ruby.rubyproject.BootClassPathProvider org.netbeans.modules.ruby.spi.project.support.rake.PropertyEvaluator org.netbeans.modules.ruby.spi.project.support.rake.PropertyProvider org.netbeans.modules.ruby.spi.project.support.rake.PropertyUtils org.netbeans.modules.ruby.spi.project.support.rake.PropertyUtils$FilePropertyProvider org.netbeans.modules.ruby.spi.project.support.rake.PropertyUtils$SequentialPropertyEvaluator The following two classes are still being loaded: org.netbeans.modules.ruby.RubyLanguage org.netbeans.modules.ruby.rhtml.RhtmlLanguage Reassigning to Tor: org.netbeans.modules.ruby.RubyLanguage org.netbeans.modules.ruby.rhtml.RhtmlLanguage Can you please update the issue with a current list (a lot of changes since the last update, e.g. GSF -> CSL). Thanks. |