Commit e52ad884 authored by Andrey Filippov's avatar Andrey Filippov

Working on view menu to start multiple targets for the same tool

parent 02c3694d
......@@ -22,8 +22,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import com.elphel.vdt.core.tools.config.ConfigException;
//TODO: Andrey: Now Parameter has file name
public class Checks {
public static void checkCyclicInheritance(Inheritable inheritanceChainMember, String entityName)
throws ConfigException
......
......@@ -24,7 +24,7 @@ import org.w3c.dom.*;
import org.xml.sax.SAXException;
import javax.xml.parsers.*;
import com.elphel.vdt.core.tools.BooleanUtils;
import com.elphel.vdt.core.tools.params.*;
import com.elphel.vdt.core.tools.params.conditions.*;
......@@ -33,6 +33,8 @@ import com.elphel.vdt.core.tools.config.*;
import com.elphel.vdt.core.tools.contexts.*;
import com.elphel.vdt.core.tools.menu.*;
import com.elphel.vdt.ui.MessageUI;
import com.elphel.vdt.veditor.VerilogPlugin;
import com.elphel.vdt.veditor.preference.PreferenceStrings;
public class XMLConfig extends Config {
......@@ -98,6 +100,11 @@ public class XMLConfig extends Config {
static final String CONTEXT_TOOL_SHELL_ATTR = "shell";
static final String CONTEXT_TOOL_EXTENSIONS_LIST_TAG = "extensions-list";
static final String CONTEXT_TOOL_EXTENSION_TAG = "extension";
static final String CONTEXT_TOOL_ACTION_LIST_TAG = "action-menu";
static final String CONTEXT_TOOL_ACTION_TAG = "action";
static final String CONTEXT_TOOL_ACTION_LABEL = "label";
static final String CONTEXT_TOOL_ACTION_RESOURCE = "resource";
static final String CONTEXT_TOOL_EXTENSION_MASK_ATTR = "mask";
static final String CONTEXT_TOOL_SYNTAX_ERRORS = "errors";
static final String CONTEXT_TOOL_SYNTAX_WARNINGS= "warnings";
......@@ -374,7 +381,8 @@ public class XMLConfig extends Config {
SAXException,
IOException
{
System.out.println("Reading file '" + configFile + "'");
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("Reading file '" + configFile + "'");
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
......@@ -424,7 +432,8 @@ public class XMLConfig extends Config {
List<DesignMenu> menuComponents = readDesignMenu(document);
designMenuManager.addDesignMenuComponents(menuComponents);
System.out.println("Done reading file '" + configFile + "'");
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER))
System.out.println("Done reading file '" + configFile + "'");
}
......@@ -567,15 +576,19 @@ public class XMLConfig extends Config {
// if(toolShell == null) toolShell="";
List<String> toolExtensionsList = readToolExtensionsList(contextNode, contextName);
List<RunFor> toolRunfor= readToolRunForList(contextNode, contextName);
System.out.println("contextNode.getNodeValue()="+contextNode.getNodeValue());
System.out.println("toolPackage="+toolPackage);
System.out.println("toolProject="+toolProject);
System.out.println("toolExe="+toolExe);
System.out.println("toolShell="+toolShell);
List<Tool.RunFor> toolRunfor= readToolRunForList(contextNode, contextName);
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER)) {
System.out.println("contextNode.getNodeValue()="+contextNode.getNodeValue());
System.out.println("toolPackage="+toolPackage);
System.out.println("toolProject="+toolProject);
System.out.println("toolExe="+toolExe);
System.out.println("toolShell="+toolShell);
if (toolRunfor!=null){
System.out.println("got toolRunfor.size()="+toolRunfor.size());
}
}
context = new Tool(contextName,
contextInterfaceName,
......@@ -610,8 +623,10 @@ public class XMLConfig extends Config {
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
ContextInputDefinition contextInputDefinition = readContextInputDefinition(contextNode, context);
if (contextKind==ContextKind.PROJECT){
System.out.println("processing project context");
if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER)) {
if (contextKind==ContextKind.PROJECT){
System.out.println("processing project context");
}
}
context.setParams(contextParams);
context.setParamGroups(contextInputDefinition.getParamGroups()); // "Project Properties", "General"
......@@ -943,11 +958,37 @@ public class XMLConfig extends Config {
}
private List<Tool.RunFor> readToolRunForList(Node toolNode, String toolName){
if (toolNode.getNodeValue()==null) return null;
System.out.println("FIXME: readToolRunForList("+toolNode.getNodeName() +", "+toolName+")"+
" rootNode="+rootNode.getNodeName()+" filename="+currentConfigFileName);
return null;
private List<RunFor> readToolRunForList(Node toolNode, String toolName)
throws ConfigException
{
String toolInfo = "Tool '" + toolName + "'";
List<RunFor> runForList = new ArrayList<RunFor>();
List<Node> runForNodesList = findChildNodes(toolNode, CONTEXT_TOOL_ACTION_LIST_TAG);
if(runForNodesList.isEmpty())
return null;
if(runForNodesList.size() > 1)
throw new ConfigException(toolInfo +
" definition cannot contain several '" +
CONTEXT_OUTPUT_SECTION_TAG +
"' nodes");
Node runForNode = runForNodesList.get(0);
List<Node> runForNodes = findChildNodes(runForNode, CONTEXT_TOOL_ACTION_TAG);
for(Iterator<Node> n = runForNodes.iterator(); n.hasNext();) {
Node node = (Node)n.next();
String label = getAttributeValue(node, CONTEXT_TOOL_ACTION_LABEL);
if (label == null)
throw new ConfigException(toolInfo + ": Attribute '" + CONTEXT_TOOL_ACTION_LABEL + "' is absent");
String resource = getAttributeValue(node, CONTEXT_TOOL_ACTION_RESOURCE);
if (resource == null)
throw new ConfigException(toolInfo + ": Attribute '" + CONTEXT_TOOL_ACTION_RESOURCE + "' is absent");
runForList.add(new RunFor(label, resource));
}
return runForList;
}
private List<Parameter> readParameters(Node node, Context context)
......
......@@ -31,7 +31,8 @@ public abstract class AbstractGenerator {
protected final String prefix, suffix;
protected String separator;
private final boolean forcedMultiline;
private boolean menuMode=false; // managing menu items, not running tool
public AbstractGenerator() {
this(false);
}
......@@ -60,7 +61,14 @@ public abstract class AbstractGenerator {
separator = separator.replace("\\n", "\n");
separator = separator.replace("\\t", "\t");
}
public void setMenuMode(boolean menuMode){
this.menuMode=menuMode;
}
public boolean getMenuMode(){
return menuMode;
}
public abstract String getName();
public String[] generate() {
......
......@@ -19,23 +19,37 @@ package com.elphel.vdt.core.tools.generators;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.ui.IPageLayout;
import com.elphel.vdt.VDT;
import com.elphel.vdt.ui.variables.SelectedResourceManager;
public class CurrentFileGenerator extends AbstractGenerator {
private static final String NAME = VDT.GENERATOR_ID_CURRENT_FILE;
// private boolean menuMode=false; // managing menu items, not running tool
public String getName() {
return NAME;
}
/*
public CurrentFileGenerator(boolean menuMode){
super();
this.menuMode=menuMode;
}
*/
/*
public void setMenuMode(boolean menuMode){
this.menuMode=menuMode;
}
*/
protected String[] getStringValues() {
IResource resource = SelectedResourceManager.getDefault().getSelectedResource();
IResource resource;
if (getMenuMode()) resource = SelectedResourceManager.getDefault().getViewSelectedResource(IPageLayout.ID_RES_NAV);
else resource = SelectedResourceManager.getDefault().getSelectedResource();
if((resource != null) && (resource.getType() == IResource.FILE))
return new String[] { ((IFile)resource).getLocation().toOSString() };
return new String[] { "" };
}
}
......@@ -23,11 +23,7 @@ import com.elphel.vdt.core.tools.Updateable;
import com.elphel.vdt.core.tools.config.ConfigException;
public class EntityUtilsMarkChildren {
// Updating tool context (to) from project context (from), items in to have now null context, in from - ProjectContext
/*
* Andrey: Seems there should be only one instance of each parameter, no cloning?
*/
//Andrey debugging: Updating tool context (to) from project context (from), items in to have now null context, in from - ProjectContext
public static <T extends Updateable> void update(List<Parameter> from, List<Parameter> to)
throws ConfigException
{
......
......@@ -122,6 +122,9 @@ public class Parameter implements Cloneable, Updateable {
this.relevant = relevant;
this.hasDependentParameters = false;
this.sourceXML=sourceXML;
if (id.equals("SimulationTopFile")){ // Andrey
System.out.println("Creating parameter SimulationTopFile, defaultValue="+defaultValue);
}
}
protected Parameter(Parameter param) {
this(param.id,
......@@ -164,26 +167,43 @@ public class Parameter implements Cloneable, Updateable {
this.context = context;
*/
if (id.equals("SimulationTopFile")){ // Andrey
System.out.println("Initializing parameter SimulationTopFile, defaultValue="+defaultValue);
}
// replacing:
if(this.context == context)
throw new ConfigException("Parameter ('" + id + "') cannot be re-initialized on the same context level"); // wrong file name, should be per-parameter
if(this.context == null) {
this.context = context;
} else {
System.out.println ("Andrey: Trying to use already defined context '"+this.context.getName()+
"' instead of the currently processed '"+context.getName()+"' for parameter '"+this.getID()+"'");
// Andrey: Not sure if initialization is still needed - it is probably done before cloning
// System.out.println("Skipping initialization - it is already done");
// return;
// Andrey: replacing with
if(this.context == context) {
// That kind of check never happens, same id parameter fro the same tool (not inherited) is silently ignored
throw new ConfigException("Parameter ('" + id + "') cannot be re-initialized on the same context level in "+sourceXML); // wrong file name, should be per-parameter
}
if(this.context != null) {
/*
System.out.println ("Andrey: Trying to use already defined context for parameter '"+id+"', context='"+this.context.getName()+
"' instead of the currently processed '"+context.getName()+"' for parameter '"+this.getID()+"'"+
" isChild="+getIsChild());
*/
setIsChild(true); // Still does not work with EntityUtils.update(), only with EntityUtilsMarkChildren.update()
return; // this parameter is inherited, already processed
}
this.context = context;
if (getIsChild()){
/*
System.out.println ("Andrey: isChild is set for parameter '"+id+"' context '"+this.context.getName()+
"' instead of the currently processed '"+context.getName()+"' for parameter '"+this.getID()+"'"+
" isChild="+getIsChild());
*/
}
this.context = context;
String contextInfo = "Context '" + context.getName() + "'";
if(typeName == null)
throw new ConfigException(contextInfo + ": Type name of parameter '" + id + "' is absent");
throw new ConfigException(contextInfo + ": Type name of parameter '" + id + "' is absent in "+sourceXML);
else if(syntaxName == null)
throw new ConfigException(contextInfo + ": Syntax name of parameter '" + id + "' is absent");
throw new ConfigException(contextInfo + ": Syntax name of parameter '" + id + "' is absent in "+sourceXML);
else if(defaultValue == null)
throw new ConfigException(contextInfo + ": Default value of parameter '" + id + "' is absent");
throw new ConfigException(contextInfo + ": Default value of parameter '" + id + "' is absent in "+sourceXML);
if(readonly == null)
readonly = new String(BooleanUtils.VALUE_FALSE);
......@@ -199,7 +219,7 @@ public class Parameter implements Cloneable, Updateable {
if(label == null)
throw new ConfigException(contextInfo + ": Label of the parameter '" + id +
"' is absent, while visible attribute is not " +
BooleanUtils.VALUE_FALSE);
BooleanUtils.VALUE_FALSE+" in "+sourceXML);
}
// this.type = context.getControlInterface().findParamType(typeName);
......@@ -209,7 +229,7 @@ public class Parameter implements Cloneable, Updateable {
throw new ConfigException(contextInfo + ": Parameter type '" + typeName +
// "' doesn't exist in control interface '" + context.getControlInterface().getName() +
"' doesn't exist in control interface '" + this.context.getControlInterface().getName() +
"'");
"' in "+sourceXML);
// this.syntax = context.getControlInterface().findSyntax(syntaxName);
this.syntax = this.context.getControlInterface().findSyntax(syntaxName);
......@@ -218,7 +238,7 @@ public class Parameter implements Cloneable, Updateable {
throw new ConfigException(contextInfo + ": Syntax '" + syntaxName +
// "' doesn't exist in control interface '" + context.getControlInterface().getName() +
"' doesn't exist in control interface '" + this.context.getControlInterface().getName() +
"'");
"' in "+sourceXML);
}
//
......@@ -292,6 +312,10 @@ public class Parameter implements Cloneable, Updateable {
//
public void setCurrentValue(String value) throws ToolException {
if (id.equals("SimulationTopFile")){ // Andrey
System.out.println("setCurrentValue() SimulationTopFile, value="+value);
}
if(type.isList())
throw new ToolException("Assigning a non-list value to list parameter");
......@@ -304,6 +328,10 @@ public class Parameter implements Cloneable, Updateable {
}
public void setCurrentValue(List<String> value) throws ToolException {
if (id.equals("SimulationTopFile")){ // Andrey
System.out.println("setCurrentValue() SimulationTopFile a list value");
}
if(!type.isList())
throw new ToolException("Assigning a list value to non-list parameter");
......@@ -315,6 +343,10 @@ public class Parameter implements Cloneable, Updateable {
}
public List<String> getCurrentValue() {
if (id.equals("SimulationTopFile")){ // Andrey
System.out.println("getCurrentValue() SimulationTopFile, value="+currentValue);
}
if(currentValue.isEmpty())
return null;
......@@ -354,6 +386,10 @@ public class Parameter implements Cloneable, Updateable {
// returns current value if it is set
// otherwise returns default value
public List<String> getValue() {
if (id.equals("SimulationTopFile")){ // Andrey
System.out.println("getValue() SimulationTopFile");
}
if(!currentValue.isEmpty())
return currentValue;
......@@ -363,6 +399,10 @@ public class Parameter implements Cloneable, Updateable {
// returns external form of the current value unless it equals null;
// otherwise returns external form of the default value
public List<String> getExternalValueForm() {
if (id.equals("SimulationTopFile")){ // Andrey
System.out.println("getExternalValueForm() SimulationTopFile");
}
List<String> externalFormValue = new ArrayList<String>();
for(Iterator<String> i = getValue().iterator(); i.hasNext();) {
......@@ -425,8 +465,12 @@ public class Parameter implements Cloneable, Updateable {
if(syntaxName == null)
syntaxName = param.syntaxName;
if(defaultValue == null)
if(defaultValue == null) {
defaultValue = param.defaultValue;
if (id.equals("SimulationTopFile")){ // Andrey
System.out.println("Updating parameter SimulationTopFile, defaultValue="+defaultValue);
}
}
if(label == null)
label = param.label;
......@@ -543,7 +587,7 @@ public class Parameter implements Cloneable, Updateable {
"' of parameter '" + id +
"' has value that is neither " + BooleanUtils.VALUE_TRUE +
", nor " + BooleanUtils.VALUE_FALSE +
", nor a condition expression");
", nor a condition expression in "+sourceXML);
}
}
......@@ -556,7 +600,7 @@ public class Parameter implements Cloneable, Updateable {
"' of parameter '" + id +
"' has value '" + boolValue +
"' that is neither " + BooleanUtils.VALUE_TRUE +
", nor " + BooleanUtils.VALUE_FALSE);
", nor " + BooleanUtils.VALUE_FALSE+" in "+sourceXML);
}
}
......
......@@ -20,11 +20,15 @@ package com.elphel.vdt.core.tools.params;
import java.util.*;
import java.io.*;
import org.eclipse.core.resources.IProject;
import com.elphel.vdt.core.options.OptionsCore;
import com.elphel.vdt.core.tools.*;
import com.elphel.vdt.core.tools.contexts.*;
import com.elphel.vdt.core.tools.config.*;
import com.elphel.vdt.core.tools.params.conditions.ConditionUtils;
import com.elphel.vdt.core.tools.params.recognizers.*;
import com.elphel.vdt.core.tools.params.types.RunFor;
public class Tool extends Context implements Cloneable, Inheritable {
......@@ -51,10 +55,6 @@ public class Tool extends Context implements Cloneable, Inheritable {
private boolean isShell = false; /* Tool is a shell, preserve first argument, merge all others */
private String projectPath=null;
private boolean initialized = false;
public class RunFor{
String prompt;
String resource;
}
public Tool(String name,
String controlInterfaceName,
String label,
......@@ -95,6 +95,10 @@ public class Tool extends Context implements Cloneable, Inheritable {
this.toolWarnings = toolWarnings;
this.toolInfo = toolInfo;
}
public List<RunFor> getRunFor(){
return runfor;
}
public void init(Config config) throws ConfigException {
if(initialized)
......@@ -200,7 +204,10 @@ public class Tool extends Context implements Cloneable, Inheritable {
return null;
FormatProcessor processor = new FormatProcessor(
new Recognizer[] { new ContextParamRecognizer(this) });
new Recognizer[] {
new ContextParamRecognizer(this),
// new SimpleGeneratorRecognizer() // Andrey: Trying
});
String[] actualExtensions = new String[extensions.size()];
......@@ -221,6 +228,76 @@ public class Tool extends Context implements Cloneable, Inheritable {
return actualExtensions;
}
public RunFor[] getMenuActions(IProject project) {
if(runfor == null)
return null;
updateContextOptions (project); // Fill in parameters
// Can be two different processors for labels and resources
//SimpleGeneratorRecognizer(true) may be not needed, as current file is already set here
FormatProcessor processor = new FormatProcessor(
new Recognizer[] {
new ContextParamRecognizer(this),
new SimpleGeneratorRecognizer(true) // in menuMode
// new SimpleGeneratorRecognizer(false) // in menuMode
});
RunFor[] actualActions = new RunFor[runfor.size()];
for(int i = 0; i < runfor.size(); i++) {
List<String> labels = null;
try {
labels = processor.process(runfor.get(i).getLabel());
} catch(ToolException e) {
assert false;
}
assert labels.size() == 1;
List<String> resources = null;
String resource=null;
try {
resources = processor.process(runfor.get(i).getResource());
} catch(ToolException e) {
// OK to be null;
}
if (resources!=null) {
assert ((resources==null) || (resources.size() == 1));
resource = resources.get(0);
}
actualActions[i] = new RunFor(labels.get(0), resource);
}
return actualActions;
}
private void updateContextOptions (IProject project){
PackageContext packageContext = getParentPackage();
if (packageContext != null) {
OptionsCore.doLoadContextOptions(packageContext);
try {
packageContext.buildParams();
} catch (ToolException e) { // Do nothing here
System.out.println("updateContextOptions ToolException for Package Context="+e.getMessage());
}
}
Context context = getParentProject();
if (context != null) {
OptionsCore.doLoadContextOptions(context, project);
try {
context.buildParams();
} catch (ToolException e) { // Do nothing here
System.out.println("updateContextOptions ToolException for Project Context="+e.getMessage());
}
}
OptionsCore.doLoadContextOptions(this, project);
try {
buildParams();
} catch (ToolException e) { // Do nothing here
System.out.println("updateContextOptions ToolException for Tool Context="+e.getMessage());
}
}
public List<Parameter> getParams() {
return paramContainer.getParams();
}
......@@ -235,8 +312,16 @@ public class Tool extends Context implements Cloneable, Inheritable {
public Parameter findParam(String paramID) {
Parameter param = super.findParam(paramID); //Andrey: happily finds ProjectContext parameter, thinks it is tool context
/*
* Andrey: Added isChild property to the Property, and still left static inheritance at XML parsing time. Then, during parameter
* processing that inheritance is ignored
*/
// if(param != null) // Was before the change described above
if ((param != null) &&(param.getID().equals("SimulationTopFile"))){ // Andrey
System.out.println("Initializing parameter SimulationTopFile, isChild="+param.getIsChild());
}
// if(param != null)
if ((param != null) && !param.getIsChild())
return param;
......@@ -404,7 +489,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
}
private void inheritParams(Context context) throws ConfigException {
// EntityUtils.update(context.getParams(), paramContainer.getParams());
// EntityUtils.update(context.getParams(), paramContainer.getParams());
EntityUtilsMarkChildren.update(context.getParams(), paramContainer.getParams());
}
......
......@@ -31,10 +31,19 @@ public class SimpleGeneratorRecognizer implements Recognizer {
new ProjectPathGenerator(),
new TopModuleNameGenerator(),
new CurrentFileGenerator(),
new ViewSelectedFileGenerator(),
// new ViewSelectedFileGenerator(),
new CurrentFileBaseGenerator()
};
public SimpleGeneratorRecognizer(){
super();
}
public SimpleGeneratorRecognizer(boolean menuMode){
super();
for (int i=0;i<generators.length;i++){
generators[i].setMenuMode(menuMode);
}
}
public RecognizerResult recognize(String template, int startPos) {
RecognizerResult result = new RecognizerResult();
......
/*******************************************************************************
* Copyright (c) 2006 Elphel, Inc and Excelsior, LLC.
* This file is a part of Eclipse/VDT plug-in.
* Eclipse/VDT plug-in is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* Eclipse/VDT plug-in is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with Eclipse VDT plug-in; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*******************************************************************************/
package com.elphel.vdt.core.tools.params.types;
public class RunFor{
public String label;
public String resource;
public RunFor(String label, String resource){
this.label=label;
this.resource=resource;
}
public String getLabel(){
return label;
}
public String getResource(){
return resource;
}
}
......@@ -43,15 +43,13 @@ import com.elphel.vdt.core.tools.ToolsCore;
import com.elphel.vdt.core.tools.contexts.Context;
import com.elphel.vdt.core.tools.menu.DesignMenu;
import com.elphel.vdt.core.tools.params.Tool;
import com.elphel.vdt.core.tools.params.types.RunFor;
import com.elphel.vdt.Txt;
import com.elphel.vdt.VDT;
//import com.elphel.vdt.VDTPlugin;
import com.elphel.vdt.veditor.VerilogPlugin;
import com.elphel.vdt.ui.MessageUI;
import com.elphel.vdt.ui.VDTPluginImages;
import com.elphel.vdt.ui.variables.SelectedResourceManager;
import com.elphel.vdt.ui.views.DesignMenuModel;
import com.elphel.vdt.ui.dialogs.DesignMenuSelectionDialog;
......@@ -429,14 +427,25 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
showProjectPropertiesToolbarAction.setProject(project);
clearProjectPropertiesAction.setProject(project);
// Selected item should be not null, but resource - may be
// RunFor[] getMenuActions()
if (selectedItem != null){
Tool tool= selectedItem.getTool();
if (tool!=null){
RunFor [] runFor=tool.getMenuActions(project);
System.out.println("Got Runfor["+((runFor!=null)?runFor.length:"null")+"]");
if (runFor!=null){
for (int i=0;i<runFor.length;i++){
System.out.println(" label='"+runFor[i].getLabel()+"', resource='"+runFor[i].getResource()+"'");
}
}
}
}
boolean enabled = (selectedItem != null) // At startup null (twice went through this); Right Click - "Icarus Ver..."
&& (selectedResource != null) // at startup x353_1.tf; Right Click - "L/x353/x353_1.tf
&& (selectedItem.isEnabled(selectedResource));
launchAction.setEnabled(enabled);
//Just trying
if (enabled){
......
......@@ -36,7 +36,7 @@
<parameter id = "SimulationTopFile"
label = "Project top simulation file"
type = "FileType"
default = ""
default = "default_top (testing)"
format = "ValueSyntax"
readonly= "false" />
......
......@@ -129,7 +129,7 @@
<parameter id = "SimulationTopFile"
label = "Project top simulation file"
type = "FileType"
default = ""
default = "default_top (testing)"
format = "ValueSyntax"
readonly= "false" />
......@@ -177,9 +177,10 @@
</extensions-list>
<action-menu>
<option label="Simulate" resource="%SimulationTopFile" />
<option label="Simulate" resource="%%SelectedFile" />
<option label="Just try for" resource="%%OS" />
<action label="Simulate" resource="%SimulationTopFile" />
<action label="Simulate for" resource="%%CurrentFile" />
<action label="Empty" resource="" />
<action label="Just try for" resource="%%OS" />
</action-menu>
......@@ -190,6 +191,7 @@
default = "-c"
readonly = "false"
visible = "true"/>
<!-- Intentional error: No, does not detect duplicates yet-->
<parameter id = "Param_PreExe"
label = "Param_PreExe"
......@@ -298,35 +300,34 @@
default = "build1"
format = "ValueSyntax"
readonly= "false" />
<input>
<group name="files" label="Files">
"Param_PreExe"
"Param_Exe"
"Param_Shell_Options"
"Param_TopModule"
"TopModulesOther"
"ModuleLibrary"
"ExtraFiles"
</group>
<group name="options" label="Options">
"ErrorsOnly"
"Filter_String"
"v"
"LegacyModel"
"NoSpecify"
<!-- "SourceList" -->
</group>
<group name="files" label="Files">
<!-- "SimulationTopFile" -->
"Param_PreExe"
"Param_Exe"
"Param_Shell_Options"
"Param_TopModule"
"TopModulesOther"
"ModuleLibrary"
"ExtraFiles"
</group>
<group name="options" label="Options">
"ErrorsOnly"
"Filter_String"
"v"
"LegacyModel"
"NoSpecify"
<!-- "SourceList" -->
</group>
</input>
<output>
<line name="command_line" sep=" ">
"%Param_Shell_Options"
"echo BuildDir=%BuildDir ;"
"echo SimulationTopFile=%SimulationTopFile ;"
"echo SimulationTopModule=%SimulationTopModule ;"
"echo BuildDir=%BuildDir ;"
"%Param_PreExe"
"%Param_Exe"
"%Param_TopModule"
......@@ -344,7 +345,7 @@
</output>
</tool>
<!-- "echo %SimulationTopFile %%SelectedFile ;" -->
<!-- "echo %SimulationTopFile %%CurrentFile ;" -->
<!--
"-s counter_tb"
"%SourceList" -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment