Package jSimMacs.data

Examples of jSimMacs.data.Project


    else if (es == newProjectItem) {
      newProjectDialog.setLocationRelativeTo(this);
      newProjectDialog.setVisible(true);
      String projectName = newProjectDialog.getProjectName();
      if ((projectName != null) && (projectName.length() > 0)) {
        Project project = newProjectDialog.getProject();
        if (JSimLogic.getInstance().createProject(project)) {
          pTree.insertProjectNode(newProjectDialog
              .getProjectLocation(), project);
          newFileTree.insertProjectNode(newProjectDialog
              .getProjectLocation(), project);
          JSimLogic.getInstance().saveProjectFile(project,
              newProjectDialog.getProjectLocation());
          JSimLogic.getInstance().saveRemoteProject(
              newProjectDialog.getProjectLocation());
          // pTree.setup();
          // newFileTree.setup();
        }
        newProjectDialog.setProjectName("");
      }
    } else if (es == newFileItem) {
      newFileDialog.setLocationRelativeTo(this);
      newFileDialog.setVisible(true);
      String fileName = newFileDialog.getFileName();
      if ((fileName != null) && (fileName.length() > 0)) {
        try {
          String filePath = JSimLogic.getInstance().createFile(
              fileName, newFileDialog.getSelectedNode());
          if (filePath == null) {
            JOptionPane.showMessageDialog(this,
                "Can't create file", "File error",
                JOptionPane.ERROR_MESSAGE);
          } else
            pTree.insertNode(newFileDialog.getSelectedNode(),
                filePath);
          // pTree.updateTree();
        } catch (IOException e1) {
          JOptionPane.showMessageDialog(this, "Can't create file",
              "File error", JOptionPane.ERROR_MESSAGE);
        }
      }
    } else if (es instanceof JSimMenuItem) {
      JSimMenuItem item = (JSimMenuItem) es;
      Project project = item.getProject();
      try {
        JSimLogic.getInstance().loadProjectAttributes(project);
      } catch (IOException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
View Full Code Here


      // directoryList = sort(directoryList);

      for (int i = 0; i < directoryList.length; i++) {
        if (directoryList[i].isDirectory()
            && !directoryList[i].isHidden()) {
          Project project = new Project(directoryList[i].getName());
          project.setLocation(ProjectLocation.LOCALE);
          localProjects.add(project);
          localRoot.add(new ProjectEntryMutuableTreeNode(
              directoryList[i], project));
        }
      }
View Full Code Here

  public String getSshUser() {
    return sshUser.getText();
  }
 
  public Project getProject(){
    Project project = null;
    if(sshEnabled){
      project = new RemoteProject(getProjectName());
      ((RemoteProject)project).setHostname(getSshHostname());
      ((RemoteProject)project).setPort(Integer.parseInt(getSshPort()));
      ((RemoteProject)project).setUsername(getSshUser());
      ((RemoteProject)project).setPath(getSshPath());
      ((RemoteProject)project).setUseCertificate(sshCertificate.isSelected());
    }
    else
      project = new Project(getProjectName());
    project.setType((ProjectType)projectList.getSelectedValue());
    project.setLocation(projectLocation);
    project.setUseMPILib(mpiSupport.isSelected());
    return project;
  }
View Full Code Here

      Arrays.sort(directoryList);
      // directoryList = sort(directoryList);
      for (int i = 0; i < directoryList.length; i++)
        if (directoryList[i].isDirectory()
            && !directoryList[i].isHidden()) {
          Project project = null;
          if (node == localRoot)
            project = new Project(directoryList[i].getName());
          node.add(new ProjectEntryMutuableTreeNode(directoryList[i],
              project));
        }

      File[] fileList = userDir.listFiles();
View Full Code Here

 
  private int counter = 0;

  public ProjectReaderHandler(Project project) {
    if (project == null)
      this.project = new Project();
    else
      this.project = project;
  }
View Full Code Here

TOP

Related Classes of jSimMacs.data.Project

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.