mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
remove unused return value (was always null)
GitOrigin-RevId: 5e593775263b96e3113ea4cfb3df8e541ea82700
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ecbea7d7fb
commit
9d50130bbf
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2010 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-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.util.xml.actions;
|
||||
|
||||
import com.intellij.ide.util.ClassFilter;
|
||||
@@ -50,7 +36,7 @@ public abstract class CreateClassMappingAction<T extends DomElement> extends Cre
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DomElement createElement(final T context, final Editor editor, PsiFile file, final Project project) {
|
||||
protected void createElement(final T context, final Editor editor, PsiFile file, final Project project) {
|
||||
PsiClass selectedClass;
|
||||
if (!ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
PsiClass baseClass = getBaseClass(context, project, myBaseClass);
|
||||
@@ -67,13 +53,12 @@ public abstract class CreateClassMappingAction<T extends DomElement> extends Cre
|
||||
else {
|
||||
selectedClass = getBaseClass(context, project, myBaseClass == null ? CommonClassNames.JAVA_LANG_OBJECT : myBaseClass);
|
||||
}
|
||||
if (selectedClass == null) return null;
|
||||
if (selectedClass == null) return;
|
||||
|
||||
return createElement(context, editor, file, project, selectedClass);
|
||||
createElement(context, editor, file, project, selectedClass);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected DomElement createElement(final T context,
|
||||
protected void createElement(final T context,
|
||||
final Editor editor,
|
||||
final PsiFile file,
|
||||
final Project project,
|
||||
@@ -81,7 +66,6 @@ public abstract class CreateClassMappingAction<T extends DomElement> extends Cre
|
||||
final Map<String, String> map = new HashMap<>();
|
||||
map.put("CLASS_NAME", selectedClass.getQualifiedName());
|
||||
WriteCommandAction.writeCommandAction(project, file).run(() -> DomTemplateRunner.getInstance(project).runTemplate(createElement(context), myTemplate, editor, map));
|
||||
return null;
|
||||
}
|
||||
|
||||
protected @NlsContexts.DialogTitle String getChooserTitle() {
|
||||
|
||||
+3
-18
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2010 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-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.util.xml.ui.actions.generate;
|
||||
|
||||
import com.intellij.codeInsight.actions.SimpleCodeInsightAction;
|
||||
@@ -42,11 +28,10 @@ public abstract class CreateDomElementAction<T extends DomElement> extends Simpl
|
||||
|
||||
@Override
|
||||
public void invoke(@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) {
|
||||
DomElement element = createElement(getContextElement(editor), editor, file, project);
|
||||
createElement(getContextElement(editor), editor, file, project);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected abstract DomElement createElement(T context, Editor editor, PsiFile file, Project project);
|
||||
protected abstract void createElement(T context, Editor editor, PsiFile file, Project project);
|
||||
|
||||
@Override
|
||||
protected boolean isValidForFile(@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) {
|
||||
|
||||
Reference in New Issue
Block a user