mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[lvcs] extract local history isEnabled API (IJPL-161713)
GitOrigin-RevId: 18a6bbdf87ff7b1919fdd745870820c5fa4c1826
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d90f879649
commit
8b44f407ee
@@ -49,8 +49,10 @@ class LocalHistoryImpl(private val coroutineScope: CoroutineScope) : LocalHistor
|
||||
|
||||
private var daysToKeep = getInt(DAYS_TO_KEEP)
|
||||
|
||||
var isDisabled: Boolean = false
|
||||
private set
|
||||
override val isEnabled: Boolean
|
||||
get() = !isDisabled
|
||||
|
||||
private var isDisabled: Boolean = false
|
||||
|
||||
var facade: LocalHistoryFacade? = null
|
||||
private set
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
package com.intellij.history.integration.ui.actions;
|
||||
|
||||
import com.intellij.history.LocalHistory;
|
||||
import com.intellij.history.core.LocalHistoryFacade;
|
||||
import com.intellij.history.integration.IdeaGateway;
|
||||
import com.intellij.history.integration.LocalHistoryImpl;
|
||||
@@ -19,7 +20,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
public abstract class LocalHistoryAction extends AnAction implements DumbAware {
|
||||
@Override
|
||||
public void update(@NotNull AnActionEvent e) {
|
||||
if (LocalHistoryImpl.getInstanceImpl().isDisabled()) {
|
||||
if (!LocalHistory.getInstance().isEnabled()) {
|
||||
e.getPresentation().setEnabledAndVisible(false);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user