|
|
Re: preprocessor plugin [message #163488 is a reply to message #163285] |
Sat, 29 November 2003 10:02 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: crscca.bol.net.n
Eugene did u try the eclipse cdt? does it already solve this issue?cann it
be resused?
Well I dont know about aspectj but a pre-processor could be useful if you
are in some rare case writing the same code again and again and for some
reson or the other you are not able to encapsulate it beyond a point using
OOP.
So as an alternative you end up developing a kind of template for various
pieces of code. If this is the purpose a C++ style preprocesor might be a
good idea.
As an extension or add on see if you can get the preprocessor to read
inputs from propertyfiles for "define" values and also run a loop on
various property/xml files as specified in one particular central
controller property/xml file. Could be useful under those circumstances.
This would eliminate some of the tedius apects of even preprocessor
statements.
Eugeny N Dzhurinsky wrote:
> Hello
> I found that standart "cpp" preprocessor can parse Java files.
> I checked source code for it - seems so be simple enough, so i'm going
> to develop the plug-in for C-like pre-processing in Java files. Right
> now i thinking in this way:
> When statring build-in parser for syntax check, get input stream of file
> to parse, then run the pre-processor, get output stream and pass it to
> the Eclipse's lexer (or whatever it uses). This way Eclipse will be able
> to parse the result file, and show the syntax/grammar's errors. For
> correct mapping of found error to original file (in case if they occures
> inside the case conditions or macros) i will need to have a way to get
> the line numbers for errors and map it to actual lines of original file
> with pre-processor statements. So the plug-in will be a "layer" between
> the UI for the graphical representation of Java file and the Eclipse's
> lexer.
> Can anybody suggest me anything regarding the thoughts given above?
|
|
|
Re: preprocessor plugin [message #266885 is a reply to message #163488] |
Fri, 13 August 2004 16:39 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: jbacon_FAKE_.magmic_FAKE_.com
Did anyone ever get around to writing a plugin for this? I am using
Antenna (antenna.sourceforge.net) for my J2ME development in Eclipse and
I have ifdef's all over the place which makes Eclipse's parsing choke.
I'd LOVE a plugin that would handle a preprocessor. I don't have the
time to spend on it but if someone else did that would ROCK.
Raster wrote:
> Eugene did u try the eclipse cdt? does it already solve this issue?cann it
> be resused?
>
> Well I dont know about aspectj but a pre-processor could be useful if you
> are in some rare case writing the same code again and again and for some
> reson or the other you are not able to encapsulate it beyond a point using
> OOP.
>
> So as an alternative you end up developing a kind of template for various
> pieces of code. If this is the purpose a C++ style preprocesor might be a
> good idea.
> As an extension or add on see if you can get the preprocessor to read
> inputs from propertyfiles for "define" values and also run a loop on
> various property/xml files as specified in one particular central
> controller property/xml file. Could be useful under those circumstances.
>
> This would eliminate some of the tedius apects of even preprocessor
> statements.
>
> Eugeny N Dzhurinsky wrote:
>
>
>>Hello
>
>
>>I found that standart "cpp" preprocessor can parse Java files.
>>I checked source code for it - seems so be simple enough, so i'm going
>>to develop the plug-in for C-like pre-processing in Java files. Right
>>now i thinking in this way:
>
>
>>When statring build-in parser for syntax check, get input stream of file
>>to parse, then run the pre-processor, get output stream and pass it to
>>the Eclipse's lexer (or whatever it uses). This way Eclipse will be able
>>to parse the result file, and show the syntax/grammar's errors. For
>>correct mapping of found error to original file (in case if they occures
>>inside the case conditions or macros) i will need to have a way to get
>>the line numbers for errors and map it to actual lines of original file
>>with pre-processor statements. So the plug-in will be a "layer" between
>>the UI for the graphical representation of Java file and the Eclipse's
>>lexer.
>
>
>>Can anybody suggest me anything regarding the thoughts given above?
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03391 seconds