Skip to content

Commit

Permalink
Use released version of SLCORE
Browse files Browse the repository at this point in the history
  • Loading branch information
henryju committed Mar 1, 2021
1 parent d431557 commit 77a7701
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

public class SonarLintProjectConfiguration {

private List<SonarLintProperty> extraProperties = new ArrayList<>();
private List<ExclusionItem> fileExclusions = new ArrayList<>();
private final List<SonarLintProperty> extraProperties = new ArrayList<>();
private final List<ExclusionItem> fileExclusions = new ArrayList<>();
@Nullable
private EclipseProjectBinding projectBinding;
private boolean autoEnabled = true;
Expand Down Expand Up @@ -77,22 +77,6 @@ public String connectionId() {
return connectionId;
}

@Nullable
public String serverPathToIdePath(String serverPath) {
if (!serverPath.startsWith(sqPathPrefix())) {
return null;
}
int localPrefixLen = sqPathPrefix().length();
if (localPrefixLen > 0) {
localPrefixLen++;
}
String idePathPrefix = idePathPrefix();
if (!idePathPrefix.isEmpty()) {
idePathPrefix = idePathPrefix + "/";
}
return idePathPrefix + serverPath.substring(localPrefixLen);
}

@Override
public int hashCode() {
final int prime = 31;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ private static Optional<ISonarLintFile> findHotspotFile(FetchedHotspot fetchedHo

private static Optional<ISonarLintFile> findHotspotFile(FetchedHotspot fetchedHotspot, ISonarLintProject project) {
Optional<ISonarLintFile> hotspotFile = SonarLintCorePlugin.getServersManager().resolveBinding(project)
.map(binding -> binding.getProjectBinding().serverPathToIdePath(fetchedHotspot.hotspot.filePath))
.flatMap(binding -> binding.getProjectBinding().serverPathToIdePath(fetchedHotspot.hotspot.filePath))
.flatMap(project::find);
if (hotspotFile.isPresent()) {
return hotspotFile;
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<license.mailto>[email protected]</license.mailto>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<tycho.version>2.3.0-SNAPSHOT</tycho.version>
<sonarlint-core.version>5.2.0.28039</sonarlint-core.version>
<sonarlint-core.version>5.2.0.28259</sonarlint-core.version>
<protobuf.version>3.11.4</protobuf.version>
<jacoco.version>0.8.5</jacoco.version>
<okhttp.version>3.14.9</okhttp.version>
Expand Down
2 changes: 1 addition & 1 deletion target-platform-build/dev.target
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<location path="${M2_REPO}/org/assertj/assertj-core/3.19.0" type="Directory"/>
<location path="${M2_REPO}/org/sonarsource/orchestrator/sonar-orchestrator-osgi/3.34.0.2692" type="Directory"/>
<location path="${M2_REPO}/com/eclipsesource/minimal-json/minimal-json/0.9.5" type="Directory"/>
<location includeSource="true" path="${M2_REPO}/org/sonarsource/sonarlint/core/sonarlint-core/5.2.0.28039" type="Directory"/>
<location includeSource="true" path="${M2_REPO}/org/sonarsource/sonarlint/core/sonarlint-core/5.2.0.28259" type="Directory"/>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.cdt.feature.group" version="0.0.0"/>
<unit id="org.eclipse.egit.feature.group" version="0.0.0"/>
Expand Down

0 comments on commit 77a7701

Please sign in to comment.