Skip to content

Commit

Permalink
2024.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatov committed Nov 15, 2024
1 parent 4c6d865 commit 7f039b5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 23 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ allprojects {

dependencies {
intellijPlatform { IntelliJPlatformDependenciesExtension ijp ->
ijp.intellijIdeaCommunity("2024.2")
ijp.intellijIdeaCommunity("2024.3")
ijp.bundledPlugins("com.intellij.copyright", "com.intellij.java")
ijp.instrumentationTools()
ijp.testFramework(TestFrameworkType.Platform.INSTANCE)
Expand Down
2 changes: 1 addition & 1 deletion src/org/intellij/erlang/console/ErlangConsoleView.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public ErlangConsoleView(@NotNull Project project) {
}

@Override
protected void doAddPromptToHistory() {
public void doAddPromptToHistory() {
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
package org.intellij.erlang.sdk;

import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.vfs.VfsUtilCore;
import com.intellij.openapi.vfs.VirtualFileManager;
import com.intellij.platform.workspace.jps.entities.SdkEntity;
import com.intellij.platform.workspace.storage.EntityStorage;
import com.intellij.workspaceModel.core.fileIndex.WorkspaceFileIndexContributor;
Expand All @@ -40,24 +38,13 @@ public void registerFileSets(SdkEntity entity,
if (!"Erlang SDK".equals(entity.getType())) {
return;
}
var homePath = entity.getHomePath();
if (homePath != null) {
var path = VfsUtilCore.pathToUrl(homePath.getUrl());
var home = VirtualFileManager.getInstance().findFileByUrl(path);
var lib = home != null ? home.findChild("lib") : null;
if (lib != null) {
registrar.registerExclusionCondition(lib, virtualFile -> {
var name = virtualFile.getName();
if (name.endsWith("html")) {
LOG.info("Excluded " + virtualFile.getUrl() + " from Erlang SDK" + entity.getName() + " to speedup indexing");
return true;
}
return false;
}, entity);
registrar.registerExclusionCondition(entity.getHomePath().append("lib"), virtualFile -> {
var name = virtualFile.getName();
if (name.endsWith("html")) {
LOG.info("Excluded " + virtualFile.getUrl() + " from Erlang SDK" + entity.getName() + " to speedup indexing");
return true;
}
else {
LOG.info("Lib dir not found for SDK" + entity.getName() + " at " + homePath);
}
}
return false;
}, entity);
}
}
5 changes: 5 additions & 0 deletions tests/org/intellij/erlang/parser/ErlangParserTestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,9 @@ protected void setUp() throws Exception {
super.setUp();
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), "com.intellij.lang.braceMatcher", LanguageExtensionPoint.class);
}

@Override
protected boolean isCheckNoPsiEventsOnReparse() {
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected void setUp() throws Exception {
}

private void doTest(int expectedMs) {
PlatformTestUtil.newPerformanceTest("erlang highlighting is slow", () -> {
PlatformTestUtil.newBenchmark("erlang highlighting is slow", () -> {
myFixture.configureByFile(getTestName(false) + ".erl");
myFixture.doHighlighting();
}).attempts(100).start();
Expand Down

0 comments on commit 7f039b5

Please sign in to comment.