New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make TemplateMode 3.0 compatible #4

Open
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@joelmoniz
Copy link

joelmoniz commented Jun 5, 2015

This PR fixes #3. The primary change is that the jars in the processing/java/mode folder, especially JavaMode.jar, need to be included in the mode's "lib" directory. This is because in 3.0, unlike previously, the JavaMode itself is loaded as a contributed mode, and isn't in Processing's classpath. Which means that if the JavaMode.jar isn't included, the class loader trying to load the mode has no idea what exactly JavaMode.jar is (since JavaMode.jar isn't in processing's classpath).

Further, how the mode's class loader identifies the class loader to be returned (i.e., JavaMode's class loader) also has to be changed- earlier, it could just cycle through all the modes and find which one of them corresponded to the JavaMode.class. However, now, since the JavaMode.class of the mode is not the same as the JavaMode's JavaMode.class (since they're loaded from different jars), it has to identify the JavaMode by name, and then return its class loader.

Once these 2 changes are made, everything runs smoothly. I've updated the resources/theme folder as well, since otherwise, the UI looks terribly off, as quite a few UI changes were made in 3.0.
And finally, I've updated the readme to mention that the jars in the processing/java/mode folder have to be included in the "lib" folder.

A huge thank you to @Manindra29 for helping me figure out all these changes that needed to be done.

@arypbatista

This comment has been minimized.

Copy link

arypbatista commented Jul 15, 2016

@martinleopold Please, merge this pull request.

Or @joelmoniz proceed to create your own repository with this update so people interested will follow your updated version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment