New version for the update site.

This commit is contained in:
lonnen
2010-09-29 02:03:02 +00:00
parent cc9e601066
commit d563e0e1af
8 changed files with 40 additions and 39 deletions

View File

@@ -2,7 +2,7 @@
<feature
id="processing.plugin"
label="Processing Plug-In for Eclipse"
version="1.1.0.qualifier"
version="1.2.0.qualifier"
provider-name="Processing.org">
<description url="http://www.processing.org/">
@@ -48,6 +48,9 @@ All images are included under a creative commons license (http://creativecommons
<import plugin="org.eclipse.jdt.launching" version="3.5.100" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.ide" version="3.6.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.core" version="3.6.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.navigator"/>
<import plugin="org.eclipse.ui.navigator.resources"/>
<import plugin="org.eclipse.jdt.ui" version="3.6.0" match="greaterOrEqual"/>
</requires>
<plugin

View File

@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Processing Plugin Core
Bundle-SymbolicName: processing.plugin.core;singleton:=true
Bundle-Version: 0.2.0.0
Bundle-Version: 0.2.1.0
Bundle-Activator: processing.plugin.core.ProcessingCore
Bundle-Vendor: Processing.org
Require-Bundle: org.eclipse.core.runtime,

View File

@@ -229,7 +229,7 @@ public class SketchProject implements IProjectNature {
project.build(IncrementalProjectBuilder.FULL_BUILD, monitor);
}
/** Return the sketch's code folder or null if it cannot be retrieved */
/** Return the sketch's code folder or null if it cannot be retrieved. */
public IFolder getCodeFolder(){
try{
IFolder code = project.getFolder("code");
@@ -358,7 +358,7 @@ public class SketchProject implements IProjectNature {
if(srcFolderPathList != null){
for( IPath p : srcFolderPathList){
if (p!=null){
System.out.println(p.toOSString());
// System.out.println(p.toOSString());
entries.add(JavaCore.newSourceEntry(p.makeAbsolute()));
}
}
@@ -367,7 +367,7 @@ public class SketchProject implements IProjectNature {
if(libraryJarPathList != null){
for(IPath p : libraryJarPathList){
if (p != null){
System.out.println(p.toString());
// System.out.println(p.toString());
entries.add(
JavaCore.newLibraryEntry(p.makeAbsolute(),
null, // no source

View File

@@ -29,7 +29,6 @@ import java.util.zip.ZipFile;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
import processing.plugin.core.ProcessingCore;
import processing.plugin.core.ProcessingCorePreferences;
import processing.plugin.core.ProcessingLog;
@@ -101,21 +100,19 @@ public class Utilities {
}
return count;
}
/**
* Given a folder, return a list of absolute paths to all .jar and .zip
* (but not .class) files inside that folder, separated by the system's
* path separator character.
*
* <p>
* This will prepend the system's path separator so that it can be directly
* appended to another path string.
*
* <p>
* This function doesn't bother checking to see if there are any .class
* files in the folder or within a subfolder.
*/
static public String contentsToClassPath(File folder) {
//TODO Review this method and make sure that it is returning only paths directly to jars and zip files
// It was returning empty paths which was breaking things. Needs to be reviewed.
if (folder == null) return "";
if (!folder.isDirectory()) return "";

View File

@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Processing Plugin User Interface Elements
Bundle-SymbolicName: processing.plugin.ui;singleton:=true
Bundle-Version: 0.2.0.0
Bundle-Version: 0.2.1.0
Bundle-Activator: processing.plugin.ui.ProcessingPlugin
Bundle-Vendor: Processing.org
Require-Bundle: org.eclipse.ui,

View File

@@ -158,10 +158,10 @@ public class ExportAsAppletSelectProjectsWizardPage extends WizardPage {
projectTable.setLabelProvider(new ProjectTableLabelProvider());
final FormData formData = new FormData();
formData.bottom = new FormAttachment(100,0);
formData.right = new FormAttachment(100,0);
formData.top = new FormAttachment(0,0);
formData.left = new FormAttachment(0,0);
formData.bottom = new FormAttachment(95,0);
formData.right = new FormAttachment(95,0);
formData.top = new FormAttachment(5,0);
formData.left = new FormAttachment(5,0);
final Table table = projectTable.getTable();
table.setLayoutData(formData);

View File

@@ -20,6 +20,7 @@ import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@@ -108,32 +109,29 @@ public class ExportAsAppletWizard extends Wizard implements IExportWizard {
IFile code = sp.getMainFile();
if (code == null) return false;
// true to nuke the folder contents, if they exist
IFolder exportFolder = sp.getAppletFolder(true);
IFolder exportFolder = sp.getAppletFolder(true); // true to nuke the folder contents, if they exist
// if the code folder has stuff, move it to the applet folder
// add the contents of the code folder to the jar
IFolder codeFolder = sp.getCodeFolder();
if(codeFolder != null){
if (codeFolder != null){
try{
String includes = Utilities.contentsToClassPath(codeFolder.getFullPath().toFile());
String[] codeList = Utilities.splitTokens(includes,File.separator);
for (String path : codeList){
System.out.println("Found file: " + path + ".");
if (path.toLowerCase().endsWith(".jar") ||
path.toLowerCase().endsWith(".zip")) {
IFile exportFile = codeFolder.getFile(new Path(path));
if (exportFile.isAccessible()){
exportFile.copy(exportFolder.getFullPath(), true, null);
System.out.println("Copied the file to " + exportFolder.getFullPath().toString() + " .");
}
}
}
} catch (CoreException e) {
ProcessingLog.logError("Could not export. CoreException while packaging the code folder.", e);
return false;
for(IResource r : codeFolder.members()){
if(!(r instanceof IFile)) continue;
if(r.getName().startsWith(".")) continue;
if ("jar".equalsIgnoreCase(r.getFileExtension()) ||
"zip".equalsIgnoreCase(r.getFileExtension())){
r.copy(exportFolder.getFullPath().append(r.getName()), true, null);
//System.out.println("Copied the file to " + exportFolder.getFullPath().toString() + " .");
}
}
} catch (CoreException e){
ProcessingLog.logError("Code Folder entries could not be included in export." +
"Export for " + sp.getProject().getName() + " may not function properly.", e);
}
}
////
// Get the compiled source and package it as a jar
// Shell parentShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
// JarPackageData codePackageData = new JarPackageData();
// codePackageData.setJarLocation(sp.getAppletFolder().getFullPath().append(sp.getProject().getName() + ".jar"));
@@ -150,8 +148,8 @@ public class ExportAsAppletWizard extends Wizard implements IExportWizard {
// }
// int wide = this.getWidth();
// int high = this.getHeight();
// int wide = sp.getWidth();
// int high = sp.getHeight();
//
// String codeContents = Utilities.readFile(code);
//

View File

@@ -3,6 +3,9 @@
<feature url="features/processing.plugin_1.0.2.201009081624.jar" id="processing.plugin" version="1.0.2.201009081624">
<category name="processing_plug_in"/>
</feature>
<feature url="features/processing.plugin_1.2.0.201009282130.jar" id="processing.plugin" version="1.2.0.201009282130">
<category name="processing_plug_in"/>
</feature>
<category-def name="processing_plug_in" label="Processing Plug-in for Eclipse">
<description>
Provides integration for the Processing programming language to the Eclipse platform. See http://www.processing.org to learn more.