Package net.sourceforge.ganttproject

Examples of net.sourceforge.ganttproject.GanttProject


        return GanttLanguage.getInstance().getText("ganttprojectFiles");
    }

    public void run(GanttProject project, final UIFacade uiFacade, final File selectedFile, final boolean bMerge) {
        myUIFacade = project.getUIFacade();
    final GanttProject targetProject = project;
    final BufferProject bufferProject = createBufferProject(targetProject, uiFacade);
    project.getUndoManager().undoableEdit("Import",
                new Runnable() {
          public void run() {
            openDocument(targetProject, bufferProject, uiFacade, selectedFile, bMerge);
View Full Code Here


        }
       
        List values = new ArrayList();
        Exporter exporter = findExporter(parsedArgs, values);
        if (exporter!=null && values.size()>0) {
            GanttProject project = new GanttProject(false);
            String inputFileName = String.valueOf(values.get(0));
           
            project.openStartupDocument(inputFileName);
            ConsoleUIFacade consoleUI = new ConsoleUIFacade(project.getUIFacade());
            File inputFile = new File(inputFileName);
            if (false==inputFile.exists()) {
                consoleUI.showErrorDialog("File "+inputFileName+" does not exist.");
                return true;
            }
            if (false==inputFile.canRead()) {
                consoleUI.showErrorDialog("File "+inputFileName+" is not readable.");
                return true;                   
            }

            Platform.getJobManager().setProgressProvider(null);
            File outputFile;
            if (values.size()>1) {
                outputFile = new File(String.valueOf(values.get(1)));
            }
            else {
                outputFile = FileChooserPage.proposeOutputFile(project, exporter);
            }
            System.err.println("[CommandLineExportApplication] export(): exporting with "+exporter);
            exporter.setContext(project, consoleUI);
            if (exporter instanceof ExportFileWizardImpl.LegacyOptionsClient) {
                ((ExportFileWizardImpl.LegacyOptionsClient)exporter).setOptions(project.getOptions());
            }
            try {
              ExportFinalizationJob finalizationJob = new ExportFinalizationJob() {
          public void run(File[] exportedFiles) {
            System.exit(0);
View Full Code Here

TOP

Related Classes of net.sourceforge.ganttproject.GanttProject

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.