Skip to content

Commit e2005f1

Browse files
authored
Merge pull request #33 from r4fterman/feature/issue-32-remove-all-obsolete-code
Issue-#32: Remove Java applet support
2 parents 45a35ec + f40ede1 commit e2005f1

15 files changed

Lines changed: 399 additions & 1562 deletions

File tree

abbot/src/main/java/abbot/editor/EditorConstants.java

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -8,61 +8,6 @@
88
*/
99
public interface EditorConstants {
1010

11-
String MENU_FILE = "menus.file";
12-
String MENU_EDIT = "menus.edit";
13-
String MENU_TEST = "menus.test";
14-
String MENU_INSERT = "menus.insert";
15-
String MENU_CAPTURE = "menus.capture";
16-
String MENU_HELP = "menus.help";
17-
1811
String ACTION_PREFIX = "actions.";
19-
String ACTION_EDITOR_ABOUT = "editor-about";
20-
String ACTION_EDITOR_EMAIL = "editor-email";
21-
String ACTION_EDITOR_BUGREPORT = "editor-submit-bug";
22-
String ACTION_EDITOR_WEBSITE = "editor-website";
23-
String ACTION_EDITOR_USERGUIDE = "editor-userguide";
24-
String ACTION_EDITOR_QUIT = "editor-quit";
25-
String ACTION_SCRIPT_OPEN = "script-open";
26-
String ACTION_SCRIPT_NEW = "script-new";
27-
String ACTION_SCRIPT_DUPLICATE = "script-duplicate";
28-
String ACTION_SCRIPT_SAVE = "script-save";
29-
String ACTION_SCRIPT_SAVE_AS = "script-save-as";
30-
String ACTION_SCRIPT_RENAME = "script-rename";
31-
String ACTION_SCRIPT_CLOSE = "script-close";
32-
String ACTION_SCRIPT_DELETE = "script-delete";
33-
String ACTION_SCRIPT_CLEAR = "script-clear";
34-
String ACTION_STEP_CUT = "step-cut";
35-
String ACTION_STEP_MOVE_UP = "step-move-up";
36-
String ACTION_STEP_MOVE_DOWN = "step-move-down";
37-
String ACTION_STEP_GROUP = "step-group";
38-
String ACTION_SELECT_TESTSUITE = "select-testsuite";
39-
String ACTION_EXPORT_HIERARCHY = "export-hierarchy";
40-
String ACTION_RUN = "run";
41-
String ACTION_RUN_TO = "run-to";
42-
String ACTION_RUN_SELECTED = "run-selected";
43-
String ACTION_RUN_LAUNCH = "run-launch";
44-
String ACTION_RUN_TERMINATE = "run-terminate";
45-
String ACTION_GET_VMARGS = "run-get-vmargs";
4612
String ACTION_TOGGLE_FORKED = "toggle-forked";
47-
String ACTION_TOGGLE_SLOW_PLAYBACK = "toggle-slow-playback";
48-
String ACTION_TOGGLE_AWT_MODE = "toggle-awt-mode";
49-
String ACTION_TOGGLE_STOP_ON_FAILURE = "toggle-stop-on-failure";
50-
String ACTION_TOGGLE_STOP_ON_ERROR = "toggle-stop-on-error";
51-
String ACTION_INSERT_LAUNCH = "insert-launch";
52-
String ACTION_INSERT_APPLET = "insert-applet";
53-
String ACTION_INSERT_TERMINATE = "insert-terminate";
54-
String ACTION_INSERT_CALL = "insert-call";
55-
String ACTION_INSERT_SAMPLE = "insert-sample";
56-
String ACTION_INSERT_SEQUENCE = "insert-sequence";
57-
String ACTION_INSERT_SCRIPT = "insert-script";
58-
String ACTION_INSERT_FIXTURE = "insert-fixture";
59-
String ACTION_INSERT_COMMENT = "insert-comment";
60-
String ACTION_INSERT_EXPRESSION = "insert-expression";
61-
String ACTION_INSERT_ANNOTATION = "insert-annotation";
62-
String ACTION_DYNAMIC = "dynamic-actions";
63-
String ACTION_CAPTURE_IMAGE = "capture-image";
64-
String ACTION_CAPTURE_COMPONENT = "capture-component";
65-
String ACTION_SELECT_COMPONENT = "select-component";
66-
String ACTION_CAPTURE = "capture";
67-
String ACTION_CAPTURE_ALL = "capture-all";
6813
}

