diff --git a/java/compiler/openapi/src/com/intellij/openapi/compiler/options/ExcludedEntriesConfigurable.java b/java/compiler/openapi/src/com/intellij/openapi/compiler/options/ExcludedEntriesConfigurable.java index d58b9b3a540f..2d94b3cb1807 100644 --- a/java/compiler/openapi/src/com/intellij/openapi/compiler/options/ExcludedEntriesConfigurable.java +++ b/java/compiler/openapi/src/com/intellij/openapi/compiler/options/ExcludedEntriesConfigurable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * 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. @@ -251,7 +251,7 @@ public class ExcludedEntriesConfigurable implements UnnamedConfigurable { } if(col == 1) { if(!description.isFile()) { - return description.isIncludeSubdirectories() ? Boolean.TRUE : Boolean.FALSE; + return description.isIncludeSubdirectories(); } else { return null; diff --git a/java/java-impl/src/com/intellij/application/options/ImportLayoutPanel.java b/java/java-impl/src/com/intellij/application/options/ImportLayoutPanel.java index 5aa88cd33015..9e343fbbca3e 100644 --- a/java/java-impl/src/com/intellij/application/options/ImportLayoutPanel.java +++ b/java/java-impl/src/com/intellij/application/options/ImportLayoutPanel.java @@ -242,7 +242,7 @@ public abstract class ImportLayoutPanel extends JPanel { return entry.getPackageName(); } if (col == 2) { - return entry.isWithSubpackages() ? Boolean.TRUE : Boolean.FALSE; + return entry.isWithSubpackages(); } throw new IllegalArgumentException(String.valueOf(col)); } diff --git a/java/java-impl/src/com/intellij/refactoring/encapsulateFields/EncapsulateFieldsDialog.java b/java/java-impl/src/com/intellij/refactoring/encapsulateFields/EncapsulateFieldsDialog.java index 6356a17b956c..0cd97b593d90 100644 --- a/java/java-impl/src/com/intellij/refactoring/encapsulateFields/EncapsulateFieldsDialog.java +++ b/java/java-impl/src/com/intellij/refactoring/encapsulateFields/EncapsulateFieldsDialog.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * 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. @@ -532,7 +532,7 @@ public class EncapsulateFieldsDialog extends RefactoringDialog implements Encaps public Object getValueAt(int rowIndex, int columnIndex) { switch (columnIndex) { case CHECKED_COLUMN: - return myCheckedMarks[rowIndex] ? Boolean.TRUE : Boolean.FALSE; + return myCheckedMarks[rowIndex]; case FIELD_COLUMN: return myFieldNames[rowIndex]; case GETTER_COLUMN: diff --git a/platform/lang-impl/src/com/intellij/application/options/codeStyle/OptionTableWithPreviewPanel.java b/platform/lang-impl/src/com/intellij/application/options/codeStyle/OptionTableWithPreviewPanel.java index 10fd6fc2d65c..51e95ecb3b1c 100644 --- a/platform/lang-impl/src/com/intellij/application/options/codeStyle/OptionTableWithPreviewPanel.java +++ b/platform/lang-impl/src/com/intellij/application/options/codeStyle/OptionTableWithPreviewPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * 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. @@ -414,7 +414,7 @@ public abstract class OptionTableWithPreviewPanel extends CustomizableLanguageCo @Override public Object getValue(CodeStyleSettings settings) { try { - return field.getBoolean(getSettings(settings)) ? Boolean.TRUE : Boolean.FALSE; + return field.getBoolean(getSettings(settings)); } catch (IllegalAccessException ignore) { return null; @@ -814,7 +814,7 @@ public abstract class OptionTableWithPreviewPanel extends CustomizableLanguageCo return myOptionsEditor.getEditorValue(); } else if (myCurrentEditor == myBooleanEditor) { - return myBooleanEditor.isSelected() ? Boolean.TRUE : Boolean.FALSE; + return myBooleanEditor.isSelected(); } else if (myCurrentEditor == myIntOptionsEditor) { return myIntOptionsEditor.getPresentableValue(); diff --git a/platform/lang-impl/src/com/intellij/application/options/codeStyle/OptionTreeWithPreviewPanel.java b/platform/lang-impl/src/com/intellij/application/options/codeStyle/OptionTreeWithPreviewPanel.java index a03388a6565e..5585ff8ee3a2 100644 --- a/platform/lang-impl/src/com/intellij/application/options/codeStyle/OptionTreeWithPreviewPanel.java +++ b/platform/lang-impl/src/com/intellij/application/options/codeStyle/OptionTreeWithPreviewPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2010 JetBrains s.r.o. + * 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. @@ -331,7 +331,7 @@ public abstract class OptionTreeWithPreviewPanel extends CustomizableLanguageCod private static void applyToggleNode(MyToggleTreeNode childNode, final CodeStyleSettings settings) { BooleanOptionKey key = (BooleanOptionKey)childNode.getKey(); - key.setValue(settings, childNode.isSelected() ? Boolean.TRUE : Boolean.FALSE); + key.setValue(settings, childNode.isSelected()); } @Override diff --git a/platform/lang-impl/src/com/intellij/refactoring/extractMethod/AbstractParameterTablePanel.java b/platform/lang-impl/src/com/intellij/refactoring/extractMethod/AbstractParameterTablePanel.java index 6209025f82b5..c62a9cb3dc26 100644 --- a/platform/lang-impl/src/com/intellij/refactoring/extractMethod/AbstractParameterTablePanel.java +++ b/platform/lang-impl/src/com/intellij/refactoring/extractMethod/AbstractParameterTablePanel.java @@ -152,7 +152,7 @@ public abstract class AbstractParameterTablePanel extends JPanel { public Object getValueAt(int rowIndex, int columnIndex) { switch (columnIndex) { case CHECKMARK_COLUMN: { - return myVariableData[rowIndex].passAsParameter ? Boolean.TRUE : Boolean.FALSE; + return myVariableData[rowIndex].passAsParameter; } case PARAMETER_NAME_COLUMN: { return myVariableData[rowIndex].name; diff --git a/platform/platform-api/src/com/intellij/openapi/actionSystem/ToggleAction.java b/platform/platform-api/src/com/intellij/openapi/actionSystem/ToggleAction.java index ac53e4038b64..9de7cd0be6f9 100644 --- a/platform/platform-api/src/com/intellij/openapi/actionSystem/ToggleAction.java +++ b/platform/platform-api/src/com/intellij/openapi/actionSystem/ToggleAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * 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. @@ -41,9 +41,8 @@ public abstract class ToggleAction extends AnAction implements Toggleable { public final void actionPerformed(@NotNull final AnActionEvent e){ final boolean state = !isSelected(e); setSelected(e, state); - final Boolean selected = state ? Boolean.TRUE : Boolean.FALSE; final Presentation presentation = e.getPresentation(); - presentation.putClientProperty(SELECTED_PROPERTY, selected); + presentation.putClientProperty(SELECTED_PROPERTY, state); } /** diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/CommittedChangesTreeBrowser.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/CommittedChangesTreeBrowser.java index 2d9f451e2fb2..4f933bea51f7 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/CommittedChangesTreeBrowser.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/CommittedChangesTreeBrowser.java @@ -1,3 +1,18 @@ +/* + * 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. + */ package com.intellij.openapi.vcs.changes.committed; import com.intellij.ide.CopyProvider; @@ -376,7 +391,7 @@ public class CommittedChangesTreeBrowser extends JPanel implements TypeSafeDataP sink.put(VcsDataKeys.CHANGES, changes.toArray(new Change[changes.size()])); } else if (key.equals(VcsDataKeys.HAVE_SELECTED_CHANGES)) { final int count = myChangesTree.getSelectionCount(); - sink.put(VcsDataKeys.HAVE_SELECTED_CHANGES, count > 0 ? Boolean.TRUE : Boolean.FALSE); + sink.put(VcsDataKeys.HAVE_SELECTED_CHANGES, count > 0); } else if (key.equals(VcsDataKeys.CHANGES_WITH_MOVED_CHILDREN)) { final Collection changes = collectChanges(getSelectedChangeLists(), true);