This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
return false;
if (prefix == null || prefix.length() == 0)
return true;
// sub word completion
{
// example:
// 'out' produces '.*?[o|O].*?[u|U].*?[t|T].*?'
// org.openide.util.Utilities.acoh -> actionsForPath
// java.lang.System.out -> setOut
// argex -> IllegalArgumentException
// java.util.Collections.que -> asLifoQueue
// java.lang.System.sin -> setIn, getSecurityManager, setSecurityManager
// check whether user input matches the regex
StringBuilder sb = new StringBuilder(3+8*prefix.length());
sb.append(".*?");
for (int i = 0; i < prefix.length(); i++) {
char charAt = prefix.charAt(i);
if (Character.isLowerCase(charAt)) {
sb.append("[");
sb.append(charAt);
sb.append("|");
sb.append(Character.toUpperCase(charAt));
sb.append("]");
} else {
//keep uppercase characters as beacons
// for example: java.lang.System.sIn -> setIn
}
System.out.println(sb);
// FIXME regex matches are expensive
if (Pattern.compile(sb.toString()).matcher(theString).matches()) {
};
return isCaseSensitive() ? theString.startsWith(prefix) :
theString.toLowerCase(Locale.ENGLISH).startsWith(prefix.toLowerCase(Locale.ENGLISH));