Hello, this question might seem very blatant but I could’t figure it out by googleing and searching the forums.
I would like to sort the different classes in subfolders of the project (eg. gui, algorithm) and then import them into my main project. I found that theres an “import” but it seems to be for librarys only.
Thanks in advance
It is too bad that you cannot put .pde and .java files in the /code folder, the way that you can add .jar files.
I understand why this is done with .pde files from a UI perspective, as they are created as new tabs, and they need a consistent place to appear (and to be consistently visible to new programmers).
However with .java it seems like being able to treat them as /code resources could sometimes help to keep sketches tidy.
Yes. Its the first time im actually creating a bigger project with processing and it kinda bothers me that I cannot split the GUI part and the algorithm part into different subfolders. Its not a huge problem, just not the way I’d like it to be
Processing’s IDE (PDE) was not targeted for big projects.
Hence its “.pde” files are simply called sketches.
If it’s getting too clunky you should consider moving your project to another more appropriate IDE.
A downside (if it is a downside for you) is that, if you structure larger projects in a Java IDE, there is no merging multiple .pde files from subfolders (at least, as for as I am aware).
Instead, you will be writing your classes as .java files in Java rather than using Processing syntax (so writing public in front of things, no color sugar word for int color data, explicitly passing in this rather than having automatic inner classes, et cetera).
I started with java and went to processing because my project is about rendering and moving alot (thousands) of objects which is just pretty diffictult in java. (or at least easier in processing) I really dont care about the structure as long as it works, but i wouldve prefered it to be tidy. Thats not a reason for me to change ide’s mid-development, especially since no one is every going to look at the code of this.