}
}
} else if (es == openProject) {
if (selectedNode instanceof RemoteProjectMutuableTreeNode) {
RemoteProjectMutuableTreeNode rNode = (RemoteProjectMutuableTreeNode) selectedNode;
RemoteProject rProject = rNode.getRemoteProject();
JSimLogic.getInstance().openConnection(rProject);
SFTPv3DirectoryEntry entry = JSimLogic.getInstance()
.getDirectoryEntry(rProject,
rProject.getPath() + rProject.getName());
if (entry != null) {
rNode.setJSimNode(entry);
rNode.createNodes(true);
model.nodeStructureChanged(selectedNode);
JSimLogic.getInstance().refreshSimpleRemoteTree();
} else
JSimLogic.getInstance().closeConnection(rProject);
}
} else if (es == closeProject) {
if (selectedNode instanceof RemoteProjectMutuableTreeNode) {
RemoteProjectMutuableTreeNode rNode = (RemoteProjectMutuableTreeNode) selectedNode;
RemoteProject rProject = rNode.getRemoteProject();
JSimLogic.getInstance().closeConnection(rProject);
rNode.removeAllChildren();
rNode.setJSimNode(null);
model.nodeStructureChanged(selectedNode);
JSimLogic.getInstance().refreshSimpleRemoteTree();
}
} else if (es == projectSettings) {
if (selectedNode instanceof RemoteProjectMutuableTreeNode) {
JSimLogic.getInstance().showProjectSettingsDialog(
((JSimMutuableTreeNode) selectedNode).getProject());
}
} else if (es == importFile) {
if (selectedNode instanceof RemoteProjectMutuableTreeNode) {
RemoteProjectMutuableTreeNode rNode = (RemoteProjectMutuableTreeNode) selectedNode;
RemoteProject rProject = rNode.getRemoteProject();
ImportFileDialog importDialog = new ImportFileDialog(rNode
.getPathString(), rProject);
importDialog.pack();
importDialog.setSize(500, 350);
// importDialog.setLocationRelativeTo(this);