mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
testng: use repository library when adding testng library via quickfix
This way users projects won't depend on specific JAR from IDEA's installation (IDEA-192234).
This commit is contained in:
+1
-12
@@ -15,19 +15,14 @@
|
||||
*/
|
||||
package com.theoryinpractice.testng.intention;
|
||||
|
||||
import com.beust.jcommander.JCommander;
|
||||
import com.intellij.codeInsight.daemon.quickFix.ExternalLibraryResolver;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.roots.ExternalLibraryDescriptor;
|
||||
import com.intellij.util.PathUtil;
|
||||
import com.intellij.util.ThreeState;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
@@ -38,13 +33,7 @@ public class TestNGExternalLibraryResolver extends ExternalLibraryResolver {
|
||||
"Test", "BeforeClass", "BeforeGroups", "BeforeMethod", "BeforeSuite", "BeforeTest", "AfterClass", "AfterGroups", "AfterMethod",
|
||||
"AfterSuite", "AfterTest", "Configuration"
|
||||
);
|
||||
public static final ExternalLibraryDescriptor TESTNG_DESCRIPTOR = new ExternalLibraryDescriptor("org.testng", "testng") {
|
||||
@NotNull
|
||||
@Override
|
||||
public List<String> getLibraryClassesRoots() {
|
||||
return Arrays.asList(PathUtil.getJarPathForClass(Test.class), PathUtil.getJarPathForClass(JCommander.class));
|
||||
}
|
||||
};
|
||||
public static final ExternalLibraryDescriptor TESTNG_DESCRIPTOR = new ExternalLibraryDescriptor("org.testng", "testng");
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user