[eol] problem with creating a native java String [message #545037] |
Tue, 06 July 2010 09:44  |
Eclipse User |
|
|
|
hi all
i was trying to create a java.lang.String as native type in eol (as shown in the book, listing 3.8 ), but it does not seem to work. i tried things like the following, but it always tells me that the methods (replaceAll, indexOf etc.) are not found.
var code = new Native("java.lang.String");
code.replaceAll("", node.viewmap.classBody.toString());
var index = code.indexOf("createContents()");
has anyone an idea what i'm doing wrong?
thanks
marco
|
|
|
|
|
|
Re: [eol] problem with creating a native java String [message #545105 is a reply to message #545097] |
Tue, 06 July 2010 12:04  |
Eclipse User |
|
|
|
Hi Marco,
The new version is now available in the interim update site:
http://download.eclipse.org/modeling/gmt/epsilon/interim/
Please note that we have heavily refactored some of the core parts of
Epsilon in this version and although all our tests are green, new bugs
may still have found their way in, so I'd recommend trying this in a new
Eclipse instance - just in case.
Cheers,
Dimitris
Dimitris Kolovos wrote:
> Hi Marco,
>
> In the new version you won't have to use Native(...) to define a native
> String as all strings will be native. var a : String; will create a new
> native string and then you can perform the assignment using = (i.e. a =
> "bla";).
>
> Cheers,
> Dimitris
>
> mkranz wrote:
>> hello dimitris
>>
>> sounds great! but i still have to use a native java string, right?
>> oh and btw., how's assignment handled with native strings?
>> can i do this?
>>
>> var string = new Native("java.lang.String");
>> string = "bla";
>>
>>
>> cheers
>>
>> marco
|
|
|
Re: [eol] problem with creating a native java String [message #590471 is a reply to message #545037] |
Tue, 06 July 2010 10:36  |
Eclipse User |
|
|
|
Hi Marco,
In the current version of Epsilon all instances of java.lang.String are
wrapped as instances of EolString. However, we've now removed all
wrapping and will be releasing a new interim version shortly (within the
next couple of hours) in which you can call all native functions as
well. I'll let you know when it's ready.
Cheers,
Dimitris
mkranz wrote:
> hi all
>
> i was trying to create a java.lang.String as native type in eol (as
> shown in the book, listing 3.8 ), but it does not seem to work. i tried
> things like the following, but it always tells me that the methods
> (replaceAll, indexOf etc.) are not found.
>
> var code = new Native("java.lang.String");
> code.replaceAll("", node.viewmap.classBody.toString());
> var index = code.indexOf("createContents()");
>
> has anyone an idea what i'm doing wrong?
>
> thanks
>
> marco
|
|
|
|
Re: [eol] problem with creating a native java String [message #590491 is a reply to message #545079] |
Tue, 06 July 2010 11:35  |
Eclipse User |
|
|
|
Hi Marco,
In the new version you won't have to use Native(...) to define a native
String as all strings will be native. var a : String; will create a new
native string and then you can perform the assignment using = (i.e. a =
"bla";).
Cheers,
Dimitris
mkranz wrote:
> hello dimitris
>
> sounds great! but i still have to use a native java string, right?
> oh and btw., how's assignment handled with native strings?
> can i do this?
>
> var string = new Native("java.lang.String");
> string = "bla";
>
>
> cheers
>
> marco
|
|
|
Re: [eol] problem with creating a native java String [message #590501 is a reply to message #545097] |
Tue, 06 July 2010 12:04  |
Eclipse User |
|
|
|
Hi Marco,
The new version is now available in the interim update site:
http://download.eclipse.org/modeling/gmt/epsilon/interim/
Please note that we have heavily refactored some of the core parts of
Epsilon in this version and although all our tests are green, new bugs
may still have found their way in, so I'd recommend trying this in a new
Eclipse instance - just in case.
Cheers,
Dimitris
Dimitris Kolovos wrote:
> Hi Marco,
>
> In the new version you won't have to use Native(...) to define a native
> String as all strings will be native. var a : String; will create a new
> native string and then you can perform the assignment using = (i.e. a =
> "bla";).
>
> Cheers,
> Dimitris
>
> mkranz wrote:
>> hello dimitris
>>
>> sounds great! but i still have to use a native java string, right?
>> oh and btw., how's assignment handled with native strings?
>> can i do this?
>>
>> var string = new Native("java.lang.String");
>> string = "bla";
>>
>>
>> cheers
>>
>> marco
|
|
|
Powered by
FUDForum. Page generated in 0.06890 seconds