Package ch.mtSystems.jnc.model

Examples of ch.mtSystems.jnc.model.JNCProject


  // --------------- private methods ---------------

  private void buildContens(Shell shell)
  {
    JNCProject project = AppController.getAppController().getCurrentProject();

    bFromFiles = new Button(shell, SWT.RADIO);
    bFromFiles.setText("Choose from files");
    bFromFiles.addSelectionListener(this);
    bFromFiles.setEnabled(project.getFiles().length > 0);

    bFromDirectory = new Button(shell, SWT.RADIO);
    bFromDirectory.setText("Choose from a directory");
    bFromDirectory.addSelectionListener(this);
    bFromDirectory.setEnabled(project.getDirectories().length > 0);

    bFromJar = new Button(shell, SWT.RADIO);
    bFromJar.setText("Choose from a jar");
    bFromJar.addSelectionListener(this);
    bFromJar.setEnabled(project.getJars().length > 0);

    Label sep1 = new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL);


    lClasses = new List(shell, SWT.BORDER|SWT.H_SCROLL|SWT.V_SCROLL);
View Full Code Here


    bOpenProject = new Button(openComposite, SWT.NONE);
    bOpenProject.setImage(imgOpen);
    bOpenProject.addSelectionListener(this);

    JNCProject project = AppController.getAppController().getCurrentProject();
    if(project != null)
    {
      rbKeepCurrent = new Button(JNC.getContentComposite(), SWT.RADIO);
      rbKeepCurrent.setLayoutData(LayoutUtilities.createGridData(-1, -1, -1, -1, 15));
      rbKeepCurrent.setText("Keep current project:");
      rbKeepCurrent.setSelection(true);
      rbKeepCurrent.addSelectionListener(this);
      buttonList.add(rbKeepCurrent);

      Label fileLabel = new Label(JNC.getContentComposite(), SWT.NONE);
      fileLabel.setLayoutData(LayoutUtilities.createGridData(-1, -1, -1, -1, 40));

      File saveFile = project.getSaveFile();
      fileLabel.setText("- " + ((saveFile != null) ? saveFile.toString() : "not yet saved"));
    }

    // page settings
    JNC.getNextButton().setEnabled(project != null);
View Full Code Here

        if(messageBox.open() != SWT.YES) return;
      }

      if(rbNewProject.getSelection())
      {
        ap.setCurrentProject(new JNCProject());
      } else if(rbOpenProject.getSelection())
      {
        try
        {
          File f = new File(tOpenProject.getText());
View Full Code Here

  // --------------- private methods ---------------

  private void updateData()
  {
    JNCProject project = AppController.getAppController().getCurrentProject();

    File[] faFiles = project.getFiles();
    for(int i=0; i<faFiles.length; i++) (new TableItem(tFiles, SWT.NONE)).setText(faFiles[i].toString());

    File[] faDirs = project.getDirectories();
    for(int i=0; i<faDirs.length; i++) (new TableItem(tDirs, SWT.NONE)).setText(faDirs[i].toString());

    for(File jarFile : project.getJars())
    {
      TableItem item = new TableItem(tJars, SWT.NONE);
      item.setText(jarFile.toString());
      item.setChecked(project.getCompileCompleteJar(jarFile));
    }

    JNC.getNextButton().setEnabled(tFiles.getItemCount() > 0 ||
        tDirs.getItemCount() > 0 || tJars.getItemCount() > 0);
  }
View Full Code Here

   * mode = 1: directories
   * mode = 2: jars
   */
  private void addSource(int mode, File[] files)
  {
    JNCProject project = AppController.getAppController().getCurrentProject();
    for(int i=0; i<files.length; i++)
    {
      if(mode == 0)
      {
        if(project.addFile(files[i]))
        {
          (new TableItem(tFiles, SWT.NONE)).setText(files[i].toString());
        }
      } else if(mode == 1)
      {
        if(project.addDirectory(files[i]))
        {
          (new TableItem(tDirs, SWT.NONE)).setText(files[i].toString());
        }
      } else if(mode == 2)
      {
        if(project.addJar(files[i], false))
        {
          (new TableItem(tJars, SWT.NONE)).setText(files[i].toString());
        }
      }
    }
View Full Code Here

        AppController.getAppController().getCurrentProject().removeGcjFlag(flag);
        tGcjFlags.remove(selIndices[i]);
      }
    } else if(e.getSource() == bShowCommands)
    {
      JNCProject project = AppController.getAppController().getCurrentProject();
      project.setShowCommands(bShowCommands.getSelection());
    } else if(e.getSource() == bExcludeGui)
    {
      JNCProject project = AppController.getAppController().getCurrentProject();
      project.setExcludeGui(bExcludeGui.getSelection());
    } else if(e.getSource() == bExcludeJce)
    {
      JNCProject project = AppController.getAppController().getCurrentProject();
      project.setExcludeJce(bExcludeJce.getSelection());
    } else if(e.getSource() == bAddGnuRegex)
    {
      JNCProject project = AppController.getAppController().getCurrentProject();
      project.setAddGnuRegex(bAddGnuRegex.getSelection());
    } else if(e.getSource() == bDontCacheJars)
    {
      JNCProject project = AppController.getAppController().getCurrentProject();
      project.setDontCacheJars(bDontCacheJars.getSelection());
    }
  }
