Skip to content

Commit

Permalink
Try to make TestDebug more stable
Browse files Browse the repository at this point in the history
Signed-off-by: Mickael Istria <[email protected]>
  • Loading branch information
mickaelistria committed Apr 9, 2019
1 parent 0376260 commit c28c8fe
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion org.eclipse.acute.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.acute.tests;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.2.1.qualifier
Bundle-Vendor: %Bundle-Vendor
Eclipse-BundleShape: dir
Require-Bundle: org.eclipse.ui,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.model.IDebugTarget;
import org.eclipse.debug.core.model.ISuspendResume;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.text.TextSelection;
Expand All @@ -53,6 +55,7 @@ public class TestDebug extends AbstractAcuteTest {
public void setUpLaunch() throws DebugException {
this.launchManager = DebugPlugin.getDefault().getLaunchManager();
removeAllLaunches();
DebugUIPlugin.getDefault().getPreferenceStore().setValue("org.eclipse.debug.ui.switch_perspective_on_suspend", MessageDialogWithToggle.ALWAYS);
}

private void removeAllLaunches() throws DebugException {
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.acute/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.acute;singleton:=true
Bundle-Version: 0.3.2.qualifier
Bundle-Version: 0.3.3.qualifier
Bundle-Activator: org.eclipse.acute.AcutePlugin
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: org.eclipse.ui,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.ILaunchShortcut2;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
Expand All @@ -39,21 +40,11 @@
public class DotnetDebugLaunchShortcut implements ILaunchShortcut2 {

@Override public void launch(ISelection selection, String mode) {
try {
getLaunchConfigurations(selection)[0].launch(mode, null);
} catch (CoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
DebugUITools.launch(getLaunchConfigurations(selection)[0], mode);
}

@Override public void launch(IEditorPart editor, String mode) {
try {
getLaunchConfigurations(editor)[0].launch(mode, null);
} catch (CoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
DebugUITools.launch(getLaunchConfigurations(editor)[0], mode);
}

@Override public ILaunchConfiguration[] getLaunchConfigurations(ISelection selection) {
Expand Down

0 comments on commit c28c8fe

Please sign in to comment.