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 152931 - Unable to insert constructor into PHP class.
Summary: Unable to insert constructor into PHP class.
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Petr Pisl
URL:
Keywords:
: 153404 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-11 11:01 UTC by Michael Nazarov
Modified: 2009-10-22 01:28 UTC (History)
2 users (show)

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 Michael Nazarov 2008-11-11 11:01:35 UTC
Product Version: NetBeans IDE Dev (Build 200811110201)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b12
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)

Steps to reproduce:

1. Create PHP application.
2. Enter empty class like
class a
{

}
3. Place caret into class and press Alt+Insert.
4. Select "Insert Constructor"

You'll see:

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.RangeCheck(ArrayList.java:547)
	at java.util.ArrayList.get(ArrayList.java:322)
	at org.netbeans.modules.php.editor.codegen.ui.ConstructorPanel.initPanel(ConstructorPanel.java:85)
	at org.netbeans.modules.php.editor.codegen.ui.ConstructorPanel.<init>(ConstructorPanel.java:78)
	at org.netbeans.modules.php.editor.codegen.CGSGenerator.invoke(CGSGenerator.java:120)
	at org.netbeans.modules.editor.codegen.GenerateCodePanel.invokeSelected(GenerateCodePanel.java:148)
	at org.netbeans.modules.editor.codegen.GenerateCodePanel.listMouseReleased(GenerateCodePanel.java:117)
	at org.netbeans.modules.editor.codegen.GenerateCodePanel.access$100(GenerateCodePanel.java:60)
	at org.netbeans.modules.editor.codegen.GenerateCodePanel$2.mouseReleased(GenerateCodePanel.java:103)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
	at java.awt.Component.processMouseEvent(Component.java:6134)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
	at java.awt.Component.processEvent(Component.java:5899)
	at java.awt.Container.processEvent(Container.java:2023)
	at java.awt.Component.dispatchEventImpl(Component.java:4501)
	at java.awt.Container.dispatchEventImpl(Container.java:2081)
	at java.awt.Component.dispatchEvent(Component.java:4331)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4299)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3963)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3893)
	at java.awt.Container.dispatchEventImpl(Container.java:2067)
	at java.awt.Window.dispatchEventImpl(Window.java:2458)
	at java.awt.Component.dispatchEvent(Component.java:4331)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:284)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Comment 1 Mikhail Matveev 2008-11-11 13:39:40 UTC
Reproducible for me.
Doesn't exist in FCS.
Comment 2 Petr Pisl 2008-11-11 13:42:32 UTC
Are you able to reproduce it in 6.5 or only in trunk?
Comment 3 Petr Pisl 2008-11-11 13:53:16 UTC
Introduced by my yesterdays commit. Fixed in the trunk.
Comment 4 Quality Engineering 2008-11-12 04:58:55 UTC
Integrated into 'main-golden', will be available in build *200811120201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/3585e5fd6639
User: Petr Pisl <ppisl@netbeans.org>
Log: #152931 - Unable to insert constructor into PHP class.
Comment 5 Mikhail Matveev 2008-11-18 19:46:11 UTC
*** Issue 153404 has been marked as a duplicate of this issue. ***
Comment 6 Michael Nazarov 2008-11-20 12:13:50 UTC
Product Version: NetBeans IDE Dev (Build 200811200201)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b12
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)

Found it again.
Comment 7 Petr Pisl 2008-11-21 10:36:37 UTC
It should be fixed now.
Comment 8 Mikhail Matveev 2008-11-21 19:12:08 UTC
Verified
Comment 9 Quality Engineering 2008-11-22 04:45:40 UTC
Integrated into 'main-golden', will be available in build *200811220201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/3a5cbc6cab60
User: Petr Pisl <ppisl@netbeans.org>
Log: #152931 - Unable to insert constructor into PHP class.

The second atempt