Skip to content

Commit 5883c44

Browse files
committed
Add TODOs
1 parent 4371fd1 commit 5883c44

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/main/java/javafxlibrary/utils/Finder.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public Finder() {
2929
this.currentRoot = robot.listTargetWindows().get(0).getScene().getRoot();
3030
}
3131

32+
// TODO: Add more debug logging about find status
33+
// TODO: Use newFind as default
3234
public Node find(String query) {
3335
if (containsPrefixes(query)) {
3436
originalQuery = query;
@@ -136,6 +138,8 @@ private Set<Node> executeLookupAll(String query, FindPrefix prefix) {
136138
throw new IllegalArgumentException("FindPrefix value " + prefix + " of query " + query + " is not supported");
137139
}
138140

141+
// TODO: Add parseWholeQuery for findAll -> this.currentRoot = (Parent) newFind(rootQuery); only looks from a single parent
142+
// TODO: Add support for using indexes in queries (css=VBox[3]), xPath already implements this
139143
private String parseWholeQuery(String query) {
140144

141145
while (containsMultiplePrefixes(query)) {
@@ -149,6 +153,7 @@ private String parseWholeQuery(String query) {
149153
this.currentRoot = (Parent) newFind(rootQuery);
150154
RobotLog.debug("New root set for find: " + this.currentRoot);
151155

156+
// TODO: Continue search if there are roots left in other windows / return values
152157
if (this.currentRoot == null)
153158
throw new JavaFXLibraryNonFatalException("Could not find a Parent node with query: \"" +
154159
rootQuery + "\" to be used as the next root node, quitting find!");

src/main/java/javafxlibrary/utils/HelperFunctions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public static Node waitUntilExists(String target, int timeout, String timeUnit)
8282
try {
8383
WaitForAsyncUtils.waitFor((long) timeout, getTimeUnit(timeUnit), () -> createFinder().find(target) != null);
8484
Node node = createFinder().find(target);
85+
// TODO: Add null checks for node.getScene()
8586
WaitForAsyncUtils.waitFor((long) timeout, getTimeUnit(timeUnit), () -> hasValidCoordinates(node));
8687
return node;
8788
} catch (TimeoutException te) {

0 commit comments

Comments
 (0)