Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 314832

Summary: ->eAllContents is proposed but fails silently
Product: [Modeling] Acceleo Reporter: Cedric Brun <cedric.brun>
Component: CoreAssignee: Project Inbox <acceleo-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P2 CC: ed, jonathan.musset, laurent.goubet, stephane.begaudeau
Version: 1.0.0   
Target Milestone: ---   
Hardware: PC   
OS: All   
See Also: https://git.eclipse.org/r/68784
https://git.eclipse.org/c/acceleo/org.eclipse.acceleo.git/commit/?id=c53f40da531410a26e401c688f7a2a0fde1a76fc
Whiteboard:
Attachments:
Description Flags
Patch
none
Patch v2
laurent.goubet: iplog+
revised patch none

Description Cedric Brun CLA 2010-05-28 05:16:25 EDT
I'm using Acceleo 3.0.0RC2.
If I write :

[template public generate(e : Document)]
	
	[comment @main /]
	[file ('test.html', false, 'UTF-8')]
	<html>
	[e->eAllContents().toHTML()/]
	</html>
	[/file]
	
[/template] 


[template public toHTML (elem : OclAny) ]
<!-- not handled yet  [elem.eClass().name/] -->
[/template]

The template compile finely, the completion even proposed me the eAllContents string after the "->", but II only get 
"
	<html>
	org.eclipse.emf.ecore.impl.DynamicEObjectImpl@1b12d63 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@11ae567 (name: OclInvalid_Class) (instanceClassName: null) (abstract: false, interface: false))
	</html>
"
in my generated file.

Once I change the ->eAllContents() to .eAllContents() then everything work as expected.
Comment 1 Jonathan MUSSET CLA 2010-05-28 05:32:11 EDT
Priority and severity have changed
Comment 2 Stephane Begaudeau CLA 2010-07-05 05:12:33 EDT
Created attachment 173396 [details]
Patch

With this patch, the completion process is improved.
- Now all the collection types (collection, set, ordered set, bag, sequence) will have access to our "collection non standard operations" in the completion window. These operations are Sep(String) : Sequence(OclAny) and Filter(OclType) : Collection(T)

- The ordered set and the sequence will have access to their non standard operations too. These operations are reverse() : OrderedSet(T) and lastIndexOf(T) : Integer
Comment 3 Stephane Begaudeau CLA 2010-07-06 08:20:43 EDT
Created attachment 173533 [details]
Patch v2

Refactoring of the previous patch
Comment 4 Laurent Goubet CLA 2010-07-06 11:04:32 EDT
Created attachment 173566 [details]
revised patch

This slightly revised patch removes unnecessary tests and prevents Acceleo from adding wrong completion proposals on Set and Bag.
Comment 5 Laurent Goubet CLA 2010-07-06 11:06:27 EDT
Patch commited on HEAD and available on maintenance
Comment 6 Laurent Goubet CLA 2010-07-29 10:18:50 EDT
*** Bug 321226 has been marked as a duplicate of this bug. ***
Comment 7 Stephane Begaudeau CLA 2010-09-13 23:29:14 EDT
Reopened because the patch has created a problem with the non standard library of Acceleo. This patch has been reverted in Acceleo 3.0.1 RC4 and Acceleo 3.1.0 M2. Another fix will be provided.
Comment 8 Stephane Begaudeau CLA 2011-11-10 04:59:18 EST
*** Bug 363444 has been marked as a duplicate of this bug. ***
Comment 9 Eclipse Genie CLA 2016-03-18 11:31:38 EDT
New Gerrit change created: https://git.eclipse.org/r/68784
Comment 10 Laurent Goubet CLA 2016-03-18 12:03:46 EDT
Review https://git.eclipse.org/r/#/c/68784/ removes EObject operation proposals from the collection completion ('->' operator) without presenting the bug 322145 regression observed back then.