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
06b222bd
Commit
06b222bd
authored
Mar 18, 2014
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debug/bug fix
parent
703c6d5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
5 deletions
+30
-5
SelectedResourceManager.java
src/com/elphel/vdt/ui/variables/SelectedResourceManager.java
+23
-3
DesignFlowView.java
src/com/elphel/vdt/ui/views/DesignFlowView.java
+7
-2
No files found.
src/com/elphel/vdt/ui/variables/SelectedResourceManager.java
View file @
06b222bd
...
...
@@ -21,14 +21,15 @@ import java.text.ParseException;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Stack
;
import
com.elphel.vdt.VDT
;
import
com.elphel.vdt.VerilogUtils
;
import
com.elphel.vdt.core.tools.params.Tool
;
import
com.elphel.vdt.core.tools.params.ToolSequence
;
import
com.elphel.vdt.ui.MessageUI
;
import
com.elphel.vdt.veditor.VerilogPlugin
;
import
com.elphel.vdt.veditor.preference.PreferenceStrings
;
import
org.eclipse.core.resources.IContainer
;
import
org.eclipse.core.resources.IFile
;
import
org.eclipse.core.resources.IProject
;
...
...
@@ -366,7 +367,26 @@ public class SelectedResourceManager implements IWindowListener, ISelectionListe
}
// Used when restoring from memento
public
void
setChosenVerilogFile
(
IResource
file
)
{
public
void
setChosenVerilogFile
(
IResource
file
)
{
if
(
file
!=
null
){
if
(
file
.
getType
()
!=
IResource
.
FILE
)
{
String
msg
=
"Tried to use "
+
file
+
" as HDL file"
;
if
(
VerilogPlugin
.
getPreferenceBoolean
(
PreferenceStrings
.
DEBUG_OTHER
))
{
MessageUI
.
error
(
msg
);
}
System
.
out
.
println
(
msg
);
return
;
}
if
(!
VerilogUtils
.
isHhdlFile
((
IFile
)
file
)){
String
msg
=
"Tried to use non-HDL "
+
file
+
" as HDL file"
;
if
(
VerilogPlugin
.
getPreferenceBoolean
(
PreferenceStrings
.
DEBUG_OTHER
))
{
MessageUI
.
error
(
msg
);
}
System
.
out
.
println
(
msg
);
return
;
}
}
fChosenVerilogFile
=
file
;
IProject
project
=
getSelectedProject
();
IProject
newProject
=
(
file
==
null
)?
null
:
file
.
getProject
();
...
...
src/com/elphel/vdt/ui/views/DesignFlowView.java
View file @
06b222bd
...
...
@@ -276,7 +276,9 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
if
(
VerilogPlugin
.
getPreferenceBoolean
(
PreferenceStrings
.
DEBUG_OTHER
))
System
.
out
.
println
(
"Initiating DB rebuild HDLFile="
+
HDLFile
);
toolSequence
.
setUnfinishedBoot
(
null
,
true
);
VerilogUtils
.
getTopModuleNames
((
IFile
)
HDLFile
);
// will initiate DB rebuild, updateDirty and call doLoadDesignMenu();
VerilogUtils
.
getTopModuleNames
((
IFile
)
HDLFile
);
// will initiate DB rebuild, updateDirty and call doLoadDesignMenu();
// java.lang.ClassCastException: org.eclipse.core.internal.resources.Project cannot be cast to org.eclipse.core.resources.IFile
// at com.elphel.vdt.ui.views.DesignFlowView.doLoadDesignMenu(DesignFlowView.java:279)
}
return
;
}
...
...
@@ -1265,7 +1267,10 @@ public class DesignFlowView extends ViewPart implements ISelectionListener {
toolSequence
.
setUnfinishedBoot
(
memento
,
true
);
if
(
VerilogPlugin
.
getPreferenceBoolean
(
PreferenceStrings
.
DEBUG_OTHER
))
System
.
out
.
println
(
"Initiating DB rebuild HDLFile="
+
HDLFile
);
VerilogUtils
.
getTopModuleNames
((
IFile
)
HDLFile
);
VerilogUtils
.
getTopModuleNames
((
IFile
)
HDLFile
);
// java.lang.ClassCastException: org.eclipse.core.internal.resources.Project cannot be cast to org.eclipse.core.resources.IFile
// at com.elphel.vdt.ui.views.DesignFlowView.restoreState(DesignFlowView.java:1270)
// at com.elphel.vdt.ui.views.DesignFlowView.createPartControl(DesignFlowView.java:237)
}
else
{
if
(
VerilogPlugin
.
getPreferenceBoolean
(
PreferenceStrings
.
DEBUG_OTHER
))
System
.
out
.
println
(
"Skipping DB rebuild HDLFile=NULL"
);
...
...
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