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.

Bug 121322

Summary: please made the indexer/autocompleten pathes configureable
Product: ruby Reporter: rvater <rvater>
Component: GemsAssignee: issues@ruby <issues>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description rvater 2007-11-06 20:08:47 UTC
Hi,

we are working a lot with RailsEngines (www.railsengines.org) as plugin
framework for our products. After your changes that cuts the 
'vendor/plugins/*' path from the indexing we are not able to work with 
netbeans as rails IDE like before.
Some explain:
 the plugin-structure, RailsEngines provide look like
 /vendor/plugins/<plugin-name>/app/controllers
                                  /models
                                  /helpers
                                  /views
                              /lib
and so on.

only 'lib' is now indexed and the classes under 'app','tests' etc.
aren't recognized any more.

we are currently stucked at nbrubyide build '20071023(something)'. 
with this version, the ide work great.

IMHO the best solution is to make the index-pathes configureable
per project.

thanks a lot
ralph
Comment 1 Torbjorn Norbye 2007-11-06 20:55:08 UTC
Thanks for the report. I will be revisiting this, but for now I've added a workaround (in dev - this is post 6.0).

Run with this flag (build #5079 or later):
-J-Druby.include_nonlib_plugins=true

vendor/ IS scanned and preindexed, including plugins, but it generally only adds the lib/ directory in each plugin (and
gem) to reflect what the loadpaths generally do (such that relative paths in require-completion etc. all work correctly).

You typically don't want doc/ or test/ to be indexed so this seemed like the right behavior (and faster than scanning
all the tests).  But for RailsEngine it looks like they're using a different convention).  My first idea was to just see
if "lib" exists, and if not, include the plugin root itself - but that won't work since RailsEngines -does- have a lib/
directory. 

Let me know whether this works for you for now as a workaround since I haven't tested it myself.

IDE:-------------------------------------------------
IDE: [11/6/07 12:50 PM] Committing started
Checking in BootClassPathImplementation.java;
/cvs/ruby/railsprojects/src/org/netbeans/modules/ruby/railsprojects/classpath/BootClassPathImplementation.java,v  <-- 
BootClassPathImplementation.java
new revision: 1.6; previous revision: 1.5
done
IDE: [11/6/07 12:50 PM] Committing finished
Comment 2 rvater 2007-11-06 21:24:04 UTC
Hi tor,
thanks for your fast reply.

sorry, but it doesn't work for me. after take a look at your changes in 'BootClassPathImplementation.java'
i think, i found the fault.


line BootClassPathImplementation.java:435  > if (!lib.exists()) { <

this line prevent NB to scan the whole plugin directory cause the 'lib'
directory exist. maybe it is useful to check an additional directory
like 'app' or something else to escalate to a full directory scan ?

thank 
ralph
Comment 3 Torbjorn Norbye 2007-11-06 21:33:09 UTC
Doh, I left that half finished - the new exists check was my first impulse when I thought I could detect your scenario
when there's no lib/ dir, and I forgot to take it out. Try build #5081.
Comment 4 rvater 2007-11-06 21:53:34 UTC
Hi,

build #5081 works great for me. ;o)

Thanks a lot for your help.

Ralph
Comment 5 jbarclay 2009-03-15 16:39:05 UTC
This is very important to developers who have their development shared server on a network.  There are some projects I
have to do in Eclipse because I can't turn off indexing on NetBeans and don't have the time to wait hours for it to
index.  I can work while its indexing, but netbeans performs quite slow during indexing.

I love most of Netbeans, but in fact I'm giving up on NetBeans until I can specify what is indexed or I have the ability
to turn off indexing altogether.    Also I've read years of related feature requests and the answer is always a
workaround or a rationale for not needing this feature.  A simple we don't have time or this isn't a priority is better
than telling users they don't really want what they are requesting.
Comment 6 Erno Mononen 2009-03-16 09:57:11 UTC
jbarclay: just to be sure, are you talking about Ruby or Java projects?