Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 Go to next message
Nathalie  is currently offline 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 Go to previous messageGo to next message
Goulwen Le Fur is currently offline 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)
> [....]
Re: EEF - Having trouble with ReferencesTable, Add and delete buttons. [message #666240 is a reply to message #658176] Tue, 19 April 2011 14:33 Go to previous message
Nathalie  is currently offline Nathalie
Messages: 22
Registered: July 2009
Junior Member
Hi,
sorry i am late to reply, but I almost forgot this post.

Well I finally move away from those issues since I wrote this post. In fact, my .components model was not valid and this is the reason why there were all those generation errors and the editor display was incorrect. There were also issues in the ecore I was using.

Thanks Goulwen for your answer.
Previous Topic:[EEF] Elements don't show in AdvancedReferencesTable
Next Topic:[EEF] how to restrict available options for non containment references?
Goto Forum:
  


Current Time: Sat Oct 25 21:24:22 GMT 2014

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

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