Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-07-19 16:10:23 +0000
committerAlexander Kurtakov2017-07-19 16:10:23 +0000
commit8e8b622b4bf49f7e77107db4335e10731eb53254 (patch)
treeaff0eafed9ebc8ccbaa1db91c9b415c6468ea49b /bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java
parentd796c830dbef8ef8ba662ac974b21ce5a174d739 (diff)
downloadeclipse.platform.team-8e8b622b4bf49f7e77107db4335e10731eb53254.tar.gz
eclipse.platform.team-8e8b622b4bf49f7e77107db4335e10731eb53254.tar.xz
eclipse.platform.team-8e8b622b4bf49f7e77107db4335e10731eb53254.zip
Bug 519875 - Cleanup o.e.team.ui
Move Runnables to lambdas. Change-Id: I8ab7b9d9262c9d37ecf345ed4427e811fbb97387 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java')
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java31
1 files changed, 12 insertions, 19 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java
index 36d0fcaca..f78134352 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -17,7 +17,6 @@ import org.eclipse.core.runtime.*;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Shell;
@@ -40,23 +39,17 @@ public class ShowLocalHistory extends ActionDelegate implements IObjectActionDel
if (states == null || states.length == 0)
return;
try {
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- @Override
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- final IResource resource = (IResource) fSelection.getFirstElement();
- Runnable r = new Runnable() {
- @Override
- public void run() {
- IHistoryView view = TeamUI.showHistoryFor(TeamUIPlugin.getActivePage(), resource, LocalHistoryPageSource.getInstance());
- IHistoryPage page = view.getHistoryPage();
- if (page instanceof LocalHistoryPage){
- LocalHistoryPage historyPage = (LocalHistoryPage) page;
- historyPage.setClickAction(isCompare());
- }
- }
- };
- TeamUIPlugin.getStandardDisplay().asyncExec(r);
- }
+ PlatformUI.getWorkbench().getProgressService().busyCursorWhile(monitor -> {
+ final IResource resource = (IResource) fSelection.getFirstElement();
+ Runnable r = () -> {
+ IHistoryView view = TeamUI.showHistoryFor(TeamUIPlugin.getActivePage(), resource, LocalHistoryPageSource.getInstance());
+ IHistoryPage page = view.getHistoryPage();
+ if (page instanceof LocalHistoryPage){
+ LocalHistoryPage historyPage = (LocalHistoryPage) page;
+ historyPage.setClickAction(isCompare());
+ }
+ };
+ TeamUIPlugin.getStandardDisplay().asyncExec(r);
});
} catch (InvocationTargetException exception) {
ErrorDialog.openError(getShell(), null, null, new Status(IStatus.ERROR, TeamUIPlugin.PLUGIN_ID, IStatus.ERROR, TeamUIMessages.ShowLocalHistory_1, exception.getTargetException()));

Back to the top