Java: return null when language is Scala (IJ-CR-120989)

GitOrigin-RevId: da52c1255ab6904fe184d732f8740b938622e245
This commit is contained in:
Bas Leijdekkers
2023-11-29 00:53:26 +00:00
committed by intellij-monorepo-bot
parent f9b82cf58c
commit e8be232407
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2009 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-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.codeInsight.completion;
import com.intellij.psi.util.proximity.ProximityStatistician;
@@ -26,6 +12,7 @@ import org.jetbrains.annotations.NotNull;
public class JavaProximityStatistician extends ProximityStatistician{
@Override
public StatisticsInfo serialize(@NotNull final PsiElement element, @NotNull final ProximityLocation location) {
if (element.getLanguage().getID().equals("Scala")) return null;
return element instanceof PsiMember ? JavaStatisticsManager.createInfo(null, (PsiMember)element) : null;
}
}