Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EEF] Documentation?
[EEF] Documentation? [message #507823] Thu, 14 January 2010 14:38 Go to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Hi,
I tried to use EEF, but I only found a page in
http://wiki.eclipse.org/EEF_tutorial_:_First_generation
This page is very terse and, in particular, I could not divine what has
to be done, exactly about:

For the generation, EEF creates two generic providers which have to be
configured with extension points in the project where the code is
generated. The extension point declares a "PropertiesEditionProviders"
and a "PropertieEditionPolicyProviders".

Also I had some problems with:

selectionViewer.addDoubleClickListener(new
OpenWizardOnDoubleClick(editingDomain));

....since I couldn't find any reference to OpenWizardOnDoubleClick()
anywhere on the internet.
Should I write it? If so what is the signature? What should it do?

In general: where can I find documentation to get me running?

Thanks in Advance
Mauro
Re: [EEF] Documentation? [message #507955 is a reply to message #507823] Fri, 15 January 2010 05:08 Go to previous messageGo to next message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040400000102050905000601
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Mauro,

All the documentation for EEF is on the wiki : http://wiki.eclipse.org/EEF

The tutorial wiki page helps you to makes EEF working with any EMF
models. The last part are about to connect the EMF editor with EEF.

the extensions points are partially generated in your workspace ( in the
root of the generated folder you specified in the eefgen model ).

So you can copy/paste it in the plugin.xml of the EMF .edit plugin.
you must verify that the 3 extension points are used .

Next, the OpenWizardOnDoubleClick Class is located in
org.eclipse.emf.eef.runtime.ui.notify.OpenWizardOnDoubleClic k.

so you must add a dependency to EEF runtime in the EMF editor plugin. (
as explained in the wiki )

Thanks for your comments, we will update the wiki to be more clear .

Cheers,

Mauro Condarelli a
Re: [EEF] Documentation? [message #508266 is a reply to message #507955] Mon, 18 January 2010 08:32 Go to previous messageGo to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Thanks for Your kind reply.
I tried to follow instructions, but failed.
I am quite sure others would benefit from some usage clarification.
If required I can contribute a log of my efforts to be converted into a
tutorial... if I manage to solve my problems.
The project I'm working on is supposed to be released as Open Source, so
I have no concerns about keeping "trade secrets" of any sort.

* I have a rather simple EMF model (incomplete!) in
it.condarelli.rcp.writer.model/model/world.genmodel from annotated java.
* I generated the EMF Model, edit and editor code.
* I installed EEF(0.8.0.v201001060751) from "modeling.emf.eef Update
Site - http://download.eclipse.org/modeling/emft/eef/updates/milest ones/"
* I did "Initialize EEF models"; this produced
it.condarelli.rcp.writer.model/model/world.eefgen.
* I did "Generate EEF architecture" with almost no customization of
world.eefgen; this produced a complete src-gen subfolder.

At this point things diverged from the (rather terse) documentation:

# This src-gen is not un the build path by default: I had to manually
add it (Right click->Build path->Use as source folder)
# The generated src-gen/world_properties.plugin.xml did contain only two
of the three extension points named in EEF_tutorial_:_First_generation:
<!-- EEF extensions -->
<extension
point="org.eclipse.emf.eef.runtime.PropertiesEditionProvider ">
<PropertiesEditionComponentProvider

providerClass=" it.condarelli.rcp.writer.model.world.providers.WorldPackageP ropertiesEditionProvider ">
</PropertiesEditionComponentProvider>
</extension>
<extension

point="org.eclipse.emf.eef.runtime.PropertiesEditionPolicyProvider ">
<PropertiesEditionPolicyProvider

providerClass=" it.condarelli.rcp.writer.model.world.providers.WorldPackageP ropertiesEditionPolicyProvider ">
</PropertiesEditionPolicyProvider>
</extension>
no trace of <extension
point="org.eclipse.emf.eef.runtime.PropertiesEditionPartProvider ">
# I added these to my it.condarelli.rcp.writer.model/plugin.xml along
with the extension points listed under <!-- Tabbed properties views
extension -->; is this right? or should I add to the EMF-generated
it.condarelli.rcp.writer.model.edit/plugin.xml or
it.condarelli.rcp.writer.model.editor/plugin.xml?
# All java sources generated under
src-gen/it.condarelli.rcp.writer.model.world.components and under
src-gen/it.condarelli.rcp.writer.model.world.parts have lots of errors
essentially spawning from the fact I have no package
it.condarelli.rcp.writer.model.world.parts; I only have
it.condarelli.rcp.writer.model.world.parts.impl; this seems somewhat
consistent with the missing extension point.

At this point I played around a bit with properties in world.eefgen, but
I'm effectively stuck.




Stéphane Bouchet wrote:
> Hi Mauro,
>
> All the documentation for EEF is on the wiki : http://wiki.eclipse.org/EEF
>
> The tutorial wiki page helps you to makes EEF working with any EMF
> models. The last part are about to connect the EMF editor with EEF.
>
> the extensions points are partially generated in your workspace ( in the
> root of the generated folder you specified in the eefgen model ).
>
> So you can copy/paste it in the plugin.xml of the EMF .edit plugin.
> you must verify that the 3 extension points are used .
>
> Next, the OpenWizardOnDoubleClick Class is located in
> org.eclipse.emf.eef.runtime.ui.notify.OpenWizardOnDoubleClic k.
>
> so you must add a dependency to EEF runtime in the EMF editor plugin. (
> as explained in the wiki )
I did add it, but, for some reason, eclipse Source->Organize imports did
not work for me; I had to manually add "import
org.eclipse.emf.eef.runtime.ui.notify.OpenWizardOnDoubleClic k ", then the
error disappeared.
>
> Thanks for your comments, we will update the wiki to be more clear .
Please do. As said I'm available to help writing guidelines and/or to
test them.

While I have You on-line:
* I have a few EDate fields, but I didn't find any widget to edit them
(I would like to use a picker (e.g.:
http://www.cwroethel.com/Projects/JPopupCalendar/)
* I also have a few EString fields that should contain filenames: is
there a file chooser widget to use (or an easy way to implement it)?

TiA
Regards
Mauro

>
> Cheers,
>
> Mauro Condarelli a écrit :
>> Hi,
>> I tried to use EEF, but I only found a page in
>> http://wiki.eclipse.org/EEF_tutorial_:_First_generation
>> This page is very terse and, in particular, I could not divine what
>> has to be done, exactly about:
>>
>> For the generation, EEF creates two generic providers which have to be
>> configured with extension points in the project where the code is
>> generated. The extension point declares a "PropertiesEditionProviders"
>> and a "PropertieEditionPolicyProviders".
>>
>> Also I had some problems with:
>>
>> selectionViewer.addDoubleClickListener(new
>> OpenWizardOnDoubleClick(editingDomain));
>>
>> ...since I couldn't find any reference to OpenWizardOnDoubleClick()
>> anywhere on the internet.
>> Should I write it? If so what is the signature? What should it do?
>>
>> In general: where can I find documentation to get me running?
>>
>> Thanks in Advance
>> Mauro
>
Re: [EEF] Documentation? [message #508509 is a reply to message #508266] Tue, 19 January 2010 09:37 Go to previous messageGo to next message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090305050608050308080807
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Mauro,

comments inline ...

Mauro Condarelli a
Re: [EEF] Documentation? [message #508648 is a reply to message #508509] Tue, 19 January 2010 17:23 Go to previous messageGo to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
This is a multi-part message in MIME format.
--------------060201050109040702090902
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

St
Re: [EEF] Documentation? [message #508777 is a reply to message #508648] Wed, 20 January 2010 09:56 Go to previous messageGo to next message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040804070704050101060305
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Mauro,

We can continue our discussion here, since it contributes to everybody.

I get your models and try to generates from it and guess what ... i got
the same result as you :D

The generation fails because there is some missing representation for
your widgets "Time". I set a EObjectFlatComboViewer to it and the
generation does it jobs completely.

Now, there is still some errors in the generated code.

First, you use your own "String" Element.
It causes compile errors, and i am not sure what you want to do with.
if you just want a list of string, do not use reference, but attributes
with an upperbound set to -1, if you want a reference to your own
datatype, i suggest you to change its name ( WorldString for example )

Second, EEF does not handle correctly the attributes with
changeable=false property, and it causes also compile errors.
you can safely remove the line that cause the erros, i already created a
bugzilla for it :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=300154

After these little modifications, you will have a running code but you
must test it :)

Cheers,




Mauro Condarelli a
Re: [EEF] Documentation? [message #508945 is a reply to message #508777] Wed, 20 January 2010 19:51 Go to previous messageGo to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Stephane Bouchet wrote on Wed, 20 January 2010 04:56

Mauro,

We can continue our discussion here, since it contributes to everybody.

I get your models and try to generates from it and guess what ... i got
the same result as you Very Happy

The generation fails because there is some missing representation for
your widgets "Time". I set a EObjectFlatComboViewer to it and the
generation does it jobs completely.

Now, there is still some errors in the generated code.

First, you use your own "String" Element.
It causes compile errors, and i am not sure what you want to do with.
if you just want a list of string, do not use reference, but attributes
with an upperbound set to -1, if you want a reference to your own
datatype, i suggest you to change its name ( WorldString for example )

Second, EEF does not handle correctly the attributes with
changeable=false property, and it causes also compile errors.
you can safely remove the line that cause the erros, i already created a
bugzilla for it :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=300154

After these little modifications, you will have a running code but you
must test it Smile


Ok.
Thanks.

I corrected my model and retried.
I still have no automatic generation of ther representation for the "time" widget, so I had to set it manually.
I removed all changeable="false" properties.
I finally got a compilable source tree. Very Happy

A few things remain:


  1. You suggested to manually add :
    <extension
          point="org.eclipse.emf.eef.runtime.PropertiesEditionPartProvider">
       <PropertiesEditionPartProvider
    
    providerClass="it.condarelli.rcp.writer.model.world.providers.WorldPackagePropertiesEditionPartProvider">
       </PropertiesEditionPartProvider>
    </extension>
    But that providerClass was not generated; I have "WorldPropertiesEditionPartProvider" instead, so I assume it was a typo, right?
  2. All Date fields are treated as String; is there a way to use some more specific widget? Should I use Calendar instead? I assume the standard SWT DateTime widget should be used, but I am open to suggestions.
  3. Similar question about FileSelection: I gave a few "String" fields that actually are filenames in the filesystem; can I force eef to generate a FileDialog (or something similar)?
  4. last, but not least: How am I supposed to use the generated widgets? Should I simply create a custom EditorPart and include them in it?


TiA
Mauro
Re: [EEF] Documentation? [message #509038 is a reply to message #508777] Thu, 21 January 2010 09:11 Go to previous messageGo to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Hi, I will re-post my answer (with additional comments!) because the
posting done via web interface did not come through very nicely :(

Please simply discard previous post.

Stephane Bouchet wrote on Wed, 20 January 2010 04:56
> Mauro,
>
> We can continue our discussion here, since it contributes to everybody.
>
> I get your models and try to generates from it and guess what ... i
got the same result as you :d
>
> The generation fails because there is some missing representation for
your widgets "Time". I set a EObjectFlatComboViewer to it and the
generation does it jobs completely.
>
> Now, there is still some errors in the generated code.
>
> First, you use your own "String" Element.
> It causes compile errors, and i am not sure what you want to do with.
> if you just want a list of string, do not use reference, but
attributes with an upperbound set to -1, if you want a reference to your
own datatype, i suggest you to change its name ( WorldString for example )
>
> Second, EEF does not handle correctly the attributes with
changeable=false property, and it causes also compile errors.
> you can safely remove the line that cause the erros, i already
created a bugzilla for it :
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=300154
>
> After these little modifications, you will have a running code but
you must test it :)


Ok.
Thanks.

I corrected my model and retried.
I still have no automatic generation of the representation for the
"time" widget, so I had to set it manually.
I removed all changeable="false" properties.
I finally got a compilable source tree. :d


A few things remain:

_______________________________
You suggested to manually add :
<extension
point="org.eclipse.emf.eef.runtime.PropertiesEditionPartProvider ">
<PropertiesEditionPartProvider
providerClass=" it.condarelli.rcp.writer.model.world.providers.WorldPackageP ropertiesEditionPartProvider ">
</PropertiesEditionPartProvider>
</extension>
But that providerClass was not generated; I have
"WorldPropertiesEditionPartProvider" instead, so I assume it was a typo,
can You confirm that?

_______________________________
I strongly suggest to add "@SuppressWarnings("unchecked")" to (almost)
all generated classes; this would enable to get rid of a lot of
(useless) warnings that hide a few potentially dangerous ones.
e.g.:
in WorldPropertiesEditionPartForm:
....
public void createControls(final FormToolkit widgetFactory, Composite
view) {
this.messageManager = messageManager;
....
There is no messageManager in the parameter list, so this.messageManager
and messageManager are *the same* thing.
The statement is useless or (worse) something is missing.
Similar problem with *all* XxxPropertiesEditionPartForm, so I assume it
is a template bug ;)

Other suspicious point:
In TimelinePropertiesEditionComponent:
....
public Diagnostic validateValue(IPropertiesEditionEvent event) {
Diagnostic ret = Diagnostic.OK_INSTANCE;
if (event.getNewValue() != null) {
String newStringValue = event.getNewValue().toString();
try {
nothing here???
} catch (IllegalArgumentException iae) {
....
Probably simply an incomplete template.
_______________________________
All Date fields are treated as String.
Is there a way to use some more specific widget?
Should I use Calendar instead?
I assume the standard SWT DateTime widget should be used, but I am open
to suggestions.

_______________________________
Similar question about FileSelection:
I have a few "String" fields that actually are filenames in the filesystem.
Can I force eef to generate a FileDialog (or something similar)?

_______________________________
Last, but *not least*:
How am I supposed to use the generated widgets? Should I simply create a
custom EditorPart and include them in it?
I spotted an interesting
WorldPropertiesEditionProvider.getPropertiesEditionComponent (), but I
have no documentation (BTW the builds have either sources nor associated
javadoc: where can I find those?).
How should I proceed?


TiA
Mauro
Re: [EEF] Documentation? [message #509094 is a reply to message #509038] Thu, 21 January 2010 11:25 Go to previous messageGo to next message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040904010303000400080705
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Mauro Condarelli a
Re: [EEF] Documentation? [message #509153 is a reply to message #509094] Thu, 21 January 2010 14:17 Go to previous messageGo to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Stéphane Bouchet wrote:
> Mauro Condarelli a écrit :
>> I still have no automatic generation of the representation for the
>> "time" widget, so I had to set it manually.
>
> Good, we will investigate for the automatic generation of the "time"
> widget representation. a reminder, the generation of the EEF models is
> not incremental.
I assume this means I have to completely erase all generated code before
I can safely regenerate after any change in the model; is this correct?

> For now, EEF representations are limited.
> like EMF, dates are treated as string, this is the basic feature.
> of course, eef provides some more advanced widget, but this list is
> limited for now. the list of widgets you can use is proposed in the drop
> box. So there is no Calendar for now, neither Image. These widgets will
> be added by request on the bugzilla.
Should I take this as a hint to open a feature enhancement entry in
bugzilla?
I can surely do that :)

> It is possible to provide your own implementation of widget, but you
> need to creates templates to generates code for the wanted widget.
>
> We will write documentation about extending the widgets as soon as
> possible.
Thanks. We will need that ;)

>> I spotted an interesting
>> WorldPropertiesEditionProvider.getPropertiesEditionComponent (), but I
>> have no documentation (BTW the builds have either sources nor
>> associated javadoc: where can I find those?).
>
> Exact, the actuals builds on hudson does not provides sources or
> javadoc. we will provides them in next future.
> you can checkout the sources from CVS, thought.
I will do that.
Thanks.

> Some final thoughts :
>
> EEF is still in incubation phase, lots of works need to be done, like
> documentation, bugfixes, improvments. The team appreciates all the
> feedback from community and is aware of the lack of developer
> documentation for now. we will improve all these demands in a future as
> they take some amont of work.
Final question :) :
I am aware eef is still incomplete and I don't complain, but I am still
undecided if it is currently usable or not.
Related issue: how long will it take to eef to be mature enough to exit
from incubation? (just a rough estimate: next release, one year, 10
years, ...).

I am actually looking for a way to build a custom editor that uses an
EMF model as provider.
I know I can use EMF provider code to display things, but then I have to
add listeners to every widget to update the model, which is a lot of
code. Ed Merks pointed me in the EEF direction, but I am still unsure if
it is exactly what I need.
Can someone provide a comment on this?

Thanks
Mauro
Re: [EEF] Documentation? [message #509172 is a reply to message #509153] Thu, 21 January 2010 15:08 Go to previous messageGo to next message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040603060903070104020606
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Mauro Condarelli a
Re: [EEF] Documentation? [message #509227 is a reply to message #509172] Thu, 21 January 2010 17:38 Go to previous messageGo to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Stéphane Bouchet wrote:
> Mauro Condarelli a écrit :
>> Stéphane Bouchet wrote:
>>> Mauro Condarelli a écrit :
>>>> I still have no automatic generation of the representation for the
>>>> "time" widget, so I had to set it manually.
>>>
>>> Good, we will investigate for the automatic generation of the "time"
>>> widget representation. a reminder, the generation of the EEF models
>>> is not incremental.
>> I assume this means I have to completely erase all generated code
>> before I can safely regenerate after any change in the model; is this
>> correct?
>
> woups, not at all, i was talking about EEFgen and components files ( eef
> models ). not the generated code produced by EEF. you cannot iterate
> over the "initialize eef models" action. that causes problems when you
> modify your ecore/genmodel .
>
> EEF generated code ( parts, providers ... ) can be regenerated over, no
> problems with that. ( for example, modification from text to textarea is
> possible without deleting generated code, it will change just the
> necessary )

SO:

IF I change the underlying EMF model (world.genmodel) I *DO* need to
erase the EEF models (world.eefgen & world.components).

IF I change the EEF model (world.eefgen) I *DO NOT* need to delete files.

Is this correct?
I think so, but I would like to avoid strange surprises since I will
need to improve the EMF model a lot.

>> I am actually looking for a way to build a custom editor that uses an
>> EMF model as provider.
>> I know I can use EMF provider code to display things, but then I have
>> to add listeners to every widget to update the model, which is a lot
>> of code. Ed Merks pointed me in the EEF direction, but I am still
>> unsure if it is exactly what I need.
>
> yes, i saw the topic on emf newsgroup :)
> take a look to this :
> http://www.eclipse.org/modeling/emft/eef/videos/eef-rcp-appl ication.htm

Nice ;)

I can surely live with that, at least for the time being, but I was
actually looking for something a bit different: ideally I would like to
have a

Widget getEEFWidget(Composite parent, EObject property);

This should return a widget which can edit the selected EObject, either
as a single property (if EObject is a leaf) or as a standard Composite
containing a lot of widgets to edit a subtree of the model.

This would enable me to build an editor for my data exactly as I need
it. Of course if I ask for a Composite I must be happy with the
"standard" design :)

Is there any hope to have such a thing without too much effort?

============================================================ ========
:D :D I MANAGED TO HAVE THE GENERATED EDITOR TO EDIT MY DATA!! :D :D
============================================================ ========

Unfortunately I also have errors.
Essentially all strings (labels and the like) are replaced by:

NLS missing message: XxxPropertyEditionPart_YyyLabel in
it.condarelli.rcp.writer.model.world.providers.worldMessages

I assume I have to do something about internationalization, but I don't
know what (unless I have just to do the normal string editing
(Externakize Strings Wizard)).

I also have a bunch of (possibly related) errors on the console:

....
ENTRY org.eclipse.osgi 2 1 2010-01-21 17:41:20.203
!MESSAGE NLS missing message: PropertiesEditionPart_AddListViewerLabel
in: it.condarelli.rcp.writer.model.world.providers.worldMessages

!ENTRY org.eclipse.osgi 2 1 2010-01-21 17:41:20.203
!MESSAGE NLS missing message:
PropertiesEditionPart_RemoveListViewerLabel in:
it.condarelli.rcp.writer.model.world.providers.worldMessages

!ENTRY org.eclipse.ui 4 0 2010-01-21 17:43:32.620
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.UnsupportedOperationException
at
it.condarelli.rcp.writer.model.world.impl.IBaseImpl.basicGet Timeline(IBaseImpl.java:475)
at
it.condarelli.rcp.writer.model.world.impl.IBaseImpl.eIsSet(I BaseImpl.java:659)
at
it.condarelli.rcp.writer.model.world.impl.SceneImpl.eIsSet(S ceneImpl.java:977)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:1239)
at
org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.hasNext(EContentsEList.java:407)
at
org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.next(EContentsEList.java:561)
at
org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryPr oxyResolves(EObjectValidator.java:434)
at
org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryDe faultConstraint(EObjectValidator.java:209)
at
org.eclipse.emf.ecore.util.EObjectValidator.validate(EObject Validator.java:190)
at
org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:164)
at
org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:143)
at
org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:114)
at
it.condarelli.rcp.writer.model.world.components.ScenePropert iesEditionComponent.validate(ScenePropertiesEditionComponent .java:873)
at
it.condarelli.rcp.writer.model.world.components.ScenePropert iesEditionComponent.firePropertiesChanged(ScenePropertiesEdi tionComponent.java:756)
at
it.condarelli.rcp.writer.model.world.parts.forms.SceneProper tiesEditionPartForm$7.focusLost(ScenePropertiesEditionPartFo rm.java:334)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:137)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
....

Any suggestion?

TiA
Mauro
Re: [EEF] Documentation? [message #509373 is a reply to message #509227] Fri, 22 January 2010 09:42 Go to previous messageGo to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Responding to myself :)
I managed to find the reason for the errors.
I would like a comment for the ther questions though.

Mauro Condarelli wrote:
> ============================================================ ========
> :D :D I MANAGED TO HAVE THE GENERATED EDITOR TO EDIT MY DATA!! :D :D
> ============================================================ ========
>
> Unfortunately I also have errors.
> Essentially all strings (labels and the like) are replaced by:
>
> NLS missing message: XxxPropertyEditionPart_YyyLabel in
> it.condarelli.rcp.writer.model.world.providers.worldMessages
>
> I assume I have to do something about internationalization, but I don't
> know what (unless I have just to do the normal string editing
> (Externakize Strings Wizard)).
>
> I also have a bunch of (possibly related) errors on the console:
>
> ...
> ENTRY org.eclipse.osgi 2 1 2010-01-21 17:41:20.203
> !MESSAGE NLS missing message: PropertiesEditionPart_AddListViewerLabel
> in: it.condarelli.rcp.writer.model.world.providers.worldMessages
>
> !ENTRY org.eclipse.osgi 2 1 2010-01-21 17:41:20.203
> !MESSAGE NLS missing message:
> PropertiesEditionPart_RemoveListViewerLabel in:
> it.condarelli.rcp.writer.model.world.providers.worldMessages

This bunch of erros come from the fact I have an Italian locale on my
PC, so I understand I have o copy worldMessages.properties to
worldMessages_it.properties and, possibly, edit it.

I did that and now I have my labels as they should.

I see this as a bug: If the correct locale is not found EEF should
fall-back to the "neutral"(english) file.
Should I file an entry in bugzilla?

>
> !ENTRY org.eclipse.ui 4 0 2010-01-21 17:43:32.620
> !MESSAGE Unhandled event loop exception
> !STACK 0
> java.lang.UnsupportedOperationException
> at
> it.condarelli.rcp.writer.model.world.impl.IBaseImpl.basicGet Timeline(IBaseImpl.java:475)
>
This is simply my incomplete code: I have some computed values that are
not implemented (yet).
Forget about that.

Regards
Mauro
Re: [EEF] Documentation? [message #509458 is a reply to message #509373] Fri, 22 January 2010 13:51 Go to previous messageGo to next message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050105090901010302010600
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Mauro Condarelli a
Re: [EEF] Documentation? [message #509468 is a reply to message #509227] Fri, 22 January 2010 14:16 Go to previous message
Goulwen Le Fur is currently offline Goulwen Le FurFriend
Messages: 125
Registered: July 2009
Senior Member
Mauro Condarelli a écrit :
> Stéphane Bouchet wrote:
>> Mauro Condarelli a écrit :
>>> Stéphane Bouchet wrote:
>>>> Mauro Condarelli a écrit :
>>>>> I still have no automatic generation of the representation for the
>>>>> "time" widget, so I had to set it manually.
>>>>
>>>> Good, we will investigate for the automatic generation of the "time"
>>>> widget representation. a reminder, the generation of the EEF models
>>>> is not incremental.
>>> I assume this means I have to completely erase all generated code
>>> before I can safely regenerate after any change in the model; is this
>>> correct?
>>
>> woups, not at all, i was talking about EEFgen and components files (
>> eef models ). not the generated code produced by EEF. you cannot
>> iterate over the "initialize eef models" action. that causes problems
>> when you modify your ecore/genmodel .
>>
>> EEF generated code ( parts, providers ... ) can be regenerated over,
>> no problems with that. ( for example, modification from text to
>> textarea is possible without deleting generated code, it will change
>> just the necessary )
>
> SO:
>
> IF I change the underlying EMF model (world.genmodel) I *DO* need to
> erase the EEF models (world.eefgen & world.components).
>
> IF I change the EEF model (world.eefgen) I *DO NOT* need to delete files.
>
> Is this correct?
> I think so, but I would like to avoid strange surprises since I will
> need to improve the EMF model a lot.
>
>>> I am actually looking for a way to build a custom editor that uses an
>>> EMF model as provider.
>>> I know I can use EMF provider code to display things, but then I have
>>> to add listeners to every widget to update the model, which is a lot
>>> of code. Ed Merks pointed me in the EEF direction, but I am still
>>> unsure if it is exactly what I need.
>>
>> yes, i saw the topic on emf newsgroup :)
>> take a look to this :
>> http://www.eclipse.org/modeling/emft/eef/videos/eef-rcp-appl ication.htm
>
> Nice ;)
>
> I can surely live with that, at least for the time being, but I was
> actually looking for something a bit different: ideally I would like to
> have a
>
> Widget getEEFWidget(Composite parent, EObject property);
>
> This should return a widget which can edit the selected EObject, either
> as a single property (if EObject is a leaf) or as a standard Composite
> containing a lot of widgets to edit a subtree of the model.
>

You can do that by getting the PropertiesEditionComponent associated to
the EObject and getting the parts of the component. But you cant access
directly to the view.

And to be honnest, I think this will be never possible ^^


> This would enable me to build an editor for my data exactly as I need
> it. Of course if I ask for a Composite I must be happy with the
> "standard" design :)
>
> Is there any hope to have such a thing without too much effort?
>
> ============================================================ ========
> :D :D I MANAGED TO HAVE THE GENERATED EDITOR TO EDIT MY DATA!! :D :D
> ============================================================ ========
>


Cheers,

--
Goulwen

> Unfortunately I also have errors.
> Essentially all strings (labels and the like) are replaced by:
>
> NLS missing message: XxxPropertyEditionPart_YyyLabel in
> it.condarelli.rcp.writer.model.world.providers.worldMessages
>
> I assume I have to do something about internationalization, but I don't
> know what (unless I have just to do the normal string editing
> (Externakize Strings Wizard)).
>
> I also have a bunch of (possibly related) errors on the console:
>
> ...
> ENTRY org.eclipse.osgi 2 1 2010-01-21 17:41:20.203
> !MESSAGE NLS missing message: PropertiesEditionPart_AddListViewerLabel
> in: it.condarelli.rcp.writer.model.world.providers.worldMessages
>
> !ENTRY org.eclipse.osgi 2 1 2010-01-21 17:41:20.203
> !MESSAGE NLS missing message:
> PropertiesEditionPart_RemoveListViewerLabel in:
> it.condarelli.rcp.writer.model.world.providers.worldMessages
>
> !ENTRY org.eclipse.ui 4 0 2010-01-21 17:43:32.620
> !MESSAGE Unhandled event loop exception
> !STACK 0
> java.lang.UnsupportedOperationException
> at
> it.condarelli.rcp.writer.model.world.impl.IBaseImpl.basicGet Timeline(IBaseImpl.java:475)
>
> at
> it.condarelli.rcp.writer.model.world.impl.IBaseImpl.eIsSet(I BaseImpl.java:659)
>
> at
> it.condarelli.rcp.writer.model.world.impl.SceneImpl.eIsSet(S ceneImpl.java:977)
>
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:1239)
>
> at
> org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.hasNext(EContentsEList.java:407)
>
> at
> org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.next(EContentsEList.java:561)
>
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryPr oxyResolves(EObjectValidator.java:434)
>
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryDe faultConstraint(EObjectValidator.java:209)
>
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate(EObject Validator.java:190)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:164)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:143)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:114)
> at
> it.condarelli.rcp.writer.model.world.components.ScenePropert iesEditionComponent.validate(ScenePropertiesEditionComponent .java:873)
>
> at
> it.condarelli.rcp.writer.model.world.components.ScenePropert iesEditionComponent.firePropertiesChanged(ScenePropertiesEdi tionComponent.java:756)
>
> at
> it.condarelli.rcp.writer.model.world.parts.forms.SceneProper tiesEditionPartForm$7.focusLost(ScenePropertiesEditionPartFo rm.java:334)
>
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:137)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> ...
>
> Any suggestion?
>
> TiA
> Mauro
Re: [EEF] Documentation? [message #622020 is a reply to message #508266] Tue, 19 January 2010 09:37 Go to previous message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090305050608050308080807
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Mauro,

comments inline ...

Mauro Condarelli a
Re: [EEF] Documentation? [message #622022 is a reply to message #508509] Tue, 19 January 2010 17:23 Go to previous message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
This is a multi-part message in MIME format.
--------------060201050109040702090902
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

St
Re: [EEF] Documentation? [message #622023 is a reply to message #508648] Wed, 20 January 2010 09:56 Go to previous message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040804070704050101060305
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Mauro,

We can continue our discussion here, since it contributes to everybody.

I get your models and try to generates from it and guess what ... i got
the same result as you :D

The generation fails because there is some missing representation for
your widgets "Time". I set a EObjectFlatComboViewer to it and the
generation does it jobs completely.

Now, there is still some errors in the generated code.

First, you use your own "String" Element.
It causes compile errors, and i am not sure what you want to do with.
if you just want a list of string, do not use reference, but attributes
with an upperbound set to -1, if you want a reference to your own
datatype, i suggest you to change its name ( WorldString for example )

Second, EEF does not handle correctly the attributes with
changeable=false property, and it causes also compile errors.
you can safely remove the line that cause the erros, i already created a
bugzilla for it :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=300154

After these little modifications, you will have a running code but you
must test it :)

Cheers,




Mauro Condarelli a
Re: [EEF] Documentation? [message #622025 is a reply to message #508777] Wed, 20 January 2010 19:51 Go to previous message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Stephane Bouchet wrote on Wed, 20 January 2010 04:56
> Mauro,
>
> We can continue our discussion here, since it contributes to everybody.
>
> I get your models and try to generates from it and guess what ... i got
> the same result as you :d
>
> The generation fails because there is some missing representation for
> your widgets "Time". I set a EObjectFlatComboViewer to it and the
> generation does it jobs completely.
>
> Now, there is still some errors in the generated code.
>
> First, you use your own "String" Element.
> It causes compile errors, and i am not sure what you want to do with.
> if you just want a list of string, do not use reference, but attributes
> with an upperbound set to -1, if you want a reference to your own
> datatype, i suggest you to change its name ( WorldString for example )
>
> Second, EEF does not handle correctly the attributes with
> changeable=false property, and it causes also compile errors.
> you can safely remove the line that cause the erros, i already created a
> bugzilla for it :
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=300154
>
> After these little modifications, you will have a running code but you
> must test it :)


Ok.
Thanks.

I corrected my model and retried.
I still have no automatic generation of ther representation for the "time" widget, so I had to set it manually.
I removed all changeable="false" properties.
I finally got a compilable source tree. :d

A few things remain:


You suggested to manually add :<extension
point="org.eclipse.emf.eef.runtime.PropertiesEditionPartProvider ">
<PropertiesEditionPartProvider

providerClass=" it.condarelli.rcp.writer.model.world.providers.WorldPackageP ropertiesEditionPartProvider ">
</PropertiesEditionPartProvider>
</extension>But that providerClass was not generated; I have "WorldPropertiesEditionPartProvider" instead, so I assume it was a typo, right?
All Date fields are treated as String; is there a way to use some more specific widget? Should I use Calendar instead? I assume the standard SWT DateTime widget should be used, but I am open to suggestions.
Similar question about FileSelection: I gave a few "String" fields that actually are filenames in the filesystem; can I force eef to generate a FileDialog (or something similar)?
last, but not least: How am I supposed to use the generated widgets? Should I simply create a custom EditorPart and include them in it?


TiA
Mauro
Re: [EEF] Documentation? [message #622026 is a reply to message #508777] Thu, 21 January 2010 09:11 Go to previous message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Hi, I will re-post my answer (with additional comments!) because the
posting done via web interface did not come through very nicely :(

Please simply discard previous post.

Stephane Bouchet wrote on Wed, 20 January 2010 04:56
> Mauro,
>
> We can continue our discussion here, since it contributes to everybody.
>
> I get your models and try to generates from it and guess what ... i
got the same result as you :d
>
> The generation fails because there is some missing representation for
your widgets "Time". I set a EObjectFlatComboViewer to it and the
generation does it jobs completely.
>
> Now, there is still some errors in the generated code.
>
> First, you use your own "String" Element.
> It causes compile errors, and i am not sure what you want to do with.
> if you just want a list of string, do not use reference, but
attributes with an upperbound set to -1, if you want a reference to your
own datatype, i suggest you to change its name ( WorldString for example )
>
> Second, EEF does not handle correctly the attributes with
changeable=false property, and it causes also compile errors.
> you can safely remove the line that cause the erros, i already
created a bugzilla for it :
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=300154
>
> After these little modifications, you will have a running code but
you must test it :)


Ok.
Thanks.

I corrected my model and retried.
I still have no automatic generation of the representation for the
"time" widget, so I had to set it manually.
I removed all changeable="false" properties.
I finally got a compilable source tree. :d


A few things remain:

_______________________________
You suggested to manually add :
<extension
point="org.eclipse.emf.eef.runtime.PropertiesEditionPartProvider ">
<PropertiesEditionPartProvider
providerClass=" it.condarelli.rcp.writer.model.world.providers.WorldPackageP ropertiesEditionPartProvider ">
</PropertiesEditionPartProvider>
</extension>
But that providerClass was not generated; I have
"WorldPropertiesEditionPartProvider" instead, so I assume it was a typo,
can You confirm that?

_______________________________
I strongly suggest to add "@SuppressWarnings("unchecked")" to (almost)
all generated classes; this would enable to get rid of a lot of
(useless) warnings that hide a few potentially dangerous ones.
e.g.:
in WorldPropertiesEditionPartForm:
....
public void createControls(final FormToolkit widgetFactory, Composite
view) {
this.messageManager = messageManager;
....
There is no messageManager in the parameter list, so this.messageManager
and messageManager are *the same* thing.
The statement is useless or (worse) something is missing.
Similar problem with *all* XxxPropertiesEditionPartForm, so I assume it
is a template bug ;)

Other suspicious point:
In TimelinePropertiesEditionComponent:
....
public Diagnostic validateValue(IPropertiesEditionEvent event) {
Diagnostic ret = Diagnostic.OK_INSTANCE;
if (event.getNewValue() != null) {
String newStringValue = event.getNewValue().toString();
try {
nothing here???
} catch (IllegalArgumentException iae) {
....
Probably simply an incomplete template.
_______________________________
All Date fields are treated as String.
Is there a way to use some more specific widget?
Should I use Calendar instead?
I assume the standard SWT DateTime widget should be used, but I am open
to suggestions.

_______________________________
Similar question about FileSelection:
I have a few "String" fields that actually are filenames in the filesystem.
Can I force eef to generate a FileDialog (or something similar)?

_______________________________
Last, but *not least*:
How am I supposed to use the generated widgets? Should I simply create a
custom EditorPart and include them in it?
I spotted an interesting
WorldPropertiesEditionProvider.getPropertiesEditionComponent (), but I
have no documentation (BTW the builds have either sources nor associated
javadoc: where can I find those?).
How should I proceed?


TiA
Mauro
Re: [EEF] Documentation? [message #622027 is a reply to message #509038] Thu, 21 January 2010 11:25 Go to previous message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040904010303000400080705
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Mauro Condarelli a
Re: [EEF] Documentation? [message #622029 is a reply to message #509094] Thu, 21 January 2010 14:17 Go to previous message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Stéphane Bouchet wrote:
> Mauro Condarelli a écrit :
>> I still have no automatic generation of the representation for the
>> "time" widget, so I had to set it manually.
>
> Good, we will investigate for the automatic generation of the "time"
> widget representation. a reminder, the generation of the EEF models is
> not incremental.
I assume this means I have to completely erase all generated code before
I can safely regenerate after any change in the model; is this correct?

> For now, EEF representations are limited.
> like EMF, dates are treated as string, this is the basic feature.
> of course, eef provides some more advanced widget, but this list is
> limited for now. the list of widgets you can use is proposed in the drop
> box. So there is no Calendar for now, neither Image. These widgets will
> be added by request on the bugzilla.
Should I take this as a hint to open a feature enhancement entry in
bugzilla?
I can surely do that :)

> It is possible to provide your own implementation of widget, but you
> need to creates templates to generates code for the wanted widget.
>
> We will write documentation about extending the widgets as soon as
> possible.
Thanks. We will need that ;)

>> I spotted an interesting
>> WorldPropertiesEditionProvider.getPropertiesEditionComponent (), but I
>> have no documentation (BTW the builds have either sources nor
>> associated javadoc: where can I find those?).
>
> Exact, the actuals builds on hudson does not provides sources or
> javadoc. we will provides them in next future.
> you can checkout the sources from CVS, thought.
I will do that.
Thanks.

> Some final thoughts :
>
> EEF is still in incubation phase, lots of works need to be done, like
> documentation, bugfixes, improvments. The team appreciates all the
> feedback from community and is aware of the lack of developer
> documentation for now. we will improve all these demands in a future as
> they take some amont of work.
Final question :) :
I am aware eef is still incomplete and I don't complain, but I am still
undecided if it is currently usable or not.
Related issue: how long will it take to eef to be mature enough to exit
from incubation? (just a rough estimate: next release, one year, 10
years, ...).

I am actually looking for a way to build a custom editor that uses an
EMF model as provider.
I know I can use EMF provider code to display things, but then I have to
add listeners to every widget to update the model, which is a lot of
code. Ed Merks pointed me in the EEF direction, but I am still unsure if
it is exactly what I need.
Can someone provide a comment on this?

Thanks
Mauro
Re: [EEF] Documentation? [message #622030 is a reply to message #509153] Thu, 21 January 2010 15:08 Go to previous message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040603060903070104020606
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Mauro Condarelli a
Re: [EEF] Documentation? [message #622031 is a reply to message #509172] Thu, 21 January 2010 17:38 Go to previous message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Stéphane Bouchet wrote:
> Mauro Condarelli a écrit :
>> Stéphane Bouchet wrote:
>>> Mauro Condarelli a écrit :
>>>> I still have no automatic generation of the representation for the
>>>> "time" widget, so I had to set it manually.
>>>
>>> Good, we will investigate for the automatic generation of the "time"
>>> widget representation. a reminder, the generation of the EEF models
>>> is not incremental.
>> I assume this means I have to completely erase all generated code
>> before I can safely regenerate after any change in the model; is this
>> correct?
>
> woups, not at all, i was talking about EEFgen and components files ( eef
> models ). not the generated code produced by EEF. you cannot iterate
> over the "initialize eef models" action. that causes problems when you
> modify your ecore/genmodel .
>
> EEF generated code ( parts, providers ... ) can be regenerated over, no
> problems with that. ( for example, modification from text to textarea is
> possible without deleting generated code, it will change just the
> necessary )

SO:

IF I change the underlying EMF model (world.genmodel) I *DO* need to
erase the EEF models (world.eefgen & world.components).

IF I change the EEF model (world.eefgen) I *DO NOT* need to delete files.

Is this correct?
I think so, but I would like to avoid strange surprises since I will
need to improve the EMF model a lot.

>> I am actually looking for a way to build a custom editor that uses an
>> EMF model as provider.
>> I know I can use EMF provider code to display things, but then I have
>> to add listeners to every widget to update the model, which is a lot
>> of code. Ed Merks pointed me in the EEF direction, but I am still
>> unsure if it is exactly what I need.
>
> yes, i saw the topic on emf newsgroup :)
> take a look to this :
> http://www.eclipse.org/modeling/emft/eef/videos/eef-rcp-appl ication.htm

Nice ;)

I can surely live with that, at least for the time being, but I was
actually looking for something a bit different: ideally I would like to
have a

Widget getEEFWidget(Composite parent, EObject property);

This should return a widget which can edit the selected EObject, either
as a single property (if EObject is a leaf) or as a standard Composite
containing a lot of widgets to edit a subtree of the model.

This would enable me to build an editor for my data exactly as I need
it. Of course if I ask for a Composite I must be happy with the
"standard" design :)

Is there any hope to have such a thing without too much effort?

============================================================ ========
:D :D I MANAGED TO HAVE THE GENERATED EDITOR TO EDIT MY DATA!! :D :D
============================================================ ========

Unfortunately I also have errors.
Essentially all strings (labels and the like) are replaced by:

NLS missing message: XxxPropertyEditionPart_YyyLabel in
it.condarelli.rcp.writer.model.world.providers.worldMessages

I assume I have to do something about internationalization, but I don't
know what (unless I have just to do the normal string editing
(Externakize Strings Wizard)).

I also have a bunch of (possibly related) errors on the console:

....
ENTRY org.eclipse.osgi 2 1 2010-01-21 17:41:20.203
!MESSAGE NLS missing message: PropertiesEditionPart_AddListViewerLabel
in: it.condarelli.rcp.writer.model.world.providers.worldMessages

!ENTRY org.eclipse.osgi 2 1 2010-01-21 17:41:20.203
!MESSAGE NLS missing message:
PropertiesEditionPart_RemoveListViewerLabel in:
it.condarelli.rcp.writer.model.world.providers.worldMessages

!ENTRY org.eclipse.ui 4 0 2010-01-21 17:43:32.620
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.UnsupportedOperationException
at
it.condarelli.rcp.writer.model.world.impl.IBaseImpl.basicGet Timeline(IBaseImpl.java:475)
at
it.condarelli.rcp.writer.model.world.impl.IBaseImpl.eIsSet(I BaseImpl.java:659)
at
it.condarelli.rcp.writer.model.world.impl.SceneImpl.eIsSet(S ceneImpl.java:977)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:1239)
at
org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.hasNext(EContentsEList.java:407)
at
org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.next(EContentsEList.java:561)
at
org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryPr oxyResolves(EObjectValidator.java:434)
at
org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryDe faultConstraint(EObjectValidator.java:209)
at
org.eclipse.emf.ecore.util.EObjectValidator.validate(EObject Validator.java:190)
at
org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:164)
at
org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:143)
at
org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:114)
at
it.condarelli.rcp.writer.model.world.components.ScenePropert iesEditionComponent.validate(ScenePropertiesEditionComponent .java:873)
at
it.condarelli.rcp.writer.model.world.components.ScenePropert iesEditionComponent.firePropertiesChanged(ScenePropertiesEdi tionComponent.java:756)
at
it.condarelli.rcp.writer.model.world.parts.forms.SceneProper tiesEditionPartForm$7.focusLost(ScenePropertiesEditionPartFo rm.java:334)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:137)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
....

