}
else if(obj instanceof FBXCircuit){
//Maybe we should get a run action from the object?
//Failing that ,we should ask the object what to do
FBXCircuit circ = (FBXCircuit)obj;
if(circ.getSwitchFile() != null){
OpenFileAction openFileAction = new OpenFileAction();
String switchPath = circ.getSwitchFile().getFullPath().toString();
openFileAction.setFilename(switchPath);
openFileAction.run();
if(!openFileAction.isSuccess()){
showMessage("File Not found: " + switchPath);
}
}
else{
Utils.println("No switch file exists.. create?");
showMessage("Switch File not found");
}
}
else if(obj instanceof FBXFuseAction){
FBXFuseAction fuseaction = (FBXFuseAction)obj;
FBXCircuit circ = fuseaction.getCircuit();
String switchFile = fuseaction.getSwichFile().getFullPath().toString();
OpenFileAction openFileAction = new OpenFileAction();
openFileAction.setFilename(switchFile);
openFileAction.open(fuseaction.getTagStart(), fuseaction.getTagEnd());
if(!openFileAction.isSuccess()){
showMessage("File Not found: " + switchFile);
}
}
else if(obj instanceof FBXFuse){
FBXFuse fuse= (FBXFuse)obj;
FBXFuseAction fuseaction = (FBXFuseAction)fuse.getParent();
FBXCircuit circ = fuseaction.getCircuit();
OpenFileAction openFileAction = new OpenFileAction();
String fusePath = projcombo.getText() + "/" + fuse.getPath();