mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# The file might be automatically updated. Comments and empty lines will be removed.
|
||||
kotlinPluginBuild=1.1.2-release-IJ2017.2-1
|
||||
jetSignBuild=42.30
|
||||
jdkBuild=u152b837.5
|
||||
jdkBuild=u152b845.1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* 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.
|
||||
@@ -91,6 +91,7 @@ public class CompilerPaths {
|
||||
}
|
||||
|
||||
public static String getCompilerSystemDirectoryName(Project project) {
|
||||
// todo: use ProjectKt.getSystemCacheFileName()
|
||||
return ProjectUtilCore.getPresentableName(project) + "." + project.getLocationHash();
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* 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.
|
||||
@@ -36,6 +36,7 @@ import com.intellij.openapi.util.WriteExternalException;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.project.ProjectKt;
|
||||
import com.intellij.rt.coverage.data.ProjectData;
|
||||
import com.intellij.util.Alarm;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
@@ -144,7 +145,7 @@ public class TestDiscoveryExtension extends RunConfigurationExtension {
|
||||
|
||||
@NotNull
|
||||
public static String baseTestDiscoveryPathForProject(Project project) {
|
||||
return PathManager.getSystemPath() + File.separator + "testDiscovery" + File.separator + project.getName() + "." + project.getLocationHash();
|
||||
return PathManager.getSystemPath() + File.separator + "testDiscovery" + File.separator + ProjectKt.getSystemCacheFileName(project, true, ".");
|
||||
}
|
||||
|
||||
private static final Object ourTracesLock = new Object();
|
||||
|
||||
+11
-2
@@ -325,6 +325,10 @@ public class LibraryRootsComponent implements Disposable, LibraryEditorComponent
|
||||
return ArrayUtil.toObjectArray(elements);
|
||||
}
|
||||
|
||||
public void onLibraryRenamed() {
|
||||
updateModificationOfImportedModelWarning();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static Object getPathElement(final TreePath selectionPath) {
|
||||
if (selectionPath == null) {
|
||||
@@ -496,9 +500,14 @@ public class LibraryRootsComponent implements Disposable, LibraryEditorComponent
|
||||
for (Runnable listener : myListeners) {
|
||||
listener.run();
|
||||
}
|
||||
ProjectModelExternalSource externalSource = getLibraryEditor().getExternalSource();
|
||||
updateModificationOfImportedModelWarning();
|
||||
}
|
||||
|
||||
private void updateModificationOfImportedModelWarning() {
|
||||
LibraryEditor libraryEditor = getLibraryEditor();
|
||||
ProjectModelExternalSource externalSource = libraryEditor.getExternalSource();
|
||||
if (externalSource != null && hasChanges()) {
|
||||
String name = getLibraryEditor().getName();
|
||||
String name = libraryEditor instanceof ExistingLibraryEditor ? ((ExistingLibraryEditor)libraryEditor).getLibrary().getName() : libraryEditor.getName();
|
||||
myModificationOfImportedModelWarningComponent.showWarning(name != null ? "Library '" + name + "'" : "Library", externalSource);
|
||||
}
|
||||
else {
|
||||
|
||||
+3
@@ -101,6 +101,9 @@ public class LibraryConfigurable extends ProjectStructureElementConfigurable<Lib
|
||||
public void setDisplayName(final String name) {
|
||||
if (!myUpdatingName) {
|
||||
getLibraryEditor().setName(name);
|
||||
if (myLibraryEditorComponent != null) {
|
||||
myLibraryEditorComponent.onLibraryRenamed();
|
||||
}
|
||||
myContext.getDaemonAnalyzer().queueUpdateForAllElementsWithErrors();
|
||||
}
|
||||
}
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
package com.intellij.codeInsight.intention
|
||||
|
||||
import com.intellij.lang.LanguageExtension
|
||||
import com.intellij.psi.PsiModifier
|
||||
import com.intellij.psi.PsiType
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import org.jetbrains.annotations.NonNls
|
||||
import org.jetbrains.uast.UClass
|
||||
import org.jetbrains.uast.UDeclaration
|
||||
|
||||
/**
|
||||
* Extension Point provides language-abstracted code modifications for JVM-based languages.
|
||||
*
|
||||
* Each method should return nullable code modification (preferable [IntentionAction] as most generic).
|
||||
* If method returns `null` this means that operation on given elements is not supported or not yet implemented for a language.
|
||||
*
|
||||
* Every new added method should return `null` by default and then be overridden in implementations for each language if it is possible.
|
||||
*
|
||||
* @since 2017.2
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
abstract class JvmCommonCodeModifications {
|
||||
|
||||
open fun createChangeModifierAction(declaration: UDeclaration, @PsiModifier.ModifierConstant @NonNls modifier: String, shouldPresent: Boolean): IntentionAction? = null
|
||||
|
||||
open fun createAddMethodAction(u: UClass, methodName: String, returnType: PsiType, vararg arguments: PsiType): IntentionAction? = null
|
||||
|
||||
companion object : LanguageExtension<JvmCommonCodeModifications>("com.intellij.codeInsight.intention.jvmCommonCodeModifications")
|
||||
}
|
||||
|
||||
+71
-20
@@ -17,6 +17,8 @@ package com.intellij.codeInspection.inheritance
|
||||
|
||||
import com.intellij.CommonBundle
|
||||
import com.intellij.codeInsight.daemon.QuickFixBundle
|
||||
import com.intellij.codeInsight.intention.JvmCommonCodeModifications
|
||||
import com.intellij.codeInsight.intention.IntentionAction
|
||||
import com.intellij.codeInspection.*
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.diagnostic.Logger
|
||||
@@ -56,11 +58,13 @@ class ImplicitSubclassInspection : AbstractBaseUastLocalInspectionTool() {
|
||||
|
||||
val smartPointerManager = SmartPointerManager.getInstance(aClass.project)
|
||||
|
||||
val commonModifications = JvmCommonCodeModifications.forLanguage(aClass.language)
|
||||
|
||||
for ((method, description) in methodsToOverride) {
|
||||
if (method.isFinal || method.isStatic || method.hasModifierProperty(PsiModifier.PRIVATE)) {
|
||||
methodsToAttachToClassFix?.add(smartPointerManager.createSmartPsiElementPointer(method, method.containingFile))
|
||||
|
||||
val methodFixes = arrayOf<LocalQuickFix>(MakeExtendableFix(method, method.name))
|
||||
val methodFixes = createFixesIfApplicable(commonModifications, method, method.name)
|
||||
problemTargets(method, methodHighlightableModifiersSet).forEach {
|
||||
problems.add(manager.createProblemDescriptor(
|
||||
it, description, isOnTheFly,
|
||||
@@ -77,7 +81,7 @@ class ImplicitSubclassInspection : AbstractBaseUastLocalInspectionTool() {
|
||||
problems.add(manager.createProblemDescriptor(
|
||||
it, classReasonToBeSubclassed ?: InspectionsBundle.message("inspection.implicit.subclass.display.forClass", aClass.name),
|
||||
isOnTheFly,
|
||||
arrayOf<LocalQuickFix>(MakeExtendableFix(aClass, aClass.name ?: "class", methodsToAttachToClassFix ?: emptyList())),
|
||||
createFixesIfApplicable(commonModifications, aClass, aClass.name ?: "class", methodsToAttachToClassFix ?: emptyList()),
|
||||
ProblemHighlightType.GENERIC_ERROR_OR_WARNING)
|
||||
)
|
||||
}
|
||||
@@ -87,6 +91,16 @@ class ImplicitSubclassInspection : AbstractBaseUastLocalInspectionTool() {
|
||||
return problems.toTypedArray()
|
||||
}
|
||||
|
||||
private fun createFixesIfApplicable(commonModifications: JvmCommonCodeModifications?,
|
||||
aClass: UDeclaration,
|
||||
hintTargetName: String,
|
||||
methodsToAttachToClassFix: List<SmartPsiElementPointer<UDeclaration>> = emptyList()): Array<LocalQuickFix> {
|
||||
if (commonModifications == null) return emptyArray()
|
||||
val fix = MakeExtendableFix(aClass, hintTargetName, commonModifications, methodsToAttachToClassFix)
|
||||
if (!fix.hasActionsToPerform) return emptyArray()
|
||||
return arrayOf(fix)
|
||||
}
|
||||
|
||||
private fun problemTargets(declaration: UDeclaration, highlightableModifiersSet: Set<String>): List<PsiElement> {
|
||||
val modifiersElements = declaration.modifierList?.let {
|
||||
it.getChildren().filter {
|
||||
@@ -106,6 +120,7 @@ class ImplicitSubclassInspection : AbstractBaseUastLocalInspectionTool() {
|
||||
|
||||
private class MakeExtendableFix(uDeclaration: UDeclaration,
|
||||
hintTargetName: String,
|
||||
val changeModifiers: JvmCommonCodeModifications,
|
||||
val siblings: List<SmartPsiElementPointer<UDeclaration>> = emptyList())
|
||||
: LocalQuickFixOnPsiElement(uDeclaration) {
|
||||
|
||||
@@ -113,18 +128,32 @@ class ImplicitSubclassInspection : AbstractBaseUastLocalInspectionTool() {
|
||||
private val LOG = Logger.getInstance("#com.intellij.codeInspection.inheritance.MakeExtendableFix")
|
||||
}
|
||||
|
||||
private val actionsToPerform = SmartList<IntentionAction>()
|
||||
|
||||
val hasActionsToPerform: Boolean
|
||||
get() = actionsToPerform.isNotEmpty()
|
||||
|
||||
init {
|
||||
collectMakeExtendable(uDeclaration, actionsToPerform)
|
||||
for (sibling in siblings) {
|
||||
sibling.element?.let {
|
||||
collectMakeExtendable(it, actionsToPerform, checkParent = false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun getFamilyName(): String = QuickFixBundle.message("fix.modifiers.family")
|
||||
|
||||
override fun invoke(project: Project, file: PsiFile, startElement: PsiElement, endElement: PsiElement) {
|
||||
try {
|
||||
makeExtendable(startElement as UDeclaration)
|
||||
for (sibling in siblings) {
|
||||
sibling.element?.let {
|
||||
makeExtendable(it)
|
||||
}
|
||||
for (intentionAction in actionsToPerform) {
|
||||
if (intentionAction.isAvailable(project, null, file))
|
||||
intentionAction.invoke(project, null, file)
|
||||
}
|
||||
}
|
||||
catch (e: IncorrectOperationException) {
|
||||
if (ApplicationManager.getApplication().isUnitTestMode)
|
||||
throw e
|
||||
ApplicationManager.getApplication().invokeLater {
|
||||
Messages.showErrorDialog(project, e.message, CommonBundle.getErrorTitle())
|
||||
}
|
||||
@@ -132,29 +161,51 @@ class ImplicitSubclassInspection : AbstractBaseUastLocalInspectionTool() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun makeExtendable(declaration: UDeclaration) {
|
||||
private fun collectMakeExtendable(declaration: UDeclaration,
|
||||
actionsList: SmartList<IntentionAction>,
|
||||
checkParent: Boolean = true) {
|
||||
val isClassMember = !(declaration is UClass)
|
||||
declaration.modifierList?.apply {
|
||||
setModifierProperty(PsiModifier.FINAL, false)
|
||||
setModifierProperty(PsiModifier.PRIVATE, false)
|
||||
addIfApplicable(declaration, PsiModifier.FINAL, false, actionsList)
|
||||
addIfApplicable(declaration, PsiModifier.PRIVATE, false, actionsList)
|
||||
if (isClassMember) {
|
||||
setModifierProperty(PsiModifier.STATIC, false)
|
||||
addIfApplicable(declaration, PsiModifier.STATIC, false, actionsList)
|
||||
}
|
||||
}
|
||||
if (isClassMember) {
|
||||
(declaration.uastParent as? UClass)?.modifierList?.apply {
|
||||
setModifierProperty(PsiModifier.FINAL, false)
|
||||
setModifierProperty(PsiModifier.PRIVATE, false)
|
||||
if (checkParent && isClassMember) {
|
||||
(declaration.uastParent as? UClass)?.apply {
|
||||
addIfApplicable(this, PsiModifier.FINAL, false, actionsList)
|
||||
addIfApplicable(this, PsiModifier.PRIVATE, false, actionsList)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun addIfApplicable(declaration: UDeclaration,
|
||||
name: String,
|
||||
shouldPresent: Boolean,
|
||||
actionsList: SmartList<IntentionAction>) {
|
||||
if (declaration.modifierList?.hasModifierProperty(name) != shouldPresent) {
|
||||
(changeModifiers.createChangeModifierAction(declaration, name, shouldPresent))?.let {
|
||||
actionsList.add(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val MAX_MESSAGES_TO_COMBINE = 3
|
||||
|
||||
private val text = when (uDeclaration) {
|
||||
is UClass -> InspectionsBundle.message("inspection.implicit.subclass.make.class.extendable",
|
||||
hintTargetName,
|
||||
siblings.size,
|
||||
siblingsDescription())
|
||||
else -> InspectionsBundle.message("inspection.implicit.subclass.extendable", hintTargetName)
|
||||
is UClass ->
|
||||
if (actionsToPerform.size <= MAX_MESSAGES_TO_COMBINE)
|
||||
actionsToPerform.map { it.text }.joinToString()
|
||||
else InspectionsBundle.message("inspection.implicit.subclass.make.class.extendable",
|
||||
hintTargetName,
|
||||
siblings.size,
|
||||
siblingsDescription())
|
||||
else ->
|
||||
if (actionsToPerform.size <= MAX_MESSAGES_TO_COMBINE)
|
||||
actionsToPerform.joinToString { it.text }
|
||||
else
|
||||
InspectionsBundle.message("inspection.implicit.subclass.extendable", hintTargetName)
|
||||
}
|
||||
|
||||
private fun siblingsDescription() =
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
package com.intellij.codeInsight.intention.impl
|
||||
|
||||
import com.intellij.codeInsight.daemon.impl.quickfix.ModifierFix
|
||||
import com.intellij.codeInsight.intention.IntentionAction
|
||||
import org.jetbrains.uast.UDeclaration
|
||||
import com.intellij.codeInsight.intention.JvmCommonCodeModifications
|
||||
|
||||
|
||||
class JavaCommonCodeModifications : JvmCommonCodeModifications() {
|
||||
|
||||
override fun createChangeModifierAction(declaration: UDeclaration, modifier: String, shouldPresent: Boolean): IntentionAction {
|
||||
return ModifierFix(declaration.modifierList, modifier, shouldPresent, false)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,8 +22,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface ProgressIndicatorEx extends ProgressIndicatorStacked {
|
||||
void addStateDelegate(@NotNull ProgressIndicatorEx delegate);
|
||||
|
||||
boolean isModalityEntered();
|
||||
|
||||
void finish(@NotNull TaskInfo task);
|
||||
|
||||
boolean isFinished(@NotNull TaskInfo task);
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* 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.
|
||||
@@ -18,8 +18,8 @@ package com.intellij.framework.detection.impl;
|
||||
import com.intellij.framework.detection.DetectedFrameworkDescription;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.project.ProjectKt;
|
||||
import com.intellij.util.containers.MultiMap;
|
||||
import com.intellij.util.indexing.FileBasedIndex;
|
||||
import com.intellij.util.io.DataExternalizer;
|
||||
@@ -50,7 +50,7 @@ public class DetectedFrameworksData {
|
||||
|
||||
public DetectedFrameworksData(Project project) {
|
||||
myDetectedFrameworks = new MultiMap<>();
|
||||
File file = new File(FrameworkDetectorRegistryImpl.getDetectionDirPath() + File.separator + FileUtil.sanitizeFileName(project.getName(), false) + "." + project.getLocationHash() +
|
||||
File file = new File(FrameworkDetectorRegistryImpl.getDetectionDirPath() + File.separator + ProjectKt.getSystemCacheFileName(project, true, ".") +
|
||||
File.separator + "files");
|
||||
myNewFiles = new TIntObjectHashMap<>();
|
||||
try {
|
||||
|
||||
@@ -561,6 +561,7 @@ public class FoldingModelImpl implements FoldingModelEx, PrioritizedInternalDocu
|
||||
|
||||
@Override
|
||||
public void beforeDocumentChange(DocumentEvent event) {
|
||||
if (myIsBatchFoldingProcessing) LOG.error("Document changes are not allowed during batch folding update");
|
||||
myDocumentChangeProcessed = false;
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -378,6 +378,8 @@ class EditorSizeManager extends InlayModel.SimpleAdapter implements PrioritizedD
|
||||
}
|
||||
|
||||
void textLayoutPerformed(int startOffset, int endOffset) {
|
||||
assert 0 <= startOffset && startOffset < endOffset && endOffset <= myDocument.getTextLength()
|
||||
: "startOffset=" + startOffset + ", endOffset=" + endOffset;
|
||||
if (myDocument.isInBulkUpdate()) return;
|
||||
if (myEditor.getFoldingModel().isInBatchFoldingOperation()) {
|
||||
myDeferredRanges.add(new TextRange(startOffset, endOffset));
|
||||
|
||||
-52
@@ -15,13 +15,10 @@
|
||||
*/
|
||||
package com.intellij.openapi.progress.util;
|
||||
|
||||
import com.intellij.openapi.application.*;
|
||||
import com.intellij.openapi.application.impl.LaterInvocator;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.TaskInfo;
|
||||
import com.intellij.openapi.wm.ex.ProgressIndicatorEx;
|
||||
import com.intellij.ui.GuiUtils;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.containers.WeakList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -31,7 +28,6 @@ import java.util.List;
|
||||
public class AbstractProgressIndicatorExBase extends AbstractProgressIndicatorBase implements ProgressIndicatorEx {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.progress.util.ProgressIndicatorBase");
|
||||
private final boolean myReusable;
|
||||
private volatile boolean myModalityEntered;
|
||||
private volatile List<ProgressIndicatorEx> myStateDelegates;
|
||||
private volatile WeakList<TaskInfo> myFinished;
|
||||
private volatile boolean myWasStarted;
|
||||
@@ -52,48 +48,13 @@ public class AbstractProgressIndicatorExBase extends AbstractProgressIndicatorBa
|
||||
delegateRunningChange(ProgressIndicator::start);
|
||||
}
|
||||
myWasStarted = true;
|
||||
|
||||
enterModality();
|
||||
}
|
||||
|
||||
protected final void enterModality() {
|
||||
if (myModalityProgress == this) {
|
||||
ModalityState modalityState = ModalityState.defaultModalityState();
|
||||
if (!myModalityEntered &&
|
||||
!ApplicationManager.getApplication().isDispatchThread() &&
|
||||
!((TransactionGuardImpl)TransactionGuard.getInstance()).isWriteSafeModality(modalityState)) {
|
||||
// exceptions here should be assigned to Peter
|
||||
LOG.error("Non-modal progress should be started in a write-safe context: an action or modality-aware invokeLater. See also TransactionGuard documentation.");
|
||||
}
|
||||
GuiUtils.invokeLaterIfNeeded(this::doEnterModality, modalityState);
|
||||
}
|
||||
}
|
||||
|
||||
private void doEnterModality() {
|
||||
if (!myModalityEntered) {
|
||||
LaterInvocator.enterModal(this);
|
||||
myModalityEntered = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
super.stop();
|
||||
delegateRunningChange(ProgressIndicator::stop);
|
||||
exitModality();
|
||||
}
|
||||
|
||||
protected final void exitModality() {
|
||||
if (myModalityProgress == this) {
|
||||
GuiUtils.invokeLaterIfNeeded(this::doExitModality, ModalityState.defaultModalityState());
|
||||
}
|
||||
}
|
||||
|
||||
private void doExitModality() {
|
||||
if (myModalityEntered) {
|
||||
myModalityEntered = false;
|
||||
LaterInvocator.leaveModal(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -246,19 +207,6 @@ public class AbstractProgressIndicatorExBase extends AbstractProgressIndicatorBa
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isModalityEntered() {
|
||||
return myModalityEntered;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void initStateFrom(@NotNull final ProgressIndicator indicator) {
|
||||
super.initStateFrom(indicator);
|
||||
if (indicator instanceof ProgressIndicatorEx) {
|
||||
myModalityEntered = ((ProgressIndicatorEx)indicator).isModalityEntered();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean wasStarted() {
|
||||
return myWasStarted;
|
||||
|
||||
@@ -18,6 +18,8 @@ package com.intellij.openapi.progress.util;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.application.impl.LaterInvocator;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.openapi.ui.DialogWrapperDialog;
|
||||
@@ -25,6 +27,7 @@ import com.intellij.openapi.ui.DialogWrapperPeer;
|
||||
import com.intellij.openapi.ui.impl.DialogWrapperPeerImpl;
|
||||
import com.intellij.openapi.ui.impl.FocusTrackbackProvider;
|
||||
import com.intellij.openapi.ui.impl.GlassPaneDialogWrapperPeer;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.wm.WindowManager;
|
||||
import com.intellij.openapi.wm.ex.WindowManagerEx;
|
||||
@@ -322,6 +325,8 @@ class ProgressDialog implements Disposable {
|
||||
}
|
||||
});
|
||||
|
||||
Disposer.register(myPopup.getDisposable(), () -> myProgressWindow.exitModality());
|
||||
|
||||
myPopup.show();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ package com.intellij.openapi.progress.util;
|
||||
import com.intellij.ide.IdeEventQueue;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.impl.LaterInvocator;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
@@ -62,6 +63,7 @@ public class ProgressWindow extends ProgressIndicatorBase implements BlockingPro
|
||||
private String myProcessId = "<unknown>";
|
||||
@Nullable private volatile Runnable myBackgroundHandler;
|
||||
protected int myDelayInMillis = DEFAULT_PROGRESS_DIALOG_POSTPONE_TIME_MILLIS;
|
||||
private boolean myModalityEntered;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface Listener {
|
||||
@@ -181,6 +183,20 @@ public class ProgressWindow extends ProgressIndicatorBase implements BlockingPro
|
||||
timer.start();
|
||||
}
|
||||
|
||||
final void enterModality() {
|
||||
if (myModalityProgress == this && !myModalityEntered) {
|
||||
LaterInvocator.enterModal(this);
|
||||
myModalityEntered = true;
|
||||
}
|
||||
}
|
||||
|
||||
final void exitModality() {
|
||||
if (myModalityProgress == this && myModalityEntered) {
|
||||
myModalityEntered = false;
|
||||
LaterInvocator.leaveModal(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startBlocking() {
|
||||
startBlocking(EmptyRunnable.getInstance());
|
||||
|
||||
@@ -103,7 +103,7 @@ public class ProjectImpl extends PlatformComponentManagerImpl implements Project
|
||||
|
||||
myProjectManager = projectManager;
|
||||
|
||||
myName = projectName == null ? getStateStore().getProjectName() : projectName;
|
||||
myName = projectName;
|
||||
// light project may be changed later during test, so we need to remember its initial state
|
||||
myLight = ApplicationManager.getApplication().isUnitTestMode() && filePath.contains(LIGHT_PROJECT_NAME);
|
||||
}
|
||||
@@ -243,13 +243,16 @@ public class ProjectImpl extends PlatformComponentManagerImpl implements Project
|
||||
@NotNull
|
||||
@Override
|
||||
public String getName() {
|
||||
if (myName == null) {
|
||||
return getStateStore().getProjectName();
|
||||
}
|
||||
return myName;
|
||||
}
|
||||
|
||||
@NonNls
|
||||
@Override
|
||||
public String getPresentableUrl() {
|
||||
if (myName == null || isDefault()) {
|
||||
if (isDefault()) {
|
||||
// not yet initialized
|
||||
return null;
|
||||
}
|
||||
@@ -295,6 +298,9 @@ public class ProjectImpl extends PlatformComponentManagerImpl implements Project
|
||||
if (!isDefault() && !ApplicationManager.getApplication().isHeadlessEnvironment()) {
|
||||
distributeProgress();
|
||||
}
|
||||
if (myName == null) {
|
||||
myName = getStateStore().getProjectName();
|
||||
}
|
||||
ApplicationManager.getApplication().getMessageBus().syncPublisher(ProjectLifecycleListener.TOPIC).projectComponentsInitialized(this);
|
||||
|
||||
//noinspection SynchronizeOnThis
|
||||
@@ -416,10 +422,6 @@ public class ProjectImpl extends PlatformComponentManagerImpl implements Project
|
||||
return Extensions.getArea(this).getExtensionPoint(extensionPointName).getExtensions();
|
||||
}
|
||||
|
||||
public String getDefaultName() {
|
||||
return isDefault() ? myName : getStateStore().getProjectName();
|
||||
}
|
||||
|
||||
private class MyProjectManagerListener extends ProjectManagerAdapter {
|
||||
@Override
|
||||
public void projectOpened(Project project) {
|
||||
@@ -454,7 +456,7 @@ public class ProjectImpl extends PlatformComponentManagerImpl implements Project
|
||||
(isDisposed() ? " (Disposed" + (temporarilyDisposed ? " temporarily" : "") + ")"
|
||||
: isDefault() ? "" : " '" + getPresentableUrl() + "'") +
|
||||
(isDefault() ? " (Default)" : "") +
|
||||
" " + myName;
|
||||
" " + getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
-5
@@ -422,11 +422,6 @@ public class ProgressIndicatorTest extends LightPlatformTestCase {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isModalityEntered() {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finish(@NotNull TaskInfo task) {
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.intellij.openapi.roots.ModuleRootManager
|
||||
import com.intellij.openapi.util.SystemInfo
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.util.PathUtilRt
|
||||
import com.intellij.util.io.basicAttributesIfExists
|
||||
import com.intellij.util.io.exists
|
||||
import java.nio.file.InvalidPathException
|
||||
@@ -120,4 +121,11 @@ fun Project.guessProjectDir() : VirtualFile {
|
||||
}
|
||||
}
|
||||
return this.baseDir!!
|
||||
}
|
||||
|
||||
// Use parameters only for migration purposes, once all usages will be migrated, parameters will be removed
|
||||
@JvmOverloads
|
||||
fun Project.getSystemCacheFileName(forceNameUse: Boolean = false, hashSeparator: String = "-"): String {
|
||||
val name = if (!forceNameUse && isDirectoryBased) FileUtil.sanitizeFileName(PathUtilRt.getFileName(basePath), false) else name
|
||||
return "$name$hashSeparator$locationHash"
|
||||
}
|
||||
+1
-10
@@ -79,16 +79,7 @@ public class OutputToGeneralTestEventsConverter implements ProcessOutputConsumer
|
||||
}
|
||||
|
||||
public void process(final String text, final Key outputType) {
|
||||
// Test runner may generate message with protocol start inside of line i.e: "test_test.py.. ##teamcity[testStarted ..."
|
||||
// Splitter only supports cases when message starts at the beginning of the line
|
||||
// See https://github.com/JetBrains/teamcity-messages/issues/131
|
||||
final int messageProtocolPosition = text.indexOf(ServiceMessage.SERVICE_MESSAGE_START);
|
||||
if (messageProtocolPosition > 0) {
|
||||
mySplitter.process(text.substring(0, messageProtocolPosition), outputType);
|
||||
mySplitter.process(text.substring(messageProtocolPosition), outputType);
|
||||
} else {
|
||||
mySplitter.process(text, outputType);
|
||||
}
|
||||
mySplitter.process(text, outputType);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
-385
@@ -1,385 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
package org.jetbrains.plugins.groovy.lang;
|
||||
|
||||
import com.intellij.codeHighlighting.TextEditorHighlightingPassRegistrar;
|
||||
import com.intellij.codeInsight.daemon.ImplicitUsageProvider;
|
||||
import com.intellij.codeInsight.highlighting.ReadWriteAccessDetector;
|
||||
import com.intellij.codeInspection.unused.ImplicitPropertyUsageProvider;
|
||||
import com.intellij.core.CoreApplicationEnvironment;
|
||||
import com.intellij.core.CoreProjectEnvironment;
|
||||
import com.intellij.ide.FileIconProvider;
|
||||
import com.intellij.javaee.CoreExternalResourceManager;
|
||||
import com.intellij.javaee.ExternalResourceManagerEx;
|
||||
import com.intellij.lang.LanguageAnnotators;
|
||||
import com.intellij.lang.LanguageParserDefinitions;
|
||||
import com.intellij.lang.LanguageStructureViewBuilder;
|
||||
import com.intellij.lang.findUsages.LanguageFindUsages;
|
||||
import com.intellij.lang.folding.LanguageFolding;
|
||||
import com.intellij.mock.MockProject;
|
||||
import com.intellij.openapi.extensions.Extensions;
|
||||
import com.intellij.openapi.fileTypes.FileTypeRegistry;
|
||||
import com.intellij.openapi.fileTypes.SyntaxHighlighterFactory;
|
||||
import com.intellij.openapi.util.Condition;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.pom.PomDeclarationSearcher;
|
||||
import com.intellij.problems.WolfTheProblemSolver;
|
||||
import com.intellij.psi.ClassTypePointerFactory;
|
||||
import com.intellij.psi.PsiElementFinder;
|
||||
import com.intellij.psi.ResolveScopeProvider;
|
||||
import com.intellij.psi.codeStyle.ReferenceAdjuster;
|
||||
import com.intellij.psi.impl.ExpressionConverter;
|
||||
import com.intellij.psi.impl.LanguageConstantExpressionEvaluator;
|
||||
import com.intellij.psi.impl.compiled.ClsCustomNavigationPolicy;
|
||||
import com.intellij.psi.search.PsiShortNamesCache;
|
||||
import com.intellij.psi.search.UseScopeEnlarger;
|
||||
import com.intellij.psi.search.searches.*;
|
||||
import com.intellij.psi.stubs.StubIndexExtension;
|
||||
import com.intellij.util.QueryExecutor;
|
||||
import com.intellij.util.indexing.FileBasedIndexExtension;
|
||||
import org.jetbrains.plugins.groovy.*;
|
||||
import org.jetbrains.plugins.groovy.annotator.GrAnnotatorImpl;
|
||||
import org.jetbrains.plugins.groovy.annotator.GrReferenceHighlighterFactory;
|
||||
import org.jetbrains.plugins.groovy.annotator.GroovyFrameworkConfigNotification;
|
||||
import org.jetbrains.plugins.groovy.annotator.checkers.*;
|
||||
import org.jetbrains.plugins.groovy.builder.XmlMarkupBuilderNonCodeMemberContributor;
|
||||
import org.jetbrains.plugins.groovy.codeInsight.GroovyClsCustomNavigationPolicy;
|
||||
import org.jetbrains.plugins.groovy.codeInspection.GroovyQuickFixFactory;
|
||||
import org.jetbrains.plugins.groovy.codeInspection.declaration.GrMethodMayBeStaticInspectionFilter;
|
||||
import org.jetbrains.plugins.groovy.codeInspection.local.GroovyUnusedImportsPassFactory;
|
||||
import org.jetbrains.plugins.groovy.codeStyle.GrReferenceAdjuster;
|
||||
import org.jetbrains.plugins.groovy.configSlurper.ConfigSlurperMapContentProvider;
|
||||
import org.jetbrains.plugins.groovy.configSlurper.GroovyMapValueTypeEnhancer;
|
||||
import org.jetbrains.plugins.groovy.dgm.DGMImplicitPropertyUsageProvider;
|
||||
import org.jetbrains.plugins.groovy.dgm.DGMMemberContributor;
|
||||
import org.jetbrains.plugins.groovy.dsl.DslActivationStatus;
|
||||
import org.jetbrains.plugins.groovy.dsl.GroovyDslAnnotator;
|
||||
import org.jetbrains.plugins.groovy.dsl.GroovyDslFileIndex;
|
||||
import org.jetbrains.plugins.groovy.dsl.dsltop.GdslMembersProvider;
|
||||
import org.jetbrains.plugins.groovy.dsl.dsltop.GroovyDslDefaultMembers;
|
||||
import org.jetbrains.plugins.groovy.dsl.psi.*;
|
||||
import org.jetbrains.plugins.groovy.ext.spock.SpockMemberContributor;
|
||||
import org.jetbrains.plugins.groovy.ext.spock.SpockPomDeclarationSearcher;
|
||||
import org.jetbrains.plugins.groovy.extensions.*;
|
||||
import org.jetbrains.plugins.groovy.findUsages.*;
|
||||
import org.jetbrains.plugins.groovy.geb.*;
|
||||
import org.jetbrains.plugins.groovy.gpp.GppClosureParameterTypeProvider;
|
||||
import org.jetbrains.plugins.groovy.gpp.GppExpectedTypesContributor;
|
||||
import org.jetbrains.plugins.groovy.gpp.GppTypeConverter;
|
||||
import org.jetbrains.plugins.groovy.highlighter.GroovyDeclarationHighlightingPassFactory;
|
||||
import org.jetbrains.plugins.groovy.highlighter.GroovyKeywordHighlightingPassFactory;
|
||||
import org.jetbrains.plugins.groovy.lang.folding.GroovyFoldingBuilder;
|
||||
import org.jetbrains.plugins.groovy.lang.parser.GroovyElementTypes;
|
||||
import org.jetbrains.plugins.groovy.lang.parser.GroovyParserDefinition;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.GroovyPsiElementFactory;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.auxiliary.GrListOrMap;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrMethodCall;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrReferenceExpression;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.path.GrIndexProperty;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.expectedTypes.GroovyExpectedTypesContributor;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.impl.*;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.impl.javaView.GroovyClassFinder;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.impl.search.GrPrivateFieldScopeEnlarger;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.impl.smartPointers.GrClassReferenceTypePointerFactory;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.path.DefaultCallExpressionTypeCalculator;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.path.GrDGMTypeCalculator;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.path.GrDescriptorReturnTypeCalculator;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.path.GrWithTraitTypeCalculator;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.stubs.index.*;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.typeEnhancers.*;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.util.GroovyConstantExpressionEvaluator;
|
||||
import org.jetbrains.plugins.groovy.lang.resolve.*;
|
||||
import org.jetbrains.plugins.groovy.lang.resolve.ast.AutoExternalizeContributor;
|
||||
import org.jetbrains.plugins.groovy.lang.resolve.ast.ConstructorAnnotationsProcessor;
|
||||
import org.jetbrains.plugins.groovy.lang.resolve.ast.InheritConstructorContributor;
|
||||
import org.jetbrains.plugins.groovy.lang.resolve.ast.LoggingContributor;
|
||||
import org.jetbrains.plugins.groovy.lang.resolve.ast.builder.strategy.DefaultBuilderStrategySupport;
|
||||
import org.jetbrains.plugins.groovy.lang.resolve.ast.builder.strategy.ExternalBuilderStrategySupport;
|
||||
import org.jetbrains.plugins.groovy.lang.resolve.ast.builder.strategy.InitializerBuilderStrategySupport;
|
||||
import org.jetbrains.plugins.groovy.lang.resolve.ast.builder.strategy.SimpleBuilderStrategySupport;
|
||||
import org.jetbrains.plugins.groovy.lang.resolve.noncode.GrCollectionTypeMembersProvider;
|
||||
import org.jetbrains.plugins.groovy.lang.resolve.noncode.MixinMemberContributor;
|
||||
import org.jetbrains.plugins.groovy.lang.stubs.GroovyShortNamesCache;
|
||||
import org.jetbrains.plugins.groovy.lang.typing.*;
|
||||
import org.jetbrains.plugins.groovy.structure.GroovyStructureViewFactory;
|
||||
import org.jetbrains.plugins.groovy.swingBuilder.SwingBuilderNamedArgumentProvider;
|
||||
import org.jetbrains.plugins.groovy.swingBuilder.SwingBuilderNonCodeMemberContributor;
|
||||
import org.jetbrains.plugins.groovy.transformations.AstTransformationSupport;
|
||||
import org.jetbrains.plugins.groovy.transformations.impl.*;
|
||||
import org.jetbrains.plugins.groovy.transformations.impl.autoClone.AutoCloneTransformationSupport;
|
||||
|
||||
/**
|
||||
* Upsource
|
||||
*/
|
||||
@SuppressWarnings("UnusedDeclaration")
|
||||
public class GroovyCoreEnvironment {
|
||||
public static class ApplicationEnvironment {
|
||||
public ApplicationEnvironment(CoreApplicationEnvironment appEnvironment) {
|
||||
appEnvironment.registerFileType(GroovyFileType.GROOVY_FILE_TYPE, GroovyFileType.DEFAULT_EXTENSION);
|
||||
|
||||
appEnvironment.addExplicitExtension(SyntaxHighlighterFactory.LANGUAGE_FACTORY, GroovyLanguage.INSTANCE,
|
||||
new GroovySyntaxHighlighterFactory());
|
||||
|
||||
appEnvironment.addExplicitExtension(LanguageParserDefinitions.INSTANCE, GroovyLanguage.INSTANCE, new GroovyParserDefinition());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), GrMethodComparator.EP_NAME, GrMethodComparator.class);
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), NonCodeMembersContributor.EP_NAME, NonCodeMembersContributor.class);
|
||||
appEnvironment.addExtension(NonCodeMembersContributor.EP_NAME, new GebBrowserMemberContributor());
|
||||
appEnvironment.addExtension(NonCodeMembersContributor.EP_NAME, new GebJUnitTestMemberContributor());
|
||||
appEnvironment.addExtension(NonCodeMembersContributor.EP_NAME, new GebModuleMemberContributor());
|
||||
appEnvironment.addExtension(NonCodeMembersContributor.EP_NAME, new GebPageMemberContributor());
|
||||
appEnvironment.addExtension(NonCodeMembersContributor.EP_NAME, new GebSpockTestMemberContributor());
|
||||
appEnvironment.addExtension(NonCodeMembersContributor.EP_NAME, new GebTestNGTestMemberContributor());
|
||||
appEnvironment.addExtension(NonCodeMembersContributor.EP_NAME, new GrCollectionTypeMembersProvider());
|
||||
appEnvironment.addExtension(NonCodeMembersContributor.EP_NAME, new MixinMemberContributor());
|
||||
appEnvironment.addExtension(NonCodeMembersContributor.EP_NAME, new SpockMemberContributor());
|
||||
appEnvironment.addExtension(NonCodeMembersContributor.EP_NAME, new XmlMarkupBuilderNonCodeMemberContributor());
|
||||
appEnvironment.addExtension(NonCodeMembersContributor.EP_NAME, new DGMMemberContributor());
|
||||
appEnvironment.addExtension(NonCodeMembersContributor.EP_NAME, new SwingBuilderNonCodeMemberContributor());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), GrImportContributor.EP_NAME, GrImportContributor.class);
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), AstTransformationSupport.EP_NAME, AstTransformationSupport.class);
|
||||
|
||||
appEnvironment.addExtension(AstTransformationSupport.EP_NAME, new AutoExternalizeContributor());
|
||||
appEnvironment.addExtension(AstTransformationSupport.EP_NAME, new AutoCloneTransformationSupport());
|
||||
appEnvironment.addExtension(AstTransformationSupport.EP_NAME, new ConstructorAnnotationsProcessor());
|
||||
appEnvironment.addExtension(AstTransformationSupport.EP_NAME, new InheritConstructorContributor());
|
||||
appEnvironment.addExtension(AstTransformationSupport.EP_NAME, new DefaultBuilderStrategySupport());
|
||||
appEnvironment.addExtension(AstTransformationSupport.EP_NAME, new SimpleBuilderStrategySupport());
|
||||
appEnvironment.addExtension(AstTransformationSupport.EP_NAME, new ExternalBuilderStrategySupport());
|
||||
appEnvironment.addExtension(AstTransformationSupport.EP_NAME, new InitializerBuilderStrategySupport());
|
||||
appEnvironment.addExtension(AstTransformationSupport.EP_NAME, new BindableTransformationSupport());
|
||||
appEnvironment.addExtension(AstTransformationSupport.EP_NAME, new VetoableTransformationSupport());
|
||||
appEnvironment.addExtension(AstTransformationSupport.EP_NAME, new LoggingContributor());
|
||||
appEnvironment.addExtension(AstTransformationSupport.EP_NAME, new CategoryTransformationSupport());
|
||||
appEnvironment.addExtension(AstTransformationSupport.EP_NAME, new DelegateTransformationSupport());
|
||||
appEnvironment.addExtension(AstTransformationSupport.EP_NAME, new DefaultTransformationSupport());
|
||||
appEnvironment.addExtension(AstTransformationSupport.EP_NAME, new TraitTransformationSupport());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), ClosureMissingMethodContributor.EP_NAME,
|
||||
ClosureMissingMethodContributor.class);
|
||||
appEnvironment.addExtension(ClosureMissingMethodContributor.EP_NAME, new PluginXmlClosureMemberContributor());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), GrVariableEnhancer.EP_NAME, GrVariableEnhancer.class);
|
||||
appEnvironment.addExtension(GrVariableEnhancer.EP_NAME, new ClosureAsAnonymousParameterEnhancer());
|
||||
appEnvironment.addExtension(GrVariableEnhancer.EP_NAME, new ClosureParameterEnhancer());
|
||||
appEnvironment.addExtension(GrVariableEnhancer.EP_NAME, new ClosureParamsEnhancer());
|
||||
appEnvironment.addExtension(GrVariableEnhancer.EP_NAME, new GppClosureParameterTypeProvider());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), GrReferenceTypeEnhancer.EP_NAME,
|
||||
GrReferenceTypeEnhancer.class);
|
||||
appEnvironment.addExtension(GrReferenceTypeEnhancer.EP_NAME, new GroovyMapValueTypeEnhancer());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), GrTypeConverter.EP_NAME, GrTypeConverter.class);
|
||||
appEnvironment.addExtension(GrTypeConverter.EP_NAME, new GrBooleanTypeConverter());
|
||||
appEnvironment.addExtension(GrTypeConverter.EP_NAME, new GrGenericTypeConverter());
|
||||
appEnvironment.addExtension(GrTypeConverter.EP_NAME, new GrClassConverter());
|
||||
appEnvironment.addExtension(GrTypeConverter.EP_NAME, new GrNullVoidConverter());
|
||||
appEnvironment.addExtension(GrTypeConverter.EP_NAME, new GrCharConverter());
|
||||
appEnvironment.addExtension(GrTypeConverter.EP_NAME, new GrNumberConverter());
|
||||
appEnvironment.addExtension(GrTypeConverter.EP_NAME, new GrStringConverter());
|
||||
appEnvironment.addExtension(GrTypeConverter.EP_NAME, new GrEnumConverter());
|
||||
appEnvironment.addExtension(GrTypeConverter.EP_NAME, new GrContainerTypeConverter());
|
||||
appEnvironment.addExtension(GrTypeConverter.EP_NAME, new ClosureToSamConverter());
|
||||
appEnvironment.addExtension(GrTypeConverter.EP_NAME, new GrContainerConverter());
|
||||
appEnvironment.addExtension(GrTypeConverter.EP_NAME, new GppTypeConverter());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), GroovyExpectedTypesContributor.EP_NAME,
|
||||
GroovyExpectedTypesContributor.class);
|
||||
appEnvironment.addExtension(GroovyExpectedTypesContributor.EP_NAME, new GppExpectedTypesContributor());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), GroovyScriptTypeDetector.EP_NAME,
|
||||
GroovyScriptTypeDetector.class);
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), GroovyNamedArgumentProvider.EP_NAME, GroovyNamedArgumentProvider.class);
|
||||
appEnvironment.addExtension(GroovyNamedArgumentProvider.EP_NAME, new GroovyConstructorNamedArgumentProvider());
|
||||
appEnvironment.addExtension(GroovyNamedArgumentProvider.EP_NAME, new GroovyMethodReturnNamedArgumentProvider());
|
||||
appEnvironment.addExtension(GroovyNamedArgumentProvider.EP_NAME, new GroovySourceCodeNamedArgumentProvider());
|
||||
appEnvironment.addExtension(GroovyNamedArgumentProvider.EP_NAME, new SwingBuilderNamedArgumentProvider());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), GroovyMapContentProvider.EP_NAME,
|
||||
GroovyMapContentProvider.class);
|
||||
appEnvironment.addExtension(GroovyMapContentProvider.EP_NAME, new ConfigSlurperMapContentProvider());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), GroovyUnresolvedHighlightFilter.EP_NAME,
|
||||
GroovyUnresolvedHighlightFilter.class);
|
||||
appEnvironment.addExtension(GroovyUnresolvedHighlightFilter.EP_NAME, new GroovyUnresolvedReferenceFilterByFile());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), GroovyUnresolvedHighlightFileFilter.EP_NAME,
|
||||
GroovyUnresolvedHighlightFileFilter.class);
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), GrCallExpressionTypeCalculator.EP_NAME, GrCallExpressionTypeCalculator.class);
|
||||
appEnvironment.addExtension(GrCallExpressionTypeCalculator.EP_NAME, new DefaultCallExpressionTypeCalculator());
|
||||
appEnvironment.addExtension(GrCallExpressionTypeCalculator.EP_NAME, new GrDescriptorReturnTypeCalculator());
|
||||
appEnvironment.addExtension(GrCallExpressionTypeCalculator.EP_NAME, new GrDGMTypeCalculator());
|
||||
appEnvironment.addExtension(GrCallExpressionTypeCalculator.EP_NAME, new GrWithTraitTypeCalculator());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), GrExpressionTypeCalculator.EP_NAME, GrExpressionTypeCalculator.class);
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), GroovyClassDescriptor.EP_NAME,
|
||||
GroovyClassDescriptor.class);
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), GroovyMethodDescriptorExtension.EP_NAME,
|
||||
GroovyMethodDescriptorExtension.class);
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), PsiEnhancerCategory.EP_NAME, PsiEnhancerCategory.class);
|
||||
appEnvironment.addExtension(PsiEnhancerCategory.EP_NAME, new GrExpressionCategory());
|
||||
appEnvironment.addExtension(PsiEnhancerCategory.EP_NAME, new PsiClassCategory());
|
||||
appEnvironment.addExtension(PsiEnhancerCategory.EP_NAME, new PsiElementCategory());
|
||||
appEnvironment.addExtension(PsiEnhancerCategory.EP_NAME, new PsiExpressionCategory());
|
||||
appEnvironment.addExtension(PsiEnhancerCategory.EP_NAME, new PsiMethodCategory());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), GdslMembersProvider.EP_NAME, GdslMembersProvider.class);
|
||||
appEnvironment.addExtension(GdslMembersProvider.EP_NAME, new GdkMethodDslProvider());
|
||||
appEnvironment.addExtension(GdslMembersProvider.EP_NAME, new GroovyDslDefaultMembers());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), GroovyFrameworkConfigNotification.EP_NAME,
|
||||
GroovyFrameworkConfigNotification.class);
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), GrMethodMayBeStaticInspectionFilter.EP_NAME, GrMethodMayBeStaticInspectionFilter.class);
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), CustomAnnotationChecker.EP_NAME, CustomAnnotationChecker.class);
|
||||
appEnvironment.addExtension(CustomAnnotationChecker.EP_NAME, new AnnotationCollectorChecker());
|
||||
appEnvironment.addExtension(CustomAnnotationChecker.EP_NAME, new BaseScriptAnnotationChecker());
|
||||
appEnvironment.addExtension(CustomAnnotationChecker.EP_NAME, new DelegatesToAnnotationChecker());
|
||||
appEnvironment.addExtension(CustomAnnotationChecker.EP_NAME, new FieldAnnotationChecker());
|
||||
appEnvironment.addExtension(CustomAnnotationChecker.EP_NAME, new GrabAnnotationChecker());
|
||||
appEnvironment.addExtension(CustomAnnotationChecker.EP_NAME, new GrAliasAnnotationChecker());
|
||||
appEnvironment.addExtension(CustomAnnotationChecker.EP_NAME, new NewifyAnnotationChecker());
|
||||
appEnvironment.addExtension(CustomAnnotationChecker.EP_NAME, new TypeCheckedAnnotationChecker());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), ImplicitPropertyUsageProvider.EP_NAME,
|
||||
ImplicitPropertyUsageProvider.class);
|
||||
appEnvironment.addExtension(ImplicitPropertyUsageProvider.EP_NAME, new DGMImplicitPropertyUsageProvider());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), ImplicitUsageProvider.EP_NAME,
|
||||
ImplicitUsageProvider.class);
|
||||
appEnvironment.addExtension(ImplicitUsageProvider.EP_NAME, new GrImplicitUsageProvider());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), FileTypeRegistry.FileTypeDetector.EP_NAME,
|
||||
FileTypeRegistry.FileTypeDetector.class);
|
||||
appEnvironment.addExtension(FileTypeRegistry.FileTypeDetector.EP_NAME, new GroovyHashBangFileTypeDetector());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), ClsCustomNavigationPolicy.EP_NAME,
|
||||
ClsCustomNavigationPolicy.class);
|
||||
appEnvironment.addExtension(ClsCustomNavigationPolicy.EP_NAME, new GroovyClsCustomNavigationPolicy());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), PomDeclarationSearcher.EP_NAME,
|
||||
PomDeclarationSearcher.class);
|
||||
appEnvironment.addExtension(PomDeclarationSearcher.EP_NAME, new GebContentDeclarationSearcher());
|
||||
appEnvironment.addExtension(PomDeclarationSearcher.EP_NAME, new SpockPomDeclarationSearcher());
|
||||
|
||||
appEnvironment.addExplicitExtension(LanguageConstantExpressionEvaluator.INSTANCE, GroovyLanguage.INSTANCE,
|
||||
new GroovyConstantExpressionEvaluator());
|
||||
|
||||
appEnvironment.addExplicitExtension(ExpressionConverter.EP, GroovyLanguage.INSTANCE, new GroovyExpressionConverter());
|
||||
appEnvironment.addExplicitExtension(LanguageAnnotators.INSTANCE, GroovyLanguage.INSTANCE, new GrAnnotatorImpl());
|
||||
appEnvironment.addExplicitExtension(LanguageAnnotators.INSTANCE, GroovyLanguage.INSTANCE, new GroovyDslAnnotator());
|
||||
|
||||
appEnvironment.addExplicitExtension(LanguageStructureViewBuilder.INSTANCE, GroovyLanguage.INSTANCE, new GroovyStructureViewFactory());
|
||||
appEnvironment.addExplicitExtension(LanguageFolding.INSTANCE, GroovyLanguage.INSTANCE, new GroovyFoldingBuilder());
|
||||
appEnvironment.addExplicitExtension(LanguageFindUsages.INSTANCE, GroovyLanguage.INSTANCE, new GroovyFindUsagesProvider());
|
||||
appEnvironment.addExplicitExtension(ReferenceAdjuster.Extension.INSTANCE, GroovyLanguage.INSTANCE, new GrReferenceAdjuster());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), UseScopeEnlarger.EP_NAME, UseScopeEnlarger.class);
|
||||
appEnvironment.addExtension(UseScopeEnlarger.EP_NAME, new GrPrivateFieldScopeEnlarger());
|
||||
|
||||
DirectClassInheritorsSearch.INSTANCE.registerExecutor(new GroovyDirectInheritorsSearcher());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), MethodReferencesSearch.EP_NAME, QueryExecutor.class);
|
||||
appEnvironment.addExtension(MethodReferencesSearch.EP_NAME, new AccessorMethodReferencesSearcher());
|
||||
appEnvironment.addExtension(MethodReferencesSearch.EP_NAME, new MethodLateBoundReferencesSearcher());
|
||||
appEnvironment.addExtension(MethodReferencesSearch.EP_NAME, new GroovyConstructorUsagesSearcher());
|
||||
appEnvironment.addExtension(MethodReferencesSearch.EP_NAME, new GroovyReflectedMethodReferenceSearcher());
|
||||
appEnvironment.addExtension(MethodReferencesSearch.EP_NAME, new GrLiteralMethodSearcher());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), AnnotatedElementsSearch.EP_NAME, QueryExecutor.class);
|
||||
appEnvironment.addExtension(AnnotatedElementsSearch.EP_NAME, new AnnotatedMembersSearcher());
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), SuperMethodsSearch.EP_NAME, QueryExecutor.class);
|
||||
appEnvironment.addExtension(SuperMethodsSearch.EP_NAME, new GDKSuperMethodSearcher());
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), DefinitionsScopedSearch.EP_NAME, QueryExecutor.class);
|
||||
appEnvironment.addExtension(DefinitionsScopedSearch.EP_NAME, new GroovyImplementationSearch());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), StubIndexExtension.EP_NAME, StubIndexExtension.class);
|
||||
appEnvironment.addExtension(StubIndexExtension.EP_NAME, new GrAnnotationMethodNameIndex());
|
||||
appEnvironment.addExtension(StubIndexExtension.EP_NAME, new GrAnnotatedMemberIndex());
|
||||
appEnvironment.addExtension(StubIndexExtension.EP_NAME, new GrAnonymousClassIndex());
|
||||
appEnvironment.addExtension(StubIndexExtension.EP_NAME, new GrDirectInheritorsIndex());
|
||||
appEnvironment.addExtension(StubIndexExtension.EP_NAME, new GrFieldNameIndex());
|
||||
appEnvironment.addExtension(StubIndexExtension.EP_NAME, new GrFullClassNameIndex());
|
||||
appEnvironment.addExtension(StubIndexExtension.EP_NAME, new GrFullScriptNameIndex());
|
||||
appEnvironment.addExtension(StubIndexExtension.EP_NAME, new GrMethodNameIndex());
|
||||
appEnvironment.addExtension(StubIndexExtension.EP_NAME, new GrScriptClassNameIndex());
|
||||
appEnvironment.addExtension(StubIndexExtension.EP_NAME, new GrScriptClassNameIndex());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), FileBasedIndexExtension.EXTENSION_POINT_NAME,
|
||||
FileBasedIndexExtension.class);
|
||||
appEnvironment.addExtension(FileBasedIndexExtension.EXTENSION_POINT_NAME, new GroovyDslFileIndex());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), ReferencesSearch.EP_NAME, QueryExecutor.class);
|
||||
appEnvironment.addExtension(ReferencesSearch.EP_NAME, new ConstructorReferencesSearcher());
|
||||
appEnvironment.addExtension(ReferencesSearch.EP_NAME, new GrAliasedImportedElementSearcher());
|
||||
appEnvironment.addExtension(ReferencesSearch.EP_NAME, new AccessorReferencesSearcher());
|
||||
appEnvironment.addExtension(ReferencesSearch.EP_NAME, new GroovyTraitFieldSearcher());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), FileIconProvider.EP_NAME, FileIconProvider.class);
|
||||
appEnvironment.addExtension(FileIconProvider.EP_NAME, new GroovyFileIconProvider());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), ResolveScopeProvider.EP_NAME, ResolveScopeProvider.class);
|
||||
appEnvironment.addExtension(ResolveScopeProvider.EP_NAME, new GroovyResolveScopeProvider());
|
||||
|
||||
|
||||
Class<Condition<VirtualFile>> conditionClass = (Class)Condition.class;
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), WolfTheProblemSolver.FILTER_EP_NAME, conditionClass);
|
||||
appEnvironment.addExtension(WolfTheProblemSolver.FILTER_EP_NAME, new GroovyProblemFileHighlightFilter());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), ClassTypePointerFactory.EP_NAME, ClassTypePointerFactory.class);
|
||||
appEnvironment.addExtension(ClassTypePointerFactory.EP_NAME, new GrClassReferenceTypePointerFactory());
|
||||
|
||||
appEnvironment.registerApplicationService(GroovyQuickFixFactory.class, new EmptyGroovyQuickFixFactory());
|
||||
appEnvironment.registerApplicationComponent(DslActivationStatus.class, new DslActivationStatus());
|
||||
|
||||
CoreApplicationEnvironment.registerExtensionPoint(Extensions.getRootArea(), ReadWriteAccessDetector.EP_NAME, ReadWriteAccessDetector.class);
|
||||
appEnvironment.addExtension(ReadWriteAccessDetector.EP_NAME, new GroovyReadWriteAccessDetector());
|
||||
|
||||
appEnvironment.addExplicitExtension(GrTypeCalculator.EP, GrReferenceExpression.class, new GrClosureDelegateTypeCalculator());
|
||||
appEnvironment.addExplicitExtension(GrTypeCalculator.EP, GrListOrMap.class, new DefaultListOrMapTypeCalculator());
|
||||
appEnvironment.addExplicitExtension(GrTypeCalculator.EP, GrIndexProperty.class, new DefaultIndexAccessTypeCalculator());
|
||||
appEnvironment.addExplicitExtension(GrTypeCalculator.EP, GrReferenceExpression.class, new ReferenceExpressionTypeCalculator());
|
||||
appEnvironment.addExplicitExtension(GrTypeCalculator.EP, GrMethodCall.class, new MethodCallTypeCalculator());
|
||||
|
||||
if (GroovyElementTypes.ADDITIVE_EXPRESSION == null) throw new IllegalStateException(); // initialize tokens
|
||||
}
|
||||
|
||||
protected ExternalResourceManagerEx createExternalResourceManager() {
|
||||
return new CoreExternalResourceManager();
|
||||
}
|
||||
}
|
||||
|
||||
public static class ProjectEnvironment {
|
||||
public ProjectEnvironment(CoreProjectEnvironment projectEnvironment) {
|
||||
MockProject project = projectEnvironment.getProject();
|
||||
project.registerService(GroovyPsiElementFactory.class, GroovyPsiElementFactoryImpl.class);
|
||||
|
||||
project.registerService(GroovyPsiManager.class, GroovyPsiManager.class);
|
||||
project.registerService(GroovyCodeStyleManager.class, CoreGroovyCodeStyleManager.class);
|
||||
project.registerService(GroovyCodeStyleSettingsFacade.class, CoreGroovyCodeStyleSettingsFacade.class);
|
||||
projectEnvironment.addProjectExtension(PsiShortNamesCache.EP_NAME, new GroovyShortNamesCache(project));
|
||||
projectEnvironment.addProjectExtension(PsiElementFinder.EP_NAME, new GroovyClassFinder(project));
|
||||
TextEditorHighlightingPassRegistrar registrar = TextEditorHighlightingPassRegistrar.getInstance(project);
|
||||
projectEnvironment.registerProjectComponent(GroovyUnusedImportsPassFactory.class, new GroovyUnusedImportsPassFactory(project, registrar));
|
||||
projectEnvironment.registerProjectComponent(GroovyKeywordHighlightingPassFactory.class, new GroovyKeywordHighlightingPassFactory(project, registrar));
|
||||
projectEnvironment.registerProjectComponent(GroovyDeclarationHighlightingPassFactory.class, new GroovyDeclarationHighlightingPassFactory(project, registrar));
|
||||
projectEnvironment.registerProjectComponent(GrReferenceHighlighterFactory.class, new GrReferenceHighlighterFactory(project, registrar));
|
||||
}
|
||||
}
|
||||
}
|
||||
+22
-3
@@ -17,17 +17,30 @@ package org.jetbrains.plugins.groovy.lang.typing;
|
||||
|
||||
import com.intellij.openapi.util.ClassExtension;
|
||||
import com.intellij.psi.PsiType;
|
||||
import org.jetbrains.annotations.ApiStatus.Experimental;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrExpression;
|
||||
|
||||
/**
|
||||
* This API provides ability to plug into expression type calculation in Groovy.
|
||||
* Each expression has it's default implementation which is executed last.
|
||||
* <p>
|
||||
* The API is experimental at least until 2017.3.
|
||||
*
|
||||
* @param <T> expression class
|
||||
* @see DefaultListOrMapTypeCalculator
|
||||
* @see DefaultIndexAccessTypeCalculator
|
||||
*/
|
||||
@Experimental
|
||||
public interface GrTypeCalculator<T extends GrExpression> {
|
||||
|
||||
ClassExtension<GrTypeCalculator> EP = new ClassExtension<>("org.intellij.groovy.typeCalculator");
|
||||
|
||||
@Nullable
|
||||
PsiType getType(@NotNull T expression);
|
||||
|
||||
/**
|
||||
* @return {@code expression} type if some implementation can calculate it, otherwise {@code null}. <br/>
|
||||
* The result type is the first non-{@code null} value returned.
|
||||
*/
|
||||
@Nullable
|
||||
static PsiType getTypeFromCalculators(@NotNull GrExpression expression) {
|
||||
for (GrTypeCalculator calculator : EP.forKey(expression.getClass())) {
|
||||
@@ -37,4 +50,10 @@ public interface GrTypeCalculator<T extends GrExpression> {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code null} if expression type cannot be calculated.
|
||||
*/
|
||||
@Nullable
|
||||
PsiType getType(@NotNull T expression);
|
||||
}
|
||||
|
||||
@@ -161,18 +161,18 @@
|
||||
implementation="org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.path.GrDescriptorReturnTypeCalculator"/>
|
||||
<callExpressionTypeCalculator
|
||||
implementation="org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.path.GrDGMTypeCalculator"/>
|
||||
|
||||
<typeCalculator forClass="org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrReferenceExpression"
|
||||
implementationClass="org.jetbrains.plugins.groovy.lang.typing.GrClosureDelegateTypeCalculator"/>
|
||||
<typeCalculator forClass="org.jetbrains.plugins.groovy.lang.psi.api.auxiliary.GrListOrMap"
|
||||
|
||||
<typeCalculator forClass="org.jetbrains.plugins.groovy.lang.psi.api.auxiliary.GrListOrMap" order="last"
|
||||
implementationClass="org.jetbrains.plugins.groovy.lang.typing.DefaultListOrMapTypeCalculator"/>
|
||||
<typeCalculator forClass="org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.path.GrIndexProperty"
|
||||
<typeCalculator forClass="org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.path.GrIndexProperty" order="last"
|
||||
implementationClass="org.jetbrains.plugins.groovy.lang.typing.DefaultIndexAccessTypeCalculator"/>
|
||||
<typeCalculator forClass="org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrReferenceExpression"
|
||||
implementationClass="org.jetbrains.plugins.groovy.lang.typing.ReferenceExpressionTypeCalculator"
|
||||
order="last"/>
|
||||
<typeCalculator forClass="org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrMethodCall"
|
||||
implementationClass="org.jetbrains.plugins.groovy.lang.typing.MethodCallTypeCalculator"
|
||||
order="last"/>
|
||||
<typeCalculator forClass="org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrReferenceExpression" order="last"
|
||||
implementationClass="org.jetbrains.plugins.groovy.lang.typing.ReferenceExpressionTypeCalculator"/>
|
||||
<typeCalculator forClass="org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrMethodCall" order="last"
|
||||
implementationClass="org.jetbrains.plugins.groovy.lang.typing.MethodCallTypeCalculator"/>
|
||||
|
||||
<scriptTypeDetector implementation="org.jetbrains.plugins.groovy.gant.GantScriptTypeDetector"/>
|
||||
|
||||
|
||||
@@ -166,6 +166,9 @@ class NewTeamcityServiceMessages(_old_service_messages):
|
||||
_latest_subtest_result = None
|
||||
|
||||
def message(self, messageName, **properties):
|
||||
# Intellij may fail to process message if it has char just before it.
|
||||
# New line has no visible affect, but saves from such cases
|
||||
print("")
|
||||
if messageName in set(["enteredTheMatrix", "testCount"]):
|
||||
_old_service_messages.message(self, messageName, **properties)
|
||||
return
|
||||
|
||||
@@ -324,6 +324,11 @@
|
||||
<extensionPoint name="java.refactoring.chainCallExtractor" interface="com.intellij.refactoring.chainCall.ChainCallExtractor"/>
|
||||
|
||||
<extensionPoint name="repositoryLibrary" beanClass="com.intellij.jarRepository.RepositoryLibraryDefinition"/>
|
||||
|
||||
<extensionPoint qualifiedName="com.intellij.codeInsight.intention.jvmCommonCodeModifications" beanClass="com.intellij.lang.LanguageExtensionPoint">
|
||||
<with attribute="implementationClass" implements="com.intellij.codeInsight.intention.JvmCommonCodeModifications"/>
|
||||
</extensionPoint>
|
||||
|
||||
</extensionPoints>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
@@ -1962,6 +1967,7 @@
|
||||
<projectService serviceInterface="org.jetbrains.uast.UastContext" serviceImplementation="org.jetbrains.uast.UastContext"/>
|
||||
<metaLanguage implementation="com.intellij.uast.UastMetaLanguage"/>
|
||||
<smartPointer.anchorProvider implementation="com.intellij.uast.UastElementAnchorProvider"/>
|
||||
<codeInsight.intention.jvmCommonCodeModifications language="JAVA" implementationClass="com.intellij.codeInsight.intention.impl.JavaCommonCodeModifications"/>
|
||||
</extensions>
|
||||
|
||||
<extensions defaultExtensionNs="org.jetbrains.uast">
|
||||
|
||||
Reference in New Issue
Block a user