blob: 88b2b449ac6928b858d420e6b8e7b46c727f7876 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
package com.intellij.vcs.log.impl;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.vcs.log.VcsLogSettings;
import org.jetbrains.annotations.Nullable;
/**
* @author Kirill Likhodedov
*/
@State(name = "Vcs.Log.Settings", storages = {@Storage(file = StoragePathMacros.WORKSPACE_FILE)})
public class VcsLogSettingsImpl implements VcsLogSettings, PersistentStateComponent<VcsLogSettingsImpl.State> {
private State myState = new State();
public static class State {
public int RECENT_COMMITS_COUNT = 1000;
public boolean SHOW_BRANCHES_PANEL = false;
}
@Nullable
@Override
public State getState() {
return myState;
}
@Override
public void loadState(State state) {
myState = state;
}
@Override
public int getRecentCommitsCount() {
return myState.RECENT_COMMITS_COUNT;
}
@Override
public boolean isShowBranchesPanel() {
return myState.SHOW_BRANCHES_PANEL;
}
@Override
public void setShowBranchesPanel(boolean show) {
myState.SHOW_BRANCHES_PANEL = show;
}
public void setRecentCommitsBlockSize(int commitCount) {
myState.RECENT_COMMITS_COUNT = commitCount;
}
}
|