1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-17 06:52:18 +01:00

Code cleanup

This commit is contained in:
Federico Fissore 2015-07-03 11:59:25 +02:00
parent 6258e02436
commit 7cc7d47e61

View File

@ -33,7 +33,6 @@ package processing.app.syntax;
import org.apache.commons.compress.utils.IOUtils;
import org.fife.ui.rsyntaxtextarea.*;
import org.fife.ui.rsyntaxtextarea.Token;
import org.fife.ui.rsyntaxtextarea.focusabletip.FocusableTip;
import org.fife.ui.rtextarea.RTextArea;
import org.fife.ui.rtextarea.RTextAreaUI;
import org.fife.ui.rtextarea.RUndoManager;
@ -67,18 +66,12 @@ import java.util.logging.Logger;
* Arduino Sketch code editor based on RSyntaxTextArea (http://fifesoft.com/rsyntaxtextarea)
*
* @author Ricardo JL Rufino (ricardo@criativasoft.com.br)
* @date 20/04/2015
* @since 1.6.4
*/
public class SketchTextArea extends RSyntaxTextArea {
private final static Logger LOG = Logger.getLogger(SketchTextArea.class.getName());
/**
* The last docTooltip displayed.
*/
private FocusableTip docTooltip;
private EditorListener editorListener;
private final PdeKeywords pdeKeywords;
@ -174,15 +167,6 @@ public class SketchTextArea extends RSyntaxTextArea {
return this.getSelectedText() != null;
}
public void setSelectedText(String text) {
int old = getTextMode();
setTextMode(OVERWRITE_MODE);
replaceSelection(text);
setTextMode(old);
}
public void processKeyEvent(KeyEvent evt) {
// this had to be added because the menu key events weren't making it up to the frame.
@ -237,16 +221,6 @@ public class SketchTextArea extends RSyntaxTextArea {
}
}
public String getTextLine(int line) {
try {
int offset = getLineStartOffset(line);
int end = getLineEndOffset(line);
return getDocument().getText(offset, end - offset);
} catch (BadLocationException e) {
return null;
}
}
public void setEditorListener(EditorListener editorListener) {
this.editorListener = editorListener;