View Full Code Here

  // --------------- private methods ---------------

  private void updateData()
  {
    JNCProject project = AppController.getAppController().getCurrentProject();

    for(String flag : project.getGcjFlags())
    {
      TableItem item = new TableItem(tGcjFlags, SWT.NONE);
      item.setText(flag);
      item.setChecked(project.getFlagMainCompilationOnly(flag));
    }

    bShowCommands.setSelection(project.getShowCommands());
    bExcludeGui.setSelection(project.getExcludeGui());
    bExcludeJce.setSelection(project.getExcludeJce());
    bAddGnuRegex.setSelection(project.getAddGnuRegex());
    bDontCacheJars.setSelection(project.getDontCacheJars());
  }
View Full Code Here

  // --------------- private methods ---------------

  private void updateData()
  {
    JNCProject project = AppController.getAppController().getCurrentProject();
    ignoreEvents = true;

    if(project.getMainClass() != null) tMainClass.setText(project.getMainClass());
    if(project.getJavaLibPath() != null) tJavaLibPath.setText(project.getJavaLibPath());
    bUseCni.setSelection(project.getUseCni());

    bWindows.setSelection(project.getCompileWindows());
    if(project.getWindowsFile() != null) tWindows.setText(project.getWindowsFile().toString());
    bLinux.setSelection(project.getCompileLinux());
    if(project.getLinuxFile() != null) tLinux.setText(project.getLinuxFile().toString());

    bIcon.setSelection(project.getUseIcon());
    if(project.getIconFile() != null) tIcon.setText(project.getIconFile().toString());
    bHideConsole.setSelection(project.getHideConsole());
   
    bOmitStripping.setSelection(project.getOmitStripping());
    bOmitPacking.setSelection(project.getOmitPacking());
    bDisableOptimisation.setSelection(project.getDisableOptimisation());

    updateWindowsSettings();
    updateLinuxSettings();
    updateNextButton();
View Full Code Here

    ignoreEvents = false;
  }

  private void updateWindowsSettings()
  {
    JNCProject project = AppController.getAppController().getCurrentProject();

    tWindows.setEnabled(project.getCompileWindows());
    bOpenWindows.setEnabled(project.getCompileWindows());

    bIcon.setEnabled(project.getCompileWindows());
    bOpenIcon.setEnabled(project.getCompileWindows() && project.getUseIcon());
    bHideConsole.setEnabled(project.getCompileWindows());
   
    tIcon.setEnabled(project.getCompileWindows() && project.getUseIcon());
    tIcon.setBackground((project.getCompileWindows() && project.getUseIcon()) ?
        Display.getDefault().getSystemColor(SWT.COLOR_WHITE) :
        bHideConsole.getBackground());
  }
View Full Code Here

        bHideConsole.getBackground());
  }

  private void updateLinuxSettings()
  {
    JNCProject project = AppController.getAppController().getCurrentProject();
    tLinux.setEnabled(project.getCompileLinux());
    bOpenLinux.setEnabled(project.getCompileLinux());
  }
View Full Code Here

TOP

Related Classes of ch.mtSystems.jnc.model.JNCProject

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.