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; ...@@ -37,13 +37,26 @@ import org.eclipse.swt.widgets.Shell;
*/ */
public class DirListPromptDialog extends ListPromptDialog { public class DirListPromptDialog extends ListPromptDialog {
public DirListPromptDialog( final Shell parentShell, String title) { public DirListPromptDialog(
final Shell parentShell,
String title,
final String projectPath
) {
super( parentShell super( parentShell
, title , title
, new IAddAction() { , new IAddAction() {
public String getNewValue() { public String getNewValue() {
DirectoryDialog dialog = new DirectoryDialog(parentShell); 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; return selectedDir;
} }
} }
......
...@@ -26,9 +26,13 @@ ...@@ -26,9 +26,13 @@
*******************************************************************************/ *******************************************************************************/
package com.elphel.vdt.ui.options.component; 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.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 { public class DirListComponent extends ListComponent {
...@@ -36,9 +40,17 @@ public class DirListComponent extends ListComponent { ...@@ -36,9 +40,17 @@ public class DirListComponent extends ListComponent {
super(param); 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() return new DirListPromptDialog( promptField.getVisibleNameField().getShell()
, "Directory list prompt" ); , "Directory list prompt",
fProjectPath);
} }
} }
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
call="iverilog"/> call="iverilog"/>
</menu> </menu>
<menu name="ISE" <menu name="ISE"
label="ISE Tools" label="Xilinx ISE Tools"
icon="xilinx.png"> icon="ise_logo.png">
<menu name="ISE_utils" <menu name="ISE_utils"
label="ISE utilities" label="ISE utilities"
icon="setup.png"> icon="setup.png">
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
</menu> </menu>
<menu name="Vivado" <menu name="Vivado"
label="Vivado Tools" label="Xilinx Vivado Tools"
icon="vivado_logo.png"> icon="vivado_logo.png">
<menu name="VivadoUtils" <menu name="VivadoUtils"
label="Vivado utilities" label="Vivado utilities"
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
call="VivadoBitstream"/> call="VivadoBitstream"/>
</menu> </menu>
<menu name="Quartus" <menu name="Quartus"
label="Quartus tools" label="Altera Quartus tools"
icon="quartus16x16.png"> icon="quartus16x16.png">
<menuitem name="Quartus Server" <menuitem name="Quartus Server"
label="Start remote Quartus session" label="Start remote Quartus session"
......
...@@ -124,6 +124,10 @@ ...@@ -124,6 +124,10 @@
format="CopyValue" default="iverilog" readonly="false" format="CopyValue" default="iverilog" readonly="false"
visible="true" /> 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" <parameter id="VVP_Exe" label="VVP_Exe" type="Filename"
format="CopyValue" default="vvp" readonly="false" format="CopyValue" default="vvp" readonly="false"
visible="true" /> visible="true" />
...@@ -304,6 +308,7 @@ ...@@ -304,6 +308,7 @@
"Param_Exe" "Param_Exe"
"Param_Shell_Options" "Param_Shell_Options"
"IVerilogOther" "IVerilogOther"
"VVP_prefix"
"VVP_Exe" "VVP_Exe"
"GtkWave_Exe" "GtkWave_Exe"
"LogFile" "LogFile"
...@@ -382,6 +387,7 @@ ...@@ -382,6 +387,7 @@
<!-- "time vvp -v" --> <!-- "time vvp -v" -->
"%Param_1" "%Param_1"
"trap 'killall vvp; ' EXIT;" "trap 'killall vvp; ' EXIT;"
"%VVP_prefix"
"%VVP_Exe -v" "%VVP_Exe -v"
"%Param_2" "%Param_2"
"%OutFileFull" "%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