List<CommandLinesBlock>contextCommandLinesBlocks=readCommandLinesBlocks(contextNode,context);// Correct? for "project_parameters" in /vdt/tools/Verilog/IVerilog.xml
// Each of contextParams (3 total, correct) has null context. Probably OK, same for the tool context
Iterator<CommandLinesBlock>commandLinesBlockIter=commandLinesBlocks.iterator();// command lines block is empty (yes, there is nothing in project output)
createdControlFiles.clear();
...
...
@@ -203,7 +204,7 @@ public abstract class Context {
@@ -39,6 +39,9 @@ public class Tool extends Context implements Cloneable, Inheritable {
privateList<String>extensions;
privateList<RunFor>runfor;
privateToolbaseTool;
privatePackageContextparentPackage;
privateProjectContextparentProject;
...
...
@@ -48,7 +51,10 @@ public class Tool extends Context implements Cloneable, Inheritable {
privatebooleanisShell=false;/* Tool is a shell, preserve first argument, merge all others */
privateStringprojectPath=null;
privatebooleaninitialized=false;
publicclassRunFor{
Stringprompt;
Stringresource;
}
publicTool(Stringname,
StringcontrolInterfaceName,
Stringlabel,
...
...
@@ -63,6 +69,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
StringtoolErrors,
StringtoolWarnings,
StringtoolInfo,
List<RunFor>runfor,
/* never used ??? */
List<Parameter>params,
List<ParamGroup>paramGroups,
...
...
@@ -76,7 +83,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
params,
paramGroups,
commandLinesBlocks);
this.runfor=runfor;
this.baseToolName=baseToolName;
this.label=label;
this.parentPackageName=parentPackageName;
...
...
@@ -107,7 +114,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
initParentPackage();
initParentProject();
initParams();
initParams();// *Inherits and sets up contexts? Also Error with copying context to items
initOtherAttributes();
initCommandLines();
...
...
@@ -227,9 +234,10 @@ public class Tool extends Context implements Cloneable, Inheritable {
}
publicParameterfindParam(StringparamID){
Parameterparam=super.findParam(paramID);
Parameterparam=super.findParam(paramID);//Andrey: happily finds ProjectContext parameter, thinks it is tool context
if(param!=null)
// if(param != null)
if((param!=null)&&!param.getIsChild())
returnparam;
if(baseTool!=null){
...
...
@@ -288,8 +296,16 @@ public class Tool extends Context implements Cloneable, Inheritable {
//
protectedvoidinitParams()throwsConfigException{
/*
* Seems that inheritance is implemented twice - here and when generating output lines, and the parameters are cloned, so when say
* project parameters are modified, the changes are not propagated to the tool parameters. I'll try to disable inheritance here,
* see what happens (this intermediate inheritance may be still needed somewhere - exe name, extensions?). Another option would be to reference instead of cloning
* and skip initialization of the "alien" context parameters.
*
* Yes, exe name wants it
*/
if(parentProject!=null)
inheritParams(parentProject);
inheritParams(parentProject);// Here inheriting project parameters
if(parentPackage!=null)
inheritParams(parentPackage);
...
...
@@ -308,9 +324,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
inheritParams(baseTool);
inheritParamGroups();
}
paramContainer.init(config,this);
paramContainer.init(config,this);// Error inside here when context is cloned in inheritance. Parameter ('SimulationTopFile') cannot be re-initialized
initParamGroups();
}
...
...
@@ -390,7 +404,8 @@ public class Tool extends Context implements Cloneable, Inheritable {