Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsSelectionPage.java')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsSelectionPage.java40
1 files changed, 12 insertions, 28 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsSelectionPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsSelectionPage.java
index b71fcf5b7..d9a02aa16 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsSelectionPage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsSelectionPage.java
@@ -19,7 +19,6 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.debug.core.model.IBreakpoint;
import org.eclipse.debug.internal.core.BreakpointManager;
import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
@@ -30,7 +29,6 @@ import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsViewer;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.actions.ImportBreakpointsOperation;
-import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.wizard.WizardPage;
@@ -51,10 +49,6 @@ public class WizardImportBreakpointsSelectionPage extends WizardPage {
super(pageName, ImportExportMessages.WizardImportBreakpointsSelectionPage_2, null);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
@Override
public void createControl(Composite parent) {
setDescription(ImportExportMessages.WizardImportBreakpointsSelectionPage_1);
@@ -79,10 +73,6 @@ public class WizardImportBreakpointsSelectionPage extends WizardPage {
return markers;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
- */
@Override
public void setVisible(boolean visible) {
if (visible) {
@@ -100,28 +90,22 @@ public class WizardImportBreakpointsSelectionPage extends WizardPage {
}
private void updateBreakpointsPreviewList(final EmbeddedBreakpointsViewer currentTView) throws InvocationTargetException, InterruptedException {
- getContainer().run(false, true, new IRunnableWithProgress() {
- @Override
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- WizardImportBreakpointsPage mainPage = (WizardImportBreakpointsPage) getWizard().getPage(
- ImportExportMessages.WizardImportBreakpoints_0);
- ImportBreakpointsOperation operation = new ImportBreakpointsOperation(mainPage.getFileNameField().getText()
- .trim(), mainPage.getAutoRemoveDuplicates(), false, false);
- operation.run(monitor);
- BreakpointContainer breakpointManager = new BreakpointContainer(null, null);
- IBreakpoint[] importedBreakpoints = operation.getImportedBreakpoints();
- for(int i = 0; i < importedBreakpoints.length; i++) {
- breakpointManager.addBreakpoint(importedBreakpoints[i], new ModelDelta(null, IModelDelta.ADDED));
- }
- currentTView.getViewer().setInput(breakpointManager);
- currentTView.getViewer().refresh();
+ getContainer().run(false, true, monitor -> {
+ WizardImportBreakpointsPage mainPage = (WizardImportBreakpointsPage) getWizard()
+ .getPage(ImportExportMessages.WizardImportBreakpoints_0);
+ ImportBreakpointsOperation operation = new ImportBreakpointsOperation(
+ mainPage.getFileNameField().getText().trim(), mainPage.getAutoRemoveDuplicates(), false, false);
+ operation.run(monitor);
+ BreakpointContainer breakpointManager = new BreakpointContainer(null, null);
+ IBreakpoint[] importedBreakpoints = operation.getImportedBreakpoints();
+ for (int i = 0; i < importedBreakpoints.length; i++) {
+ breakpointManager.addBreakpoint(importedBreakpoints[i], new ModelDelta(null, IModelDelta.ADDED));
}
+ currentTView.getViewer().setInput(breakpointManager);
+ currentTView.getViewer().refresh();
});
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#getImage()
- */
@Override
public Image getImage() {
return DebugUITools.getImage(IInternalDebugUIConstants.IMG_WIZBAN_IMPORT_BREAKPOINTS);

Back to the top