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 66875 - Text comes out backward in Class Name Prefix field, within Window Component wizard
Summary: Text comes out backward in Class Name Prefix field, within Window Component w...
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Templates (show other bugs)
Version: 5.x
Hardware: Macintosh Mac OS X
: P2 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-15 05:38 UTC by moazam
Modified: 2006-02-14 17:50 UTC (History)
1 user (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 moazam 2005-10-15 05:38:32 UTC
Using the wizard, when I try to create a new Window Component, I cannot get past the "Name, Icon, and 
Location" part. Clicking 'Finish' does nothing either. When trying to enter text into the "Class Name 
Prefix", the text gets clobbered, comes out somewhat backwards and stops the IDE from working.

Here is the problem I'm seeing,

1.) Create a new Project, New->Project->Netbeans Plug-in Modules->Module Project
2.) Create a new File, Second mouseclick on root project->New->Window Component
3.) Click Next
4.) In the Class Name Prefix field, try to type something. It'll come out backwards.
5.) Press Finish, nothing happens. (there is a red ball with a minus sign in it that flashes in right bottom 
right corner...but no progress)

I've looked for a pre-existing bug, but cannot find one.

I'm using OS X 10.4.2 with NetBeans 5 Beta Build 200509261930, Java 1.5.0_02-36.
I also tried with NetBeans IDE 5.0 qbuild build 200510131600, Java 1.5.0_02-36 and Java 
1.4.2_09-232. I've tried this with two different OS X machines, both running Tiger.

$ uname -a
Darwin ae86.local 8.2.0 Darwin Kernel Version 8.2.0: Fri Jun 24 17:46:54 PDT 2005; 
root:xnu-792.2.4.obj~3/RELEASE_PPC Power Macintosh powerpc       

This problem does *not* seem to occur on Windows XP or Solaris.

The exact stacktrace which I get as soon as I try to type something into the "Class Name Prefix" field is 
included below.

*********** Exception occurred ************ at 11:48 PM on Oct 10, 2005
java.lang.IllegalStateException: No match found
    at java.util.regex.Matcher.group(Matcher.java:461)
    at org.netbeans.modules.apisupport.project.layers.LayerUtils.findGeneratedName(LayerUtils.java:
204)
    at org.netbeans.modules.apisupport.project.CreatedModifiedFilesFactory$CreateLayerEntry.<init>
(CreatedModifiedFilesFactory.java:468)
    at org.netbeans.modules.apisupport.project.CreatedModifiedFilesFactory.createLayerEntry
(CreatedModifiedFilesFactory.java:96)
    at org.netbeans.modules.apisupport.project.CreatedModifiedFiles.createLayerEntry
(CreatedModifiedFiles.java:315)
    at org.netbeans.modules.apisupport.project.ui.wizard.winsys.NewTCIterator.generateFileChanges
(NewTCIterator.java:244)
    at org.netbeans.modules.apisupport.project.ui.wizard.winsys.NameAndLocationPanel.updateData
(NameAndLocationPanel.java:70)
    at org.netbeans.modules.apisupport.project.ui.wizard.winsys.NameAndLocationPanel.access$100
(NameAndLocationPanel.java:35)
    at org.netbeans.modules.apisupport.project.ui.wizard.winsys.NameAndLocationPanel$1.insertUpdate
(NameAndLocationPanel.java:49)
    at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:184)
    at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:754)
    at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:711)
    at javax.swing.text.PlainDocument.insertString(PlainDocument.java:114)
    at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:673)
    at javax.swing.text.JTextComponent.replaceSelection(JTextComponent.java:1099)
    at javax.swing.text.DefaultEditorKit$DefaultKeyTypedAction.actionPerformed(DefaultEditorKit.java:
844)
    at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1576)
    at javax.swing.JComponent.processKeyBinding(JComponent.java:2763)
    at javax.swing.JComponent.processKeyBindings(JComponent.java:2798)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2726)
    at java.awt.Component.processEvent(Component.java:5331)
    at java.awt.Container.processEvent(Container.java:2010)
    at java.awt.Component.dispatchEventImpl(Component.java:4021)
    at java.awt.Container.dispatchEventImpl(Container.java:2068)
    at java.awt.Component.dispatchEvent(Component.java:3869)
    at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:
672)
    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:
920)
    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:
