mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 18:10:43 +01:00
Changed missing sketchName.pde from warning to error. Finished all exporter UI stuff.
This commit is contained in:
@@ -85,7 +85,7 @@ public class ExportAsAppletSelectProjectsWizardPage extends WizardPage {
|
||||
public boolean setEntry(SketchProject project){
|
||||
if (project == null) return false;
|
||||
sp = project;
|
||||
System.out.println("Adding: " + project.getProject().getName());
|
||||
// System.out.println("Adding: " + project.getProject().getName());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -117,8 +117,8 @@ public class ExportAsAppletSelectProjectsWizardPage extends WizardPage {
|
||||
|
||||
/** Gets the column text */
|
||||
public String getColumnText(Object element, int columnIndex) {
|
||||
System.out.println(element.toString());
|
||||
System.out.println(columnIndex);
|
||||
// System.out.println(element.toString());
|
||||
// System.out.println(columnIndex);
|
||||
switch (columnIndex) {
|
||||
case 0: // project
|
||||
if (element instanceof ProjectTableEntryModel)
|
||||
@@ -190,5 +190,14 @@ public class ExportAsAppletSelectProjectsWizardPage extends WizardPage {
|
||||
* and builds everything itself. */
|
||||
super.setVisible(visible);
|
||||
}
|
||||
|
||||
public SketchProject[] getSelectedProjects(){
|
||||
Object[] elements = projectTable.getCheckedElements();
|
||||
SketchProject[] selectedProjects = new SketchProject[elements.length];
|
||||
for(int i=0; i<elements.length; i++){
|
||||
selectedProjects[i] = ((ProjectTableEntryModel) elements[i]).getProject();
|
||||
}
|
||||
return selectedProjects;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,11 +13,16 @@ package processing.plugin.ui.wizards;
|
||||
//import java.util.Iterator;
|
||||
//import org.eclipse.core.resources.IProject;
|
||||
//import org.eclipse.core.resources.IResource;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.jface.wizard.Wizard;
|
||||
import org.eclipse.ui.IExportWizard;
|
||||
import org.eclipse.ui.IWorkbench;
|
||||
|
||||
import processing.plugin.core.ProcessingLog;
|
||||
import processing.plugin.core.builder.SketchProject;
|
||||
|
||||
|
||||
/**
|
||||
* An export wizard for processing projects.
|
||||
@@ -67,7 +72,16 @@ public class ExportAsAppletWizard extends Wizard implements IExportWizard {
|
||||
|
||||
public boolean performFinish() {
|
||||
// return SketchProject.forProject(page.getProject()).exportAsApplet();
|
||||
return false;
|
||||
ArrayList<String> couldNotExport = new ArrayList<String>();
|
||||
for(SketchProject sp : page.getSelectedProjects()){
|
||||
// System.out.println(sp.getProject().getName());
|
||||
if (!sp.exportAsApplet()) couldNotExport.add(sp.getProject().getName());
|
||||
}
|
||||
|
||||
if (couldNotExport.size() > 0)
|
||||
for(String s : couldNotExport) ProcessingLog.logInfo( "Unable to export " + s + ".");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user