Loading src/com/elphel/vdt/ui/variables/SelectedResourceManager.java +23 −3 Original line number Original line Diff line number Diff line Loading @@ -26,6 +26,7 @@ import com.elphel.vdt.VDT; import com.elphel.vdt.VerilogUtils; import com.elphel.vdt.VerilogUtils; import com.elphel.vdt.core.tools.params.Tool; import com.elphel.vdt.core.tools.params.Tool; import com.elphel.vdt.core.tools.params.ToolSequence; 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.VerilogPlugin; import com.elphel.vdt.veditor.preference.PreferenceStrings; import com.elphel.vdt.veditor.preference.PreferenceStrings; Loading Loading @@ -367,6 +368,25 @@ public class SelectedResourceManager implements IWindowListener, ISelectionListe // Used when restoring from memento // 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; fChosenVerilogFile=file; IProject project=getSelectedProject(); IProject project=getSelectedProject(); IProject newProject= (file == null)? null: file.getProject(); IProject newProject= (file == null)? null: file.getProject(); Loading src/com/elphel/vdt/ui/views/DesignFlowView.java +7 −2 Original line number Original line Diff line number Diff line Loading @@ -277,6 +277,8 @@ public class DesignFlowView extends ViewPart implements ISelectionListener { System.out.println("Initiating DB rebuild HDLFile="+HDLFile); System.out.println("Initiating DB rebuild HDLFile="+HDLFile); toolSequence.setUnfinishedBoot(null,true); 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; return; } } Loading Loading @@ -1266,6 +1268,9 @@ public class DesignFlowView extends ViewPart implements ISelectionListener { if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER)) if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER)) System.out.println("Initiating DB rebuild HDLFile="+HDLFile); 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 { } else { if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER)) if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER)) System.out.println("Skipping DB rebuild HDLFile=NULL"); System.out.println("Skipping DB rebuild HDLFile=NULL"); Loading Loading
src/com/elphel/vdt/ui/variables/SelectedResourceManager.java +23 −3 Original line number Original line Diff line number Diff line Loading @@ -26,6 +26,7 @@ import com.elphel.vdt.VDT; import com.elphel.vdt.VerilogUtils; import com.elphel.vdt.VerilogUtils; import com.elphel.vdt.core.tools.params.Tool; import com.elphel.vdt.core.tools.params.Tool; import com.elphel.vdt.core.tools.params.ToolSequence; 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.VerilogPlugin; import com.elphel.vdt.veditor.preference.PreferenceStrings; import com.elphel.vdt.veditor.preference.PreferenceStrings; Loading Loading @@ -367,6 +368,25 @@ public class SelectedResourceManager implements IWindowListener, ISelectionListe // Used when restoring from memento // 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; fChosenVerilogFile=file; IProject project=getSelectedProject(); IProject project=getSelectedProject(); IProject newProject= (file == null)? null: file.getProject(); IProject newProject= (file == null)? null: file.getProject(); Loading
src/com/elphel/vdt/ui/views/DesignFlowView.java +7 −2 Original line number Original line Diff line number Diff line Loading @@ -277,6 +277,8 @@ public class DesignFlowView extends ViewPart implements ISelectionListener { System.out.println("Initiating DB rebuild HDLFile="+HDLFile); System.out.println("Initiating DB rebuild HDLFile="+HDLFile); toolSequence.setUnfinishedBoot(null,true); 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; return; } } Loading Loading @@ -1266,6 +1268,9 @@ public class DesignFlowView extends ViewPart implements ISelectionListener { if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER)) if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER)) System.out.println("Initiating DB rebuild HDLFile="+HDLFile); 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 { } else { if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER)) if (VerilogPlugin.getPreferenceBoolean(PreferenceStrings.DEBUG_OTHER)) System.out.println("Skipping DB rebuild HDLFile=NULL"); System.out.println("Skipping DB rebuild HDLFile=NULL"); Loading