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
.cvsSupport2
.cvshandlers
;
18 import com
.intellij
.openapi
.vcs
.update
.FileGroup
;
19 import com
.intellij
.openapi
.vcs
.update
.UpdatedFiles
;
20 import com
.intellij
.CvsBundle
;
21 import org
.jetbrains
.annotations
.NonNls
;
23 public class CvsUpdatePolicy
{
24 @NonNls public static final String BINARY_MERGED_ID
= "BINARY_MERGED";
25 @NonNls public static final String UNKNOWN_TYPE_ID
= "UNKNOWN_TYPE";
26 @NonNls public static final String MODIFIED_REMOVED_FROM_SERVER_ID
= "MOD_REMOVED_FROM_SERVER";
27 @NonNls public static final String LOCALLY_REMOVED_MODIFIED_ON_SERVER_ID
= "LOCALLY_REMOVED_MODIFIED_ON_SERVER";
28 @NonNls public static final String CREATED_BY_SECOND_PARTY_ID
= "CREATED_BY_SECOND_PARTY";
30 private CvsUpdatePolicy() {
33 public static UpdatedFiles
createUpdatedFiles() {
34 UpdatedFiles result
= UpdatedFiles
.create();
41 public static void fillGroups(UpdatedFiles result
) {
42 result
.registerGroup(new FileGroup(CvsBundle
.message("update.status.unknown"), CvsBundle
.message("update.status.unknown"), false, CvsUpdatePolicy
.UNKNOWN_TYPE_ID
, false));
44 new FileGroup(CvsBundle
.message("update.status.locally.modified.removed.from.server"), CvsBundle
.message("update.status.locally.modified.removed.from.server"),false, CvsUpdatePolicy
.MODIFIED_REMOVED_FROM_SERVER_ID
, false));
46 new FileGroup(CvsBundle
.message("update.status.locally.removed.modified.on.server"), CvsBundle
.message("update.status.locally.removed.modified.on.server"), false, CvsUpdatePolicy
.LOCALLY_REMOVED_MODIFIED_ON_SERVER_ID
, false));
47 result
.registerGroup(new FileGroup(CvsBundle
.message("update.status.created.by.second.party"), CvsBundle
.message("update.status.created.by.second.party"), true, CvsUpdatePolicy
.CREATED_BY_SECOND_PARTY_ID
, false));
48 result
.registerGroup(new FileGroup(CvsBundle
.message("update.status.binary.file.has.to.be.merged"), CvsBundle
.message("update.status.binary.file.has.to.be.merged"), false, CvsUpdatePolicy
.BINARY_MERGED_ID
, false));