This service is archived, please use www.eclipse.org/forums


Home » Capella » M2Doc » Custom Service (how to get parameter)
Custom Service [message #3738] Mon, 02 December 2019 08:19 Go to next message
jpclavery.gmail.com is currently offline  jpclavery.gmail.com
Messages: 37
Registered: April 2019
Member
Hi all,

I wrote a Java Service that I call like this in my template :

{m:for pc | self.eAllContents(pa::PhysicalComponent)->select(p|p.name.equalsIgnoreCase('the parameter')).eAllContents(pa::PhysicalComponent)}
{m:pc.ServerTable()}
{m:endfor}

because I don't know how to test "the parameter" in my java Service.

In fact I would like to call my Java service like this :

{m:for pc | self.eAllContents(pa::PhysicalComponent)}
{m:pc.ServerTable()}
{m:endfor}

and get all PhysicalComponent with name 'the parameter' in the Java Service and not in the template.

Can someone help me please ?

Thanks




Re: Custom Service [message #3739 is a reply to message #3738] Mon, 02 December 2019 10:58 Go to previous messageGo to next message
jpclavery.gmail.com is currently offline  jpclavery.gmail.com
Messages: 37
Registered: April 2019
Member
Simply :

{m:for pc | self.eAllContents(pa::PhysicalComponent)}
{m:pc.ServerTable('the parameter')}
{m:endfor}

ServerTable(PhysicalComponent,'the parameter')
Re: Custom Service [message #3741 is a reply to message #3739] Tue, 03 December 2019 03:06 Go to previous message
yvan.lussaud.obeo.fr is currently offline  yvan.lussaud.obeo.fr
Messages: 43
Registered: October 2017
Member
Exactly see also my anser here: https://stackoverflow.com/q/59141078

If you need more details feel free to ask here.
Next Topic: Calling custom service from interpreter view
Goto Forum:
  


Current Time: Fri Jun 05 20:45:54 EST 2020

Total time taken to generate the page: 0.01562 seconds