1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 06:32:10 +02:00

opening links from Problem Details was not working properly

This commit is contained in:
Alena Laskavaia 2010-08-17 02:10:24 +00:00
parent 3d24fe63f2
commit b99d01ac98

View file

@ -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;
}