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 181696 - "elsif" code template does not work
Summary: "elsif" code template does not work
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Editing (show other bugs)
Version: 6.x
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Erno Mononen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-09 08:34 UTC by Petr Chytil
Modified: 2010-04-07 04:42 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 Petr Chytil 2010-03-09 08:34:44 UTC
Product Version: NetBeans IDE Dev (Build 201003081350)
Java: 1.6.0_17; Java HotSpot(TM) 64-Bit Server VM 14.3-b01-101
System: Mac OS X version 10.5.8 running on x86_64; MacRoman; en_US (nb)
Userdir: /Users/petr/.netbeans/dev

Steps to reproduce:
1) open some ruby file
2) write "elsif" and hit the TAB key

This code should appear at the cursor position:
=======================8<=======================
elsif ${1 default="condition"}
	${cursor}
=======================8<=======================

But instead of that, this is what I am getting:
=======================8<=======================
elsif
=======================8<=======================
Comment 1 Petr Chytil 2010-03-09 09:00:20 UTC
The same thing happens with these code templates: "end", "when"
Comment 2 Erno Mononen 2010-03-10 06:46:26 UTC
Reproduced, not sure where the problem is - possibly in the templates infrastructure as I haven't touched this area in 6.9. I'll investigate.
Comment 3 Erno Mononen 2010-04-06 12:44:23 UTC
Looks like any templates whose name match a keyword don't work, once you type a keyword it gets indented immediately and hence the conditions for expanding templates when hitting TAB are not fulfilled. Should be somehow addressed in the infrastructure, but probably just easiest to rename those templates.
Comment 4 Erno Mononen 2010-04-06 13:00:55 UTC
Changed the template names in 0278a5b49916. Some templates matching keywords actually work since they don't usually cause indentation changes (such as 'begin'), so I left them as they are.
Comment 5 Quality Engineering 2010-04-07 04:42:53 UTC
Integrated into 'main-golden', will be available in build *201004070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/0278a5b49916
User: Erno Mononen <emononen@netbeans.org>
Log: #181696: "elsif" code template does not work