VCS: file changed remotely hint
[fedora-idea.git] / vcs-impl / src / com / intellij / openapi / vcs / changes / ui / ChangeListRemoteState.java
blob38cf1b979a2af56c785dc4f6e2021c33e37a7621
1 package com.intellij.openapi.vcs.changes.ui;
3 public class ChangeListRemoteState {
4 // true -> ok
5 private final boolean[] myChangeStates;
7 public ChangeListRemoteState(final int size) {
8 myChangeStates = new boolean[size];
9 for (int i = 0; i < myChangeStates.length; i++) {
10 myChangeStates[i] = true;
14 public void report(final int idx, final boolean state) {
15 myChangeStates[idx] = state;
18 public boolean getState() {
19 boolean result = true;
20 for (boolean state : myChangeStates) {
21 result &= state;
23 return result;
26 public static class Reporter {
27 private final int myIdx;
28 private final ChangeListRemoteState myState;
30 public Reporter(int idx, ChangeListRemoteState state) {
31 myIdx = idx;
32 myState = state;
35 public void report(final boolean state) {
36 myState.report(myIdx, state);