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();
createdControlFiles.clear();
...
@@ -203,7 +204,7 @@ public abstract class Context {
...
@@ -203,7 +204,7 @@ public abstract class Context {
@@ -39,6 +39,9 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -39,6 +39,9 @@ public class Tool extends Context implements Cloneable, Inheritable {
privateList<String>extensions;
privateList<String>extensions;
privateList<RunFor>runfor;
privateToolbaseTool;
privateToolbaseTool;
privatePackageContextparentPackage;
privatePackageContextparentPackage;
privateProjectContextparentProject;
privateProjectContextparentProject;
...
@@ -48,7 +51,10 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -48,7 +51,10 @@ public class Tool extends Context implements Cloneable, Inheritable {
privatebooleanisShell=false;/* Tool is a shell, preserve first argument, merge all others */
privatebooleanisShell=false;/* Tool is a shell, preserve first argument, merge all others */
privateStringprojectPath=null;
privateStringprojectPath=null;
privatebooleaninitialized=false;
privatebooleaninitialized=false;
publicclassRunFor{
Stringprompt;
Stringresource;
}
publicTool(Stringname,
publicTool(Stringname,
StringcontrolInterfaceName,
StringcontrolInterfaceName,
Stringlabel,
Stringlabel,
...
@@ -63,6 +69,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -63,6 +69,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
StringtoolErrors,
StringtoolErrors,
StringtoolWarnings,
StringtoolWarnings,
StringtoolInfo,
StringtoolInfo,
List<RunFor>runfor,
/* never used ??? */
/* never used ??? */
List<Parameter>params,
List<Parameter>params,
List<ParamGroup>paramGroups,
List<ParamGroup>paramGroups,
...
@@ -76,7 +83,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -76,7 +83,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
params,
params,
paramGroups,
paramGroups,
commandLinesBlocks);
commandLinesBlocks);
this.runfor=runfor;
this.baseToolName=baseToolName;
this.baseToolName=baseToolName;
this.label=label;
this.label=label;
this.parentPackageName=parentPackageName;
this.parentPackageName=parentPackageName;
...
@@ -107,7 +114,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -107,7 +114,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
initParentPackage();
initParentPackage();
initParentProject();
initParentProject();
initParams();
initParams();// *Inherits and sets up contexts? Also Error with copying context to items
initOtherAttributes();
initOtherAttributes();
initCommandLines();
initCommandLines();
...
@@ -227,9 +234,10 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -227,9 +234,10 @@ public class Tool extends Context implements Cloneable, Inheritable {
}
}
publicParameterfindParam(StringparamID){
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;
returnparam;
if(baseTool!=null){
if(baseTool!=null){
...
@@ -288,8 +296,16 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -288,8 +296,16 @@ public class Tool extends Context implements Cloneable, Inheritable {
//
//
protectedvoidinitParams()throwsConfigException{
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)
if(parentProject!=null)
inheritParams(parentProject);
inheritParams(parentProject);// Here inheriting project parameters
if(parentPackage!=null)
if(parentPackage!=null)
inheritParams(parentPackage);
inheritParams(parentPackage);
...
@@ -308,9 +324,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -308,9 +324,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
inheritParams(baseTool);
inheritParams(baseTool);
inheritParamGroups();
inheritParamGroups();
}
}
paramContainer.init(config,this);// Error inside here when context is cloned in inheritance. Parameter ('SimulationTopFile') cannot be re-initialized
paramContainer.init(config,this);
initParamGroups();
initParamGroups();
}
}
...
@@ -390,7 +404,8 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -390,7 +404,8 @@ public class Tool extends Context implements Cloneable, Inheritable {