Bug 196973 - [ui] Adding the edit and editor plugin to have OCL models editable in the EMF's Sample Ecore Editor
Summary: [ui] Adding the edit and editor plugin to have OCL models editable in the EMF...
Status: CLOSED FIXED
Alias: None
Product: OCL
Classification: Modeling
Component: Core (show other bugs)
Version: 1.1.0   Edit
Hardware: PC Windows XP
: P2 enhancement (vote)
Target Milestone: 3.0.0   Edit
Assignee: Ed Willink CLA
QA Contact:
URL:
Whiteboard: Broad Appeal, Usability
Keywords: plan
Depends on:
Blocks:
 
Reported: 2007-07-18 11:15 EDT by Adolfo Sanchez-Barbudo Herrera CLA
Modified: 2013-05-22 14:10 EDT (History)
3 users (show)

See Also:


Attachments
Enhance Edit genmodel settings (4.12 KB, patch)
2009-03-03 04:38 EST, Ed Willink CLA
no flags Details | Diff
Edit plugins contribution (347.90 KB, application/octet-stream)
2009-03-03 04:52 EST, Ed Willink CLA
no flags Details
genmodels and templates for edit plugins (12.61 KB, patch)
2009-09-12 15:56 EDT, Ed Willink CLA
no flags Details | Diff
Revised icons (49.35 KB, application/octet-stream)
2009-09-12 15:58 EDT, Ed Willink CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adolfo Sanchez-Barbudo Herrera CLA 2007-07-18 11:15:16 EDT
Adding the edit and editor plugin to have OCL models editable in the EMF's Sample Ecore Editor.
Comment 1 Christian Damus CLA 2007-07-18 11:42:49 EDT
Will have to consider how best to package these plug-ins and their corresponding Javadocs, because this will roughly double the amount of code and Javadoc in the OCL component:  the edit plug-ins for each of the generic, Ecore, and UML metamodels will be about as large (in number of classes) as the metamodels themselves.

The SDK ZIP is already at 9MB where the runtime ZIP is 1.6 MB, the difference largely accounted for by Javadocs.

I expect that, at least, a separate feature is in order for the editing support, to make a user-friendly update site.  Probably should follow EMF's strategy for featurization ...
Comment 2 Ed Willink CLA 2008-03-06 15:12:54 EST
Default autogenerated versions of these are available from the GMT/UMLX project and may be found in module org.eclipse.gmt/umlx/plugins/org.eclipse.ocl.edit and org.eclipse.gmt/umlx/plugins/org.eclipse.ocl.ecore.edit of /cvsroot/technology at dev.eclipse.org. This is obviously just a provisional source.

I don't see a great deal of value in providing Javadocs for autogenerated class hierarchies, certainly not full Javadoc, perhaps a minimal presence only. Perhaps just a javadoc generation script.

It's not even clear whether it's worth providing, let alone designing, all 456 creation icons. Some way of sharing a few defaults would be good.



Comment 3 Ed Willink CLA 2008-08-03 13:15:55 EDT
org.eclipse.ocl.edit and org.eclipse.ocl.ecore.edit have now been added to M2M QVT Declarative as part of the migration of QVT aspects of UMLX.

It would be good to have these provided by MDT for Eclipse 3.5.
Comment 4 Ed Willink CLA 2008-08-13 14:50:40 EDT
A non-trivial amount of work may be required to provide good org.eclipse.ocl...edit/icons/full/obj16 icons, which an IMP-based editor could re-use in its outline. The org.eclipse.ocl...edit/icons/full/ctool16 icons are much more prolific but not very interesting.

Is there any good source of existing icons?

Any good ideas for some design themes?