abbot/src/main/java/abbot/editor/editors/AppletviewerEditor.java

Lines changed: 0 additions & 134 deletions
This file was deleted.

abbot/src/main/java/abbot/finder/AWTHierarchy.java

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,24 +42,19 @@ public boolean contains(Component component) {
4242

4343
@Override
4444
public void dispose(Window window) {
45-
if (AWT.isAppletViewerFrame(window)) {
46-
// Don't dispose, it must quit on its own
47-
return;
48-
}
49-
5045
Log.debug("Dispose " + window);
5146

5247
Arrays.stream(window.getOwnedWindows()).forEach(this::dispose);
5348

5449
if (AWT.isSharedInvisibleFrame(window)) {
55-
// Don't dispose, or any child windows which may be currently
56-
// ignored (but not hidden) will be hidden and disposed.
50+
// Don't dispose, or any child windows that may be currently
51+
// ignored (but not hidden) will be hidden and disposed of.
5752
return;
5853
}
5954

6055
// Ensure the disposal is done on the swing thread so we can catch any
6156
// exceptions. If Window.dispose is called from a non-Swing thread,
62-
// it will invoke the dispose action on the Swing thread but in that
57+
// it will invoke the dispose action on the Swing thread, but in that
6358
// case we have no control over exceptions.
6459
Runnable action =
6560
() -> {
@@ -114,15 +109,14 @@ public Collection<Component> getComponents(Component component) {
114109
new ArrayList<>(Arrays.asList(((Container) component).getComponents()));
115110
// Add other components which are not explicitly children, but
116111
// that are conceptually descendents
117-
if (component instanceof JMenu menu) {
118-
list.add(menu.getPopupMenu());
119-
} else if (component instanceof Window window) {
120-
list.addAll(Arrays.asList(window.getOwnedWindows()));
121-
} else if (component instanceof JDesktopPane) {
122-
// Add iconified frames, which are otherwise unreachable.
123-
// For consistency, they are still considerered children of
124-
// the desktop pane.
125-
list.addAll(findInternalFramesFromIcons((Container) component));
112+
switch (component) {
113+
case JMenu menu -> list.add(menu.getPopupMenu());
114+
case Window window -> list.addAll(Arrays.asList(window.getOwnedWindows()));
115+
case JDesktopPane jDesktopPane ->
116+
// Add iconified frames, which are otherwise unreachable.
117+
// For consistency, they are still considered children of the desktop pane.
118+
list.addAll(findInternalFramesFromIcons((Container) component));
119+
default -> {}
126120
}
127121
return list;
128122
}

abbot/src/main/java/abbot/finder/TestHierarchy.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ public class TestHierarchy extends AWTHierarchy {
2222
// Map of components to ignore
2323
private final Map<Component, Boolean> filtered = new WeakHashMap<>();
2424

25-
private static final boolean TRACK_APPLET_CONSOLE =
26-
Boolean.getBoolean("abbot.applet.track_console");
27-
2825
/**
2926
* Create a new TestHierarchy which does not contain any UI Components which might already exist.
3027
*/
@@ -88,10 +85,6 @@ public boolean isFiltered(Component component) {
8885
return false;
8986
}
9087

91-
if ("sun.plugin.ConsoleWindow".equals(component.getClass().getName())) {
92-
return !TRACK_APPLET_CONSOLE;
93-
}
94-
9588
return filtered.containsKey(component)
9689
|| ((component instanceof Window) && isFiltered(component.getParent()))
9790
|| (!(component instanceof Window) && isWindowFiltered(component));

0 commit comments

Comments
 (0)