-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve readability, reduce complexity
- Loading branch information
Showing
12 changed files
with
172 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 0 additions & 71 deletions
71
...e.bazel.eclipse.core/src/com/salesforce/bazel/eclipse/core/classpath/ClasspathHolder.java
This file was deleted.
Oops, something went wrong.
45 changes: 45 additions & 0 deletions
45
...ipse.core/src/com/salesforce/bazel/eclipse/core/classpath/CompileAndRuntimeClasspath.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/*- | ||
* Copyright (c) 2024 Salesforce and others. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Salesforce - adapted from M2E, JDT or other Eclipse project | ||
*/ | ||
package com.salesforce.bazel.eclipse.core.classpath; | ||
|
||
import java.util.Collection; | ||
import java.util.LinkedHashSet; | ||
|
||
import com.salesforce.bazel.eclipse.core.model.discovery.classpath.ClasspathEntry; | ||
|
||
/** | ||
* Represents a classpath as two parts, compile being the classpath entries that are loaded into the project model, and | ||
* transitive as classpath that are part of the transitive set for runtime only. | ||
*/ | ||
public record CompileAndRuntimeClasspath( | ||
Collection<ClasspathEntry> compileEntries, | ||
Collection<ClasspathEntry> additionalRuntimeEntries) { | ||
|
||
public static class Builder { | ||
private final LinkedHashSet<ClasspathEntry> compileEntries = new LinkedHashSet<>(); | ||
private final LinkedHashSet<ClasspathEntry> additionalRuntimeEntries = new LinkedHashSet<>(); | ||
|
||
public boolean addCompileEntry(ClasspathEntry entry) { | ||
return compileEntries.add(entry); | ||
} | ||
|
||
public boolean addRuntimeEntry(ClasspathEntry entry) { | ||
return additionalRuntimeEntries.add(entry); | ||
} | ||
|
||
public CompileAndRuntimeClasspath build() { | ||
return new CompileAndRuntimeClasspath(compileEntries, additionalRuntimeEntries); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.