Is this an area where the Eclipse/IBM graphics department could help?
Comment 5 Christian Damus CLA 2008-08-27 17:08:22 EDT
(In reply to comment #4)
> Is there any good source of existing icons?

I aven't had occasion to look for icons, before.  A IBM, we would just put requests into a database, and icons came back like magic.  :-)

> Any good ideas for some design themes?

What do other programming languages use?  The MDT UML2 component has operation, attribute, enum, state, and value-specification icons that would be useful for corresponding OCL expressions.  There's even a host of Action metaclasses that may provide useful icons.


> Is this an area where the Eclipse/IBM graphics department could help?

Does Eclipse have a graphics department?  That would be best.  How would we ask IBM to provide icons, especially if they don't need the OCL edit plug-in? (they never did while I was there)
Comment 6 Ed Willink CLA 2008-11-30 05:31:38 EST
I've started replacing some of the default ocl.ecore.edit icons. If you check out org.eclipse.m2m/org.eclipse.qvt.declarative/plugins/org.eclipse.ocl.ecore.edit you can see them.

In order to make the AST look better:

I found I wanted 6 distinct Constraint icons corresponding to the stereotypes.

I found that I wanted role-based icons, so that for instance the children of an IfExp have icons based upon "?", "T" and "F".

To avoid a proliferation of icon locations I am adding these to the ocl.ecore.edit plug-in.

Do you want the ocl...edit restricted to just those needed by the default generation?

Should all ocl...edit icons be resolved solely in ocl.edit?


Comment 7 Ed Willink CLA 2009-03-03 04:38:52 EST
Created attachment 127293 [details]
Enhance Edit genmodel settings

The attached patch switches off creation icons saving a phenomenal number of useless icons in the generated plugins. It also switches off creation commands, which appears to make no difference at all.

[Preparation for contributions in next attachment].
Comment 8 Ed Willink CLA 2009-03-03 04:52:22 EST
Created attachment 127295 [details]
Edit plugins contribution

Attached contains ocl.edit, ocl.ecore.edit and ocl.uml.edit contributions. They are auto-generated from the genmodels patched in the previous patch.

No @generated NOT anywhere.
No creation icons anywhere.
No icons in ocl.ecore.edit and ocl.uml.edit at all. EMF automatically tries ocl.edit instead.
API issues; none directly; just possibly someone will get fooled by direct rather than reflective support and non-default icons.

Full set of custom icons in ocl.edit. Most drawn to a consistent theme extending Ecore.
Final two Action icons taken from UML2.
I have about 10 extra icons such as InvariantConstraint.gif and ConditionTrue.gif that I use in the OCL editor and another 10 such as StringType.gif that are not used anywhere but complete the theme. I could contribute these too if you are happy for ocl.edit/icons to be a useful dustbin.

Now that the icons are drawn and the ridiculous bloat of creation icons is solved, I think it is worth incorporating this.

I suspect that uml2.uml.edit needs this. They seem to have created a variety of icons such as StringLiteralExp.gif but lacked enthusiasm to give them any serious content.
Comment 9 James Bruck CLA 2009-03-23 14:31:22 EDT
> I suspect that uml2.uml.edit needs this. They seem to have created a variety of
> icons such as StringLiteralExp.gif but lacked enthusiasm to give them any
> serious content. 


I'm not sure what exactly is meant by "serious content"?   Do you mean that you don't like the icons or that they are lacking enough visual cues to indicate what they represent?  

The icons that exist in UML2 are all consistent (ie have consistent shading, size, style etc. )   I would be happy to adopt any contributions but the icons in the patch don't seem to fit with the existing ones.

- James.
Comment 10 Ed Willink CLA 2009-03-23 15:52:10 EDT
In comment #4 I appealed for icon themes but unfortunately none were forthcoming, so I used my own imagination and limited GIMP skills and extended from Ecore where feasible. Just before offering the #7,#8 attachments I resolved two missing non-EssentialOCL icons and struck gold with the UML2 edit plugins.

The UML2 icons have a good consistent set of icons for UML classes, with a distinct generic black square border for OCL expressions, but the internals do not vary significantly for different OCL expression classes. This lack of variation was what I meant by lack of "serious content".

Perhaps we can align the themes somehow and avoid duplication between the two edit plugins.
Comment 11 Ed Willink CLA 2009-08-14 11:12:09 EDT
James: We're planning to add the edit support and textual editor for Helios, so I've been reviewing this Bugzilla.

You were not completely happy with the suggested OCL icons.

After comparing the two sets of icons:

UML2 has a consistent set of almost exclusively blue shaded icons.

The OCL proposal is a consistent set of mostly yellow-brown icons with coloured details.

I'm not quite clear what the inconsistencies you would like addressed.

a) graphic style e.g. blue/brown

b) specific icons

I can see a benefit in addressing b) where the proposed OCL icons are tending towards Ecore icons and so have the strange package icon, and less common class and property icons. Use of UML2-based icons for e.g PropertyCallExp would be better. Changing the shared Variable icon is feasible; I think it can just be shrunk enough for the surround of a VariableExp. I think the shape of the OCL Constraint icon is a bit better since the brace is more pronounced.

Will addressing b)-like issues satisfy your concerns.

I'm very reluctant to address a) since that requires a rework of all the icons and it is difficult to add decoration without colour. I suspect that user may find it quite helpful to have blue icons for UML2 and yellow/brown for OCL.
Comment 12 Ed Willink CLA 2009-09-12 15:56:16 EDT
Created attachment 147050 [details]
genmodels and templates for edit plugins

See next attachment
Comment 13 Ed Willink CLA 2009-09-12 15:58:23 EDT
Created attachment 147051 [details]
Revised icons

The attached now suppresses creation icons.

The main icons have much more in common with the UML2 edit icons.
Comment 14 Ed Willink CLA 2009-10-26 16:04:59 EDT
Ping.

Would someone like to +1 these plugins please?
Comment 15 Adolfo Sanchez-Barbudo Herrera CLA 2009-10-30 06:35:08 EDT
Ed, +1.

I don't have any additional comment about the icons' discussion. I'm not simply a graphic designer, and I'm not very enthusiastic about the appearance for them. They look fine for me.

Trivial: there is a strange value for the editorPluginClass="org.eclipse.ocl.editor.internal.OCLEditorPlugin" in the OCL.genmodel.

Cheers,
Adolfo.
Comment 16 Ed Willink CLA 2009-10-30 15:19:06 EDT
Changes committed to HEAD.

Removed internal from Editor plugin. I doubt that anyone will want the editor plugins though.
Comment 17 Ed Willink CLA 2009-11-10 05:27:09 EST
Alex: Please add these plugins to the releng for M3.
Comment 18 Alexander Igdalov CLA 2009-11-10 17:42:28 EST
(In reply to comment #17)
> Alex: Please add these plugins to the releng for M3.

Feature org.eclipse.ocl.edit containing .edit plugins created.
Comment 19 Ed Willink CLA 2011-05-27 02:48:19 EDT
Closing after over 18 months in resolved state.