mirror of
https://github.com/processing/processing4.git
synced 2026-01-29 11:21:06 +01:00
Make sure parseXXX functions can be mapped correctly
This commit is contained in:
@@ -323,6 +323,8 @@ public class PDEX {
|
||||
.map(ps::mapJavaToSketch)
|
||||
// remove occurrences which fall into generated header
|
||||
.filter(ps::inRange)
|
||||
// remove empty intervals (happens when occurence was inserted)
|
||||
.filter(in -> in.startPdeOffset < in.stopPdeOffset)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
int usageCount = intervals.size();
|
||||
|
||||
@@ -68,9 +68,10 @@ public class SourceUtils {
|
||||
String match = matcher.group(1);
|
||||
int offset = matcher.start(1);
|
||||
int length = match.length();
|
||||
String replace = "PApplet.parse"
|
||||
+ Character.toUpperCase(match.charAt(0));
|
||||
result.add(Edit.replace(offset, length - (match.length() - 1), replace));
|
||||
result.add(Edit.insert(offset, "PApplet."));
|
||||
String replace = "parse"
|
||||
+ Character.toUpperCase(match.charAt(0)) + match.substring(1);
|
||||
result.add(Edit.replace(offset, length, replace));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user