This commit is contained in:
Daniil Ovchinnikov
2019-01-21 13:54:06 +03:00
parent 59d0b9b9cd
commit 4c7e541eb1
25 changed files with 96 additions and 334 deletions
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.java.codeInsight.completion
import com.intellij.JavaTestUtil
@@ -25,79 +11,79 @@ import com.intellij.testFramework.fixtures.JavaCodeInsightFixtureTestCase
import groovy.transform.CompileStatic
@CompileStatic
public class HeavySmartTypeCompletion15Test extends JavaCodeInsightFixtureTestCase {
private static final String BASE_PATH = "/codeInsight/completion/smartType";
class HeavySmartTypeCompletion15Test extends JavaCodeInsightFixtureTestCase {
private static final String BASE_PATH = "/codeInsight/completion/smartType"
@Override
protected String getTestDataPath() {
return JavaTestUtil.getJavaTestDataPath();
return JavaTestUtil.getJavaTestDataPath()
}
public void testGetInstance() throws Throwable {
void testGetInstance() throws Throwable {
myFixture.configureFromExistingVirtualFile(
myFixture.copyFileToProject(BASE_PATH + "/foo/" + getTestName(false) + ".java", "foo/" + getTestName(false) + ".java"));
myFixture.complete(CompletionType.SMART);
myFixture.type('\n');
myFixture.checkResultByFile(BASE_PATH + "/foo/" + getTestName(false) + "-out.java");
myFixture.copyFileToProject(BASE_PATH + "/foo/" + getTestName(false) + ".java", "foo/" + getTestName(false) + ".java"))
myFixture.complete(CompletionType.SMART)
myFixture.type('\n')
myFixture.checkResultByFile(BASE_PATH + "/foo/" + getTestName(false) + "-out.java")
}
public void testProtectedAnonymousConstructor() throws Throwable {
void testProtectedAnonymousConstructor() throws Throwable {
myFixture.addClass("package pkg;" +
"public class Foo {" +
" protected Foo(int a) {}" +
"}");
"}")
myFixture.addClass("package pkg;" +
"public class Bar<T> {" +
" protected Bar(java.util.List<T> list) {}" +
"}");
doTest();
"}")
doTest()
}
public void testProtectedAnonymousConstructor2() throws Throwable {
void testProtectedAnonymousConstructor2() throws Throwable {
myFixture.addClass("package pkg;" +
"public class Foo {" +
" protected Foo(int a) {}" +
"}");
"}")
myFixture.addClass("package pkg;" +
"public class Bar<T> {" +
" protected Bar(java.util.List<T> list) {}" +
"}");
doTest();
"}")
doTest()
}
public void testUnlockDocument() throws Throwable {
myFixture.addClass("package pkg; public class Bar {}");
void testUnlockDocument() throws Throwable {
myFixture.addClass("package pkg; public class Bar {}")
myFixture.addClass("package pkg; public class Foo {" +
" public static void foo(java.util.List<pkg.Bar> list) {}" +
"}");
"}")
doTest();
doTest()
}
private void doTest() throws Exception {
configure();
checkResult();
configure()
checkResult()
}
private void checkResult() {
myFixture.checkResultByFile(BASE_PATH + "/" + getTestName(false) + "-out.java");
myFixture.checkResultByFile(BASE_PATH + "/" + getTestName(false) + "-out.java")
}
private void configure() {
myFixture.configureByFile(BASE_PATH + "/" + getTestName(false) + ".java");
myFixture.complete(CompletionType.SMART);
myFixture.configureByFile(BASE_PATH + "/" + getTestName(false) + ".java")
myFixture.complete(CompletionType.SMART)
}
public void testClassLiteralShouldInsertImport() throws Throwable {
myFixture.addClass("package bar; public class Intf {}");
myFixture.addClass("package foo; public class Bar extends bar.Intf {}");
void testClassLiteralShouldInsertImport() throws Throwable {
myFixture.addClass("package bar; public class Intf {}")
myFixture.addClass("package foo; public class Bar extends bar.Intf {}")
configure();
myFixture.type('\n');
checkResult();
configure()
myFixture.type('\n')
checkResult()
}
public void testInaccessibleClassAfterNew() {
void testInaccessibleClassAfterNew() {
Module moduleA = PsiTestUtil.addModule(project, StdModuleTypes.JAVA, 'A', myFixture.tempDirFixture.findOrCreateDir("a"))
Module moduleB = PsiTestUtil.addModule(project, StdModuleTypes.JAVA, 'B', myFixture.tempDirFixture.findOrCreateDir("b"))
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.java.codeInsight.highlighting
import com.intellij.JavaTestUtil
@@ -191,8 +177,8 @@ class HighlightUsagesHandlerTest extends LightCodeInsightFixtureTestCase {
}
void testSuppressedWarningsInInjectionHighlights() {
MyTestInjector testInjector = new MyTestInjector(getPsiManager());
testInjector.injectAll(myFixture.getTestRootDisposable());
MyTestInjector testInjector = new MyTestInjector(getPsiManager())
testInjector.injectAll(myFixture.getTestRootDisposable())
myFixture.configureByText 'Foo.java', '''
public class Foo {
public static void a(boolean b, String c) {
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.java.codeInsight.intention
import com.intellij.codeInsight.daemon.impl.quickfix.ImportClassFix
@@ -591,7 +577,7 @@ class Tq {
void setUp() throws Exception {
super.setUp()
settings = CodeStyleSettingsManager.getSettings(getProject()).getCommonSettings(JavaLanguage.INSTANCE)
JavaCodeStyleSettings javaSettings = JavaCodeStyleSettings.getInstance(getProject());
JavaCodeStyleSettings javaSettings = JavaCodeStyleSettings.getInstance(getProject())
javaSettings.CLASS_NAMES_IN_JAVADOC = JavaCodeStyleSettings.SHORTEN_NAMES_ALWAYS_AND_ADD_IMPORT
}
@@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.java.ide.fileTemplates.impl
import com.intellij.ide.fileTemplates.CreateFromTemplateHandler
@@ -164,7 +164,7 @@ class FileTemplatesTest extends IdeaTestCase {
void testFileNameTrimming() {
CreateFromTemplateHandler handler = new DefaultCreateFromTemplateHandler()
PlatformTestUtil.registerExtension(Extensions.getRootArea(), CreateFromTemplateHandler.EP_NAME, handler, getTestRootDisposable());
PlatformTestUtil.registerExtension(Extensions.getRootArea(), CreateFromTemplateHandler.EP_NAME, handler, getTestRootDisposable())
FileTemplate template = FileTemplateManager.getInstance(getProject()).addTemplate(name, "txt")
disposeOnTearDown({ FileTemplateManager.getInstance(getProject()).removeTemplate(template) } as Disposable)
template.setText('${FILE_NAME}')
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.java.psi.codeStyle.arrangement
import com.intellij.application.options.CodeStyle
@@ -97,7 +83,7 @@ class Test {
void "test with formatting disabled"() {
CodeStyleSettings settings = CodeStyle.getSettings(project)
NamedScopeDescriptor descriptor = new NamedScopeDescriptor("testScope");
NamedScopeDescriptor descriptor = new NamedScopeDescriptor("testScope")
descriptor.setPattern("file:*.java")
settings.getExcludedFiles().addDescriptor(descriptor)
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.intellij.build
import com.intellij.util.containers.ContainerUtil
@@ -74,15 +60,15 @@ class LibraryLicense {
*/
final String licenseUrl
public static jetbrainsLibrary(String libraryName) {
static jetbrainsLibrary(String libraryName) {
new LibraryLicense(name: libraryName, license: JETBRAINS_OWN)
}
public List<String> getLibraryNames() {
List<String> getLibraryNames() {
return ContainerUtil.createMaybeSingletonList(libraryName ?: name) + (additionalLibraryNames ?: [] as List<String>)
}
public String getLibraryLicenseUrl() {
String getLibraryLicenseUrl() {
licenseUrl ?: PREDEFINED_LICENSE_URLS[license]
}
}
@@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.intellij.build
@@ -11,13 +11,13 @@ enum OsFamily {
MACOS("mac", BuildOptions.OS_MAC, "macOS"),
LINUX("unix", BuildOptions.OS_LINUX, "Linux");
final String distSuffix;
final String osId;
final String osName;
final String distSuffix
final String osId
final String osName
OsFamily(@NotNull String distSuffix, @NotNull String osId, @NotNull String osName) {
this.distSuffix = distSuffix;
this.osId = osId;
this.osName = osName;
this.distSuffix = distSuffix
this.osId = osId
this.osName = osName
}
}
@@ -264,7 +264,7 @@ idea.fatal.error.notification=disabled
productLayout.mainModules + buildContext.productProperties.mavenArtifacts.additionalModules,
buildContext.productProperties.modulesToCompileTests)
def pluginsToPublish = new LinkedHashMap<PluginLayout, PluginPublishingSpec>();
def pluginsToPublish = new LinkedHashMap<PluginLayout, PluginPublishingSpec>()
for (PluginLayout plugin : DistributionJARsBuilder.getPluginsByModules(buildContext, buildContext.productProperties.productLayout.pluginModulesToPublish)) {
def publishingSpec = buildContext.productProperties.productLayout.getPluginPublishingSpec(plugin.mainModule)
if (publishingSpec == null) {
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
@@ -46,7 +32,7 @@ class LayoutBuilder {
this.context = context
this.compressJars = compressJars
def contextLoaderRef = "GANT_CONTEXT_CLASS_LOADER";
def contextLoaderRef = "GANT_CONTEXT_CLASS_LOADER"
if (!ant.project.hasReference(contextLoaderRef)) {
ClassLoader contextLoader = Thread.currentThread().contextClassLoader
if (!(contextLoader instanceof AntClassLoader)) {
@@ -244,7 +230,7 @@ class LayoutBuilder {
if (name.startsWith("#")) {
if (lib.getRoots(JpsOrderRootType.COMPILED).size() != 1) {
def urls = lib.getRoots(JpsOrderRootType.COMPILED).collect { it.url }
throw new IllegalStateException("Non-single entry module library $name: $urls");
throw new IllegalStateException("Non-single entry module library $name: $urls")
}
File file = lib.getFiles(JpsOrderRootType.COMPILED)[0]
return file.name
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.intellij.build.impl
import org.jetbrains.intellij.build.*
@@ -73,7 +59,7 @@ class MacDistributionBuilder extends OsSpecificDistributionBuilder {
</dict>
"""
}
return iprAssociation + associations + customizer.additionalDocTypes;
return iprAssociation + associations + customizer.additionalDocTypes
}
@Override
@@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.intellij.build.impl
import com.intellij.openapi.util.io.FileUtil
@@ -137,7 +137,7 @@ class MavenArtifactsBuilder {
def words = NameUtil.splitNameIntoWords(s)
def result = new ArrayList<String>()
for (int i = 0; i < words.length; i++) {
String next;
String next
if (i < words.length - 1 && Character.isDigit(words[i + 1].charAt(0))) {
next = words[i] + words[i+1]
i++
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.intellij.build.impl
import com.intellij.openapi.util.io.FileUtil
@@ -60,8 +46,8 @@ class NsisFileListGenerator {
directoryToFiles.keySet().toSorted().reverseEach {
if (!it.empty) {
out.writeLine("RmDir /r \"${installDir}\\${toWinPath(it)}\\__pycache__\"");
out.writeLine("RmDir \"${installDir}\\${toWinPath(it)}\"");
out.writeLine("RmDir /r \"${installDir}\\${toWinPath(it)}\\__pycache__\"")
out.writeLine("RmDir \"${installDir}\\${toWinPath(it)}\"")
}
}
out.writeLine("RmDir \"${installDir}\"")
@@ -69,7 +55,7 @@ class NsisFileListGenerator {
}
private static String toWinPath(String dir) {
return dir.replace('/', '\\');
return dir.replace('/', '\\')
}
@@ -1,12 +1,12 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.intellij.build.impl.logging
import groovy.transform.CompileStatic;
import org.apache.tools.ant.BuildException;
import groovy.transform.CompileStatic
import org.apache.tools.ant.BuildException
@CompileStatic
class IntelliJBuildException extends BuildException {
IntelliJBuildException(String location, String message, Throwable cause) {
super(location == null || location.isEmpty() ? message : location + ': ' + message, cause);
super(location == null || location.isEmpty() ? message : location + ': ' + message, cause)
}
}
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.util
import groovy.transform.Immutable
@@ -176,7 +162,7 @@ class RecursionManagerTest extends TestCase {
@Immutable
private static class RecursiveKey {
final String id;
final String id
@Override
int hashCode() {
@@ -186,7 +172,7 @@ class RecursionManagerTest extends TestCase {
@Override
boolean equals(Object obj) {
RecursionManager.doPreventingRecursion("abc", false) { true }
return obj instanceof RecursiveKey && obj.id == id;
return obj instanceof RecursiveKey && obj.id == id
}
}
@@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.plugins.gradle.internal.daemon
import com.intellij.openapi.application.PathManager
@@ -25,7 +25,7 @@ import java.lang.reflect.Method
@ApiStatus.Experimental
@CompileStatic
class GradleDaemonServices {
private static final Logger LOG = Logger.getInstance(GradleDaemonServices.class);
private static final Logger LOG = Logger.getInstance(GradleDaemonServices.class)
static void stopDaemons() {
Map<ClassPath, ConsumerConnection> connections = getConnections()
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.plugins.gradle.tooling.builder
import com.google.gson.GsonBuilder
@@ -93,7 +79,7 @@ class ExternalProjectBuilderImpl implements ModelBuilderService {
def ideaPluginModule = ideaPlugin?.model?.module
def parentBuildRootProject = project.gradle.parent?.rootProject
def compositePrefix = parentBuildRootProject && !project.rootProject.is(parentBuildRootProject) && ":" != project.path ?
(ideaPlugin?.model?.project?.name ?: project.rootProject.name) : "";
(ideaPlugin?.model?.project?.name ?: project.rootProject.name) : ""
def ideaModuleName = ideaPluginModule?.name ?: project.name
defaultExternalProject.id = compositePrefix + (":" == project.path ? ideaModuleName : qName)
defaultExternalProject.version = wrap(project.version)
@@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.plugins.groovy.compiler
import com.intellij.compiler.CompilerConfiguration
@@ -974,7 +974,7 @@ class BuildContextImpl extends BuildContext {
void "test report real compilation errors"() {
addModule('another', true)
myFixture.addClass('class Foo {}');
myFixture.addClass('class Foo {}')
myFixture.addFileToProject('a.groovy', 'import goo.Goo; class Bar { }')
shouldFail { compileModule(myModule) }
}
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.plugins.groovy.compiler
import com.intellij.openapi.Disposable
@@ -56,7 +42,7 @@ class GroovyDebuggerTest extends GroovyCompilerTestCase implements DebuggerMetho
@Override
protected void tearDown() throws Exception {
ThreadTracker.awaitJDIThreadsTermination(100, TimeUnit.SECONDS);
ThreadTracker.awaitJDIThreadsTermination(100, TimeUnit.SECONDS)
super.tearDown()
}
@@ -1,22 +1,8 @@
/*
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.plugins.groovy.completion
import com.intellij.codeInsight.completion.CompletionType
import com.intellij.psi.PsiMethod;
import com.intellij.psi.PsiMethod
/**
* @author peter
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.plugins.groovy.lang
import com.intellij.codeInsight.lookup.Lookup
@@ -28,7 +14,7 @@ import org.jetbrains.plugins.groovy.util.TestUtils
/**
* @author peter
*/
public class GroovyLiveTemplatesTest extends LightCodeInsightFixtureTestCase {
class GroovyLiveTemplatesTest extends LightCodeInsightFixtureTestCase {
@Override
protected String getBasePath() {
return TestUtils.getTestDataPath() + "liveTemplates/"
@@ -66,7 +52,7 @@ void usage(int num, boolean someBoolean, List<String> args){
'''
}
public static void expandTemplate(final Editor editor) {
static void expandTemplate(final Editor editor) {
new ListTemplatesAction().actionPerformedImpl(editor.getProject(), editor)
((LookupImpl)LookupManager.getActiveLookup(editor)).finishLookup(Lookup.NORMAL_SELECT_CHAR)
}
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.plugins.groovy.lang.overriding
@@ -92,7 +78,7 @@ class FindOverridingMethodsAndClassesTest extends LightCodeInsightFixtureTestCas
}
void "test find groovy inheritor of java class in local scope"() {
def superClass = myFixture.addClass("class Super {}");
def superClass = myFixture.addClass("class Super {}")
def file = myFixture.addFileToProject("a.groovy", "class Foo extends Super {}")
assert ClassInheritorsSearch.search(superClass).findAll().size() == 1
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.plugins.groovy.lang.resolve
import com.intellij.psi.PsiClassType
@@ -30,7 +16,7 @@ class NumberMathTypingTest extends LightGroovyTestCase {
@Override
void setUp() throws Exception {
super.setUp();
super.setUp()
addBigInteger()
addBigDecimal()
}
@@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.plugins.groovy.lang.resolve.dgm
import com.intellij.psi.PsiFileFactory
@@ -19,7 +19,7 @@ class ResolveExtensionMethodTest extends GroovyResolveTestCase {
final LightProjectDescriptor projectDescriptor = GroovyLightProjectDescriptor.GROOVY_LATEST
private void addExtension(String directory = "services", @Language("Groovy") String text) {
def factory = PsiFileFactory.getInstance(project);
def factory = PsiFileFactory.getInstance(project)
def file = factory.createFileFromText('a.groovy', GroovyFileType.GROOVY_FILE_TYPE, text) as GroovyFile
def fqn = file.typeDefinitions.first().qualifiedName
def path = fqn.split('\\.').join('/') + '.groovy'
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.plugins.groovy.refactoring.copy
@@ -44,7 +30,7 @@ class GroovyCopyClassTest extends LightCodeInsightFixtureTestCase {
def map = Collections.singletonMap(srcClass.navigationElement.containingFile, [srcClass] as PsiClass[])
def dir = srcClass.manager.findDirectory(myFixture.tempDirFixture.getFile("bar"))
CopyClassesHandler.doCopyClasses(map, "${testName}_after", dir, project)
});
})
myFixture.checkResultByFile("bar/${testName}_after.groovy", "${testName}_after.groovy", true)
}
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.idea.maven.dom
import org.jetbrains.idea.maven.MavenCustomRepositoryHelper
@@ -24,8 +10,8 @@ class MavenSurefirePluginTest extends MavenDomTestCase {
@Override
protected void setUp() throws Exception {
super.setUp();
setRepositoryPath(new MavenCustomRepositoryHelper(myDir, "plugins").getTestDataPath("plugins"));
super.setUp()
setRepositoryPath(new MavenCustomRepositoryHelper(myDir, "plugins").getTestDataPath("plugins"))
}
void testCompletion() {