[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] Re: [QVTO]string operations and blackboxes

Thanks, Radek,

Maybe I'm gonna wait for the integration build. Using the library, I got strange things, like:

log(self.name);    => prints out:  b<k->1>

log(self.name.substring(0,self.name.indexOf('<'))) => prints out: org.eclipse.emf.ecore.impl.DynamicEObjectImpl@f2869f (eClass: org.eclipse.emf.ecore.impl.EClassImpl@64419f (name: Invalid_Class) (instanceClassName: null) (abstract: false, interface: false))

Is it something I missed? I just added the import library Strings to the transformation.

CÃsar

"Radek Dvorak" <radek.dvorak@xxxxxxxxxxx> a Ãcrit dans le message de news:op.t927bqovhj1a1g@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Cesar,

We have already implemented complete String operatons set according to the spec.
But it was committed after M6, which you are apparently using.
We will produce integration build this week, so you could make use of it.


Anyway, once the QVT standard library does not implement all you want, you have to blackbox it.
There was already mentioned meachism in this newsgroup -
see '[QVTO] Adding custom operations for primitive data types' topic.


This is an old way of blackboxing (came from Borland initial contribution), we
plan to generate java skeletons from QVT operations headers.


So far, there is a helper String library available in QVTO, you access it like this

import library Strings;

but most of its routine have been implemented in StdLib already.


Regards, /Radek

On Thu, 24 Apr 2008 00:42:32 +0200, kaiserlautern <comouraf-lixo@xxxxxxxx> wrote:

Hi,

I have strings like a<K->1,T->T1> and would like to separate parameters (in this example, K and T) from their values (1 and T1). Apparently, QVTO implements just a fraction of the string operations proposed in the spec, making it very difficult (if possible at all) to "tokenize" strings. So, is this a typical case for blackboxes? If so, how to implement them? Is there any particularity or all I have to write is a plain (java?) class implementing only the interface declared in the qvt file? Where to put my classes?

Thanks,

CÃsar



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/