From 06080cb0e527ec289af9c4eba405dd72364fe398 Mon Sep 17 00:00:00 2001 From: nik Date: Tue, 22 May 2018 17:49:27 +0300 Subject: [PATCH] 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). --- .../intention/TestNGExternalLibraryResolver.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/plugins/testng/src/com/theoryinpractice/testng/intention/TestNGExternalLibraryResolver.java b/plugins/testng/src/com/theoryinpractice/testng/intention/TestNGExternalLibraryResolver.java index c2a0cbe3fcd2..2e710e2edcb1 100644 --- a/plugins/testng/src/com/theoryinpractice/testng/intention/TestNGExternalLibraryResolver.java +++ b/plugins/testng/src/com/theoryinpractice/testng/intention/TestNGExternalLibraryResolver.java @@ -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 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