Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Galileo, XPAND] Plugin missing?
[Galileo, XPAND] Plugin missing? [message #870656] Wed, 09 May 2012 09:06 Go to next message
Ricardo Ben Amor is currently offline Ricardo Ben AmorFriend
Messages: 51
Registered: March 2012
Member
Good morning,

In my project, i'm calling a lot of XTEND function which provide for an co-workers in my company.

When i'm adding their file in my project, almost all files work perfectly. But one of them have an error in a function.

("GetOneObject_AutosarElementOnBaseObjectRef Error: Object of type: "+ObjectRefDestType+" with ref: "+"'"+ObjectReference+"'"+" could not be found").error()->
         
   ObjectFound;


The expression ".error()" have an error. It says : « Couldn't find operation 'error()' for type 'string' ».

I'm thinking, that maybe i have a missing plugin which contain this expression?

Regards,

[Updated on: Wed, 09 May 2012 09:23]

Report message to a moderator

Re: [Galileo, XPAND] Plugin missing? [message #870683 is a reply to message #870656] Wed, 09 May 2012 10:37 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Hi have you the xtend stdlib on the class path and an extension
import for the io extension (see docs for stdlib)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [Galileo, XPAND] Plugin missing? [message #870690 is a reply to message #870683] Wed, 09 May 2012 11:14 Go to previous messageGo to next message
Ricardo Ben Amor is currently offline Ricardo Ben AmorFriend
Messages: 51
Registered: March 2012
Member
Today, i had this library :

org.eclipse.xtend.util.stdlib_1.2.0.v201203200457.jar

But indeed, the expression error() is not present in this plugin. Maybe i had to try another?
Re: [Galileo, XPAND] Plugin missing? [message #870698 is a reply to message #870690] Wed, 09 May 2012 11:32 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Hi is there really no io.ext contained?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [Galileo, XPAND] Plugin missing? [message #870710 is a reply to message #870698] Wed, 09 May 2012 12:24 Go to previous messageGo to next message
Ricardo Ben Amor is currently offline Ricardo Ben AmorFriend
Messages: 51
Registered: March 2012
Member
I'm searching in the plugin available but i don't find something with IO.

The expression error is calling in this library : org::openarchitectureware::util::stdlib::io;

Now i have to find, in which library in my version of Galileo is contain that.
Re: [Galileo, XPAND] Plugin missing? [message #870714 is a reply to message #870710] Wed, 09 May 2012 12:32 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Hi I do not know which version contains what but in eclipse expand
the package names are different from oaw xpand


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [Galileo, XPAND] Plugin missing? [message #870720 is a reply to message #870656] Wed, 09 May 2012 12:43 Go to previous messageGo to next message
Ricardo Ben Amor is currently offline Ricardo Ben AmorFriend
Messages: 51
Registered: March 2012
Member
Ok thanks,

In the plugin I have add this morning : org.eclipse.xtend.util.stdlib

When i open it, i have an io.ext file :

// ****************************************************************************
// *** openArchitectureWare stdlib extensions: io
// *** ------------------------------------------------------------------------
// *** This library contains functions for dumping objects to the console or 
// *** to stderr. 
// ****************************************************************************

private Void internalSyserr(Object s) :
   JAVA org.eclipse.xtend.util.stdlib.IOExtensions.syserr(java.lang.Object);

private Void internalSyserr(Object s, String prefix) :
   JAVA org.eclipse.xtend.util.stdlib.IOExtensions.syserr(java.lang.Object, java.lang.String);
 
private Void internalDebug(Object s) :
   JAVA org.eclipse.xtend.util.stdlib.IOExtensions.debug(java.lang.Object);

private Void internalInfo(Object s) :
   JAVA org.eclipse.xtend.util.stdlib.IOExtensions.info(java.lang.Object);

private Void internalError(Object s) :
   JAVA org.eclipse.xtend.util.stdlib.IOExtensions.error(java.lang.Object);

private Void internalThrowError(Object s) :
   JAVA org.eclipse.xtend.util.stdlib.IOExtensions.throwError(java.lang.Object);

/**
 * Prints an Object to stderr with a prefix string.
 * @param o The object that should be printed. null is allowed.
 * @param prefix A prefix string for the message.
 */ 

syserr(Object o) :
   internalSyserr(o) -> o;

/**
 * Prints an Object to stderr with a prefix string.
 * @param o The object that should be printed. null is allowed.
 * @param prefix A prefix string for the message.
 */ 
syserr(Object o, String prefix) :
   internalSyserr(o, prefix) -> o;

/**
 * Logs an object with DEBUG level to the logger.
 * @param o The object to dump.
 * @return The object o
 */
debug(Object o) :
   internalDebug(o) -> o;

/**
 * Logs an object with INFO level to the logger.
 * @param o The object to dump.
 * @return The object o
 */
info(Object o) :
   internalInfo(o) -> o;

/**
 * Logs an object with ERROR level to the logger.
 * @param o The object to dump.
 * @return The object o
 */
error(Object o) :
   internalError(o) -> o; 
/**
 * Throws an IllegalStateMessage.
 * @param o The exception message
 * @return Nothing, since an exception is thrown.
 */
throwError(Object o) :
  internalThrowError(o) -> o; 
   
   


Could be that?

Regards
Re: [Galileo, XPAND] Plugin missing? [message #870727 is a reply to message #870720] Wed, 09 May 2012 13:19 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Yes

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [Galileo, XPAND] Plugin missing? [message #870762 is a reply to message #870727] Wed, 09 May 2012 14:52 Go to previous messageGo to next message
Ricardo Ben Amor is currently offline Ricardo Ben AmorFriend
Messages: 51
Registered: March 2012
Member
Okay, this plugin is add to my project. But the problem still be the same. Maybe the use of the expression error() is not the same between the version of openrchitectureware and Eclipse Galileo?
Re: [Galileo, XPAND] Plugin missing? [message #870792 is a reply to message #870762] Wed, 09 May 2012 17:22 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Ca you Post your complete file

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [Galileo, XPAND] Plugin missing? [message #870874 is a reply to message #870792] Thu, 10 May 2012 07:01 Go to previous messageGo to next message
Ricardo Ben Amor is currently offline Ricardo Ben AmorFriend
Messages: 51
Registered: March 2012
Member
Hi,

Here my code. All my extension file are include correctly, there is no problem. The last one is with the expression erro like I say.

/*Import MetaModel from XSD Schema*/
import autosar;

/*Include OAW Utility Library*/
/*extension org::openarchitectureware::util::stdlib::io;*/

/*Include AUTOSAR XTend Library*/
extension AR_ArPackages;
extension AR_ComponentPrototype;


/*Include Utility Xtend Library*/
extension Utility_Library;

cached Object GetOneObject_AutosarElementOnBaseObjectRef(String ObjectReference,
                                                         String ObjectRefDestType,
                                                         Autosar a):
let DummyArPackage = (ArPackage)null:
let ObjectFound = GetObject_OneAutosarElementOnBaseObjectRef(a,DummyArPackage,ObjectReference,ObjectRefDestType, 0):
   
   ObjectFound != null?
      ObjectFound
   :
       ("GetOneObject_AutosarElementOnBaseObjectRef Error: Object of type: "+ObjectRefDestType+" with ref: "+"'"+ObjectReference+"'"+" could not be found").internalError()->
       
         
   ObjectFound;


Regards
Re: [Galileo, XPAND] Plugin missing? [message #870882 is a reply to message #870874] Thu, 10 May 2012 07:19 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
As I said: you need an
extension org::eclipse::...stdlib::io


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [Galileo, XPAND] Plugin missing? [message #870893 is a reply to message #870882] Thu, 10 May 2012 07:50 Go to previous message
Ricardo Ben Amor is currently offline Ricardo Ben AmorFriend
Messages: 51
Registered: March 2012
Member
Ok that works. I had thinked, that i must include a plugin. Indeed, it was just the extension : "extension org::eclipse::xtend::util::stdlib::io;", that i needed.


Thanks
Previous Topic:[Acceleo] Determining whether a modeling element is extended by some stereotype in a hierarchy
Next Topic:I've problems running an ATL M2T transformation from UML
Goto Forum:
  


Current Time: Thu Mar 28 21:46:32 GMT 2024

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

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

Back to the top