mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 10:00:42 +01:00
more code tidying
This commit is contained in:
@@ -63,9 +63,7 @@ public class JavaTextAreaPainter extends PdeTextAreaPainter {
|
||||
// TWEAK MODE
|
||||
|
||||
|
||||
protected int horizontalAdjustment = 0;
|
||||
|
||||
public boolean tweakMode = false;
|
||||
public boolean tweakMode;
|
||||
public List<List<Handle>> handles;
|
||||
public List<List<ColorControlBox>> colorBoxes;
|
||||
|
||||
@@ -310,7 +308,7 @@ public class JavaTextAreaPainter extends PdeTextAreaPainter {
|
||||
|
||||
|
||||
static private String replaceString(String str, int start, int end, String put) {
|
||||
return str.substring(0, start) + put + str.substring(end, str.length());
|
||||
return str.substring(0, start) + put + str.substring(end);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ public class RuntimePathBuilder {
|
||||
/**
|
||||
* The modules comprising the Java standard modules.
|
||||
*/
|
||||
@SuppressWarnings("SpellCheckingInspection")
|
||||
protected static final String[] STANDARD_MODULES = {
|
||||
"java.base.jmod",
|
||||
"java.compiler.jmod",
|
||||
@@ -445,17 +446,18 @@ public class RuntimePathBuilder {
|
||||
* @param sketch The sketch provided by the user.
|
||||
* @return List of classpath and/or module path entries.
|
||||
*/
|
||||
protected List<String> buildLibrarySketchPath(JavaMode mode, List<ImportStatement> imports,
|
||||
Sketch sketch) {
|
||||
protected List<String> buildLibrarySketchPath(JavaMode mode,
|
||||
List<ImportStatement> imports,
|
||||
Sketch sketch) {
|
||||
|
||||
StringJoiner classPathBuilder = new StringJoiner(File.pathSeparator);
|
||||
|
||||
imports.stream()
|
||||
.map(ImportStatement::getPackageName)
|
||||
.filter(pckg -> !isIgnorableForSketchPath(pckg))
|
||||
.map(pckg -> {
|
||||
.filter(pkg -> !isIgnorableForSketchPath(pkg))
|
||||
.map(pkg -> {
|
||||
try {
|
||||
return mode.getLibrary(pckg);
|
||||
return mode.getLibrary(pkg);
|
||||
} catch (SketchException e) {
|
||||
return null;
|
||||
}
|
||||
@@ -604,7 +606,7 @@ public class RuntimePathBuilder {
|
||||
*
|
||||
* Note that these are protected so that they can be tested. The interface below defines a
|
||||
* strategy for determining path elements. An optional caching object which allows for path
|
||||
* invalidatino is also defined below.
|
||||
* invalidation is also defined below.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -641,8 +643,8 @@ public class RuntimePathBuilder {
|
||||
*/
|
||||
protected static class CachedRuntimePathFactory implements RuntimePathFactoryStrategy {
|
||||
|
||||
private AtomicReference<List<String>> cachedResult;
|
||||
private RuntimePathFactoryStrategy innerStrategy;
|
||||
final private AtomicReference<List<String>> cachedResult;
|
||||
final private RuntimePathFactoryStrategy innerStrategy;
|
||||
|
||||
/**
|
||||
* Create a new cache around {RuntimePathFactoryStrategy}.
|
||||
|
||||
Reference in New Issue
Block a user