Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357960

Summary: Generation arguments aren't passed along to generators
Product: z_Archived Reporter: Matt Heitz <mheitz>
Component: EDTAssignee: Justin Spadea <jspadea>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: greer, jeffdouglas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Matt Heitz CLA 2011-09-16 12:28:07 EDT
When I enter generation arguments in the EGL Compiler properties page, they don't make it into the Java generator.  I haven't tried JavaScript.
Comment 1 Justin Spadea CLA 2011-09-16 16:01:37 EDT
Fixed the following:

ExampleGenerator
JavaScriptDevGenerator
JavaGenerator
JavaScriptGenerator
AbstractGenerator
WorkingCopyGenerationOperation

I removed some duplicate methods that did identical things (one method took IFile, the other took IResource, the IFile version is now gone). Each generator had a buildArgs() which was doing the same thing. This has been moved to AbstractGenerator, and this method now reads in the argument string specified on the property dialog and breaks the string into an argument array. This uses the same type of escaping and quoting that the Java command line uses to break up arguments.
Comment 2 Justin Spadea CLA 2011-09-16 16:03:45 EDT
Note that I tried to test this with "-report true", but this flag is being checked before the arguments get processed. Someone needs to change how this flag is used. I did step through the code to verify that, after the args are processed, that the report parameter was set to true.
Comment 3 Matt Heitz CLA 2011-09-19 22:55:02 EDT
It's working.  I updated JavaGenerator so it doesn't look at the -report flag until it's time to generate something.  By that time the args have been processed, so we get the correct value for -report.
Comment 4 Justin Spadea CLA 2011-09-20 09:02:35 EDT
Did you make the same change in the JavaScript generator?
Comment 5 Matt Heitz CLA 2011-09-20 09:13:46 EDT
No, I didn't update the JS generator.  Adding Scott to the CC list so he can look into it.