google-code-export / google-plugin-for-eclipse

Automatically exported from code.google.com/p/google-plugin-for-eclipse
Eclipse Public License 1.0
2 stars 0 forks source link

Unable to add Eclipse file associations for *.ui.xml #204

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I am unable to add Eclipse file associations for *.ui.xml.

Found in GWT Release (e.g. 1.5.3, 1.6 RC):

Google Plugin for Eclipse 3.6   2.2.0.v201102111811

Encountered on OS / Browser (e.g. WinXP, IE6-7, FF3):

eclipse.buildId=M20100909-0800
java.version=1.6.0_22
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product 
org.eclipse.epp.package.jee.product

Detailed description (please be as specific as possible):

I was trying to make a global switch in my Eclipse to switch from using the 
"WindowBuilder Editor" (the new default for *.ui.xml) back to "UiBinder 
Template Editor" due to issue 6011. I can do that for an individual *.ui.xml by 
right-clicking and choosing "Open With" > "UiBinder Template Editor".

I opened Window > Preferences > Editors > File Associations, didn't see  
*.ui.xml in the list of File Types, clicked "Add...", typed in "*.ui.xml", but 
when I click "OK", nothing is added to the list.

The Eclipse log reports the following error:

eclipse.buildId=M20100909-0800
java.version=1.6.0_22
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product 
org.eclipse.epp.package.jee.product

Error
Thu Feb 17 10:58:11 EST 2011
Unhandled event loop exception

org.eclipse.core.runtime.AssertionFailedException: assertion failed: 
    at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)
    at org.eclipse.core.runtime.Assert.isTrue(Assert.java:96)
    at org.eclipse.ui.internal.dialogs.FileEditorsPreferencePage.addResourceType(FileEditorsPreferencePage.java:112)
    at org.eclipse.ui.internal.dialogs.FileEditorsPreferencePage.promptForResourceType(FileEditorsPreferencePage.java:558)
    at org.eclipse.ui.internal.dialogs.FileEditorsPreferencePage.handleEvent(FileEditorsPreferencePage.java:439)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.open(WorkbenchPreferenceDialog.java:211)
    at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:65)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    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:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1383)

Shortest code snippet which demonstrates issue (please indicate where
actual result differs from expected result):

N/A

Workaround if you have one:

Click each .ui.xml file and manually open with the uibinder template editor. 
Eclipse remembers my last editor and reopens the correct one, but I have lots 
of .ui.xml files and would prefer to make the change once.

Links to relevant GWT Developer Forum posts:

N/A

Original issue reported on code.google.com by derekad...@gmail.com on 17 Feb 2011 at 4:15

GoogleCodeExporter commented 9 years ago
i fund a Solution for this,in File Associations,find *.xml,remove it and 
then click the ok button,now you can open *.ui.xml with WindowBuilder Editor 
and other with XML Editor。

Original comment by chly5281...@gmail.com on 20 May 2013 at 2:00

GoogleCodeExporter commented 9 years ago
Moving to the Google Plugin for Eclipse issue tracker; I'll let you guys close 
it if it's indeed an Eclipse issue more than a GPE one.

Original comment by t.broyer on 20 May 2013 at 11:17