mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Documentation and minor tweaks.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -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) {
|
||||
|
||||
@@ -92,7 +92,7 @@ public class ProcessingEditor extends TextEditor {
|
||||
private ProjectionSupport fProjectionSupport;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
* Default
|
||||
*/
|
||||
public ProcessingEditor() {
|
||||
super();
|
||||
|
||||
+12
-16
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user