798)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:636)
    at java.awt.Component.dispatchEventImpl(Component.java:3907)
    at java.awt.Container.dispatchEventImpl(Container.java:2068)
    at java.awt.Window.dispatchEventImpl(Window.java:1774)
    at java.awt.Component.dispatchEvent(Component.java:3869)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
[catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:275)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:186)
    at java.awt.Dialog$1.run(Dialog.java:515)
    at java.awt.Dialog.show(Dialog.java:536)
    at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:800)
    at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:843)
    at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:831)
    at org.openide.util.Mutex.doEventAccess(Mutex.java:1146)
    at org.openide.util.Mutex.readAccess(Mutex.java:183)
    at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:816)
    at org.openide.loaders.TemplateWizard.instantiateImpl(TemplateWizard.java:481)
    at org.openide.loaders.TemplateWizard.instantiate(TemplateWizard.java:366)
    at org.netbeans.modules.project.ui.actions.NewFile.doPerform(NewFile.java:117)
    at org.netbeans.modules.project.ui.actions.NewFile.access$200(NewFile.java:52)
    at org.netbeans.modules.project.ui.actions.NewFile$PopupListener.actionPerformed(NewFile.java:
311)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:334)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
    at java.awt.Component.processMouseEvent(Component.java:5554)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
    at java.awt.Component.processEvent(Component.java:5319)
    at java.awt.Container.processEvent(Container.java:2010)
    at java.awt.Component.dispatchEventImpl(Component.java:4021)
    at java.awt.Container.dispatchEventImpl(Container.java:2068)
    at java.awt.Component.dispatchEvent(Component.java:3869)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3936)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
    at java.awt.Container.dispatchEventImpl(Container.java:2054)
    at java.awt.Window.dispatchEventImpl(Window.java:1774)
    at java.awt.Component.dispatchEvent(Component.java:3869)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:275)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:190)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:182)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Roman Strobl 2005-10-17 13:52:05 UTC
Reassigning to apisupport, please evaluate.
Comment 2 Milos Kleint 2005-10-17 14:31:26 UTC
now this is very interesting because I've developed the wizard on macosx as
well. What locale are you using? is it just this one field that shows this
behaviour?
Comment 3 moazam 2005-10-18 10:38:11 UTC
This is the only field that shows this behavior. 

Here is more of my system and locale info: (I've tried with NB5 beta also, same results)

System Info: 
  Product Version       = NetBeans IDE Dev (Build 200510131600)
  Operating System      = Mac OS X version 10.4.2 running on ppc
  Java; VM; Vendor      = 1.4.2_09; Java HotSpot(TM) Client VM 1.4.2-54; Apple Computer, Inc.
  Java Home             = /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home
  System Locale; Encod. = en_US (nb); MacRoman
  Home Dir; Current Dir = /Users/moazam; /
  IDE Install; User Dir = /Developer/NetBeans5.app/Contents/Resources/NetBeans/platform6; /Users/
moazam/.netbeans/dev
Comment 4 Milos Kleint 2005-10-18 10:57:51 UTC
I stil cannot reproduce. tried both on 1.4.2 and 1.5

here's my settings.
  Product Version       = NetBeans IDE Dev (Build 051018)
  Operating System      = Mac OS X version 10.4.2 running on ppc
  Java; VM; Vendor      = 1.5.0_05; Java HotSpot(TM) Client VM 1.5.0_05-43;
Apple Computer, Inc.
  Java Home             =
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
  System Locale; Encod. = en_US (nb); MacRoman


However I've changed the validation code so that it should never reach the
problematic section if the lass name prefix text is not valid value. hopefully
this fixes the problem.

so it could be fixed now (*fingers crossed*)
Comment 5 pzajac 2005-10-18 16:17:40 UTC
please add commit log next time 
Thanks
Comment 6 Jesse Glick 2005-10-18 19:08:40 UTC
I added an assertion to try to get a better error message than the previous ISE.

committed     Up-To-Date  1.18       
apisupport/project/src/org/netbeans/modules/apisupport/project/layers/LayerUtils.java
Comment 7 moazam 2005-10-21 04:15:05 UTC
I just tested the Daily build from Oct 19, 2005 and the bug has indeed been fixed. Thanks a ton!

Fixed in build 200510191822
Comment 8 Jesse Glick 2005-10-24 17:55:55 UTC
Consider that verification.