Skip to main content



      Home
Home » Modeling » TMF (Xtext) » How to know the information of project during Lexical analyzing
icon5.gif  How to know the information of project during Lexical analyzing [message #893934] Fri, 06 July 2012 02:45 Go to next message
Eclipse UserFriend
During lexical analyzing, I want to determine which file the lexer works on. How can I get this information during the Lexcial analyzing?
Re: How to know the information of project during Lexical analyzing [message #894036 is a reply to message #893934] Fri, 06 July 2012 09:02 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

what about calling CharString.getSourceName?

~Christian

[Updated on: Fri, 06 July 2012 09:02] by Moderator

Re: How to know the information of project during Lexical analyzing [message #894395 is a reply to message #894036] Mon, 09 July 2012 01:37 Go to previous messageGo to next message
Eclipse UserFriend
Hi Christian,

Thanks for your reply.
I have tried by the following code
@Override
	public void mTokens() throws RecognitionException {
		// TODO Auto-generated method stub
		super.mTokens();
		System.out.println("name = " + input.getSourceName());
	}

And, the result is "null".
Actually, I prefer to get the instance of IProject in the lexer.
Re: How to know the information of project during Lexical analyzing [message #894397 is a reply to message #894395] Mon, 09 July 2012 02:13 Go to previous message
Eclipse UserFriend
Hi

the first one sounds like a bug to me (please file a bugzilla)
the second one like an enhancement request.

~Christian

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@xxxxxxxx
Previous Topic:How to run an MWE2 workflow from Java
Next Topic:automatically adding a xtext nature to an existing file
Goto Forum:
  


Current Time: Thu Jul 03 20:04:27 EDT 2025

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

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

Back to the top