Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vdt-plugin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
vdt-plugin
Commits
ad2afc3e
Commit
ad2afc3e
authored
Jan 27, 2014
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added optional local echo (for generated commands) on remote console
parent
c5781ccb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
43 deletions
+32
-43
VDTRunner.java
src/com/elphel/vdt/core/launching/VDTRunner.java
+23
-35
Remote.xml
tools/SimpleSamples/Remote.xml
+9
-8
No files found.
src/com/elphel/vdt/core/launching/VDTRunner.java
View file @
ad2afc3e
...
...
@@ -236,7 +236,6 @@ public class VDTRunner {
,
IProgressMonitor
monitor
)
throws
CoreException
{
//TODO: Handle monitor
System
.
out
.
println
(
"VDTLaunchConfigurationDelegate.doLaunch: console ("
+
consolePrefix
+
") commands not yet implemented"
);
// Find console with name starting with consolePrefix
IConsoleManager
man
=
ConsolePlugin
.
getDefault
().
getConsoleManager
();
// debugging
IConsole
[]
consoles
=(
IConsole
[])
man
.
getConsoles
();
...
...
@@ -254,6 +253,9 @@ public class VDTRunner {
// try to send
String
[]
arguments
=
configuration
.
getToolArguments
();
if
(
arguments
==
null
)
arguments
=
new
String
[
0
];
log
(
"Writing to console "
+
iCons
.
getName
()+
":"
,
arguments
,
null
,
false
,
true
);
/* Appears in the console of the target Eclipse (immediately erased) */
log
(
"Writing to console "
+
iCons
.
getName
()+
":"
,
arguments
,
null
,
false
,
false
);
/* Appears in the console of the parent Eclipse */
// IOConsoleInputStream inStream= iCons.getInputStream();
IOConsoleOutputStream
outStream
=
iCons
.
newOutputStream
();
IProcess
process
=((
ProcessConsole
)
iCons
).
getProcess
();
...
...
@@ -261,7 +263,9 @@ public class VDTRunner {
try
{
for
(
int
i
=
0
;
i
<
arguments
.
length
;
i
++){
// outStream.write(arguments[i]); // writes to console itself
if
(
VerilogPlugin
.
getPreferenceBoolean
(
PreferenceStrings
.
LOCAL_ECHO
))
{
outStream
.
write
(
arguments
[
i
]+
"\n"
);
// writes to console itself
}
iStreamProxy
.
write
(
arguments
[
i
]+
"\n"
);
}
}
catch
(
IOException
e
)
{
...
...
@@ -273,26 +277,6 @@ public class VDTRunner {
}
/* process.getStreamsProxy().getOutputStreamMonitor().addListener(new IStreamListener(){
public void streamAppended (String text, IStreamMonitor monitor){
//TODO: As per user requirement.
}
});
*/
/*
public void parserSetup(
VDTRunnerConfiguration configuration,
IProcess process
){
iCons= (IOConsole) DebugUITools.getConsole(process); // had non-null fPatternMatcher , fType="org.eclipse.debug.ui.ProcessConsoleType"
if (iCons==null){
System.out.println("Could not get a console for the specified process");
}
}
*/
public
void
resumeLaunch
(
String
consoleName
)
throws
CoreException
{
...
...
@@ -400,8 +384,8 @@ public class VDTRunner {
}
}
String
[]
controlFiles
=
configuration
.
getControlFiles
();
log
(
cmdLine
,
controlFiles
,
false
,
true
);
/* Appears in the console of the target Eclipse (immediately erased) */
log
(
cmdLine
,
controlFiles
,
false
,
false
);
/* Appears in the console of the parent Eclipse */
log
(
null
,
cmdLine
,
controlFiles
,
false
,
true
);
/* Appears in the console of the target Eclipse (immediately erased) */
log
(
null
,
cmdLine
,
controlFiles
,
false
,
false
);
/* Appears in the console of the parent Eclipse */
String
[]
envp
=
configuration
.
getEnvironment
();
...
...
@@ -458,22 +442,26 @@ public class VDTRunner {
}
// run()
private
void
log
(
String
[]
strings
,
private
void
log
(
String
header
,
String
[]
strings
,
String
[]
controlFiles
,
boolean
formatColumn
,
boolean
printToUser
)
{
if
(
controlFiles
!=
null
)
{
println
(
"Control files created:"
,
printToUser
);
if
(
controlFiles
.
length
==
0
)
{
println
(
"(none)"
,
printToUser
);
}
else
{
for
(
int
i
=
0
;
i
<
controlFiles
.
length
;
i
++)
println
(
controlFiles
[
i
],
printToUser
);
}
}
println
(
printToUser
);
println
(
"Launching:"
,
printToUser
);
if
(
header
==
null
)
{
header
=
"Launching:"
;
}
println
(
header
,
printToUser
);
if
(
formatColumn
)
println
(
printToUser
);
...
...
tools/SimpleSamples/Remote.xml
View file @
ad2afc3e
...
...
@@ -2,6 +2,7 @@
<vdt-project>
<interface
name=
"RemoteInterface"
extends=
"project_interface"
>
<syntax
name=
"ProgramSyntax"
format=
"%(%%ParamValue%|\n%)"
/>
</interface>
<tool
name =
"RemotePython"
project =
"FPGA_project"
...
...
@@ -127,9 +128,9 @@
<parameter
id =
"RemoteCommand"
label =
"Remote Command to send"
type =
"String"
format =
"
CopyValue
"
default =
"print "Hello, World!
"
"
type =
"String
list
"
format =
"
ProgramSyntax
"
default =
"print "Hello, World!
, 2*2=",2*2
"
readonly =
"false"
visible =
"true"
/>
...
...
@@ -145,8 +146,8 @@
<output>
<line
name=
"command_line"
>
"-c"
"echo 'Nothing to do, sleepi
ing 1
5' ;"
"sleep
1
5 ;"
"echo 'Nothing to do, sleepi
ng
5' ;"
"sleep 5 ;"
"echo 'Nothing to do, awakening' ;"
</line>
<line
name=
"console_line"
dest=
"python_console_name"
sep=
"\n"
>
...
...
@@ -154,9 +155,9 @@
</line>
<line
name=
"command_line"
>
"-c"
"echo 'Nothing to do second time, sleeping
25
' ;"
"sleep
25
;"
"echo 'Nothing to do again, awakening after sleep
25
' ;"
"echo 'Nothing to do second time, sleeping
10
' ;"
"sleep
10
;"
"echo 'Nothing to do again, awakening after sleep
10
' ;"
</line>
</output>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment