mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
fix for bug 250972
This commit is contained in:
parent
0cd1be7cee
commit
f91408d15a
3 changed files with 9 additions and 3 deletions
|
@ -473,7 +473,8 @@ public class CModelManager implements IResourceChangeListener, ICDescriptorListe
|
||||||
|
|
||||||
// crecoskie
|
// crecoskie
|
||||||
// TODO FIXME: include entries don't handle URIs yet
|
// TODO FIXME: include entries don't handle URIs yet
|
||||||
if (includeReference.isOnIncludeEntry(URIUtil.toPath(locationURI))) {
|
IPath path = URIUtil.toPath(locationURI);
|
||||||
|
if (path != null && includeReference.isOnIncludeEntry(path)) {
|
||||||
String headerContentTypeId= contentTypeId;
|
String headerContentTypeId= contentTypeId;
|
||||||
if (headerContentTypeId == null) {
|
if (headerContentTypeId == null) {
|
||||||
headerContentTypeId= CoreModel.hasCCNature(project) ? CCorePlugin.CONTENT_TYPE_CXXHEADER : CCorePlugin.CONTENT_TYPE_CHEADER;
|
headerContentTypeId= CoreModel.hasCCNature(project) ? CCorePlugin.CONTENT_TYPE_CXXHEADER : CCorePlugin.CONTENT_TYPE_CHEADER;
|
||||||
|
|
|
@ -85,6 +85,7 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.OperationCanceledException;
|
import org.eclipse.core.runtime.OperationCanceledException;
|
||||||
|
import org.eclipse.core.runtime.Path;
|
||||||
import org.eclipse.core.runtime.content.IContentType;
|
import org.eclipse.core.runtime.content.IContentType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -753,7 +754,8 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
language = LanguageManager.getInstance().getLanguageForFile(file, configuration, contentTypeId);
|
language = LanguageManager.getInstance().getLanguageForFile(file, configuration, contentTypeId);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
language = LanguageManager.getInstance().getLanguageForFile(getLocation(), getCProject().getProject(), configuration, contentTypeId);
|
String filename = getElementName();
|
||||||
|
language = LanguageManager.getInstance().getLanguageForFile(new Path(filename), getCProject().getProject(), configuration, contentTypeId);
|
||||||
}
|
}
|
||||||
return language;
|
return language;
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,7 +115,10 @@ public class ExternalEditorInput implements ITranslationUnitEditorInput, IPersis
|
||||||
* @see IEditorInput#getToolTipText()
|
* @see IEditorInput#getToolTipText()
|
||||||
*/
|
*/
|
||||||
public String getToolTipText() {
|
public String getToolTipText() {
|
||||||
return externalFile.getFullPath().toString();
|
IPath path = externalFile.getFullPath();
|
||||||
|
if(path != null)
|
||||||
|
return path.toString();
|
||||||
|
return unit.getLocationURI().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue