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
f091be45
Commit
f091be45
authored
Jan 21, 2014
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented build stamp generator, committed missed new files
parent
f88dd96e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
173 additions
and
13 deletions
+173
-13
VDT.java
src/com/elphel/vdt/VDT.java
+3
-2
BuildStampGenerator.java
...elphel/vdt/core/tools/generators/BuildStampGenerator.java
+34
-0
ChosenActionGenerator.java
...phel/vdt/core/tools/generators/ChosenActionGenerator.java
+36
-0
SelectedFileGenerator.java
...phel/vdt/core/tools/generators/SelectedFileGenerator.java
+55
-0
SimpleGeneratorRecognizer.java
...e/tools/params/recognizers/SimpleGeneratorRecognizer.java
+2
-1
SelectedResourceManager.java
src/com/elphel/vdt/ui/variables/SelectedResourceManager.java
+13
-2
DesignFlowView.java
src/com/elphel/vdt/ui/views/DesignFlowView.java
+2
-1
IVerilog.xml
tools/Verilog/IVerilog.xml
+28
-7
No files found.
src/com/elphel/vdt/VDT.java
View file @
f091be45
...
...
@@ -142,9 +142,10 @@ public class VDT {
public
static
final
String
GENERATOR_ID_FILE_LIST
=
"FileList"
;
public
static
final
String
GENERATOR_ID_TOP_MODULE
=
"TopModule"
;
public
static
final
String
GENERATOR_ID_TOP_MODULES
=
"TopModules"
;
public
static
final
String
GENERATOR_ID_
CURRENT_FILE
=
"CurrentFile"
;
public
static
final
String
GENERATOR_ID_
OS_NAME
=
"OS"
;
public
static
final
String
GENERATOR_ID_SELECTED_FILE
=
"SelectedFile"
;
public
static
final
String
GENERATOR_ID_CURRENT_FILE
=
"CurrentFile"
;
public
static
final
String
GENERATOR_ID_CURRENT_BASE
=
"CurrentFileBase"
;
public
static
final
String
GENERATOR_ID_CHOSEN_ACTION
=
"ChosenActionIndex"
;
public
static
final
String
GENERATOR_ID_
OS_NAME
=
"OS"
;
public
static
final
String
GENERATOR_ID_
BUILD_STAMP
=
"BuildStamp"
;
}
// class VDT
src/com/elphel/vdt/core/tools/generators/BuildStampGenerator.java
0 → 100644
View file @
f091be45
/*******************************************************************************
* 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
.
generators
;
import
com.elphel.vdt.VDT
;
import
com.elphel.vdt.ui.variables.SelectedResourceManager
;
public
class
BuildStampGenerator
extends
AbstractGenerator
{
public
static
final
String
NAME
=
VDT
.
GENERATOR_ID_BUILD_STAMP
;
public
String
getName
()
{
return
NAME
;
}
protected
String
[]
getStringValues
()
{
return
new
String
[]
{
SelectedResourceManager
.
getDefault
().
getBuildStamp
()};
}
}
src/com/elphel/vdt/core/tools/generators/ChosenActionGenerator.java
0 → 100644
View file @
f091be45
/*******************************************************************************
* 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
.
generators
;
import
com.elphel.vdt.VDT
;
import
com.elphel.vdt.ui.variables.SelectedResourceManager
;
public
class
ChosenActionGenerator
extends
AbstractGenerator
{
public
static
final
String
NAME
=
VDT
.
GENERATOR_ID_CHOSEN_ACTION
;
public
String
getName
()
{
return
NAME
;
}
protected
String
[]
getStringValues
()
{
int
choice
=
SelectedResourceManager
.
getDefault
().
getChosenAction
();
return
new
String
[]
{
""
+
choice
};
}
}
//ChosenActionGenerator
src/com/elphel/vdt/core/tools/generators/SelectedFileGenerator.java
0 → 100644
View file @
f091be45
/*******************************************************************************
* 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
.
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
SelectedFileGenerator
extends
AbstractGenerator
{
private
static
final
String
NAME
=
VDT
.
GENERATOR_ID_SELECTED_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
;
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
[]
{
""
};
}
}
src/com/elphel/vdt/core/tools/params/recognizers/SimpleGeneratorRecognizer.java
View file @
f091be45
...
...
@@ -33,7 +33,8 @@ public class SimpleGeneratorRecognizer implements Recognizer {
new
SelectedFileGenerator
(),
new
CurrentFileGenerator
(),
new
CurrentFileBaseGenerator
(),
new
ChosenActionGenerator
()
new
ChosenActionGenerator
(),
new
BuildStampGenerator
()
};
public
SimpleGeneratorRecognizer
(){
...
...
src/com/elphel/vdt/ui/variables/SelectedResourceManager.java
View file @
f091be45
...
...
@@ -66,7 +66,8 @@ public class SelectedResourceManager implements IWindowListener, ISelectionListe
private
String
fChosenTarget
=
null
;
// full path of the chosen (for action) resource or any string. Used to calculate CurrentFile, verilog file, ...
private
IResource
fChosenVerilogFile
=
null
;
// to keep fSelectedVerilogFile
private
int
fChosenAction
=
0
;
// Chosen variant of running the tool
private
long
timestamp
=
0
;
//
private
SelectedResourceManager
()
{
IWorkbench
workbench
=
PlatformUI
.
getWorkbench
();
if
(
workbench
!=
null
)
{
//may be running headless
...
...
@@ -255,7 +256,17 @@ public class SelectedResourceManager implements IWindowListener, ISelectionListe
else
if
(
fChosenVerilogFile
==
null
)
fChosenVerilogFile
=
fSelectedVerilogFile
;
}
public
String
setBuildStamp
(){
timestamp
=
System
.
nanoTime
();
return
getBuildStamp
();
}
public
String
getBuildStamp
(){
return
""
+
timestamp
;
}
public
String
getChosenTarget
()
{
return
fChosenTarget
;
}
...
...
src/com/elphel/vdt/ui/views/DesignFlowView.java
View file @
f091be45
...
...
@@ -243,7 +243,7 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
}
}
System
.
out
.
println
(
"fillContextMenu(), launchActions="
+
launchActions
);
//
System.out.println("fillContextMenu(), launchActions="+launchActions);
// manager.add(new Separator());
// drillDownAdapter.addNavigationActions(manager);
// Other plug-ins can contribute their actions here
...
...
@@ -623,6 +623,7 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
if
(
tool
!=
null
)
{
tool
.
setChoice
(
0
);
SelectedResourceManager
.
getDefault
().
updateActionChoice
(
fullPath
,
choice
);
// Andrey
SelectedResourceManager
.
getDefault
().
setBuildStamp
();
// Andrey
LaunchCore
.
launch
(
tool
,
selectedResource
.
getProject
()
// , selectedResource.getFullPath().toString() );
...
...
tools/Verilog/IVerilog.xml
View file @
f091be45
...
...
@@ -67,7 +67,12 @@
<syntax
name=
"DbgCurrentFileSyntax"
format=
"echo "%%CurrentFile" ;"
/>
<syntax
name=
"DbgChosenActionIndexSyntax"
format=
"echo "index=%%ChosenActionIndex" ;"
/>
<syntax
name=
"BuildStampSyntax"
format=
"%%BuildStamp"
/>
<syntax
name=
"LogFileSyntax"
format=
"%%BuildStamp.log"
/>
<syntax
name=
"GrepSkipSyntax"
format=
"| grep --line-buffered -v "%%ParamValue""
/>
//
ChosenActionIndex
...
...
@@ -283,7 +288,7 @@
label =
"Filter_String"
type =
"StringType"
format =
"JustValueSyntax"
default =
"2>&1 | tee
iverilog.log
| grep --line-buffered -E 'error|warning' | grep --line-buffered -v "(null):0""
default =
"2>&1 | tee
%LogFile
| grep --line-buffered -E 'error|warning' | grep --line-buffered -v "(null):0""
readonly =
"false"
visible =
"true"
/>
...
...
@@ -305,12 +310,22 @@
readonly =
"false"
visible =
"true"
/>
<parameter
id =
"GrepSkip1"
label =
"GrepSkip"
type =
"StringType"
format =
"GrepSkipSyntax"
default =
"(null)"
readonly =
"false"
visible =
"true"
/>
<!-- intentional error below - duplicate -->
<parameter
id =
"
BuildDir
"
label =
"
project build directory
"
type =
"
Dir
Type"
default =
"
build1
"
format =
"
Valu
eSyntax"
<parameter
id =
"
LogFile
"
label =
"
Simulator Log Filie
"
type =
"
String
Type"
default =
"
logfile.log
"
format =
"
LogFil
eSyntax"
readonly=
"false"
/>
...
...
@@ -328,6 +343,7 @@
<group
name=
"options"
label=
"Options"
>
"ErrorsOnly"
"Filter_String"
"GrepSkip1"
"v"
"LegacyModel"
"NoSpecify"
...
...
@@ -343,6 +359,7 @@
"echo CurrentFile=%%CurrentFile ;"
"echo SimulationTopFile=%SimulationTopFile ;"
"echo SimulationTopModule=%SimulationTopModule ;"
"echo LogFile=%LogFile ;"
"%Param_PreExe"
"%Param_Exe"
"%Param_TopModule"
...
...
@@ -354,7 +371,11 @@
"%SourceList"
"%ExtraFiles"
<if
ErrorsOnly=
"true"
>
"%Filter_String"
"2
>&
1"
"| tee %LogFile"
"| grep --line-buffered -E 'error|warning'"
"%GrepSkip1"
<!-- "%Filter_String" -->
</if>
</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