Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » EEF - Having trouble with ReferencesTable, Add and delete buttons.
EEF - Having trouble with ReferencesTable, Add and delete buttons. [message #656033] |
Wed, 23 February 2011 20:07 |
Nathalie Messages: 22 Registered: July 2009 |
Junior Member |
|
|
Hello,
I am using EEF version 0.9.0RC2 with Eclipse 3.7 M4, and I have a lot of problems with the generated code.
The first on is when I customize the components model to add references tables on Element editor and their corresponding Properties Editor component. I am not adding a Custom Element Editor but a "normal" one.
When my code gets generated I got this in the initPart() of the XXXEditionComponent classes: // FIXME NO VALID CASE INTO template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) in widgetControl.mtl module, with the values : measureElements, MeasureLibrary, MeasureLibrary, instead of a filter initialization.
I don't know if this bad but it is not there with a non customized version. I took a look at the widgetControl.mtl template and it seems that the filters are not generated for referenced views, so what I got is kind of normal. It is?
The second thing is that I don't see the Up and Down buttons on my pages.
The third thing which is the most annoying is when I click on the Add button. I got three errors all similar to the one below (sorry it is long, so I removed some parts that I think are not relevant).
What is really giving me headaches is that the model disappears from the EMF editor once these errors occur. So i have to close the editor and open the model again.
After debugging I found that the error occurred when the resource set of the resource is retrieved. The first time it is found, but the second time it is null, don't understand why.
Any help is welcome.
Thanks.
java.lang.NullPointerException
at org.eclipse.emf.eef.runtime.ui.widgets.settings.AdvancedEEFE ditorContentProvider.getElements(AdvancedEEFEditorContentPro vider.java:65)
at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(St ructuredViewer.java:989)
[...]
org.eclipse.ui.dialogs.FilteredTree$NotifyingTreeViewer.inpu tChanged(FilteredTree.java:1187)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentView er.java:280)
at org.eclipse.jface.viewers.StructuredViewer.setInput(Structur edViewer.java:1669)
at org.eclipse.emf.eef.runtime.ui.widgets.TabElementTreeSelecti onDialog.fillModelpage(TabElementTreeSelectionDialog.java:27 6)
at org.eclipse.emf.eef.runtime.ui.widgets.TabElementTreeSelecti onDialog.createDialogArea(TabElementTreeSelectionDialog.java :175)
at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java: 760)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
at org.eclipse.jface.window.Window.open(Window.java:790)
at com.castortech.smm.parts.impl.MeasureLibraryPropertiesEditio nPartImpl.addMeasureElements(MeasureLibraryPropertiesEdition PartImpl.java:389)
at com.castortech.smm.parts.impl.MeasureLibraryPropertiesEditio nPartImpl$9.handleAdd(MeasureLibraryPropertiesEditionPartImp l.java:347)
at org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable$AddBu ttonlistener.mouseUp(ReferencesTable.java:564)
[...]
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825 )
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.emf.eef.runtime.policies.impl.StandardEditingPol icy.execute(StandardEditingPolicy.java:47)
at com.castortech.smm.parts.forms.SmmModelPropertiesEditionPart Form.editMeasureLibrary(SmmModelPropertiesEditionPartForm.ja va:349)
at com.castortech.smm.parts.forms.SmmModelPropertiesEditionPart Form$8.handleEdit(SmmModelPropertiesEditionPartForm.java:280 )
at org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable$EditI temListener.handleEvent(ReferencesTable.java:701)
[....]
[Updated on: Wed, 23 February 2011 20:19] Report message to a moderator
|
|
|
Re: EEF - Having trouble with ReferencesTable, Add and delete buttons. [message #658176 is a reply to message #656033] |
Mon, 07 March 2011 09:55 |
Goulwen Le Fur Messages: 125 Registered: July 2009 |
Senior Member |
|
|
Hi Nathalie,
Sorry for the delay, we were a little busy these days with the EEF 0.9
release.
Le 23/02/2011 21:07, Nathalie a écrit :
> Hello,
>
> I am using EEF version 0.9.0RC2 with Eclipse 3.7 M4, and I have a lot of
> problems with the generated code.
> The first on is when I customize the components model to add references
> tables on Element editor and their corresponding Properties Editor
> component. I am not adding a Custom Element Editor but a "normal" one.
> When my code gets generated I got this in the initPart() of the
> XXXEditionComponent classes: // FIXME NO VALID CASE INTO template public
> filterUpdater(editionElement : PropertiesEditionElement, view : View,
> pec : PropertiesEditionComponent) in widgetControl.mtl module, with the
> values : measureElements, MeasureLibrary, MeasureLibrary, instead of a
> filter initialization.
> I don't know if this bad but it is not there with a non customized
> version. I took a look at the widgetControl.mtl template and it seems
> that the filters are not generated for referenced views, so what I got
> is kind of normal. It is?
>
These error messages are generated when you do an error in the EEF
models. You're trying to use a widget in a case it can't manage e.g. a
ReferencesTable with non-containing reference, ...
Can you give me the type of the "mesureElements" structural feature
(Attribute/Reference, single/multi, containment or not) and the widget
you want to use with ?
> The second thing is that I don't see the Up and Down buttons on my pages.
>
HuM, Which pages are you talking about ? :)
> The third thing which is the most annoying is when I click on the Add
> button. I got three errors all similar to the one below (sorry it is
> long, so I removed some parts that I think are not relevant).
> What is really giving me headaches is that the model disappears from the
> EMF editor once these errors occur. So i have to close the editor and
> open the model again.
> After debugging I found that the error occurred when the resource set of
> the resource is retrieved. The first time it is found, but the second
> time it is null, don't understand why.
>
So, if I understand, at line :
EList<Resource> resources =
((EEFEditorSettings)object).getSource().eResource().getResou rceSet().getResources();
eResource().getResourceSet() is null the second time ?
Can you give me the two stacks :
- When the resourceSet is returned
- When the resourceSet is null
Regards,
--
Goulwen Le Fur - goulwen.lefur@obeo.fr
> Any help is welcome.
>
> Thanks.
>
>
> java.lang.NullPointerException
> at org.eclipse.emf.eef.runtime.ui.widgets.settings.AdvancedEEFE
> ditorContentProvider.getElements(AdvancedEEFEditorContentPro vider.java:65)
> at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(St
> ructuredViewer.java:989)
> [...]
> org.eclipse.ui.dialogs.FilteredTree$NotifyingTreeViewer.inpu
> tChanged(FilteredTree.java:1187)
> at org.eclipse.jface.viewers.ContentViewer.setInput(ContentView
> er.java:280)
> at org.eclipse.jface.viewers.StructuredViewer.setInput(Structur
> edViewer.java:1669)
> at org.eclipse.emf.eef.runtime.ui.widgets.TabElementTreeSelecti
> onDialog.fillModelpage(TabElementTreeSelectionDialog.java:27 6)
> at org.eclipse.emf.eef.runtime.ui.widgets.TabElementTreeSelecti
> onDialog.createDialogArea(TabElementTreeSelectionDialog.java :175)
> at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java: 760)
> at org.eclipse.jface.window.Window.create(Window.java:431)
> at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
> at org.eclipse.jface.window.Window.open(Window.java:790)
> at com.castortech.smm.parts.impl.MeasureLibraryPropertiesEditio
> nPartImpl.addMeasureElements(MeasureLibraryPropertiesEdition
> PartImpl.java:389)
> at com.castortech.smm.parts.impl.MeasureLibraryPropertiesEditio
> nPartImpl$9.handleAdd(MeasureLibraryPropertiesEditionPartImp l.java:347)
> at org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable$AddBu
> ttonlistener.mouseUp(ReferencesTable.java:564)
> [...]
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:825 )
> at org.eclipse.jface.window.Window.open(Window.java:801)
> at org.eclipse.emf.eef.runtime.policies.impl.StandardEditingPol
> icy.execute(StandardEditingPolicy.java:47)
> at com.castortech.smm.parts.forms.SmmModelPropertiesEditionPart
> Form.editMeasureLibrary(SmmModelPropertiesEditionPartForm.ja va:349)
> at com.castortech.smm.parts.forms.SmmModelPropertiesEditionPart
> Form$8.handleEdit(SmmModelPropertiesEditionPartForm.java:280 )
> at org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable$EditI
> temListener.handleEvent(ReferencesTable.java:701)
> [....]
|
|
| |
Goto Forum:
Current Time: Thu Sep 26 14:37:46 GMT 2024
Powered by FUDForum. Page generated in 0.02540 seconds
|