mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
bug 307365: Fixed the problem of ignoring external locations altogether
This commit is contained in:
parent
bf5233d4e4
commit
cc698e4556
1 changed files with 12 additions and 10 deletions
|
@ -12,6 +12,7 @@
|
|||
package org.eclipse.cdt.core.resources;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.Map;
|
||||
|
@ -23,12 +24,17 @@ import org.eclipse.cdt.core.model.CoreModel;
|
|||
import org.eclipse.cdt.core.model.ICModelMarker;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
import org.eclipse.core.filesystem.EFS;
|
||||
import org.eclipse.core.filesystem.IFileStore;
|
||||
import org.eclipse.core.filesystem.URIUtil;
|
||||
import org.eclipse.core.resources.IMarker;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.IncrementalProjectBuilder;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.core.runtime.Preferences;
|
||||
import org.eclipse.core.runtime.jobs.ISchedulingRule;
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
|
@ -95,17 +101,13 @@ public abstract class ACBuilder extends IncrementalProjectBuilder implements IMa
|
|||
marker.setAttribute(ICModelMarker.C_MODEL_MARKER_VARIABLE, problemMarkerInfo.variableName);
|
||||
}
|
||||
if (externalLocation != null) {
|
||||
try {
|
||||
URI uri = new URI(externalLocation);
|
||||
URI uri = URIUtil.toURI(externalLocation);
|
||||
if (uri.getScheme()!=null) {
|
||||
marker.setAttribute(ICModelMarker.C_MODEL_MARKER_EXTERNAL_LOCATION, externalLocation);
|
||||
String locationText = NLS.bind(CCorePlugin.getResourceString("ACBuilder.ProblemsView.Location"), //$NON-NLS-1$
|
||||
problemMarkerInfo.lineNumber, externalLocation);
|
||||
marker.setAttribute(IMarker.LOCATION, locationText);
|
||||
}
|
||||
} catch (URISyntaxException e) {
|
||||
// Just ignore those which cannot be open by editor
|
||||
}
|
||||
} else if (problemMarkerInfo.lineNumber==0){
|
||||
marker.setAttribute(IMarker.LOCATION, " "); //$NON-NLS-1$
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue