Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2015-09-17 10:30:19 +0000
committerMatthias Sohn2015-09-17 13:28:08 +0000
commite686eb1d45e70f358b6673534cb70348674c9614 (patch)
tree6f96a1b65703214e674351915adce6ec1aeba7f0 /org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test
parent6d548e3038a6f8f94943d3cc8870b78e0fb20544 (diff)
downloadegit-e686eb1d45e70f358b6673534cb70348674c9614.tar.gz
egit-e686eb1d45e70f358b6673534cb70348674c9614.tar.xz
egit-e686eb1d45e70f358b6673534cb70348674c9614.zip
Add missing @Override annotations to all EGit bundles
Bug: 477689 Change-Id: I490e6558db5133a60caf00af2b996feae0e2e832 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test')
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/ContextMenuHelper.java6
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/Eclipse.java2
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/SWTBotTreeColumn.java2
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java23
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/commit/CommitEditorTest.java2
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/commit/RepositoryCommitMatcher.java1
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java4
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/BranchAndResetActionTest.java5
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CreatePatchActionTest.java1
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/trace/TraceConfigurationDialogTest.java1
10 files changed, 47 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/ContextMenuHelper.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/ContextMenuHelper.java
index 0f12bdc1b..fa89ce386 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/ContextMenuHelper.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/ContextMenuHelper.java
@@ -117,6 +117,7 @@ public class ContextMenuHelper {
// show
final MenuItem menuItem = UIThreadRunnable
.syncExec(new WidgetResult<MenuItem>() {
+ @Override
public MenuItem run() {
MenuItem theItem = getMenuItem(bot, texts);
if (theItem != null && !theItem.isEnabled())
@@ -135,6 +136,7 @@ public class ContextMenuHelper {
// hide
UIThreadRunnable.syncExec(new VoidResult() {
+ @Override
public void run() {
if (menuItem.isDisposed())
return; // menu already gone
@@ -147,6 +149,7 @@ public class ContextMenuHelper {
final String... texts) {
final MenuItem menuItem = UIThreadRunnable
.syncExec(new WidgetResult<MenuItem>() {
+ @Override
public MenuItem run() {
return getMenuItem(bot, texts);
}
@@ -203,6 +206,7 @@ public class ContextMenuHelper {
// show
final MenuItem menuItem = UIThreadRunnable
.syncExec(new WidgetResult<MenuItem>() {
+ @Override
public MenuItem run() {
MenuItem theItem = getMenuItem(bot, texts);
if (theItem != null && theItem.isEnabled())
@@ -215,6 +219,7 @@ public class ContextMenuHelper {
+ Arrays.asList(texts));
// hide
UIThreadRunnable.syncExec(new VoidResult() {
+ @Override
public void run() {
if (menuItem.isDisposed())
return; // menu already gone
@@ -244,6 +249,7 @@ public class ContextMenuHelper {
event.type = SWT.Selection;
VoidResult toExecute = new VoidResult() {
+ @Override
public void run() {
menuItem.notifyListeners(SWT.Selection, event);
}
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/Eclipse.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/Eclipse.java
index 669a33041..e82fb132f 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/Eclipse.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/Eclipse.java
@@ -48,6 +48,7 @@ public class Eclipse {
@SuppressWarnings("boxing")
public static boolean isEclipseShell(final SWTBotShell shell) {
return UIThreadRunnable.syncExec(new BoolResult() {
+ @Override
public Boolean run() {
return PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell() == shell.widget;
@@ -84,6 +85,7 @@ public class Eclipse {
// bot.menu("Window").menu("Preferences").click();
// Launch preferences programmatically instead
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow();
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/SWTBotTreeColumn.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/SWTBotTreeColumn.java
index eb2e43402..f304ccddf 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/SWTBotTreeColumn.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/SWTBotTreeColumn.java
@@ -29,6 +29,7 @@ public class SWTBotTreeColumn extends AbstractSWTBot<TreeColumn> {
public static SWTBotTreeColumn getColumn(final Tree tree, final int index) {
TreeColumn treeColumn = UIThreadRunnable.syncExec(tree.getDisplay(),
new WidgetResult<TreeColumn>() {
+ @Override
public TreeColumn run() {
return tree.getColumn(index);
}
@@ -39,6 +40,7 @@ public class SWTBotTreeColumn extends AbstractSWTBot<TreeColumn> {
public SWTBotTreeColumn(final TreeColumn w) throws WidgetNotFoundException {
super(w);
parent = UIThreadRunnable.syncExec(new WidgetResult<Tree>() {
+ @Override
public Tree run() {
return w.getParent();
}
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java
index 2b48f13bc..8cb7314a6 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java
@@ -258,6 +258,7 @@ public class TestUtil {
} else {
// synchronously refresh UI
PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+ @Override
public void run() {
processUIEvents();
}
@@ -301,6 +302,7 @@ public class TestUtil {
throws TimeoutException {
bot.waitUntil(new ICondition() {
+ @Override
public boolean test() throws Exception {
for (SWTBotTreeItem item : tree.getAllItems())
if (item.getText().contains(text))
@@ -308,10 +310,12 @@ public class TestUtil {
return false;
}
+ @Override
public void init(SWTBot bot2) {
// empty
}
+ @Override
public String getFailureMessage() {
return null;
}
@@ -331,6 +335,7 @@ public class TestUtil {
throws TimeoutException {
bot.waitUntil(new ICondition() {
+ @Override
public boolean test() throws Exception {
for (SWTBotTreeItem item : treeItem.getItems())
if (item.getText().contains(text))
@@ -338,10 +343,12 @@ public class TestUtil {
return false;
}
+ @Override
public void init(SWTBot bot2) {
// empty
}
+ @Override
public String getFailureMessage() {
return null;
}
@@ -362,14 +369,17 @@ public class TestUtil {
throws TimeoutException {
bot.waitUntil(new ICondition() {
+ @Override
public boolean test() throws Exception {
return tree.selection().get(0, 0).equals(text);
}
+ @Override
public void init(SWTBot bot2) {
// empty
}
+ @Override
public String getFailureMessage() {
return null;
}
@@ -388,16 +398,19 @@ public class TestUtil {
final String text, long timeout) throws TimeoutException {
bot.waitUntil(new ICondition() {
+ @Override
public boolean test() throws Exception {
if (table.indexOf(text)<0)
return false;
return true;
}
+ @Override
public void init(SWTBot bot2) {
// empty
}
+ @Override
public String getFailureMessage() {
return null;
}
@@ -408,14 +421,17 @@ public class TestUtil {
final SWTBotEditor editor, long timeout) {
bot.waitUntil(new ICondition() {
+ @Override
public boolean test() throws Exception {
return editor.isActive();
}
+ @Override
public void init(SWTBot bot2) {
// empty
}
+ @Override
public String getFailureMessage() {
return null;
}
@@ -620,12 +636,14 @@ public class TestUtil {
public static void waitUntilViewWithGivenIdShows(final String viewId) {
waitForView(new BaseMatcher<IViewReference>() {
+ @Override
public boolean matches(Object item) {
if (item instanceof IViewReference)
return viewId.equals(((IViewReference) item).getId());
return false;
}
+ @Override
public void describeTo(Description description) {
description.appendText("Wait for view with ID=" + viewId);
}
@@ -634,6 +652,7 @@ public class TestUtil {
public static void waitUntilViewWithGivenTitleShows(final String viewTitle) {
waitForView(new BaseMatcher<IViewReference>() {
+ @Override
public boolean matches(Object item) {
if (item instanceof IViewReference)
return viewTitle.equals(((IViewReference) item).getTitle());
@@ -641,6 +660,7 @@ public class TestUtil {
return false;
}
+ @Override
public void describeTo(Description description) {
description.appendText("Wait for view with title " + viewTitle);
}
@@ -657,6 +677,7 @@ public class TestUtil {
return title != null && title.startsWith(titlePrefix);
}
+ @Override
public void describeTo(Description description) {
description.appendText("Shell with title starting with '"
+ titlePrefix + "'");
@@ -669,6 +690,7 @@ public class TestUtil {
public static SWTBotView showView(final String viewId) {
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow();
@@ -692,6 +714,7 @@ public class TestUtil {
public static void hideView(final String viewId) {
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
IWorkbenchWindow[] windows = PlatformUI.getWorkbench()
.getWorkbenchWindows();
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/commit/CommitEditorTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/commit/CommitEditorTest.java
index fc71f8fd2..50fd4e4eb 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/commit/CommitEditorTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/commit/CommitEditorTest.java
@@ -69,6 +69,7 @@ public class CommitEditorTest extends LocalRepositoryTestCase {
final AtomicReference<IEditorPart> editorRef = new AtomicReference<IEditorPart>();
PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+ @Override
public void run() {
RepositoryCommit repoCommit = new RepositoryCommit(repository,
commit);
@@ -100,6 +101,7 @@ public class CommitEditorTest extends LocalRepositoryTestCase {
final AtomicReference<IEditorPart> editorRef = new AtomicReference<IEditorPart>();
PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+ @Override
public void run() {
RepositoryCommit repoCommit = new RepositoryCommit(repository,
commit);
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/commit/RepositoryCommitMatcher.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/commit/RepositoryCommitMatcher.java
index 31ba81852..4b3ec904f 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/commit/RepositoryCommitMatcher.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/commit/RepositoryCommitMatcher.java
@@ -44,6 +44,7 @@ public final class RepositoryCommitMatcher extends
return true;
}
+ @Override
public void describeTo(Description description) {
description.appendText("commit id=")
.appendValue(wanted.abbreviate())
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java
index f87222a8d..a40fa7ef5 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java
@@ -252,6 +252,7 @@ public class HistoryViewTest extends LocalRepositoryTestCase {
Job.getJobManager().join(JobFamilies.GENERATE_HISTORY, null);
// join UI update triggered by GenerateHistoryJob
projectExplorerTree.widget.getDisplay().syncExec(new Runnable() {
+ @Override
public void run() {
// empty
}
@@ -293,6 +294,7 @@ public class HistoryViewTest extends LocalRepositoryTestCase {
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
TableItem tableItem = table.widget.getSelection()[0];
ensureTableItemLoaded(tableItem);
@@ -350,6 +352,7 @@ public class HistoryViewTest extends LocalRepositoryTestCase {
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
TableItem tableItem = table.widget.getSelection()[0];
ensureTableItemLoaded(tableItem);
@@ -411,6 +414,7 @@ public class HistoryViewTest extends LocalRepositoryTestCase {
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
TableItem tableItem = table.widget.getSelection()[0];
ensureTableItemLoaded(tableItem);
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/BranchAndResetActionTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/BranchAndResetActionTest.java
index f304f732e..9d7fd468b 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/BranchAndResetActionTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/BranchAndResetActionTest.java
@@ -186,6 +186,7 @@ public class BranchAndResetActionTest extends LocalRepositoryTestCase {
assertEquals("ToBeDeleted", showUndeleted.bot().tree()
.getAllItems()[0].getItems()[0].getItems()[0].getText());
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
assertSame(folderImage, showUndeleted.bot().tree()
.getAllItems()[0].widget.getImage());
@@ -218,6 +219,7 @@ public class BranchAndResetActionTest extends LocalRepositoryTestCase {
assertEquals("ToBeDeleted", showUndeleted.bot().tree()
.getAllItems()[0].getItems()[0].getItems()[0].getText());
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
assertSame(projectImage, showUndeleted.bot().tree()
.getAllItems()[0].widget.getImage());
@@ -226,14 +228,17 @@ public class BranchAndResetActionTest extends LocalRepositoryTestCase {
ICondition treeEmpty = new ICondition() {
+ @Override
public boolean test() throws Exception {
return showUndeleted.bot().tree().getAllItems().length == 0;
}
+ @Override
public void init(SWTBot actBot) {
// nothing
}
+ @Override
public String getFailureMessage() {
return "Not deleted";
}
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CreatePatchActionTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CreatePatchActionTest.java
index dfe8735bf..d9b12660b 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CreatePatchActionTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CreatePatchActionTest.java
@@ -235,6 +235,7 @@ public class CreatePatchActionTest extends LocalRepositoryTestCase {
private static void assertClipboard(final String expected) {
final String[] value = { null };
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
Clipboard clp = new Clipboard(Display.getCurrent());
value[0] = (String) clp.getContents(TextTransfer.getInstance());
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/trace/TraceConfigurationDialogTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/trace/TraceConfigurationDialogTest.java
index b8fa659cd..bea8d1edf 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/trace/TraceConfigurationDialogTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/trace/TraceConfigurationDialogTest.java
@@ -153,6 +153,7 @@ public class TraceConfigurationDialogTest {
private void getDialog() {
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
if (configurationDialog != null)
configurationDialog.close();

Back to the top