Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 196154 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/cdt/dsf/debug/internal/ui/actions/RunToLine.java (-2 / +6 lines)
Lines 26-32 Link Here
26
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
26
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
27
import org.eclipse.cdt.dsf.service.DsfSession;
27
import org.eclipse.cdt.dsf.service.DsfSession;
28
import org.eclipse.core.resources.IFile;
28
import org.eclipse.core.resources.IFile;
29
import org.eclipse.core.runtime.IPath;
29
import org.eclipse.core.runtime.IStatus;
30
import org.eclipse.core.runtime.IStatus;
31
import org.eclipse.core.runtime.Path;
30
import org.eclipse.core.runtime.Status;
32
import org.eclipse.core.runtime.Status;
31
import org.eclipse.debug.core.DebugException;
33
import org.eclipse.debug.core.DebugException;
32
import org.eclipse.debug.ui.actions.IRunToLineTarget;
34
import org.eclipse.debug.ui.actions.IRunToLineTarget;
Lines 84-90 Link Here
84
    }
86
    }
85
    
87
    
86
    public void runToLine(final String fileName, final int lineNumber, final boolean skipBreakpoints) throws DebugException {
88
    public void runToLine(final String fileName, final int lineNumber, final boolean skipBreakpoints) throws DebugException {
87
        DsfSession session = DsfSession.getSession(fContext.getSessionId());
89
    	DsfSession session = DsfSession.getSession(fContext.getSessionId());
88
        if (session != null && session.isActive()) {
90
        if (session != null && session.isActive()) {
89
            Throwable exception = null;
91
            Throwable exception = null;
90
            try {
92
            try {
Lines 96-103 Link Here
96
                        
98
                        
97
                        IRunControl2 runControl = tracker.getService(IRunControl2.class);
99
                        IRunControl2 runControl = tracker.getService(IRunControl2.class);
98
                        if (runControl != null) {
100
                        if (runControl != null) {
101
                            IPath path = Path.fromPortableString(fileName);
102
                            String lastSegment = path.lastSegment();
99
                        	runControl.runToLine(
103
                        	runControl.runToLine(
100
                                fContext, fileName, lineNumber, skipBreakpoints, rm);
104
                                fContext, lastSegment, lineNumber, skipBreakpoints, rm);
101
                        } else {
105
                        } else {
102
                            rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "IRunControl2 service not available", null)); //$NON-NLS-1$
106
                            rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "IRunControl2 service not available", null)); //$NON-NLS-1$
103
                            rm.done();
107
                            rm.done();

Return to bug 196154