Community
Participate
Working Groups
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.
Priority and severity have changed
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
Created attachment 173533 [details] Patch v2 Refactoring of the previous patch
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.
Patch commited on HEAD and available on maintenance
*** Bug 321226 has been marked as a duplicate of this bug. ***
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.
*** Bug 363444 has been marked as a duplicate of this bug. ***
New Gerrit change created: https://git.eclipse.org/r/68784
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.
Gerrit change https://git.eclipse.org/r/68784 was merged to [master]. Commit: http://git.eclipse.org/c/acceleo/org.eclipse.acceleo.git/commit/?id=c53f40da531410a26e401c688f7a2a0fde1a76fc