Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gendoc » String (substring(), equalsIgnoreCase(), )
String [message #1706603] Fri, 28 August 2015 06:04 Go to next message
David Niehaus is currently offline David NiehausFriend
Messages: 7
Registered: July 2015
Junior Member
Hi all,

I'm trying to launch some methods on Strings in the Gendoc script sth like this

...
[if (lAbs.client.qualifiedName.equalsIgnoreCase(lClass.qualifiedName))]
...
or
...
[if (lAbs.client.qualifiedName->equalsIgnoreCase(lClass.qualifiedName))]
...


but I get the following failure message

The execution of a script failed: Error during generation of Gendoc script :Invalid Expression Type: Bag(Boolean) should be Boolean
...
or
The execution of a script failed: Error during generation of Gendoc script :Cannot find operation (equalsIgnoreCase(String)) for the type (Bag(String))
...

Thx David

Re: String [message #1706617 is a reply to message #1706603] Fri, 28 August 2015 07:52 Go to previous messageGo to next message
Yves BERNARD is currently offline Yves BERNARDFriend
Messages: 152
Registered: July 2014
Senior Member
Hi David,

The point is that lClass appears to be a collection (a "Bag") and so, even if this bag contains only one element, lClass.qualifiedName() result in a collection of the same kind (i.e. "Bag) of Strings.

So, you need to change from Bag to a single element. They are number of ways to do it. Basically, you would like to get the unique element of a Bag. This can be done either before you get the qualified name (e.g. lClass->asSequence()->first()) or after (e.g. lClass.qualifiedName->asSequence()->first())

Yves


Yves

[Updated on: Fri, 28 August 2015 07:53]

Report message to a moderator

Re: String [message #1706642 is a reply to message #1706617] Fri, 28 August 2015 11:18 Go to previous message
David Niehaus is currently offline David NiehausFriend
Messages: 7
Registered: July 2015
Junior Member
it worked fine Smile

Thx a lot
Previous Topic:Requiremt export
Next Topic:Gendoc 0.5.1 available
Goto Forum:
  


Current Time: Thu Mar 28 21:08:26 GMT 2024

Powered by FUDForum. Page generated in 0.02548 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top