Community
Participate
Working Groups
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
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.
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.
*** Bug 156240 has been marked as a duplicate of this bug. ***
Applied, thanks!
verified in wtp3.0M7 20080424170254 sdk