Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Re: Setting cellEditor to a property not working
Re: Setting cellEditor to a property not working [message #140062] Wed, 29 August 2007 11:20
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Shobana,

I'm not familiar with how VE works, so I've added the VE newsgroup to
the "to" list of the reply since it's generally a good idea to ask VE
questions on that specific newsgroup. The only stab in the dark I would
suggest is to try ecore:EAttribute instead of ecore:EReference.


Shobana wrote:
> Hi All,
> I am trying to set a cellEditor to a color property 'backgroundColor'
> in one of my custom widget, which extends from the Swing component
> JLabel.
> I have declared the property field and it corresponding getter, setter
> methods in my custom class and corresponding descriptors in the bean
> info class of the custom widget. But still when I try to assign a cell
> editor through an override file, I am getting the following exception
>
>> org.eclipse.swt.SWTException: Failed to execute runnable
> (java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EClassImpl)
> 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(Synchr onizer.java:126)
>
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3325)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
>
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.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(EclipseS tarter.java:400)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.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.ClassCastException:
> org.eclipse.emf.ecore.impl.EClassImpl
> at
> org.eclipse.ve.internal.java.core.BeanProxyAdapter.getBeanPr opertyValue(BeanProxyAdapter.java:1462)
>
> at
> org.eclipse.ve.internal.java.core.BeanPropertySourceAdapter. getPropertyValue(BeanPropertySourceAdapter.java:100)
>
> at
> org.eclipse.ve.internal.java.rules.RuledWrapperedPropertyDes criptor.getValue(RuledWrapperedPropertyDescriptor.java:143)
>
> at
> org.eclipse.ve.internal.propertysheet.command.CommandStackPr opertySheetEntry.primGetValues(CommandStackPropertySheetEntr y.java:169)
>
> at
> org.eclipse.ve.internal.propertysheet.AbstractPropertySheetE ntry.refreshValues(AbstractPropertySheetEntry.java:893)
>
> at
> org.eclipse.ve.internal.propertysheet.AbstractPropertySheetE ntry.refreshChildEntries(AbstractPropertySheetEntry.java:824 )
>
> at
> org.eclipse.ve.internal.propertysheet.AbstractPropertySheetE ntry.setValues(AbstractPropertySheetEntry.java:1029)
>
> at
> org.eclipse.ui.views.properties.PropertySheetViewer.setInput (PropertySheetViewer.java:943)
>
> at
> org.eclipse.ui.views.properties.PropertySheetPage.selectionC hanged(PropertySheetPage.java:473)
>
> at
> org.eclipse.ve.internal.propertysheet.EToolsPropertySheetPag e.superSelectionChanged(EToolsPropertySheetPage.java:250)
>
> at
> org.eclipse.ve.internal.propertysheet.EToolsPropertySheetPag e.access$2(EToolsPropertySheetPage.java:243)
>
> at
> org.eclipse.ve.internal.propertysheet.EToolsPropertySheetPag e$1.run(EToolsPropertySheetPage.java:236)
>
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>
> ... 20 more
>
> The declaration in the override file is as follows.
>
> <event:Add featureName="eStructuralFeatures">
> <addedEObjects xsi:type="ecore:EReference" name="backgroundColor"
> unsettable="true" > <eAnnotations
> xsi:type=" org.eclipse.ve.internal.cde.decorators:BasePropertyDecorator "
>
> cellEditorClassname="MyPlugin/com.editor.CustomCellEditor"/ >
> </addedEObjects> </event:Add>
> I am using Eclipse 3.2 and V.E 1.2.
> I am not understanding where i am going wrong and Why V.E is throwing
> a warning even after the corresponding property and the bean setter
> and getter methods exists. When I remove the override file, the custom
> widget works fine and the default color editor is attached to it by
> V.E. Please help me resolve this issue.
>
> Any help in this regard is greatly appreciated.
>
> Thank You and Best Regards,
> Shobana
>
Previous Topic:VE for XSWT
Next Topic:Re: Setting cellEditor to a property not working
Goto Forum:
  


Current Time: Tue Mar 19 08:23:54 GMT 2024

Powered by FUDForum. Page generated in 0.01947 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top