Any suggestion?

TiA
Mauro
Re: [EEF] Documentation? [message #622037 is a reply to message #509227] Fri, 22 January 2010 09:42 Go to previous message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Responding to myself :)
I managed to find the reason for the errors.
I would like a comment for the ther questions though.

Mauro Condarelli wrote:
> ============================================================ ========
> :D :D I MANAGED TO HAVE THE GENERATED EDITOR TO EDIT MY DATA!! :D :D
> ============================================================ ========
>
> Unfortunately I also have errors.
> Essentially all strings (labels and the like) are replaced by:
>
> NLS missing message: XxxPropertyEditionPart_YyyLabel in
> it.condarelli.rcp.writer.model.world.providers.worldMessages
>
> I assume I have to do something about internationalization, but I don't
> know what (unless I have just to do the normal string editing
> (Externakize Strings Wizard)).
>
> I also have a bunch of (possibly related) errors on the console:
>
> ...
> ENTRY org.eclipse.osgi 2 1 2010-01-21 17:41:20.203
> !MESSAGE NLS missing message: PropertiesEditionPart_AddListViewerLabel
> in: it.condarelli.rcp.writer.model.world.providers.worldMessages
>
> !ENTRY org.eclipse.osgi 2 1 2010-01-21 17:41:20.203
> !MESSAGE NLS missing message:
> PropertiesEditionPart_RemoveListViewerLabel in:
> it.condarelli.rcp.writer.model.world.providers.worldMessages

This bunch of erros come from the fact I have an Italian locale on my
PC, so I understand I have o copy worldMessages.properties to
worldMessages_it.properties and, possibly, edit it.

I did that and now I have my labels as they should.

I see this as a bug: If the correct locale is not found EEF should
fall-back to the "neutral"(english) file.
Should I file an entry in bugzilla?

>
> !ENTRY org.eclipse.ui 4 0 2010-01-21 17:43:32.620
> !MESSAGE Unhandled event loop exception
> !STACK 0
> java.lang.UnsupportedOperationException
> at
> it.condarelli.rcp.writer.model.world.impl.IBaseImpl.basicGet Timeline(IBaseImpl.java:475)
>
This is simply my incomplete code: I have some computed values that are
not implemented (yet).
Forget about that.

Regards
Mauro
Re: [EEF] Documentation? [message #622040 is a reply to message #509373] Fri, 22 January 2010 13:51 Go to previous message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050105090901010302010600
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Mauro Condarelli a
Re: [EEF] Documentation? [message #622041 is a reply to message #509227] Fri, 22 January 2010 14:16 Go to previous message
Goulwen Le Fur is currently offline Goulwen Le FurFriend
Messages: 125
Registered: July 2009
Senior Member
Mauro Condarelli a écrit :
> Stéphane Bouchet wrote:
>> Mauro Condarelli a écrit :
>>> Stéphane Bouchet wrote:
>>>> Mauro Condarelli a écrit :
>>>>> I still have no automatic generation of the representation for the
>>>>> "time" widget, so I had to set it manually.
>>>>
>>>> Good, we will investigate for the automatic generation of the "time"
>>>> widget representation. a reminder, the generation of the EEF models
>>>> is not incremental.
>>> I assume this means I have to completely erase all generated code
>>> before I can safely regenerate after any change in the model; is this
>>> correct?
>>
>> woups, not at all, i was talking about EEFgen and components files (
>> eef models ). not the generated code produced by EEF. you cannot
>> iterate over the "initialize eef models" action. that causes problems
>> when you modify your ecore/genmodel .
>>
>> EEF generated code ( parts, providers ... ) can be regenerated over,
>> no problems with that. ( for example, modification from text to
>> textarea is possible without deleting generated code, it will change
>> just the necessary )
>
> SO:
>
> IF I change the underlying EMF model (world.genmodel) I *DO* need to
> erase the EEF models (world.eefgen & world.components).
>
> IF I change the EEF model (world.eefgen) I *DO NOT* need to delete files.
>
> Is this correct?
> I think so, but I would like to avoid strange surprises since I will
> need to improve the EMF model a lot.
>
>>> I am actually looking for a way to build a custom editor that uses an
>>> EMF model as provider.
>>> I know I can use EMF provider code to display things, but then I have
>>> to add listeners to every widget to update the model, which is a lot
>>> of code. Ed Merks pointed me in the EEF direction, but I am still
>>> unsure if it is exactly what I need.
>>
>> yes, i saw the topic on emf newsgroup :)
>> take a look to this :
>> http://www.eclipse.org/modeling/emft/eef/videos/eef-rcp-appl ication.htm
>
> Nice ;)
>
> I can surely live with that, at least for the time being, but I was
> actually looking for something a bit different: ideally I would like to
> have a
>
> Widget getEEFWidget(Composite parent, EObject property);
>
> This should return a widget which can edit the selected EObject, either
> as a single property (if EObject is a leaf) or as a standard Composite
> containing a lot of widgets to edit a subtree of the model.
>

You can do that by getting the PropertiesEditionComponent associated to
the EObject and getting the parts of the component. But you cant access
directly to the view.

And to be honnest, I think this will be never possible ^^


> This would enable me to build an editor for my data exactly as I need
> it. Of course if I ask for a Composite I must be happy with the
> "standard" design :)
>
> Is there any hope to have such a thing without too much effort?
>
> ============================================================ ========
> :D :D I MANAGED TO HAVE THE GENERATED EDITOR TO EDIT MY DATA!! :D :D
> ============================================================ ========
>


