Skip to content

Commit 7eea624

Browse files
Remove EditorListener class
It did not contain any actual code anymore, so it can be removed, along with the infrastructure for setting it up.
1 parent ac66a9c commit 7eea624

File tree

3 files changed

+0
-68
lines changed

3 files changed

+0
-68
lines changed

app/src/processing/app/Editor.java

-1
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,6 @@ private SketchTextArea createTextArea() throws IOException {
10401040
textArea.setAntiAliasingEnabled(PreferencesData.getBoolean("editor.antialias"));
10411041
textArea.setTabsEmulated(PreferencesData.getBoolean("editor.tabs.expand"));
10421042
textArea.setTabSize(PreferencesData.getInteger("editor.tabs.size"));
1043-
textArea.setEditorListener(new EditorListener(this));
10441043
textArea.addHyperlinkListener(new HyperlinkListener() {
10451044
@Override
10461045
public void hyperlinkUpdate(HyperlinkEvent hyperlinkEvent) {

app/src/processing/app/EditorListener.java

-37
This file was deleted.

app/src/processing/app/syntax/SketchTextArea.java

-30
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import org.fife.ui.rtextarea.RUndoManager;
3939
import processing.app.Base;
4040
import processing.app.BaseNoGui;
41-
import processing.app.EditorListener;
4241
import processing.app.PreferencesData;
4342

4443
import javax.swing.event.EventListenerList;
@@ -49,7 +48,6 @@
4948
import javax.swing.text.Segment;
5049
import javax.swing.undo.UndoManager;
5150
import java.awt.*;
52-
import java.awt.event.KeyEvent;
5351
import java.awt.event.MouseEvent;
5452
import java.io.File;
5553
import java.io.FileInputStream;
@@ -69,8 +67,6 @@ public class SketchTextArea extends RSyntaxTextArea {
6967

7068
private final static Logger LOG = Logger.getLogger(SketchTextArea.class.getName());
7169

72-
private EditorListener editorListener;
73-
7470
private PdeKeywords pdeKeywords;
7571

7672
public SketchTextArea(PdeKeywords pdeKeywords) throws IOException {
@@ -152,27 +148,6 @@ public boolean isSelectionActive() {
152148
return this.getSelectedText() != null;
153149
}
154150

155-
public void processKeyEvent(KeyEvent evt) {
156-
157-
// this had to be added because the menu key events weren't making it up to the frame.
158-
159-
switch (evt.getID()) {
160-
case KeyEvent.KEY_TYPED:
161-
if (editorListener != null) editorListener.keyTyped(evt);
162-
break;
163-
case KeyEvent.KEY_PRESSED:
164-
if (editorListener != null) editorListener.keyPressed(evt);
165-
break;
166-
case KeyEvent.KEY_RELEASED:
167-
// inputHandler.keyReleased(evt);
168-
break;
169-
}
170-
171-
if (!evt.isConsumed()) {
172-
super.processKeyEvent(evt);
173-
}
174-
}
175-
176151
public void switchDocument(Document document, UndoManager newUndo) {
177152

178153
// HACK: Dont discard changes on curret UndoManager.
@@ -206,11 +181,6 @@ public void getTextLine(int line, Segment segment) {
206181
}
207182
}
208183

209-
210-
public void setEditorListener(EditorListener editorListener) {
211-
this.editorListener = editorListener;
212-
}
213-
214184
private static class DocLinkGenerator implements LinkGenerator {
215185

216186
private final PdeKeywords pdeKeywords;

0 commit comments

Comments
 (0)