Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-03-05 16:39:11 +0000
committerMichael Valenta2004-03-05 16:39:11 +0000
commit8ebead423aa4d5c0e064cc75e60a4c59d0b0e569 (patch)
tree3c574c2119441cd472b091d5ee641d037e5e4008
parentc67c95d957bf06493f7eca78d6d12faaf0801dec (diff)
downloadeclipse.platform.team-8ebead423aa4d5c0e064cc75e60a4c59d0b0e569.tar.gz
eclipse.platform.team-8ebead423aa4d5c0e064cc75e60a4c59d0b0e569.tar.xz
eclipse.platform.team-8ebead423aa4d5c0e064cc75e60a4c59d0b0e569.zip
45912: CVS label decorations and outgoing icons should be activated by default
-rw-r--r--bundles/org.eclipse.team.cvs.ui/plugin.xml2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java14
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java1
3 files changed, 16 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.xml b/bundles/org.eclipse.team.cvs.ui/plugin.xml
index fb55d1d9f..9cd6676b2 100644
--- a/bundles/org.eclipse.team.cvs.ui/plugin.xml
+++ b/bundles/org.eclipse.team.cvs.ui/plugin.xml
@@ -844,7 +844,7 @@
objectClass="org.eclipse.core.resources.IResource"
adaptable="true"
label="%DecoratorStandard.name"
- state="true"
+ state="false"
lightweight= "true"
quadrant = "BOTTOM_RIGHT"
class="org.eclipse.team.internal.ccvs.ui.CVSLightweightDecorator"
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
index e9334f94d..7635e7a79 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
@@ -635,6 +635,7 @@ public class CVSUIPlugin extends AbstractUIPlugin {
store.setDefault(ICVSUIConstants.PREF_FOLDERTEXT_DECORATION, CVSDecoratorConfiguration.DEFAULT_FOLDERTEXTFORMAT);
store.setDefault(ICVSUIConstants.PREF_PROJECTTEXT_DECORATION, CVSDecoratorConfiguration.DEFAULT_PROJECTTEXTFORMAT);
+ store.setDefault(ICVSUIConstants.PREF_FIRST_STARTUP, true);
store.setDefault(ICVSUIConstants.PREF_ADDED_FLAG, CVSDecoratorConfiguration.DEFAULT_ADDED_FLAG);
store.setDefault(ICVSUIConstants.PREF_DIRTY_FLAG, CVSDecoratorConfiguration.DEFAULT_DIRTY_FLAG);
store.setDefault(ICVSUIConstants.PREF_SHOW_ADDED_DECORATION, true);
@@ -684,6 +685,19 @@ public class CVSUIPlugin extends AbstractUIPlugin {
console = new CVSOutputConsole();
ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[] {console});
+
+ IPreferenceStore store = getPreferenceStore();
+ if (store.getBoolean(ICVSUIConstants.PREF_FIRST_STARTUP)) {
+ // If we enable the decorator in the XML, the CVS plugin will be loaded
+ // on startup even if the user never uses CVS. Therefore, we enable the
+ // decorator on the first start of the CVS plugin since this indicates that
+ // the user has done something with CVS. Subsequent startups will load
+ // the CVS plugin unless the user disables the decorator. In this case,
+ // we will not reenable since we only enable auatomatically on the first startup.
+ PlatformUI.getWorkbench().getDecoratorManager().setEnabled(CVSLightweightDecorator.ID, true);
+ store.setValue(ICVSUIConstants.PREF_FIRST_STARTUP, false);
+ }
+
}
public static IWorkingSet getWorkingSet(IResource[] resources, String name) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java
index bf8b42192..496ad351c 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java
@@ -89,6 +89,7 @@ public interface ICVSUIConstants {
// decorator preferences
+ public final String PREF_FIRST_STARTUP = "pref_first_startup"; //$NON-NLS-1$
public final String PREF_FILETEXT_DECORATION = "pref_filetext_decoration"; //$NON-NLS-1$
public final String PREF_FOLDERTEXT_DECORATION = "pref_foldertext_decoration"; //$NON-NLS-1$
public final String PREF_PROJECTTEXT_DECORATION = "pref_projecttext_decoration"; //$NON-NLS-1$

Back to the top