Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 219691

Summary: XML Validator Preference Settings doesn't respond.
Product: [WebTools] WTP Source Editing Reporter: David Carver <d_a_carver>
Component: wst.xmlAssignee: Gary Karasiuk <karasiuk>
Status: CLOSED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: major    
Priority: P3 CC: valentinbaciu
Version: 3.0Flags: thatnitind: review? (karasiuk)
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
patch from comment 7 none

Description David Carver CLA 2008-02-20 17:33:37 EST
Eclipse SDK
Version: 3.4.0
Build id: I20080207-1530
Web Tools: 3.0M5 20080218

When accessing the Validation settings for XML or XSD from either the Preferences->Validation->XML...Settings

Or the Properties->Validation for a particular project.   The Dialog for configuring the settings for Includes and Excludes does not respond.  It displays, but I can't click on any of the items in the list.  No buttons are active, and it doesn't accept any keyboard response.

However, the background Preference page is active, and can be exitted using the X button on the dialog box.  However, this produces the stack track below.  I'm running BEA JRockit 1.5 as the JVM using the -vm option of eclipse to make sure it uses that JVM.   I have not tried this on Windows yet to see if it happens there as well.

null
Error
Wed Feb 20 17:25:56 GMT-05:00 2008
Unhandled event loop exception

org.eclipse.swt.SWTException: Widget is disposed
at org.eclipse.swt.SWT.error(SWT.java:3716)
at org.eclipse.swt.SWT.error(SWT.java:3634)
at org.eclipse.swt.SWT.error(SWT.java:3605)
at org.eclipse.swt.widgets.Widget.error(Widget.java:443)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:381)
at org.eclipse.swt.widgets.Table.deselectAll(Table.java:929)
at org.eclipse.jface.viewers.TableViewer.doDeselectAll(TableViewer.java:270)
at org.eclipse.jface.viewers.AbstractTableViewer.setSelectionToWidget(AbstractTableViewer.java:892)
at org.eclipse.jface.viewers.StructuredViewer.setSelectionToWidget(StructuredViewer.java:1680)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1372)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1328)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1428)
at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:526)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1387)
at org.eclipse.wst.validation.ui.internal.preferences.ValidationPropertyPage$ValidatorListPage.columnClicked(ValidationPropertyPage.java:606)
at org.eclipse.wst.validation.ui.internal.preferences.ValidationPropertyPage$ValidatorListPage$1.mouseDown(ValidationPropertyPage.java:366)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:178)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1145)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3335)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2982)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:156)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:582)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:499)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:410)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1145)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3335)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2982)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2392)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2356)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2222)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:474)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:469)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:362)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175)
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.equinox.launcher.Main.invokeFramework(Main.java:564)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1251)
at org.eclipse.equinox.launcher.Main.main(Main.java:1227)
Comment 1 David Carver CLA 2008-03-16 19:08:23 EDT
Any updates on this issues, I'm still getting this with the latest I Builds for 3.0.
Comment 2 Gary Karasiuk CLA 2008-03-17 19:51:45 EDT
I've tried this on both Windows and Linux and I can't reproduce this.

I used driver http://build.eclipse.org/webtools/committers/wtp-R3.0-I/20080314073909/I-I20080314073909-20080314073909/

If you have any more details on how to reproduce this, please post them. I'd also be interested to know if you can reproduce this on another JVM.
Comment 3 David Carver CLA 2008-03-18 11:18:18 EDT
Gary, I'll see if I can pull down the latest I-Build and try it again.   If it helps, I'm using JRockit 1.5 on Linux as the JRE.
Comment 4 Gary Karasiuk CLA 2008-03-18 11:31:03 EDT
(In reply to comment #3)
> Gary, I'll see if I can pull down the latest I-Build and try it again.   If it
> helps, I'm using JRockit 1.5 on Linux as the JRE.
> 
For legal/IP reasons, I'm only allowed to download certain, pre-approved JVMs, so I am not able to try this out with JRocket. 

Comment 5 David Carver CLA 2008-03-18 12:21:40 EDT
Okay...I'll download the latest source code and step through the debugger to see if I can try and find out why this isn't working.  If I find a problem I'll post a patch.   I'm going to re-open this as I'm still getting the problem.
Comment 6 David Carver CLA 2008-03-22 18:11:43 EDT
I tried this under a sun java 1.6 jvm, under linux, and it still gets the same issue.   Gary did you try this under linux, or under windows only?

I saw this working correctly on Nitin's window machine while at eclipse con, but he saw it not working on my linux machine while there as well.
Comment 7 Nitin Dahyabhai CLA 2008-03-23 01:54:00 EDT
Actually, the preference page dialog is also clickable on Windows, it's just not blocking mouse interaction with the foreground dialog.  That's caused by the SWT.APPLICATION_MODAL hint set in the Dialog class being cleared by the FilterDialog's constructor.

 	public FilterDialog(Shell shell, Validator validator, IProject project){
 		super(shell);
 		_shell = shell;
-		setShellStyle(SWT.CLOSE|SWT.MIN|SWT.MAX|SWT.RESIZE);
+		setShellStyle(getShellStyle() | SWT.CLOSE|SWT.MIN|SWT.MAX|SWT.RESIZE);
 		_validator = validator.copy();
 		_v2 = _validator.asV2Validator();
 		_project = project;


I can't verify that this will correct the problem on Linux at the moment.

Shouldn't org.eclipse.wst.validation.ui.internal.preferences.ValidationPreferencePage.ValidatorListPage.createPage(Composite) return sc1 instead of _composite?
Comment 8 Gary Karasiuk CLA 2008-03-23 05:34:23 EDT
(In reply to comment #6)
> I tried this under a sun java 1.6 jvm, under linux, and it still gets the same
> issue.   Gary did you try this under linux, or under windows only?
> 
I tried it on Red Hat Linux, using the the IBM Java 5 JVM. I will try it with the SUN, Java 6 JVM as well.


Comment 9 Nitin Dahyabhai CLA 2008-03-24 13:24:59 EDT
Created attachment 93295 [details]
patch from comment 7
Comment 10 David Carver CLA 2008-03-24 14:04:03 EDT
(In reply to comment #9)
> Created an attachment (id=93295) [details]
> patch from comment 7
> 

Verified! That fixed the issue that I was having with the dialog not responding.

Comment 11 Nitin Dahyabhai CLA 2008-03-27 11:53:44 EDT
Bumping severity up to major (I'm tempted to call it blocking).
Comment 12 David Carver CLA 2008-03-27 12:04:12 EDT
I would say it's blocking as I can't use it at all with out the patch applied.
Comment 13 Gary Karasiuk CLA 2008-03-27 12:10:46 EDT
The patch has been applied to HEAD.

Thanks for the patch Nitin!
Comment 14 Gary Karasiuk CLA 2008-03-31 14:25:47 EDT
released
Comment 15 Gary Karasiuk CLA 2008-04-16 06:12:38 EDT
closing