From d78e828ef9a5989ffcf00168ed712dfb7e5bc3f0 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Thu, 8 Sep 2016 12:09:49 -0400 Subject: [PATCH] make Find in Reference default to built-in PApplet methods (fixes #4224) --- app/src/processing/app/Mode.java | 8 +++++++- todo.txt | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/processing/app/Mode.java b/app/src/processing/app/Mode.java index 3bdbeebc7..c7ceb1e2e 100644 --- a/app/src/processing/app/Mode.java +++ b/app/src/processing/app/Mode.java @@ -166,7 +166,13 @@ public abstract class Mode { if (htmlFilename.endsWith("_")) { keyword += "_"; } - keywordToReference.put(keyword, htmlFilename); + // Allow the bare size() command to override the lookup + // for StringList.size() and others, but not vice-versa. + // https://github.com/processing/processing/issues/4224 + boolean seen = keywordToReference.containsKey(keyword); + if (!seen || (seen && keyword.equals(htmlFilename))) { + keywordToReference.put(keyword, htmlFilename); + } } } } diff --git a/todo.txt b/todo.txt index 75b7a76a4..66f152cfc 100755 --- a/todo.txt +++ b/todo.txt @@ -1,4 +1,8 @@ 0254 (3.2.2 or 3.3) +X Find in reference for size() opens StringList.size() +X https://github.com/processing/processing/issues/4224 +X though that's still imperfect: +X https://github.com/processing/processing/issues/4655 X more font tweaks to make mono fonts work properly after #4639 _ update the Linux notes based on where we land on this _ https://github.com/processing/processing/wiki/Supported-Platforms#linux