From 85431d6d72b68f0eda3e2cbd0792f7eb64925695 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Thu, 31 Jan 2019 13:10:46 +0100 Subject: [PATCH] cleanup --- .../intellij/compiler/impl/CompileDriver.java | 19 ++++++++----------- .../configurable/VcsManagerConfigurable.java | 19 +++---------------- 2 files changed, 11 insertions(+), 27 deletions(-) diff --git a/java/compiler/impl/src/com/intellij/compiler/impl/CompileDriver.java b/java/compiler/impl/src/com/intellij/compiler/impl/CompileDriver.java index 788fe4851e45..a56be2b9e76a 100644 --- a/java/compiler/impl/src/com/intellij/compiler/impl/CompileDriver.java +++ b/java/compiler/impl/src/com/intellij/compiler/impl/CompileDriver.java @@ -1,4 +1,4 @@ -// 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. +// 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.compiler.impl; import com.intellij.CommonBundle; @@ -73,15 +73,12 @@ public class CompileDriver { private final Map myModuleOutputPaths = new HashMap<>(); private final Map myModuleTestOutputPaths = new HashMap<>(); - @SuppressWarnings("deprecation") private CompilerFilter myCompilerFilter = CompilerFilter.ALL; - public CompileDriver(Project project) { myProject = project; } - @SuppressWarnings("deprecation") - public void setCompilerFilter(CompilerFilter compilerFilter) { - myCompilerFilter = compilerFilter == null? CompilerFilter.ALL : compilerFilter; + @SuppressWarnings({"deprecation", "unused"}) + public void setCompilerFilter(@SuppressWarnings("unused") CompilerFilter compilerFilter) { } public void rebuild(CompileStatusNotification callback) { @@ -205,8 +202,7 @@ public class CompileDriver { } @Nullable - private TaskFuture compileInExternalProcess(@NotNull final CompileContextImpl compileContext, final boolean onlyCheckUpToDate) - throws Exception { + private TaskFuture compileInExternalProcess(@NotNull final CompileContextImpl compileContext, final boolean onlyCheckUpToDate) { final CompileScope scope = compileContext.getCompileScope(); final Collection paths = CompileScopeUtil.fetchFiles(compileContext); List scopes = getBuildScopes(compileContext, scope, paths); @@ -776,9 +772,10 @@ public class CompileDriver { case ERROR: case INTERNAL_BUILDER_ERROR: return CompilerMessageCategory.ERROR; case WARNING: return CompilerMessageCategory.WARNING; - case INFO: return CompilerMessageCategory.INFORMATION; - case JPS_INFO: return CompilerMessageCategory.INFORMATION; - case OTHER: return CompilerMessageCategory.INFORMATION; + case INFO: + case JPS_INFO: + case OTHER: + return CompilerMessageCategory.INFORMATION; default: return defaultCategory; } } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/VcsManagerConfigurable.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/VcsManagerConfigurable.java index 80b2c8ac2b77..74abc97c4a2e 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/VcsManagerConfigurable.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/VcsManagerConfigurable.java @@ -1,18 +1,4 @@ -/* - * 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-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.openapi.vcs.configurable; import com.intellij.application.options.colors.fileStatus.FileStatusColorsConfigurable; @@ -122,7 +108,7 @@ public class VcsManagerConfigurable extends SearchableConfigurable.Parent.Abstra result.add(new ChangelistConflictConfigurable(ChangeListManagerImpl.getInstanceImpl(myProject))); } result.add(new CommitDialogConfigurable(myProject)); - result.add(new ShelfProjectConfigurable(myProject)); + result.add(new ShelfProjectConfigurable(myProject)); for (VcsConfigurableProvider provider : VcsConfigurableProvider.EP_NAME.getExtensions()) { addIfNotNull(result, provider.getConfigurable(myProject)); } @@ -157,6 +143,7 @@ public class VcsManagerConfigurable extends SearchableConfigurable.Parent.Abstra VcsConfigurableEP(@NotNull Project project, @NotNull VcsDescriptor descriptor) { super(project); + myDescriptor = descriptor; displayName = descriptor.getDisplayName(); id = getVcsConfigurableId(descriptor.getDisplayName());