2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com
.intellij
.openapi
.vcs
.changes
.ui
;
18 import com
.intellij
.openapi
.util
.Pair
;
19 import com
.intellij
.openapi
.vcs
.VcsBundle
;
20 import com
.intellij
.openapi
.vcs
.changes
.Change
;
21 import com
.intellij
.openapi
.vcs
.changes
.RemoteRevisionsCache
;
22 import com
.intellij
.ui
.SimpleColoredComponent
;
23 import com
.intellij
.ui
.SimpleTextAttributes
;
24 import org
.jetbrains
.annotations
.Nullable
;
26 import java
.util
.List
;
28 public class RemoteStatusChangeNodeDecorator
implements ChangeNodeDecorator
{
29 protected final RemoteRevisionsCache myRemoteRevisionsCache
;
31 public RemoteStatusChangeNodeDecorator(final RemoteRevisionsCache remoteRevisionsCache
) {
32 myRemoteRevisionsCache
= remoteRevisionsCache
;
35 protected void reportState(final boolean state
) {
38 public void decorate(final Change change
, final SimpleColoredComponent component
, boolean isShowFlatten
) {
39 final boolean state
= myRemoteRevisionsCache
.isUpToDate(change
);
42 component
.append(" ");
43 component
.append(VcsBundle
.message("change.nodetitle.change.is.outdated"), SimpleTextAttributes
.ERROR_ATTRIBUTES
);
48 public List
<Pair
<String
, Stress
>> stressPartsOfFileName(Change change
, String parentPath
) {
52 public void preDecorate(Change change
, ChangesBrowserNodeRenderer renderer
, boolean showFlatten
) {