Commit 90045834 authored by Andrey Filippov's avatar Andrey Filippov

upfated to other branch

parent ceb85327
......@@ -37,13 +37,26 @@ import org.eclipse.swt.widgets.Shell;
*/
public class DirListPromptDialog extends ListPromptDialog {
public DirListPromptDialog( final Shell parentShell, String title) {
public DirListPromptDialog(
final Shell parentShell,
String title,
final String projectPath
) {
super( parentShell
, title
, new IAddAction() {
public String getNewValue() {
DirectoryDialog dialog = new DirectoryDialog(parentShell);
String selectedDir = dialog.open();
String selectedDir = dialog.open();
// try to replace prefix with ${"verilog_project_loc"}
if ((selectedDir!=null) && selectedDir.startsWith(projectPath)) {
if (selectedDir.equals(projectPath)){
System.out.println("DirListPromptDialog(): Path equals to project path = \""+selectedDir+"\", returning \"${verilog_project_path}\"");
return "${verilog_project_loc}";
}
return "${verilog_project_loc}"+selectedDir.substring(projectPath.length());
}
return selectedDir;
}
}
......
......@@ -26,9 +26,13 @@
*******************************************************************************/
package com.elphel.vdt.ui.options.component;
import com.elphel.vdt.core.tools.params.Parameter;
import org.eclipse.core.resources.IProject;
import com.elphel.vdt.core.tools.params.Parameter;
import com.elphel.vdt.ui.dialogs.ListPromptDialog;
import com.elphel.vdt.ui.dialogs.DirListPromptDialog;
import com.elphel.vdt.ui.dialogs.DirListPromptDialog;
import com.elphel.vdt.ui.variables.SelectedResourceManager;
public class DirListComponent extends ListComponent {
......@@ -36,9 +40,17 @@ public class DirListComponent extends ListComponent {
super(param);
}
protected ListPromptDialog createDialog() {
protected ListPromptDialog createDialog() {
IProject project = SelectedResourceManager.getDefault().getSelectedProject();
String projectPath=null;
if (project!=null) {
projectPath=project.getLocation().toString();
}
final String fProjectPath=projectPath;
return new DirListPromptDialog( promptField.getVisibleNameField().getShell()
, "Directory list prompt" );
, "Directory list prompt",
fProjectPath);
}
}
......@@ -46,8 +46,8 @@
call="iverilog"/>
</menu>
<menu name="ISE"
label="ISE Tools"
icon="xilinx.png">
label="Xilinx ISE Tools"
icon="ise_logo.png">
<menu name="ISE_utils"
label="ISE utilities"
icon="setup.png">
......@@ -99,7 +99,7 @@
</menu>
<menu name="Vivado"
label="Vivado Tools"
label="Xilinx Vivado Tools"
icon="vivado_logo.png">
<menu name="VivadoUtils"
label="Vivado utilities"
......@@ -183,7 +183,7 @@
call="VivadoBitstream"/>
</menu>
<menu name="Quartus"
label="Quartus tools"
label="Altera Quartus tools"
icon="quartus16x16.png">
<menuitem name="Quartus Server"
label="Start remote Quartus session"
......
......@@ -124,6 +124,10 @@
format="CopyValue" default="iverilog" readonly="false"
visible="true" />
<parameter id="VVP_prefix" label="VVP command prefix" type="String"
format="CopyValue" default="time stdbuf -i0 -o0 -e0" omit="" readonly="false"
visible="true" />
<parameter id="VVP_Exe" label="VVP_Exe" type="Filename"
format="CopyValue" default="vvp" readonly="false"
visible="true" />
......@@ -304,6 +308,7 @@
"Param_Exe"
"Param_Shell_Options"
"IVerilogOther"
"VVP_prefix"
"VVP_Exe"
"GtkWave_Exe"
"LogFile"
......@@ -382,6 +387,7 @@
<!-- "time vvp -v" -->
"%Param_1"
"trap 'killall vvp; ' EXIT;"
"%VVP_prefix"
"%VVP_Exe -v"
"%Param_2"
"%OutFileFull"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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