mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
opening links from Problem Details was not working properly
This commit is contained in:
parent
3d24fe63f2
commit
b99d01ac98
1 changed files with 4 additions and 1 deletions
|
@ -18,6 +18,7 @@ import org.eclipse.cdt.codan.ui.AbstractCodanProblemDetailsProvider;
|
|||
import org.eclipse.cdt.codan.ui.CodanEditorUtility;
|
||||
import org.eclipse.core.resources.IMarker;
|
||||
import org.eclipse.core.runtime.IAdaptable;
|
||||
import org.eclipse.jface.text.BadLocationException;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.swt.SWT;
|
||||
|
@ -84,10 +85,12 @@ public class ProblemDetails extends ViewPart {
|
|||
// link file format example "file:/tmp/file.c#42", 42 is the line number
|
||||
if (link.startsWith("file:")) { //$NON-NLS-1$
|
||||
try {
|
||||
CodanEditorUtility.openInEditor(link, curProvider
|
||||
CodanEditorUtility.openFileURL(link, curProvider
|
||||
.getMarker().getResource());
|
||||
} catch (PartInitException e1) {
|
||||
CodanUIActivator.log(e1);
|
||||
} catch (BadLocationException e1) {
|
||||
CodanUIActivator.log(e1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue