diff --git a/platform/vcs-api/src/com/intellij/vcsUtil/VcsUtil.java b/platform/vcs-api/src/com/intellij/vcsUtil/VcsUtil.java index 2c01e61e38c1..af09e25b54f1 100644 --- a/platform/vcs-api/src/com/intellij/vcsUtil/VcsUtil.java +++ b/platform/vcs-api/src/com/intellij/vcsUtil/VcsUtil.java @@ -597,8 +597,12 @@ public class VcsUtil { //} public static boolean isAspectAvailableByDefault(String id) { + return isAspectAvailableByDefault(id, true); + } + + public static boolean isAspectAvailableByDefault(@Nullable String id, boolean defaultValue) { if (id == null) return false; - return PropertiesComponent.getInstance().getBoolean(ANNO_ASPECT + id, true); + return PropertiesComponent.getInstance().getBoolean(ANNO_ASPECT + id, defaultValue); } public static void setAspectAvailability(String aspectID, boolean showByDefault) { diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/AnnotationFieldGutter.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/AnnotationFieldGutter.java index 9cec83c21c6a..cd04ed323d67 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/AnnotationFieldGutter.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/AnnotationFieldGutter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2010 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -156,7 +156,8 @@ public class AnnotationFieldGutter implements ActiveAnnotationGutter { } public boolean isAvailable() { - return VcsUtil.isAspectAvailableByDefault(getID()); + if (myAspect == null) return false; + return VcsUtil.isAspectAvailableByDefault(getID(), myAspect.isShowByDefault()); } @Nullable diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/HistoryIdColumn.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/HistoryIdColumn.java index 69ae0842bd53..8fe73dc6f0bd 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/HistoryIdColumn.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/HistoryIdColumn.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2010 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -21,6 +21,7 @@ import com.intellij.openapi.vcs.VcsBundle; import com.intellij.openapi.vcs.annotate.FileAnnotation; import com.intellij.openapi.vcs.annotate.TextAnnotationPresentation; import com.intellij.openapi.vcs.history.VcsRevisionNumber; +import com.intellij.vcsUtil.VcsUtil; import java.awt.*; import java.util.Map; @@ -57,6 +58,11 @@ class HistoryIdColumn extends AnnotationFieldGutter { return ""; } + @Override + public boolean isAvailable() { + return VcsUtil.isAspectAvailableByDefault(getID(), false); + } + @Override public String getID() { return VcsBundle.message("annotation.commit.number");