Cheers,

--
Goulwen

> Unfortunately I also have errors.
> Essentially all strings (labels and the like) are replaced by:
>
> NLS missing message: XxxPropertyEditionPart_YyyLabel in
> it.condarelli.rcp.writer.model.world.providers.worldMessages
>
> I assume I have to do something about internationalization, but I don't
> know what (unless I have just to do the normal string editing
> (Externakize Strings Wizard)).
>
> I also have a bunch of (possibly related) errors on the console:
>
> ...
> ENTRY org.eclipse.osgi 2 1 2010-01-21 17:41:20.203
> !MESSAGE NLS missing message: PropertiesEditionPart_AddListViewerLabel
> in: it.condarelli.rcp.writer.model.world.providers.worldMessages
>
> !ENTRY org.eclipse.osgi 2 1 2010-01-21 17:41:20.203
> !MESSAGE NLS missing message:
> PropertiesEditionPart_RemoveListViewerLabel in:
> it.condarelli.rcp.writer.model.world.providers.worldMessages
>
> !ENTRY org.eclipse.ui 4 0 2010-01-21 17:43:32.620
> !MESSAGE Unhandled event loop exception
> !STACK 0
> java.lang.UnsupportedOperationException
> at
> it.condarelli.rcp.writer.model.world.impl.IBaseImpl.basicGet Timeline(IBaseImpl.java:475)
>
> at
> it.condarelli.rcp.writer.model.world.impl.IBaseImpl.eIsSet(I BaseImpl.java:659)
>
> at
> it.condarelli.rcp.writer.model.world.impl.SceneImpl.eIsSet(S ceneImpl.java:977)
>
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObj ectImpl.java:1239)
>
> at
> org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.hasNext(EContentsEList.java:407)
>
> at
> org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImp l.next(EContentsEList.java:561)
>
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryPr oxyResolves(EObjectValidator.java:434)
>
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryDe faultConstraint(EObjectValidator.java:209)
>
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate(EObject Validator.java:190)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:164)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:143)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:114)
> at
> it.condarelli.rcp.writer.model.world.components.ScenePropert iesEditionComponent.validate(ScenePropertiesEditionComponent .java:873)
>
> at
> it.condarelli.rcp.writer.model.world.components.ScenePropert iesEditionComponent.firePropertiesChanged(ScenePropertiesEdi tionComponent.java:756)
>
> at
> it.condarelli.rcp.writer.model.world.parts.forms.SceneProper tiesEditionPartForm$7.focusLost(ScenePropertiesEditionPartFo rm.java:334)
>
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:137)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> ...
>
> Any suggestion?
>
> TiA
> Mauro
Previous Topic:Subversive intent to MTF
Next Topic:EMF Compare Editor: How to add text compare tab?
Goto Forum:
  


Current Time: Thu Jun 24 09:15:58 GMT 2021

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

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

Back to the top