mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-25 03:55:35 +01:00
*Fix extended tab completion for l3d, linear, mask patterns
This commit is contained in:
parent
551b25baf6
commit
502b620bde
@ -34,8 +34,9 @@ public class SuggestInputParseException extends InputParseException {
|
|||||||
return MainUtil.prepend(prefix, suggestions);
|
return MainUtil.prepend(prefix, suggestions);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void prepend(String input) {
|
public SuggestInputParseException prepend(String input) {
|
||||||
this.prefix = input + prefix;
|
this.prefix = input + prefix;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SuggestInputParseException get(Throwable e) {
|
public static SuggestInputParseException get(Throwable e) {
|
||||||
|
@ -162,7 +162,7 @@ public class HashTagPatternParser extends InputParser<Pattern>{
|
|||||||
if (len != 3) {
|
if (len != 3) {
|
||||||
if (len <= 3) {
|
if (len <= 3) {
|
||||||
if (split3.get(len - 1).endsWith(":")) {
|
if (split3.get(len - 1).endsWith(":")) {
|
||||||
throw new SuggestInputParseException(null, ALL_PATTERNS);
|
throw new SuggestInputParseException(null, ALL_PATTERNS).prepend(input);
|
||||||
}
|
}
|
||||||
String[] args = new String[]{"<mask>", "<pattern-if>", "<pattern-else>"};
|
String[] args = new String[]{"<mask>", "<pattern-if>", "<pattern-else>"};
|
||||||
throw new SuggestInputParseException(input, input + ":" + StringMan.join(Arrays.copyOfRange(args, len, 3), ":"));
|
throw new SuggestInputParseException(input, input + ":" + StringMan.join(Arrays.copyOfRange(args, len, 3), ":"));
|
||||||
@ -240,7 +240,7 @@ public class HashTagPatternParser extends InputParser<Pattern>{
|
|||||||
patterns.add(catchSuggestion(input, token, context));
|
patterns.add(catchSuggestion(input, token, context));
|
||||||
}
|
}
|
||||||
if (patterns.isEmpty()) {
|
if (patterns.isEmpty()) {
|
||||||
throw new SuggestInputParseException(null, ALL_PATTERNS);
|
throw new SuggestInputParseException(null, ALL_PATTERNS).prepend(input);
|
||||||
}
|
}
|
||||||
return new LinearBlockPattern(patterns.toArray(new Pattern[patterns.size()]));
|
return new LinearBlockPattern(patterns.toArray(new Pattern[patterns.size()]));
|
||||||
}
|
}
|
||||||
@ -251,12 +251,12 @@ public class HashTagPatternParser extends InputParser<Pattern>{
|
|||||||
patterns.add(catchSuggestion(input, token, context));
|
patterns.add(catchSuggestion(input, token, context));
|
||||||
}
|
}
|
||||||
if (patterns.isEmpty()) {
|
if (patterns.isEmpty()) {
|
||||||
throw new SuggestInputParseException(null, ALL_PATTERNS);
|
throw new SuggestInputParseException(null, ALL_PATTERNS).prepend(input);
|
||||||
}
|
}
|
||||||
return new Linear3DBlockPattern(patterns.toArray(new Pattern[patterns.size()]));
|
return new Linear3DBlockPattern(patterns.toArray(new Pattern[patterns.size()]));
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
throw new SuggestInputParseException(split2[0], DELEGATE_PATTERNS);
|
throw new SuggestInputParseException(input, DELEGATE_PATTERNS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new SuggestInputParseException(input, MainUtil.joinArrayGeneric(SIMPLE_PATTERNS, DELEGATE_PATTERNS));
|
throw new SuggestInputParseException(input, MainUtil.joinArrayGeneric(SIMPLE_PATTERNS, DELEGATE_PATTERNS));
|
||||||
|
Loading…
Reference in New Issue
Block a user