Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtend error(Xtend error)
Xtend error [message #1731221] Tue, 03 May 2016 15:26 Go to next message
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 120
Registered: April 2016
Senior Member
index.php/fa/25804/0/Hi Christian,

Please find the image

Why the error at line 35? Can you please tell me correct declaration?
Re: Xtend error [message #1731222 is a reply to message #1731221] Tue, 03 May 2016 15:27 Go to previous messageGo to next message
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 120
Registered: April 2016
Senior Member
val MessageConsole myConsole = new MessageConsole(name, null);

this line comes before 35
Re: Xtend error [message #1731225 is a reply to message #1731222] Tue, 03 May 2016 15:32 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Use #[myConsole] to create the array

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtend error [message #1731226 is a reply to message #1731225] Tue, 03 May 2016 15:37 Go to previous messageGo to next message
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 120
Registered: April 2016
Senior Member
I tried this but no luck
Re: Xtend error [message #1731227 is a reply to message #1731226] Tue, 03 May 2016 15:38 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
RamaRao Nandamuri <forums-noreply@xxxxxxxx> wrote:
> I tried this but no luck
>

What is the error message you get then


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtend error [message #1731228 is a reply to message #1731227] Tue, 03 May 2016 15:43 Go to previous messageGo to next message
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 120
Registered: April 2016
Senior Member
Type mismatch: cannot convert from IConsole to IConsole[]
Re: Xtend error [message #1731230 is a reply to message #1731228] Tue, 03 May 2016 15:46 Go to previous messageGo to next message
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 120
Registered: April 2016
Senior Member
The method IConsole((Object)=>Object) is undefined
Re: Xtend error [message #1731231 is a reply to message #1731230] Tue, 03 May 2016 15:51 Go to previous messageGo to next message
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 120
Registered: April 2016
Senior Member
Hi Christian,

It is working as :
conMan.addConsoles(#[console] as IConsole[])
Re: Xtend error [message #1731232 is a reply to message #1731230] Tue, 03 May 2016 15:51 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
sry i cannot reproduce

val IConsoleManager mgr = null
		mgr.addConsoles(#[myConsole])


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtend error [message #1731235 is a reply to message #1731232] Tue, 03 May 2016 16:19 Go to previous messageGo to next message
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 120
Registered: April 2016
Senior Member
This is the snippet to write message to console:

val console = new MessageConsole("JPL Console", null);
console.activate();
val ConsolePlugin cplugin = ConsolePlugin.getDefault();
val IConsoleManager conMan = cplugin.getConsoleManager();
conMan.addConsoles(#[console] as IConsole[])
val MessageConsoleStream stream = console.newMessageStream();

val sInput = stdInput.readLine()
if(sInput != null)
stream.println(sInput);
val sError = stdError.readLine()
if(sError != null)
stream.println(sError);
project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
Re: Xtend error [message #1731324 is a reply to message #1731235] Wed, 04 May 2016 09:44 Go to previous message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
Cannot reproduce that. Are you using a current version of Xtend?

---
Get professional support from the Xtext committers at www.typefox.io
Previous Topic:Change the "Xtext Task" in Task Browser
Next Topic:Generate Antlr grammar from Xtext
Goto Forum:
  


Current Time: Tue Apr 16 16:55:26 GMT 2024

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

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

Back to the top