We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › Processing (BETA) development on XCode / Eclipse
Page Index Toggle Pages: 1
Processing (BETA) development on XCode / Eclipse (Read 3209 times)
Processing (BETA) development on XCode / Eclipse
Apr 30th, 2005, 2:05am
 
Most developers who have a stable Java background but still use processing to do their graphical prototyping (don't we all) may find processing's IDE a little limiting (mostly due to lack of code completion and other minor features like "proper" highlighting and indentation) - Its not about what the processing IDE can't do but about what you *can* do with other software.

Now that I've rebuilt my development system (OSX, Tiger), I'm planning on going back to developing processing BETA stuff with an IDE other than its own. This thread's meant to be an effort to discuss development with an external IDE (like apple's XCode) or Eclipse.

- On eclipse, I've gone through to building standard processing applications, using everything but external libraries (which unfortunately makes it impossible to use opengl, net, or any of the others). Not that it doesn't work, but at least for opengl, building the canvas is itself a huge hack. (discussion on wiki here)
Re: Processing (BETA) development on XCode / Eclipse
Reply #1 - May 3rd, 2009, 1:48pm
 
#
# Compiling Processing apps in XCode
# by Gabe Dunne, Josh Nimoy, and David Wicks May 3, 2009
# This solution emerged collaboratively from the [o_O] Oooshiny Group
#

1. Copy the Processing core.jar to your Java extensions folder (I used 1.0.3)
2. In XCode, choose File > New Project. Go to the Java section and choose "Java Application"
3. Replace the code in [PROJECT_NAME].java with the following:

import processing.core.*;

public class ProcessingApplication extends PApplet {
     
     public static boolean FULLSCREEN = false; // toggle fullscreen app
     public static void main(String[] args)
     {
           String className = "ProcessingApplication";
           if(FULLSCREEN) { PApplet.main( new String[] { "--present", className } ); }
           else           { PApplet.main( new String[] { className } ); }
     }
     
     public void setup(){
           size(300,300);
           colorMode(RGB,1,1,1);
           rectMode(CENTER);
     }
     
     public void draw(){
           background(1,0,0);
           rect(mouseX, mouseY,50,50);
     }
   
}

4. The build should succeed.

5. Find your executable in the dist/ folder and launch it any time.

David: One oddity: I can't figure out how to get rid of the AboutBox.java and PrefPane.java files that XCode creates automatically. If you remove them using Finder, they go red in XCode, but everything still works.
Re: Processing (BETA) development on XCode / Eclipse
Reply #2 - Jun 1st, 2009, 10:33am
 
I just moved to xcode (from jbuilder 2005 on win) and now I do almost the same as mr nimoy:

- get core.jar out of the processing app like this:
Show Package Contents > contents > resources > java >
- in there you'll find the core.jar file,  copy-paste it into
Library>java>extensions

this is my template for processing apps in xcode:
Code:
import java.awt.*;
import processing.core.*;

public class processing_test extends PApplet {

//---------------------------------------------
static final boolean FULLSCREEN = true;
static int WIDTH;
static int HEIGHT;
//---------------------------------------------

public static void main(String[] args) {
if (FULLSCREEN) {
// start fullscreen, detect screensize
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
println("screensize: " + screenSize.width + ", " +
screenSize.height);
WIDTH = screenSize.width;
HEIGHT = screenSize.height;
PApplet.main(new String[] {"--present", processing_test.class.getName()});
}
else {
// start in normal window
WIDTH = 1024;
HEIGHT = 768;
PApplet.main(new String[] {processing_test.class.getName()});

}
}

public void setup() {
size(WIDTH, HEIGHT, P3D);

}

public void draw() {
background(0);
rect(mouseX, mouseY, 20,20);
}

}


does anyone know how to get code completion working with the processing core in xcode?
Page Index Toggle Pages: 1