mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
disable history id and revision annotations columns by default
(cherry picked from commit 53862d3)
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user