removing netbeans editor muck

This commit is contained in:
benfry
2009-11-05 02:05:27 +00:00
parent 02446b95ec
commit 4b19e87cb1
2 changed files with 3 additions and 63 deletions

View File

@@ -40,8 +40,8 @@ import processing.core.*;
* files and images, etc) that comes from that.
*/
public class Base {
static final int REVISION = 171;
static String VERSION_NAME = "0171";
static final int REVISION = 172;
static String VERSION_NAME = "0172";
static HashMap<Integer, String> platformNames = new HashMap<Integer, String>();
static {

View File

@@ -22,6 +22,7 @@
package processing.app;
import processing.app.debug.*;
import processing.app.syntax.*;
import processing.app.tools.*;
@@ -41,11 +42,6 @@ import javax.swing.event.*;
import javax.swing.text.*;
import javax.swing.undo.*;
//import org.netbeans.api.java.source.ui.DialogBinding;
//import org.openide.filesystems.*;
//import org.openide.loaders.DataObject;
//import org.openide.text.CloneableEditorSupport;
/**
* Main editor panel for the Processing Development Environment.
@@ -105,7 +101,6 @@ public class Editor extends JFrame implements RunnerListener {
EditorLineStatus lineStatus;
boolean newEditor = true;
JEditorPane editorPane;
JEditTextArea textarea;
@@ -215,22 +210,7 @@ public class Editor extends JFrame implements RunnerListener {
lineStatus = new EditorLineStatus(textarea);
consolePanel.add(lineStatus, BorderLayout.SOUTH);
// if (newEditor) {
// try {
// setupEditorPane();
// upper.add(editorPane);
// } catch (Exception e1) {
// PrintWriter w = PApplet.createWriter(new File("/Users/fry/Desktop/blah.txt"));
// w.println(e1.getMessage());
// e1.printStackTrace(w);
// w.flush();
// w.close();
//// e1.printStackTrace());
//// e1.printStackTrace(System.out);
// }
// } else {
upper.add(textarea);
// }
splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
upper, consolePanel);
@@ -345,46 +325,6 @@ public class Editor extends JFrame implements RunnerListener {
//setVisible(true);
}
/*
// http://wiki.netbeans.org/DevFaqEditorCodeCompletionAnyJEditorPane
void setupEditorPane() throws IOException {
editorPane = new JEditorPane();
// This will find the Java editor kit and associate it with
// our editor pane. But that does not give us code completion
// just yet because we have no Java context (i.e. no class path, etc.).
// However, this does give us syntax coloring.
EditorKit kit = CloneableEditorSupport.getEditorKit("text/x-java");
editorPane.setEditorKit(kit);
// You can specify any ".java" file.
// If the file does not exist, it will be created.
// The contents of the file does not matter.
// The extension must be ".java", however.
// String newSourcePath = "/Users/fry/Desktop/tmp.java";
// File tmpFile = new File(newSourcePath);
// System.out.println(tmpFile.getParent() + " " + tmpFile.getName());
// FileObject fob = FileUtil.createData(tmpFile);
File tmpFile = File.createTempFile("temp", ".java");
FileObject fob = FileUtil.toFileObject(FileUtil.normalizeFile(tmpFile));
DataObject dob = DataObject.find(fob);
editorPane.getDocument().putProperty(Document.StreamDescriptionProperty, dob);
// This sets up a default class path for us so that
// we can find all the JDK classes via code completion.
DialogBinding.bindComponentToFile(fob, 0, 0, editorPane);
// Last but not least, we need to fill the editor pane with
// some initial dummy code - as it seems somehow required to
// kick-start code completion.
// A simple dummy package declaration will do.
editorPane.setText("package dummy;");
}
*/
protected void setPlacement(int[] location) {
setBounds(location[0], location[1], location[2], location[3]);