mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
Cleanup (warnings; formatting)
This commit is contained in:
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2015 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.xdebugger.evaluation;
|
||||
|
||||
import com.intellij.lang.Language;
|
||||
@@ -33,12 +19,10 @@ public abstract class XDebuggerEditorsProvider {
|
||||
@NotNull
|
||||
public abstract FileType getFileType();
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #createDocument(com.intellij.openapi.project.Project, com.intellij.xdebugger.XExpression,
|
||||
* com.intellij.xdebugger.XSourcePosition, com.intellij.xdebugger.evaluation.EvaluationMode)} instead
|
||||
*/
|
||||
/** @deprecated Use {@link #createDocument(Project, XExpression, XSourcePosition, EvaluationMode)} instead */
|
||||
@NotNull
|
||||
@Deprecated
|
||||
@SuppressWarnings("DeprecatedIsStillUsed")
|
||||
public Document createDocument(@NotNull Project project,
|
||||
@NotNull String text,
|
||||
@Nullable XSourcePosition sourcePosition,
|
||||
@@ -47,21 +31,18 @@ public abstract class XDebuggerEditorsProvider {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@SuppressWarnings("deprecation")
|
||||
public Document createDocument(@NotNull Project project,
|
||||
@NotNull XExpression expression,
|
||||
@Nullable XSourcePosition sourcePosition,
|
||||
@NotNull EvaluationMode mode) {
|
||||
//noinspection deprecation
|
||||
@NotNull XExpression expression,
|
||||
@Nullable XSourcePosition sourcePosition,
|
||||
@NotNull EvaluationMode mode) {
|
||||
return createDocument(project, expression.getExpression(), sourcePosition, mode);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Collection<Language> getSupportedLanguages(@NotNull Project project, @Nullable XSourcePosition sourcePosition) {
|
||||
FileType type = getFileType();
|
||||
if (type instanceof LanguageFileType) {
|
||||
return Collections.singleton(((LanguageFileType)type).getLanguage());
|
||||
}
|
||||
return Collections.emptyList();
|
||||
return type instanceof LanguageFileType ? Collections.singleton(((LanguageFileType)type).getLanguage()) : Collections.emptyList();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user