Skip to content

Commit

Permalink
backup
Browse files Browse the repository at this point in the history
  • Loading branch information
nietoperz809 committed Oct 22, 2023
1 parent 02c9730 commit 679c150
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 38 deletions.
11 changes: 6 additions & 5 deletions src/guishell/JfTerminalPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import javax.swing.text.Element;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.util.Objects;

/**
* @author Administrator
Expand Down Expand Up @@ -80,7 +81,7 @@ public BufferedImage getScreenShot() {
@Override
public void paste() {
super.paste();
String clip = Utilities.getClipBoardString().trim();
String clip = Objects.requireNonNull(Utilities.getClipBoardString()).trim();
clip = clip.replaceAll("[\\p{C}]", " ");
lineListener.fakeIn(clip);
}
Expand Down Expand Up @@ -141,7 +142,7 @@ private void runForthLoop() {
Utilities.executeThread(() -> {
//noinspection InfiniteLoopStatement
while (true) {
lineListener.getBufferedLine(); / WAIT
lineListener.getBufferedLine(); /* WAIT */

///
String lineData = currentLine(this);
Expand All @@ -150,10 +151,10 @@ private void runForthLoop() {
boolean ok = _jf.interpretLine(lineData);
String txt = _ss.getAndClear();
if (ok)
txt = AnsiDefaultOutput + txt;
txt = AnsiDefaultOutput + txt + " OK\n";
else
txt = AnsiError + "Error";
txt = txt+ "\nJFORTH> ";
txt = AnsiError + " Error\n";
txt = txt+ "JFORTH> ";
appendANSI(txt);
}
});
Expand Down
30 changes: 1 addition & 29 deletions src/guishell/LineListener.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
package guishell;

import java.awt.*;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.stream.Collectors;

public class LineListener implements KeyListener {
Robot robot;
//Robot robot;

public LineListener() {
super();
try {
robot = new Robot();
} catch (AWTException e) {
robot = null;
e.printStackTrace();
}
}

private final ArrayBlockingQueue<String> lineBuffer = new ArrayBlockingQueue<>(128, true);
Expand Down Expand Up @@ -50,30 +43,9 @@ public void keyTyped(KeyEvent e) {
charBuffer.offer(c); // insert at tail
}

// public void writeKeyboard(Robot bot, String st) throws Exception {
// String upperCase = st.toUpperCase();
//
// for(int i = 0; i < upperCase.length(); i++) {
// String letter = Character.toString(upperCase.charAt(i));
// String code = "VK_" + letter;
//
// Field f = KeyEvent.class.getField(code);
// int keyEvent = f.getInt(null);
//
// bot.keyPress(keyEvent);
// bot.keyRelease(keyEvent);
// }
// }

@Override
public void keyPressed(KeyEvent e) {
// if (e.getKeyCode() == 35) {
// try {
// writeKeyboard(robot, lastStr);
// } catch (Exception ex) {
// ex.printStackTrace();
// }
// }
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions src/tools/BuildInfo.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package tools;

public class BuildInfo {
private static final String BUILD_NUMBER = "3717";
private static final String BUILD_DATE = "10/21/2023 05:42:18 PM";
private static final String BUILD_NUMBER = "3725";
private static final String BUILD_DATE = "10/22/2023 03:35:50 AM";

public static final String buildInfo = "JForth, Build: " + BUILD_NUMBER + ", " + BUILD_DATE
+ " -- " + System.getProperty("java.version");
Expand Down
4 changes: 2 additions & 2 deletions src/tools/build.number
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Sat Oct 21 17:42:18 CEST 2023
build.number=3718
#Sun Oct 22 03:35:51 CEST 2023
build.number=3726

0 comments on commit 679c150

Please sign in to comment.