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
19878460
Commit
19878460
authored
Mar 11, 2014
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added erasing of old dependencies from persistent storage
parent
fcd0f044
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
146 additions
and
29 deletions
+146
-29
Tool.java
src/com/elphel/vdt/core/tools/params/Tool.java
+57
-18
ToolSequence.java
src/com/elphel/vdt/core/tools/params/ToolSequence.java
+30
-0
VDTPluginImages.java
src/com/elphel/vdt/ui/VDTPluginImages.java
+3
-1
Option.java
src/com/elphel/vdt/ui/options/project/Option.java
+1
-1
ClearProjectStates.java
src/com/elphel/vdt/ui/views/ClearProjectStates.java
+36
-0
DesignFlowView.java
src/com/elphel/vdt/ui/views/DesignFlowView.java
+19
-9
No files found.
src/com/elphel/vdt/core/tools/params/Tool.java
View file @
19878460
...
@@ -292,6 +292,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -292,6 +292,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
public
void
clearDependStamps
(){
public
void
clearDependStamps
(){
DEBUG_PRINT
(
"clearDependStamps() for "
+
getName
());
dependStatesTimestamps
.
clear
();
dependStatesTimestamps
.
clear
();
dependFilesTimestamps
.
clear
();
dependFilesTimestamps
.
clear
();
}
}
...
@@ -572,7 +573,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -572,7 +573,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
public
boolean
isDisabled
(){
public
boolean
isDisabled
(){
if
(
abstractTool
)
return
true
;
// abstract are always disabled
if
(
abstractTool
)
return
true
;
// abstract are always disabled
if
(
disabled
==
null
)
return
false
;
if
(
disabled
==
null
)
return
false
;
List
<
String
>
values
=
disabled
.
getValue
(
n
ull
);
// null for topFormatProcessor
List
<
String
>
values
=
disabled
.
getValue
(
n
ew
FormatProcessor
(
this
)
);
// null for topFormatProcessor
if
((
values
==
null
)
||
(
values
.
size
()==
0
))
return
false
;
if
((
values
==
null
)
||
(
values
.
size
()==
0
))
return
false
;
return
(!
values
.
get
(
0
).
equals
(
"true"
));
return
(!
values
.
get
(
0
).
equals
(
"true"
));
}
}
...
@@ -639,10 +640,11 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -639,10 +640,11 @@ public class Tool extends Context implements Cloneable, Inheritable {
}
}
}
}
public
List
<
String
>
getDependFiles
(){
public
List
<
String
>
getDependFiles
(){
DEBUG_PRINT
(
"------ getDependFiles()"
);
if
((
dependFiles
==
null
)
||
(
dependFiles
.
size
()==
0
))
return
null
;
if
((
dependFiles
==
null
)
||
(
dependFiles
.
size
()==
0
))
return
null
;
List
<
String
>
list
=
new
ArrayList
<
String
>();
List
<
String
>
list
=
new
ArrayList
<
String
>();
for
(
Iterator
<
Parameter
>
iter
=
dependFiles
.
iterator
();
iter
.
hasNext
();)
{
for
(
Iterator
<
Parameter
>
iter
=
dependFiles
.
iterator
();
iter
.
hasNext
();)
{
List
<
String
>
vList
=
iter
.
next
().
getValue
(
n
ull
);
// null for topFormatProcessor
List
<
String
>
vList
=
iter
.
next
().
getValue
(
n
ew
FormatProcessor
(
this
)
);
// null for topFormatProcessor
if
(
vList
!=
null
)
{
if
(
vList
!=
null
)
{
for
(
String
item:
vList
){
for
(
String
item:
vList
){
if
((
item
!=
null
)
&&
(
item
.
trim
().
length
()>
0
)){
if
((
item
!=
null
)
&&
(
item
.
trim
().
length
()>
0
)){
...
@@ -656,10 +658,11 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -656,10 +658,11 @@ public class Tool extends Context implements Cloneable, Inheritable {
}
}
public
List
<
String
>
getDependStates
(){
public
List
<
String
>
getDependStates
(){
DEBUG_PRINT
(
"------ getDependStates() for "
+
getName
());
if
((
dependStates
==
null
)
||
(
dependStates
.
size
()==
0
))
return
null
;
if
((
dependStates
==
null
)
||
(
dependStates
.
size
()==
0
))
return
null
;
List
<
String
>
list
=
new
ArrayList
<
String
>();
List
<
String
>
list
=
new
ArrayList
<
String
>();
for
(
Iterator
<
Parameter
>
iter
=
dependStates
.
iterator
();
iter
.
hasNext
();)
{
for
(
Iterator
<
Parameter
>
iter
=
dependStates
.
iterator
();
iter
.
hasNext
();)
{
List
<
String
>
vList
=
iter
.
next
().
getValue
(
n
ull
);
// null for topFormatProcessor
List
<
String
>
vList
=
iter
.
next
().
getValue
(
n
ew
FormatProcessor
(
this
)
);
// null for topFormatProcessor
for
(
String
item:
vList
){
for
(
String
item:
vList
){
if
((
item
!=
null
)
&&
(
item
.
trim
().
length
()>
0
)){
if
((
item
!=
null
)
&&
(
item
.
trim
().
length
()>
0
)){
list
.
add
(
item
.
trim
());
list
.
add
(
item
.
trim
());
...
@@ -715,14 +718,14 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -715,14 +718,14 @@ public class Tool extends Context implements Cloneable, Inheritable {
public
boolean
getAutoSave
(){
public
boolean
getAutoSave
(){
if
(
autoSave
==
null
)
return
false
;
if
(
autoSave
==
null
)
return
false
;
List
<
String
>
result
=
autoSave
.
getValue
(
n
ull
);
// null for topFormatProcessor
List
<
String
>
result
=
autoSave
.
getValue
(
n
ew
FormatProcessor
(
this
)
);
// null for topFormatProcessor
if
(!
result
.
isEmpty
())
return
result
.
get
(
0
).
equals
(
"true"
);
if
(!
result
.
isEmpty
())
return
result
.
get
(
0
).
equals
(
"true"
);
return
false
;
return
false
;
}
}
public
List
<
String
>
getResultNames
(){
public
List
<
String
>
getResultNames
(){
if
(
result
==
null
)
return
null
;
if
(
result
==
null
)
return
null
;
return
result
.
getValue
(
n
ull
);
// null for topFormatProcessor
return
result
.
getValue
(
n
ew
FormatProcessor
(
this
)
);
// null for topFormatProcessor
}
}
public
void
initRestore
()
throws
ConfigException
{
public
void
initRestore
()
throws
ConfigException
{
...
@@ -831,7 +834,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -831,7 +834,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
public
String
getLogDir
()
{
return
getLogDir
(
true
);
}
public
String
getLogDir
()
{
return
getLogDir
(
true
);
}
public
String
getLogDir
(
boolean
first
)
{
public
String
getLogDir
(
boolean
first
)
{
if
(
logDir
!=
null
)
{
// has logDir specified, but may be empty
if
(
logDir
!=
null
)
{
// has logDir specified, but may be empty
List
<
String
>
value
=
logDir
.
getValue
(
n
ull
);
// null for topFormatProcessor
List
<
String
>
value
=
logDir
.
getValue
(
n
ew
FormatProcessor
(
this
)
);
// null for topFormatProcessor
if
(
value
.
size
()==
0
)
return
null
;
// overwrites with empty
if
(
value
.
size
()==
0
)
return
null
;
// overwrites with empty
return
value
.
get
(
0
);
return
value
.
get
(
0
);
}
}
...
@@ -844,7 +847,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -844,7 +847,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
public
String
getStateDir
()
{
return
getStateDir
(
true
);
}
public
String
getStateDir
()
{
return
getStateDir
(
true
);
}
public
String
getStateDir
(
boolean
first
)
{
public
String
getStateDir
(
boolean
first
)
{
if
(
stateDir
!=
null
)
{
// has stateDir specified, but may be empty
if
(
stateDir
!=
null
)
{
// has stateDir specified, but may be empty
List
<
String
>
value
=
stateDir
.
getValue
(
n
ull
);
// null for topFormatProcessor
List
<
String
>
value
=
stateDir
.
getValue
(
n
ew
FormatProcessor
(
this
)
);
// null for topFormatProcessor
if
(
value
.
size
()==
0
)
return
null
;
// overwrites with empty
if
(
value
.
size
()==
0
)
return
null
;
// overwrites with empty
return
value
.
get
(
0
);
return
value
.
get
(
0
);
}
}
...
@@ -946,23 +949,47 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -946,23 +949,47 @@ public class Tool extends Context implements Cloneable, Inheritable {
* @param project where to attach properties
* @param project where to attach properties
*/
*/
public
void
saveState
(
IProject
project
)
{
public
void
saveState
(
IProject
project
)
{
// if (getName().equals("ISExst")){
// System.out.println("saveState(Project): Debugging ISExst");
// }
QualifiedName
qn
=
new
QualifiedName
(
VDT
.
ID_VDT
,
PROJECT_TOOL_NAME
+
name
+
PROJECT_TOOL_PINNED
);
QualifiedName
qn
=
new
QualifiedName
(
VDT
.
ID_VDT
,
PROJECT_TOOL_NAME
+
name
+
PROJECT_TOOL_PINNED
);
try
{
project
.
setPersistentProperty
(
qn
,
new
Boolean
(
isPinned
()).
toString
());}
try
{
project
.
setPersistentProperty
(
qn
,
new
Boolean
(
isPinned
()).
toString
());}
catch
(
CoreException
e
)
{
System
.
out
.
println
(
project
+
"Failed setPersistentProperty("
+
qn
+
", "
+
isPinned
()+
", e="
+
e
);}
catch
(
CoreException
e
)
{
System
.
out
.
println
(
project
+
"Failed setPersistentProperty("
+
qn
+
", "
+
isPinned
()+
", e="
+
e
);}
qn
=
new
QualifiedName
(
VDT
.
ID_VDT
,
PROJECT_TOOL_NAME
+
name
+
PROJECT_TOOL_STATE
);
qn
=
new
QualifiedName
(
VDT
.
ID_VDT
,
PROJECT_TOOL_NAME
+
name
+
PROJECT_TOOL_STATE
);
try
{
project
.
setPersistentProperty
(
qn
,
getState
().
toString
());}
try
{
project
.
setPersistentProperty
(
qn
,
getState
().
toString
());}
catch
(
CoreException
e
)
{
System
.
out
.
println
(
project
+
"Failed setPersistentProperty("
+
qn
+
", "
+
getState
()+
", e="
+
e
);}
catch
(
CoreException
e
)
{
System
.
out
.
println
(
project
+
"Failed setPersistentProperty("
+
qn
+
", "
+
getState
()+
", e="
+
e
);}
if
(
getTimeStamp
()!=
null
)
{
qn
=
new
QualifiedName
(
VDT
.
ID_VDT
,
PROJECT_TOOL_NAME
+
name
+
PROJECT_TOOL_TIMESTAMP
);
qn
=
new
QualifiedName
(
VDT
.
ID_VDT
,
PROJECT_TOOL_NAME
+
name
+
PROJECT_TOOL_TIMESTAMP
);
try
{
project
.
setPersistentProperty
(
qn
,
getTimeStamp
());}
try
{
project
.
setPersistentProperty
(
qn
,
getTimeStamp
());}
catch
(
CoreException
e
)
{
System
.
out
.
println
(
project
+
"Failed setPersistentProperty("
+
qn
+
", "
+
getTimeStamp
()+
", e="
+
e
);}
catch
(
CoreException
e
)
{
System
.
out
.
println
(
project
+
"Failed setPersistentProperty("
+
qn
+
", "
+
getTimeStamp
()+
", e="
+
e
);}
}
String
lastHashString
=(
getLastRunHash
()!=
0
)?(
new
Integer
(
getLastRunHash
()).
toString
()):
null
;
if
(
getLastRunHash
()!=
0
)
{
qn
=
new
QualifiedName
(
VDT
.
ID_VDT
,
PROJECT_TOOL_NAME
+
name
+
PROJECT_TOOL_LASTRUNHASH
);
qn
=
new
QualifiedName
(
VDT
.
ID_VDT
,
PROJECT_TOOL_NAME
+
name
+
PROJECT_TOOL_LASTRUNHASH
);
try
{
project
.
setPersistentProperty
(
qn
,
new
Integer
(
getLastRunHash
()).
toString
());}
try
{
project
.
setPersistentProperty
(
qn
,
lastHashString
);}
catch
(
CoreException
e
)
{
System
.
out
.
println
(
project
+
"Failed setPersistentProperty("
+
qn
+
", "
+
getLastRunHash
()+
", e="
+
e
);}
catch
(
CoreException
e
)
{
System
.
out
.
println
(
project
+
"Failed setPersistentProperty("
+
qn
+
", "
+
lastHashString
+
", e="
+
e
);}
// Delete all old persistent dependencies for this tool before saving current ones (some dependencies might disappear)
Map
<
QualifiedName
,
String
>
pp
;
try
{
pp
=
project
.
getPersistentProperties
();
}
catch
(
CoreException
e
){
System
.
out
.
println
(
project
+
": Failed getPersistentProperties(), e="
+
e
);
return
;
}
}
String
statePrefix
=
PROJECT_TOOL_NAME
+
name
+
PROJECT_TOOL_DEPSTATE
;
String
filePrefix
=
PROJECT_TOOL_NAME
+
name
+
PROJECT_TOOL_DEPFILE
;
for
(
QualifiedName
qName:
pp
.
keySet
()){
if
(
(
qName
.
getLocalName
().
startsWith
(
statePrefix
))
||
(
qName
.
getLocalName
().
startsWith
(
filePrefix
)))
{
try
{
project
.
setPersistentProperty
(
qName
,
null
);
// erase
}
catch
(
CoreException
e
)
{
System
.
out
.
println
(
project
+
"Failed setPersistentProperty("
+
qName
+
", "
+
dependStatesTimestamps
.
get
(
state
)+
", e="
+
e
);
}
}
}
for
(
String
state:
dependStatesTimestamps
.
keySet
()){
for
(
String
state:
dependStatesTimestamps
.
keySet
()){
qn
=
new
QualifiedName
(
VDT
.
ID_VDT
,
PROJECT_TOOL_NAME
+
name
+
PROJECT_TOOL_DEPSTATE
+
state
);
qn
=
new
QualifiedName
(
VDT
.
ID_VDT
,
PROJECT_TOOL_NAME
+
name
+
PROJECT_TOOL_DEPSTATE
+
state
);
try
{
project
.
setPersistentProperty
(
qn
,
dependStatesTimestamps
.
get
(
state
));}
try
{
project
.
setPersistentProperty
(
qn
,
dependStatesTimestamps
.
get
(
state
));}
...
@@ -977,6 +1004,10 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -977,6 +1004,10 @@ public class Tool extends Context implements Cloneable, Inheritable {
}
}
public
void
restoreState
(
IProject
project
)
{
public
void
restoreState
(
IProject
project
)
{
// if (getName().equals("ISExst")){
// System.out.println("restoreState(Project): Debugging ISExst");
// }
Map
<
QualifiedName
,
String
>
pp
;
Map
<
QualifiedName
,
String
>
pp
;
try
{
try
{
pp
=
project
.
getPersistentProperties
();
pp
=
project
.
getPersistentProperties
();
...
@@ -1022,6 +1053,8 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -1022,6 +1053,8 @@ public class Tool extends Context implements Cloneable, Inheritable {
clearDependStamps
();
clearDependStamps
();
String
statePrefix
=
PROJECT_TOOL_NAME
+
name
+
PROJECT_TOOL_DEPSTATE
;
String
statePrefix
=
PROJECT_TOOL_NAME
+
name
+
PROJECT_TOOL_DEPSTATE
;
String
filePrefix
=
PROJECT_TOOL_NAME
+
name
+
PROJECT_TOOL_DEPFILE
;
String
filePrefix
=
PROJECT_TOOL_NAME
+
name
+
PROJECT_TOOL_DEPFILE
;
// TODO: check dependency exists?
for
(
QualifiedName
qName:
pp
.
keySet
()){
for
(
QualifiedName
qName:
pp
.
keySet
()){
// qn= new QualifiedName(VDT.ID_VDT, PROJECT_TOOL_NAME+name+PROJECT_TOOL_DEPSTATE+state);
// qn= new QualifiedName(VDT.ID_VDT, PROJECT_TOOL_NAME+name+PROJECT_TOOL_DEPSTATE+state);
if
(
qName
.
getLocalName
().
startsWith
(
statePrefix
)){
if
(
qName
.
getLocalName
().
startsWith
(
statePrefix
)){
...
@@ -1040,6 +1073,9 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -1040,6 +1073,9 @@ public class Tool extends Context implements Cloneable, Inheritable {
public
void
saveState
(
IMemento
memento
)
{
public
void
saveState
(
IMemento
memento
)
{
// if (getName().equals("ISExst")){
// System.out.println("saveState(memento): Debugging ISExst");
// }
IMemento
toolMemento
=
memento
.
createChild
(
MEMENTO_TOOL_TYPE
,
name
);
IMemento
toolMemento
=
memento
.
createChild
(
MEMENTO_TOOL_TYPE
,
name
);
toolMemento
.
putBoolean
(
MEMENTO_TOOL_PINNED
,
new
Boolean
(
pinned
));
toolMemento
.
putBoolean
(
MEMENTO_TOOL_PINNED
,
new
Boolean
(
pinned
));
toolMemento
.
putString
(
MEMENTO_TOOL_STATE
,
this
.
state
.
toString
());
toolMemento
.
putString
(
MEMENTO_TOOL_STATE
,
this
.
state
.
toString
());
...
@@ -1063,6 +1099,9 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -1063,6 +1099,9 @@ public class Tool extends Context implements Cloneable, Inheritable {
}
}
public
void
restoreState
(
IMemento
memento
)
{
public
void
restoreState
(
IMemento
memento
)
{
// if (getName().equals("ISExst")){
// System.out.println("restoreState(memento): Debugging ISExst");
// }
IMemento
[]
toolMementos
=
memento
.
getChildren
(
MEMENTO_TOOL_TYPE
);
IMemento
[]
toolMementos
=
memento
.
getChildren
(
MEMENTO_TOOL_TYPE
);
IMemento
toolMemento
=
null
;
IMemento
toolMemento
=
null
;
for
(
IMemento
tm:
toolMementos
){
for
(
IMemento
tm:
toolMementos
){
...
@@ -1602,7 +1641,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
...
@@ -1602,7 +1641,7 @@ public class Tool extends Context implements Cloneable, Inheritable {
//
//
private
String
getResolvedExeName
()
{
private
String
getResolvedExeName
()
{
return
ConditionUtils
.
resolveContextCondition
(
this
,
exeName
,
n
ull
);
// null for topFormatProcessor
return
ConditionUtils
.
resolveContextCondition
(
this
,
exeName
,
n
ew
FormatProcessor
(
this
)
);
// null for topFormatProcessor
}
}
/*
/*
private String getResolvedShellName() {
private String getResolvedShellName() {
...
...
src/com/elphel/vdt/core/tools/params/ToolSequence.java
View file @
19878460
...
@@ -108,6 +108,30 @@ public class ToolSequence {
...
@@ -108,6 +108,30 @@ public class ToolSequence {
toolFinished
(
null
);
toolFinished
(
null
);
}
}
public
void
clearProjectStates
(){
IProject
project
=
SelectedResourceManager
.
getDefault
().
getSelectedProject
();
if
(
project
==
null
){
System
.
out
.
println
(
"Can not clear persistent properties for a non-existent project"
);
return
;
}
Map
<
QualifiedName
,
String
>
pp
;
try
{
pp
=
project
.
getPersistentProperties
();
}
catch
(
CoreException
e
){
System
.
out
.
println
(
project
+
": Failed getPersistentProperties(), e="
+
e
);
return
;
}
for
(
QualifiedName
qn:
pp
.
keySet
())
{
DEBUG_PRINT
(
"Clearing persistent property "
+
qn
.
toString
()+
" for project "
+
project
.
toString
());
try
{
project
.
setPersistentProperty
(
qn
,
null
);
}
catch
(
CoreException
e
)
{
System
.
out
.
println
(
project
+
": Failed setPersistentProperties("
+
qn
.
toString
()+
",null), e="
+
e
);
}
}
}
public
Set
<
IFile
>
getOldFiles
(
Set
<
String
>
dirs
){
public
Set
<
IFile
>
getOldFiles
(
Set
<
String
>
dirs
){
IProject
project
=
SelectedResourceManager
.
getDefault
().
getSelectedProject
();
// should not be null when we got here
IProject
project
=
SelectedResourceManager
.
getDefault
().
getSelectedProject
();
// should not be null when we got here
Set
<
String
>
linkFilesTargets
=
new
HashSet
<
String
>();
Set
<
String
>
linkFilesTargets
=
new
HashSet
<
String
>();
...
@@ -248,6 +272,7 @@ public class ToolSequence {
...
@@ -248,6 +272,7 @@ public class ToolSequence {
putCurrentState
(
tool
);
// delegates to *Master
putCurrentState
(
tool
);
// delegates to *Master
// Set tool timestamps for states and source files
// Set tool timestamps for states and source files
if
((
tool
.
getLastMode
()==
TOOL_MODE
.
RUN
)
||
(
tool
.
getLastMode
()==
TOOL_MODE
.
RESTORE
))
{
if
((
tool
.
getLastMode
()==
TOOL_MODE
.
RUN
)
||
(
tool
.
getLastMode
()==
TOOL_MODE
.
RESTORE
))
{
DEBUG_PRINT
(
"doToolFinished(), will run setDependState("
+
tool
.
getName
()+
")"
);
setDependState
(
tool
);
setDependState
(
tool
);
}
}
setToolsDirtyFlag
(
false
);
// no need to recalculate all parameters here
setToolsDirtyFlag
(
false
);
// no need to recalculate all parameters here
...
@@ -1430,6 +1455,9 @@ public class ToolSequence {
...
@@ -1430,6 +1455,9 @@ public class ToolSequence {
IProject
project
=
SelectedResourceManager
.
getDefault
().
getSelectedProject
();
// should not be null when we got here
IProject
project
=
SelectedResourceManager
.
getDefault
().
getSelectedProject
();
// should not be null when we got here
for
(
Tool
tool
:
ToolsCore
.
getConfig
().
getContextManager
().
getToolList
()){
for
(
Tool
tool
:
ToolsCore
.
getConfig
().
getContextManager
().
getToolList
()){
// if (tool.getState()==TOOL_STATE.SUCCESS){
// if (tool.getState()==TOOL_STATE.SUCCESS){
// if (tool.getName().equals("ISExst")){
// System.out.println("Debugging ISExst");
// }
if
(
update
){
if
(
update
){
// tool.updateContextOptions(project) recalculates parameters, but not the hashcodes
// tool.updateContextOptions(project) recalculates parameters, but not the hashcodes
tool
.
updateContextOptions
(
project
);
// Fill in parameters - it parses here too - at least some parameters? (not in menu mode)
tool
.
updateContextOptions
(
project
);
// Fill in parameters - it parses here too - at least some parameters? (not in menu mode)
...
@@ -1520,6 +1548,7 @@ public class ToolSequence {
...
@@ -1520,6 +1548,7 @@ public class ToolSequence {
* @param tool Reference to a tool to process
* @param tool Reference to a tool to process
*/
*/
public
void
setDependState
(
Tool
tool
){
public
void
setDependState
(
Tool
tool
){
DEBUG_PRINT
(
"++++++++ setDependState("
+
tool
.
getName
()+
")"
);
tool
.
clearDependStamps
();
// is it needed?
tool
.
clearDependStamps
();
// is it needed?
Map
<
String
,
String
>
depStates
=
makeDependStates
(
tool
);
Map
<
String
,
String
>
depStates
=
makeDependStates
(
tool
);
for
(
String
state:
depStates
.
keySet
()){
for
(
String
state:
depStates
.
keySet
()){
...
@@ -1600,6 +1629,7 @@ public class ToolSequence {
...
@@ -1600,6 +1629,7 @@ public class ToolSequence {
return
depStates
;
return
depStates
;
}
}
private
Map
<
String
,
String
>
makeDependFiles
(
Tool
tool
){
private
Map
<
String
,
String
>
makeDependFiles
(
Tool
tool
){
DEBUG_PRINT
(
"++++++ makeDependFiles("
+
tool
.
getName
()+
")"
);
Map
<
String
,
String
>
depFiles
=
new
Hashtable
<
String
,
String
>();
Map
<
String
,
String
>
depFiles
=
new
Hashtable
<
String
,
String
>();
List
<
String
>
dependFileNames
=
tool
.
getDependFiles
();
List
<
String
>
dependFileNames
=
tool
.
getDependFiles
();
if
(
dependFileNames
!=
null
)
{
if
(
dependFileNames
!=
null
)
{
...
...
src/com/elphel/vdt/ui/VDTPluginImages.java
View file @
19878460
...
@@ -73,7 +73,9 @@ public class VDTPluginImages {
...
@@ -73,7 +73,9 @@ public class VDTPluginImages {
public
static
final
ImageDescriptor
DESC_INSTALL_PROPERTIES
=
create
(
ICONS_PATH
,
"obj16"
+
File
.
separator
+
"install_prop.gif"
,
null
);
public
static
final
ImageDescriptor
DESC_INSTALL_PROPERTIES
=
create
(
ICONS_PATH
,
"obj16"
+
File
.
separator
+
"install_prop.gif"
,
null
);
public
static
final
ImageDescriptor
DESC_PACKAGE_PROPERTIES
=
create
(
ICONS_PATH
,
"obj16"
+
File
.
separator
+
"package_prop.gif"
,
null
);
public
static
final
ImageDescriptor
DESC_PACKAGE_PROPERTIES
=
create
(
ICONS_PATH
,
"obj16"
+
File
.
separator
+
"package_prop.gif"
,
null
);
public
static
final
ImageDescriptor
DESC_PROJECT_PROPERTIES
=
create
(
ICONS_PATH
,
"obj16"
+
File
.
separator
+
"project_prop.gif"
,
null
);
public
static
final
ImageDescriptor
DESC_PROJECT_PROPERTIES
=
create
(
ICONS_PATH
,
"obj16"
+
File
.
separator
+
"project_prop.gif"
,
null
);
public
static
final
ImageDescriptor
DESC_DESIGM_MENU
=
create
(
ICONS_PATH
,
"obj16"
+
File
.
separator
+
"design_menu.gif"
,
null
);
public
static
final
ImageDescriptor
DESC_DESIGN_MENU
=
create
(
ICONS_PATH
,
"obj16"
+
File
.
separator
+
"design_menu.gif"
,
null
);
public
static
final
ImageDescriptor
DESC_ERASE
=
create
(
ICONS_PATH
,
"obj16"
+
File
.
separator
+
"eraser.png"
,
null
);
public
static
final
ImageDescriptor
DESC_TOOLS_LINKED
=
create
(
ICONS_PATH
,
"obj16"
+
File
.
separator
+
"link.png"
,
null
);
public
static
final
ImageDescriptor
DESC_TOOLS_LINKED
=
create
(
ICONS_PATH
,
"obj16"
+
File
.
separator
+
"link.png"
,
null
);
public
static
final
ImageDescriptor
DESC_TOOLS_UNLINKED
=
create
(
ICONS_PATH
,
"obj16"
+
File
.
separator
+
"broken_link.png"
,
null
);
public
static
final
ImageDescriptor
DESC_TOOLS_UNLINKED
=
create
(
ICONS_PATH
,
"obj16"
+
File
.
separator
+
"broken_link.png"
,
null
);
public
static
final
ImageDescriptor
DESC_TOOLS_SAVE
=
create
(
ICONS_PATH
,
"obj16"
+
File
.
separator
+
"save.png"
,
null
);
public
static
final
ImageDescriptor
DESC_TOOLS_SAVE
=
create
(
ICONS_PATH
,
"obj16"
+
File
.
separator
+
"save.png"
,
null
);
...
...
src/com/elphel/vdt/ui/options/project/Option.java
View file @
19878460
...
@@ -47,7 +47,7 @@ public class Option implements IOption {
...
@@ -47,7 +47,7 @@ public class Option implements IOption {
}
}
/**
/**
* Return core option (opti
u
on without UI elements)
* Return core option (option without UI elements)
*/
*/
public
Option
getOption
()
{
public
Option
getOption
()
{
return
this
;
return
this
;
...
...
src/com/elphel/vdt/ui/views/ClearProjectStates.java
0 → 100644
View file @
19878460
/*******************************************************************************
* Copyright (c) 2014 Elphel, Inc.
* 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 3 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 this program. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
package
com
.
elphel
.
vdt
.
ui
.
views
;
import
org.eclipse.core.resources.IProject
;
import
com.elphel.vdt.core.tools.params.ToolSequence
;
public
class
ClearProjectStates
extends
ClearAction
{
private
ToolSequence
toolSequence
;
public
ClearProjectStates
(
String
message
,
ToolSequence
toolSequence
)
{
super
(
message
);
this
.
toolSequence
=
toolSequence
;
}
public
void
clear
()
{
toolSequence
.
clearProjectStates
();
}
}
// class ContextsAction
src/com/elphel/vdt/ui/views/DesignFlowView.java
View file @
19878460
...
@@ -128,6 +128,8 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
...
@@ -128,6 +128,8 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
private
Action
selectDesignMenuAction
;
private
Action
selectDesignMenuAction
;
private
ClearToolStates
clearToolStatesAction
;
private
ClearToolStates
clearToolStatesAction
;
private
ClearProjectStates
clearProjectStatesAction
;
private
ClearStateFiles
clearStateFilesAction
;
private
ClearStateFiles
clearStateFilesAction
;
private
ClearLogFiles
clearLogFilesAction
;
private
ClearLogFiles
clearLogFilesAction
;
...
@@ -349,11 +351,13 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
...
@@ -349,11 +351,13 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
manager
.
add
(
clearProjectPropertiesAction
);
manager
.
add
(
clearProjectPropertiesAction
);
manager
.
add
(
clearToolPropertiesAction
);
manager
.
add
(
clearToolPropertiesAction
);
manager
.
add
(
new
Separator
());
manager
.
add
(
new
Separator
());
manager
.
add
(
clearToolStatesAction
);
manager
.
add
(
selectDesignMenuAction
);
manager
.
add
(
new
Separator
());
manager
.
add
(
clearStateFilesAction
);
manager
.
add
(
clearStateFilesAction
);
manager
.
add
(
clearLogFilesAction
);
manager
.
add
(
clearLogFilesAction
);
manager
.
add
(
new
Separator
());
manager
.
add
(
new
Separator
());
manager
.
add
(
selectDesignMenuAction
);
manager
.
add
(
clearToolStatesAction
);
manager
.
add
(
clearProjectStatesAction
);
}
}
private
void
fillContextMenu
(
IMenuManager
manager
)
{
// context (right-click) menu
private
void
fillContextMenu
(
IMenuManager
manager
)
{
// context (right-click) menu
...
@@ -566,19 +570,24 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
...
@@ -566,19 +570,24 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
}
}
};
};
selectDesignMenuAction
.
setText
(
"Change Design Menu"
);
selectDesignMenuAction
.
setText
(
"Change Design Menu"
);
selectDesignMenuAction
.
setImageDescriptor
(
VDTPluginImages
.
DESC_DESIG
M
_MENU
);
selectDesignMenuAction
.
setImageDescriptor
(
VDTPluginImages
.
DESC_DESIG
N
_MENU
);
clearToolStatesAction
=
new
ClearToolStates
(
"Do you wish to reset all tool states (as if they never ran)?"
,
toolSequence
);
clearToolStatesAction
=
new
ClearToolStates
(
"Do you wish to reset all tool states (as if they never ran)?"
,
toolSequence
);
clearToolStatesAction
.
setText
(
"Clear tool states"
);
clearToolStatesAction
.
setText
(
"Clear tool states (debug feature)"
);
clearToolStatesAction
.
setImageDescriptor
(
VDTPluginImages
.
DESC_DESIGM_MENU
);
clearToolStatesAction
.
setImageDescriptor
(
VDTPluginImages
.
DESC_ERASE
);
clearProjectStatesAction
=
new
ClearProjectStates
(
"Do you wish to reset the project state (persistent storage) as if no tools ran?"
,
toolSequence
);
clearProjectStatesAction
.
setText
(
"Clear project state (debug feature)"
);
clearProjectStatesAction
.
setImageDescriptor
(
VDTPluginImages
.
DESC_ERASE
);
clearStateFilesAction
=
new
ClearStateFiles
(
"Do you wisth to remove all state files (snapshots), but the current ones?"
,
toolSequence
);
clearStateFilesAction
=
new
ClearStateFiles
(
"Do you wisth to remove all state files (snapshots), but the current ones?"
,
toolSequence
);
clearStateFilesAction
.
setText
(
"Clear all but latest snapshot files"
);
clearStateFilesAction
.
setText
(
"Clear all but latest snapshot files"
);
clearStateFilesAction
.
setImageDescriptor
(
VDTPluginImages
.
DESC_
DESIGM_MENU
);
clearStateFilesAction
.
setImageDescriptor
(
VDTPluginImages
.
DESC_
ERASE
);
clearLogFilesAction
=
new
ClearLogFiles
(
"Do you wisth to remove all log files, but the most recent?"
,
toolSequence
);
clearLogFilesAction
=
new
ClearLogFiles
(
"Do you wisth to remove all log files, but the most recent?"
,
toolSequence
);
clearLogFilesAction
.
setText
(
"Clear all but latest log files"
);
clearLogFilesAction
.
setText
(
"Clear all but latest log files"
);
clearLogFilesAction
.
setImageDescriptor
(
VDTPluginImages
.
DESC_
DESIGM_MENU
);
clearLogFilesAction
.
setImageDescriptor
(
VDTPluginImages
.
DESC_
ERASE
);
showLaunchConfigAction
=
new
Action
()
{
showLaunchConfigAction
=
new
Action
()
{
public
void
run
()
{
public
void
run
()
{
...
@@ -1424,13 +1433,14 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
...
@@ -1424,13 +1433,14 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
}
}
}
}
String
HDLFilter
=
SelectedResourceManager
.
getDefault
().
getFilter
();
String
HDLFilter
=
SelectedResourceManager
.
getDefault
().
getFilter
();
if
(
HDLFilter
!=
null
){
//OK with null - will just arase that property
// if (HDLFilter!=null){
qn
=
new
QualifiedName
(
VDT
.
ID_VDT
,
TAG_SELECTED_HDL_FILTER
);
qn
=
new
QualifiedName
(
VDT
.
ID_VDT
,
TAG_SELECTED_HDL_FILTER
);
try
{
project
.
setPersistentProperty
(
qn
,
HDLFilter
);}
try
{
project
.
setPersistentProperty
(
qn
,
HDLFilter
);}
catch
(
CoreException
e
)
{
System
.
out
.
println
(
project
+
"Failed setPersistentProperty("
+
qn
+
", "
+
HDLFilter
+
", e="
+
e
);}
catch
(
CoreException
e
)
{
System
.
out
.
println
(
project
+
"Failed setPersistentProperty("
+
qn
+
", "
+
HDLFilter
+
", e="
+
e
);}
if
(
VerilogPlugin
.
getPreferenceBoolean
(
PreferenceStrings
.
DEBUG_OTHER
))
if
(
VerilogPlugin
.
getPreferenceBoolean
(
PreferenceStrings
.
DEBUG_OTHER
))
System
.
out
.
println
(
"project.setPersistentProperty("
+
qn
.
toString
()+
","
+
HDLFilter
+
")"
);
System
.
out
.
println
(
"project.setPersistentProperty("
+
qn
.
toString
()+
","
+
HDLFilter
+
")"
);
}
//
}
qn
=
new
QualifiedName
(
VDT
.
ID_VDT
,
TAG_LINKED_TOOLS
);
qn
=
new
QualifiedName
(
VDT
.
ID_VDT
,
TAG_LINKED_TOOLS
);
try
{
project
.
setPersistentProperty
(
qn
,
new
Boolean
(
SelectedResourceManager
.
getDefault
().
isToolsLinked
()).
toString
());}
try
{
project
.
setPersistentProperty
(
qn
,
new
Boolean
(
SelectedResourceManager
.
getDefault
().
isToolsLinked
()).
toString
());}
catch
(
CoreException
e
)
{
System
.
out
.
println
(
project
+
"Failed setPersistentProperty("
+
qn
+
", "
+
catch
(
CoreException
e
)
{
System
.
out
.
println
(
project
+
"Failed setPersistentProperty("
+
qn
+
", "
+
...
...
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