Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-10-21 16:18:03 -0400
committerMichael Valenta2004-10-21 16:18:03 -0400
commitddb2fce84287db32e3995ad373640684a599b29f (patch)
tree0376888c4942500023124ee9d2663c0bf1b928a0
parent23fb040f676a7f7a05fccbd49df11e9413929316 (diff)
downloadeclipse.platform.team-branch_20041020_LinkErrorsToConsole.tar.gz
eclipse.platform.team-branch_20041020_LinkErrorsToConsole.tar.xz
eclipse.platform.team-branch_20041020_LinkErrorsToConsole.zip
Added job properties to CVSOperationsbranch_20041020_LinkErrorsToConsole
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java22
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java26
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutOperation.java16
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java15
4 files changed, 73 insertions, 6 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java
index 7c963d2d5..90462104f 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java
@@ -106,6 +106,7 @@ public class CVSOutputConsole extends MessageConsole implements IConsoleListener
consoleManager = ConsolePlugin.getDefault().getConsoleManager();
CVSProviderPlugin.getPlugin().setConsoleListener(CVSOutputConsole.this);
CVSUIPlugin.getPlugin().getPreferenceStore().addPropertyChangeListener(CVSOutputConsole.this);
+ setAutoScroll(true);
}
/* (non-Javadoc)
@@ -266,12 +267,7 @@ public class CVSOutputConsole extends MessageConsole implements IConsoleListener
}
private void showConsole() {
- if(showOnMessage) {
- if(!visible)
- CVSConsoleFactory.showConsole();
- else
- consoleManager.showConsoleView(this);
- }
+ show(false);
}
/* (non-Javadoc)
@@ -459,4 +455,18 @@ public class CVSOutputConsole extends MessageConsole implements IConsoleListener
RGB rgb = PreferenceConverter.getColor(CVSUIPlugin.getPlugin().getPreferenceStore(), preference);
return new Color(display, rgb);
}
+
+ /**
+ * Show the console.
+ * @param showNoMatterWhat ignore preferences if <code>true</code>
+ */
+ public void show(boolean showNoMatterWhat) {
+ if(showNoMatterWhat || showOnMessage) {
+ if(!visible)
+ CVSConsoleFactory.showConsole();
+ else
+ consoleManager.showConsoleView(this);
+ }
+
+ }
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java
index 4241f9a55..4d52eb6a9 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java
@@ -16,6 +16,8 @@ import java.net.URL;
import java.util.*;
import org.eclipse.core.runtime.*;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Shell;
@@ -288,4 +290,28 @@ public abstract class CVSOperation extends TeamOperation {
// Put CVS jobs in the background by default.
return true;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.TeamOperation#isSameFamilyAs(org.eclipse.team.ui.TeamOperation)
+ */
+ protected boolean isSameFamilyAs(TeamOperation operation) {
+ // Trat all CVS operations as a single family
+ return operation instanceof CVSOperation;
+ }
+
+ /*
+ * Action to show the console that can be used by subclasses
+ * that wish to link the progress service to the console
+ */
+ protected IAction getShowConsoleAction() {
+ // Show the console as the goto action
+ return new Action("Show CVS Console") {
+ public void run() {
+ CVSUIPlugin.getPlugin().getConsole().show(true);
+ }
+ public String getToolTipText() {
+ return "Show CVS Console";
+ }
+ };
+ }
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutOperation.java
index 06bb85ec8..761169a42 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutOperation.java
@@ -12,6 +12,7 @@ package org.eclipse.team.internal.ccvs.ui.operations;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.action.IAction;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
import org.eclipse.team.internal.ccvs.ui.Policy;
@@ -67,4 +68,19 @@ public abstract class CheckoutOperation extends RemoteOperation {
public boolean canRunAsJob() {
return true;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.TeamOperation#isKeepOneProgressServiceEntry()
+ */
+ public boolean isKeepOneProgressServiceEntry() {
+ // Keep the last repository provider operation in the progress service
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.TeamOperation#getGotoAction()
+ */
+ protected IAction getGotoAction() {
+ return getShowConsoleAction();
+ }
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java
index a94e55cee..cc2e0bf5a 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java
@@ -15,6 +15,7 @@ import java.util.*;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.*;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.jface.action.IAction;
import org.eclipse.team.core.RepositoryProvider;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.core.*;
@@ -193,4 +194,18 @@ public abstract class RepositoryProviderOperation extends CVSOperation {
}
}
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.TeamOperation#isKeepOneProgressServiceEntry()
+ */
+ public boolean isKeepOneProgressServiceEntry() {
+ // Keep the last repository provider operation in the progress service
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.TeamOperation#getGotoAction()
+ */
+ protected IAction getGotoAction() {
+ return getShowConsoleAction();
+ }
}

Back to the top