Bug 140486 - Error in property sheet when add 2 of the same attribute
Summary: Error in property sheet when add 2 of the same attribute
Status: VERIFIED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.0 M7   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
: 156240 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-05-06 18:08 EDT by Amy Wu CLA
Modified: 2008-04-30 18:03 EDT (History)
3 users (show)

See Also:


Attachments
a patch to this bug (independent to bug 150594) (1.76 KB, patch)
2006-07-19 22:12 EDT, Wang Xianzhu CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Amy Wu CLA 2006-05-06 18:08:09 EDT
Error in property sheet when add 2 of the same attribute

1. create a new xml with the following:
<?xml version="1.0" encoding="UTF-8"?>
<tags>
	<first one="two"/>
</tags>
2. After the one attribute, start typing:
one="two" (so basically type the same attribute again)
3. get a "Refresh Property Sheet" dialog.  Message is "Error"

The following is in the log:

!ENTRY org.eclipse.ui 4 4 2006-05-04 17:39:20.021
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 2006-05-04 17:39:20.021
!MESSAGE Failed to execute runnable (java.lang.ArrayIndexOutOfBoundsException: 1)
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.ArrayIndexOutOfBoundsException: 1)
	at org.eclipse.swt.SWT.error(SWT.java:3374)
	at org.eclipse.swt.SWT.error(SWT.java:3297)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:126)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3325)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
	at org.eclipse.ui.views.properties.PropertySheetViewer.updateChildrenOf(PropertySheetViewer.java:1273)
	at org.eclipse.ui.views.properties.PropertySheetViewer.updateChildrenOf(PropertySheetViewer.java:1276)
	at org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetViewer.java:945)
	at org.eclipse.ui.views.properties.PropertySheetPage.refresh(PropertySheetPage.java:454)
	at org.eclipse.wst.xml.ui.views.properties.XMLPropertySheetConfiguration$PropertiesRefreshJob.runInUIThread(XMLPropertySheetConfiguration.java:101)
	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:94)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
	... 20 more
Comment 1 Wang Xianzhu CLA 2006-07-19 21:50:33 EDT
I think this bug should belong to wst.xml.  I believe the new patch for bug 150594 can also fix this bug.  I will submit a seperate patch only for this bug.
Comment 2 Wang Xianzhu CLA 2006-07-19 22:12:27 EDT
Created attachment 46557 [details]
a patch to this bug (independent to bug 150594)

I modified org.eclipse.wst.xml.ui.internal.properties.createPropertyDescriptors.  There is the same problem in method updatePropertyDescriptors, but I've never seen it be called in my test environment, so I leave it unchanged.
Comment 3 Nitin Dahyabhai CLA 2006-09-06 06:13:10 EDT
*** Bug 156240 has been marked as a duplicate of this bug. ***
Comment 4 Nitin Dahyabhai CLA 2008-04-24 02:13:27 EDT
Applied, thanks!
Comment 5 Amy Wu CLA 2008-04-30 18:03:52 EDT
verified in wtp3.0M7 20080424170254 sdk