diff --git a/editor/org.processing.editor/src/org/processing/actions/RunButton.java b/editor/org.processing.editor/src/org/processing/actions/RunButton.java index fbfbf4bc8..9f4b2e714 100644 --- a/editor/org.processing.editor/src/org/processing/actions/RunButton.java +++ b/editor/org.processing.editor/src/org/processing/actions/RunButton.java @@ -1,9 +1,7 @@ package org.processing.actions; -import java.io.File; -import java.io.FileNotFoundException; + import java.io.StringWriter; -import java.util.Hashtable; import org.eclipse.jface.action.IAction; import org.eclipse.jface.text.IDocument; @@ -106,6 +104,9 @@ public class RunButton implements IEditorActionDelegate { } catch (Exception e){ ProcessingLog.logError(e); } + + + // do something with the results } diff --git a/editor/org.processing.editor/src/org/processing/editor/ProcessingDocumentSetupParticipant.java b/editor/org.processing.editor/src/org/processing/editor/ProcessingDocumentSetupParticipant.java index 1a2e9f40d..bad95c6af 100644 --- a/editor/org.processing.editor/src/org/processing/editor/ProcessingDocumentSetupParticipant.java +++ b/editor/org.processing.editor/src/org/processing/editor/ProcessingDocumentSetupParticipant.java @@ -16,12 +16,13 @@ import org.eclipse.jface.text.rules.FastPartitioner; public class ProcessingDocumentSetupParticipant implements IDocumentSetupParticipant { /** + * Doesn't do much. */ public ProcessingDocumentSetupParticipant() { } - /* - * @see org.eclipse.core.filebuffers.IDocumentSetupParticipant#setup(org.eclipse.jface.text.IDocument) + /** + * Sets up the document. */ public void setup(IDocument document) { if (document instanceof IDocumentExtension3) { diff --git a/editor/org.processing.editor/src/org/processing/editor/ProcessingEditor.java b/editor/org.processing.editor/src/org/processing/editor/ProcessingEditor.java index f722d28dc..1014770e3 100644 --- a/editor/org.processing.editor/src/org/processing/editor/ProcessingEditor.java +++ b/editor/org.processing.editor/src/org/processing/editor/ProcessingEditor.java @@ -92,7 +92,7 @@ public class ProcessingEditor extends TextEditor { private ProjectionSupport fProjectionSupport; /** - * Default constructor. + * Default */ public ProcessingEditor() { super(); diff --git a/editor/org.processing.editor/src/org/processing/editor/ProcessingEditorPlugin.java b/editor/org.processing.editor/src/org/processing/editor/ProcessingEditorPlugin.java index 4f496b200..45fa8dc55 100644 --- a/editor/org.processing.editor/src/org/processing/editor/ProcessingEditorPlugin.java +++ b/editor/org.processing.editor/src/org/processing/editor/ProcessingEditorPlugin.java @@ -46,32 +46,28 @@ public class ProcessingEditorPlugin extends AbstractUIPlugin { /** * Creates a new plug-in instance. - * */ public ProcessingEditorPlugin() { -// [lonnen] -// Java editor example has "fgInstance= this;" -// while the editor template uses the start method to handle -// that and leaves this empty. Since I've been chasing down -// this null pointer error for going on 12 hours, I'm going -// to try it the template's way and see if it works. -// -// That did the trick! On to debugging other problems. [lonnen] June 10 2010 + //any init code should go in start() } - /* added from the editor template, not present in the java editor code - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + /** + * Called when the plugin is loaded. + * + * All initialization stuff goes here. Make sure to de-initialize it in stop() + * Also, try to keep these methods lean. If it takes too long the platform will + * cancel loading the plug-in. */ public void start(BundleContext context) throws Exception { super.start(context); fgInstance = this; - //System.out.println("fgInstance initialized!"); } - /* added from the editor template, not present in the java editor code - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + /** + * Called when the plugin is unloaded. + * + * Make sure to remove anything here that was initialized to prevent memory + * leaks. Keep this lean, or the platform will cancel the operation. */ public void stop(BundleContext context) throws Exception { fgInstance = null;