mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 06:09:17 +01:00
PDEX + PPS: remove unnecessary problem list
This commit is contained in:
@@ -876,7 +876,8 @@ public class PDEX {
|
||||
|
||||
private void handleSketchProblems(PreprocessedSketch ps) {
|
||||
// Process problems
|
||||
final List<Problem> problems = ps.problems.stream()
|
||||
IProblem[] iproblems = ps.compilationUnit.getProblems();
|
||||
final List<Problem> problems = Arrays.stream(iproblems)
|
||||
// Filter Warnings if they are not enabled
|
||||
.filter(iproblem -> !(iproblem.isWarning() && !JavaMode.warningsEnabled))
|
||||
// Hide a useless error which is produced when a line ends with
|
||||
|
||||
@@ -2,7 +2,6 @@ package processing.mode.java.pdex;
|
||||
|
||||
import com.google.classpath.ClassPath;
|
||||
|
||||
import org.eclipse.jdt.core.compiler.IProblem;
|
||||
import org.eclipse.jdt.core.dom.ASTNode;
|
||||
import org.eclipse.jdt.core.dom.CompilationUnit;
|
||||
|
||||
@@ -38,8 +37,6 @@ public class PreprocessedSketch {
|
||||
public final boolean hasSyntaxErrors;
|
||||
public final boolean hasCompilationErrors;
|
||||
|
||||
public final List<IProblem> problems;
|
||||
|
||||
public final List<ImportStatement> programImports;
|
||||
public final List<ImportStatement> coreAndDefaultImports;
|
||||
public final List<ImportStatement> codeFolderImports;
|
||||
@@ -218,8 +215,6 @@ public class PreprocessedSketch {
|
||||
public boolean hasSyntaxErrors;
|
||||
public boolean hasCompilationErrors;
|
||||
|
||||
public List<IProblem> problems = new ArrayList<>();
|
||||
|
||||
public final List<ImportStatement> programImports = new ArrayList<>();
|
||||
public final List<ImportStatement> coreAndDefaultImports = new ArrayList<>();
|
||||
public final List<ImportStatement> codeFolderImports = new ArrayList<>();
|
||||
@@ -254,8 +249,6 @@ public class PreprocessedSketch {
|
||||
hasSyntaxErrors = b.hasSyntaxErrors;
|
||||
hasCompilationErrors = b.hasCompilationErrors;
|
||||
|
||||
problems = Collections.unmodifiableList(b.problems);
|
||||
|
||||
programImports = Collections.unmodifiableList(b.programImports);
|
||||
coreAndDefaultImports = Collections.unmodifiableList(b.coreAndDefaultImports);
|
||||
codeFolderImports = Collections.unmodifiableList(b.codeFolderImports);
|
||||
|
||||
@@ -412,7 +412,6 @@ public class PreprocessingService {
|
||||
|
||||
// Get compilation problems
|
||||
List<IProblem> bindingsProblems = Arrays.asList(bindingsCU.getProblems());
|
||||
result.problems.addAll(bindingsProblems);
|
||||
result.hasCompilationErrors = bindingsProblems.stream()
|
||||
.anyMatch(IProblem::isError);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user