b-g / processing-sublime

A Sublime Text package for the programming language Processing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: ability to generate new Java Ant project for Processing

ybakos opened this issue · comments

I've been working on adding an ST plugin for our beloved Processing package that enables a user to generate a Processing project in pure Java with an ant buildfile. It works like this:

  • User creates an empty directory on the filesystem, opens it in Sublime
  • Runs a command, is prompted for the package name, Sublime generates a buildfile and boilerplate Processing sketch in pure Java

At this point, the user can engage in a workflow similar to how we've been doing things in Eclipse, but without Eclipse. I've been using this on my own for a little bit and it works pretty well.

You can see the progress so far here, and try it out if you want:
https://github.com/ybakos/processing-sublime/blob/pure_java_plugin/

To try it, you should have a Sublime window open with a folder in the sidebar, then select Tools -> Processing -> New Java Ant Project. There's also a command in the command palette: Cmd-Shift-P, Processing: New Java Ant Project.

The critical files here are Processing.py and the templates in Commands/templates.

Would love to get feedback while I work on this feature. Some TODO's:

  • ensure ST3 compatibility
  • try to automatically select Ant build setting
  • try to automatically select Processing syntax instead of Java
  • add setting for path to Processing core.jar
  • extract constants into plugin config settings
  • create command for creating a new project w/o active window

Hi @ybakos,

Sorry for the ultra late reply! Became a dad a few months ago and was totally swamped in other projects!

This looks very interesting, but also quite professional! Basically I think it would be super to include it, but as I'm not really familiar with ANT the maintenance would be on your side. Of course with super bold credits. Or maybe just do a new bundle "processing-java-sublime"?

All the best,
Benedikt

No problem and congratulations with the new baby.

The maintenance is no problem really, since ant has been around a long time and is just a command-line executable. It doesn't impact any other part of the processing-sublime plugin, other than adding another command to the command palette. Up to you if you would like me to create a PR. I don't think it deserves being in its own bundle/package.

Thanks for you understanding and patience!

Then please go ahead! I guess you would just create an additional build system, a howto section "Processing project in pure Java and ant" in the readme and add a sketch pure-java template, or?

In progress, need to ensure compatibility with ST3.