| Summary: | [Generator] Bad generation on "selection" attribute. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EEF | Reporter: | Miles Parker <milesparker> | ||||
| Component: | General | Assignee: | EEF Inbox <emft.eef-inbox> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | sbouchet, stephane.begaudeau | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Hi, Could you provide more details to be able to reproduce your problem ? i could not reproduce on our non regression tests cases. Can you provide a very small set of models ( ecore, genmodel, components and eef gen ) ? thanks, Created attachment 207497 [details]
Projects exercising selection issue.
Sure. This exercises the issue. All that I'm doing here is creating a cardinality 0..-1 reference to EObject.
thanks ! we'll have a look. The Eclipse EEF team has worked over the past few months on a brand new runtime using a reflective approach which can be used more easily with Eclipse Sirius. Since we do not plan to continue to work on the old runtime and its code generation approach, I will close this issue for now. If you want to contribute, you can reopen this issue and submit a contribution to the project thanks to our Gerrit: https://git.eclipse.org/r/#/admin/projects/eef/org.eclipse.eef |
I have a model with an attribute called "selection". When I tried to generate code for my model, I got a lot of bad code, for example: protected void addSelection() { TabElementTreeSelectionDialog dialog = new TabElementTreeSelectionDialog(selection.getInput(), selectionFilters, selectionBusinessFilters, "selection", propertiesEditionComponent.getEditingContext().getAdapterFactory(), current.eResource()) { @Override public void process(IStructuredSelection selection) { for (Iterator<?> iter = selection.iterator(); iter.hasNext();) { EObject elem = (EObject) iter.next(); propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(SelectionHistoryItemPropertiesEditionPartImpl.this, ButterflyzerViewsRepository.SelectionHistoryItem.Properties.selection, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem)); } ****ERRROR HERE selection.refresh(); } }; dialog.open(); } This was a bit difficult to diagnose as I also got some scary generation issues. I'll file those in a separate bug.