mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
CreateTestDialog: warnings fixed
This commit is contained in:
@@ -1,22 +1,7 @@
|
||||
/*
|
||||
* 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-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.
|
||||
package com.intellij.testIntegration.createTest;
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
import com.intellij.application.options.CodeStyle;
|
||||
import com.intellij.codeInsight.CodeInsightBundle;
|
||||
import com.intellij.codeInsight.daemon.impl.quickfix.OrderEntryFix;
|
||||
import com.intellij.icons.AllIcons;
|
||||
@@ -94,7 +79,7 @@ public class CreateTestDialog extends DialogWrapper {
|
||||
protected PsiDirectory myTargetDirectory;
|
||||
private TestFramework mySelectedFramework;
|
||||
|
||||
private final ComboBox myLibrariesCombo = new ComboBox(new DefaultComboBoxModel());
|
||||
private final ComboBox<TestFramework> myLibrariesCombo = new ComboBox<>(new DefaultComboBoxModel<>());
|
||||
private EditorTextField myTargetClassNameField;
|
||||
private ReferenceEditorComboWithBrowseButton mySuperClassField;
|
||||
private ReferenceEditorComboWithBrowseButton myTargetPackageField;
|
||||
@@ -375,7 +360,7 @@ public class CreateTestDialog extends DialogWrapper {
|
||||
final String defaultLibrary = getDefaultLibraryName();
|
||||
TestFramework defaultDescriptor = null;
|
||||
|
||||
final DefaultComboBoxModel model = (DefaultComboBoxModel)myLibrariesCombo.getModel();
|
||||
final DefaultComboBoxModel<TestFramework> model = (DefaultComboBoxModel<TestFramework>)myLibrariesCombo.getModel();
|
||||
|
||||
final List<TestFramework> descriptors = new SmartList<>(Extensions.getExtensions(TestFramework.EXTENSION_NAME));
|
||||
descriptors.sort((d1, d2) -> Comparing.compare(d1.getName(), d2.getName()));
|
||||
@@ -564,7 +549,7 @@ public class CreateTestDialog extends DialogWrapper {
|
||||
if (selectedRoot == null) return null;
|
||||
|
||||
return new WriteCommandAction<PsiDirectory>(myProject, CodeInsightBundle.message("create.directory.command")) {
|
||||
protected void run(@NotNull Result<PsiDirectory> result) throws Throwable {
|
||||
protected void run(@NotNull Result<PsiDirectory> result) {
|
||||
result.setResult(RefactoringUtil.createPackageDirectoryInSourceRoot(targetPackage, selectedRoot));
|
||||
}
|
||||
}.execute().getResultObject();
|
||||
|
||||
Reference in New Issue
Block a user