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 177693 - Code completion in .erb does not work properly
Summary: Code completion in .erb does not work properly
Status: VERIFIED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 6.x
Hardware: PC Mac OS X
: P1 normal (vote)
Assignee: Erno Mononen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-26 10:24 UTC by Tomas Danek
Modified: 2009-12-03 07:15 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Danek 2009-11-26 10:24:17 UTC
Product Version: NetBeans IDE 6.8 RC1 (Build 200911252200)
Java: 1.6.0_15; Java HotSpot(TM) 64-Bit Server VM 14.1-b02-90
System: Mac OS X version 10.6.2 running on x86_64; MacRoman; en_US (nb)
Userdir: /Users/tomas/.netbeans/6.8rc1
----

- create RoR on jruby 1.4.0
- generate controller + view
- try to complete Time.now.sec in controller (works)
- try to complete <%=Time.now.sec%> in view directly, or in some html code (does not work)

afaik this worked recently:(
Comment 1 Erno Mononen 2009-11-27 02:55:05 UTC
Looking at this now.
Comment 2 Erno Mononen 2009-11-27 03:47:05 UTC
Caused by http://hg.netbeans.org/ruby-main?cmd=changeset;node=fb91cd7ecec5. This doesn't work in 6.7 either, but for different reasons (in 6.7 code completion for chained methods doesn't work too well). So this indeed worked in 6.8 before the aforementioned change. I'll provide a fix for this soon. I think it would be good to fix this in 6.8 too, do you agree?
Comment 3 Tomas Danek 2009-11-27 03:59:45 UTC
Yes, would be good to have this fix also in 6.8 (depending on how risky the fix will be). I'll verify in trunk (or in ruby-main to speed up the process).
Comment 4 Erno Mononen 2009-11-27 07:08:01 UTC
Fixed in f4cc3562cc9d (backed out fb91cd7ecec5) and ef7a62640bc5. In addition to backing out fb91cd7ecec5 there was a problem wrt to return types of static methods - all static methods were considered to return only classes when in fact they almost always return instances (e.g. Time.now or all the other class methods in Time).

There are still some issues with CC accuracy when AST is broken, in particular when there is no prefix, e.g. 

Some.thing.^ <= here even if we know the return type of Some#thing, the IDE doesn't always display the correct CC list for the type, but just the methods from Module/Kernel etc (i.e. the default CC list). This isn't a new issue in any way though, and best to be handled as a separate issue.

So I'm raising this to a P1 to fix this in 6.8 after verification.
Comment 5 Quality Engineering 2009-11-28 03:22:22 UTC
Integrated into 'main-golden', will be available in build *200911280200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/f4cc3562cc9d
User: Erno Mononen <emononen@netbeans.org>
Log: #177693 - Code completion in .erb does not work properly
- Backed out changeset fb91cd7ecec5
Comment 6 Tomas Danek 2009-11-30 06:41:39 UTC
thanks for fix, verified in

Product Version: NetBeans IDE Dev (Build 200911300200)
Java: 1.6.0_15; Java HotSpot(TM) 64-Bit Server VM 14.1-b02-90
System: Mac OS X version 10.6.2 running on x86_64; MacRoman; en_US (nb)
Userdir: /Users/tomas/.netbeans/dev
Comment 7 Erno Mononen 2009-12-01 05:52:53 UTC
Ported the changesets to release68 in ce6b1b4ca33b (transplanting failed, so had to merge them manually).
Comment 8 Tomas Danek 2009-12-03 07:15:36 UTC
verified in

Product Version: NetBeans IDE 6.8 RC2 (Build 200912022200)
Java: 1.6.0_15; Java HotSpot(TM) 64-Bit Server VM 14.1-b02-90
System: Mac OS X version 10.6.2 running on x86_64; MacRoman; en_US (nb)
Userdir: /Users/tomas/.netbeans/6.8rc2