Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2004-09-23 14:14:44 +0000
committerJean Michel-Lemieux2004-09-23 14:14:44 +0000
commit4e339813ded295f8b4dd8fcf7954a91765e14798 (patch)
tree0942b69633d8f8455ccb55b1c80e0fcb6dad489c
parent088afbca07a5c3ac6b0cf9469d82c585e11020ce (diff)
downloadeclipse.platform.team-4e339813ded295f8b4dd8fcf7954a91765e14798.tar.gz
eclipse.platform.team-4e339813ded295f8b4dd8fcf7954a91765e14798.tar.xz
eclipse.platform.team-4e339813ded295f8b4dd8fcf7954a91765e14798.zip
Bug 74470 [Decorators] Edited decorator is broken
Bug 74566 [Decorators] Added file decoration concerns
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoration.java7
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java11
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java1
3 files changed, 13 insertions, 6 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoration.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoration.java
index 5d87cae3d..0e8caf800 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoration.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoration.java
@@ -248,9 +248,10 @@ public class CVSDecoration {
}
if (isAdded()) {
bindings.put(CVSDecoratorConfiguration.ADDED_FLAG, preferences.getString(ICVSUIConstants.PREF_ADDED_FLAG));
- }
- bindings.put(CVSDecoratorConfiguration.FILE_REVISION, getRevision());
- bindings.put(CVSDecoratorConfiguration.RESOURCE_TAG, getTag());
+ } else if(isHasRemote()){
+ bindings.put(CVSDecoratorConfiguration.FILE_REVISION, getRevision());
+ bindings.put(CVSDecoratorConfiguration.RESOURCE_TAG, getTag());
+ }
bindings.put(CVSDecoratorConfiguration.RESOURCE_NAME, getResourceName());
bindings.put(CVSDecoratorConfiguration.FILE_KEYWORD, getKeywordSubstitution());
if (resourceType != IResource.FILE && location != null) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java
index b57052f4d..bbaf58025 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java
@@ -115,10 +115,10 @@ public class CVSDecoratorPreferencesPage extends PreferencePage implements IWork
} else if(element.equals("Project")) { //$NON-NLS-1$
decoration.setResourceType(IResource.PROJECT);
decoration.setHasRemote(true);
+ decoration.setTag("v1_0"); //$NON-NLS-1$
} else if(element.equals("Folder")) { //$NON-NLS-1$
decoration.setHasRemote(true);
decoration.setResourceType(IResource.FOLDER);
- decoration.setDirty(true);
decoration.setHasRemote(true);
} else if(element.equals("dirty.cpp")){ //$NON-NLS-1$
decoration.setResourceType(IResource.FILE);
@@ -137,6 +137,11 @@ public class CVSDecoratorPreferencesPage extends PreferencePage implements IWork
decoration.setResourceType(IResource.FILE);
decoration.setDirty(false);
decoration.setHasRemote(true);
+ } else if(element.equals("archive.zip")){ //$NON-NLS-1$
+ decoration.setResourceType(IResource.FILE);
+ decoration.setDirty(false);
+ decoration.setHasRemote(true);
+ decoration.setKeywordSubstitution(Command.KSUBST_BINARY.getShortDisplayText());
}
decoration.compute();
return decoration;
@@ -188,6 +193,7 @@ public class CVSDecoratorPreferencesPage extends PreferencePage implements IWork
"added.java", //$NON-NLS-1$
"todo.txt", //$NON-NLS-1$
"bugs.txt", //$NON-NLS-1$
+ "archive.zip", //$NON-NLS-1$
"Folder" //$NON-NLS-1$
};
} else {
@@ -376,7 +382,7 @@ public class CVSDecoratorPreferencesPage extends PreferencePage implements IWork
previewTree = new TreeViewer(previewGroup);
data = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
data.horizontalSpan = 2;
- data.heightHint = 100;
+ data.heightHint = 125;
previewTree.getTree().setLayoutData(data);
previewTree.setContentProvider(previewContentProvider);
previewTree.setLabelProvider(new PreviewLabelProvider());
@@ -580,7 +586,6 @@ public class CVSDecoratorPreferencesPage extends PreferencePage implements IWork
CVSDecoration decoration =
new CVSDecoration(name, prefs, fileTextFormat.getText(), folderTextFormat.getText(), projectTextFormat.getText());
- decoration.setTag("v1_0"); //$NON-NLS-1$
decoration.setKeywordSubstitution(Command.KSUBST_TEXT.getShortDisplayText()); //$NON-NLS-1$
decoration.setRevision("1.45"); //$NON-NLS-1$
try {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java
index aaa1f49f0..ec06a3ee4 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java
@@ -238,6 +238,7 @@ public class CVSLightweightDecorator extends LabelProvider implements ILightweig
if (fileInfo != null) {
cvsDecoration.setAdded(fileInfo.isAdded());
cvsDecoration.setRevision(fileInfo.getRevision());
+ cvsDecoration.setReadOnly(file.isReadOnly());
ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile) resource);
cvsDecoration.setNeedsMerge(fileInfo.isNeedsMerge(file.getTimeStamp()));
option = fileInfo.getKeywordMode();

Back to the top