mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
7dafe8ec23
commit
06cdef2d93
1 changed files with 31 additions and 40 deletions
|
@ -559,7 +559,6 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected IBuffer openBuffer(IProgressMonitor pm) throws CModelException {
|
protected IBuffer openBuffer(IProgressMonitor pm) throws CModelException {
|
||||||
|
|
||||||
// create buffer - translation units only use default buffer factory
|
// create buffer - translation units only use default buffer factory
|
||||||
BufferManager bufManager = getBufferManager();
|
BufferManager bufManager = getBufferManager();
|
||||||
IBuffer buffer = getBufferFactory().createBuffer(this);
|
IBuffer buffer = getBufferFactory().createBuffer(this);
|
||||||
|
@ -650,36 +649,28 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isHeaderUnit() {
|
public boolean isHeaderUnit() {
|
||||||
return (
|
return CCorePlugin.CONTENT_TYPE_CHEADER.equals(contentTypeId)
|
||||||
CCorePlugin.CONTENT_TYPE_CHEADER.equals(contentTypeId)
|
|| CCorePlugin.CONTENT_TYPE_CXXHEADER.equals(contentTypeId);
|
||||||
|| CCorePlugin.CONTENT_TYPE_CXXHEADER.equals(contentTypeId)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSourceUnit() {
|
public boolean isSourceUnit() {
|
||||||
if (isHeaderUnit())
|
if (isHeaderUnit())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return (
|
return CCorePlugin.CONTENT_TYPE_CSOURCE.equals(contentTypeId)
|
||||||
CCorePlugin.CONTENT_TYPE_CSOURCE.equals(contentTypeId)
|
|
||||||
|| CCorePlugin.CONTENT_TYPE_CXXSOURCE.equals(contentTypeId)
|
|| CCorePlugin.CONTENT_TYPE_CXXSOURCE.equals(contentTypeId)
|
||||||
|| CCorePlugin.CONTENT_TYPE_ASMSOURCE.equals(contentTypeId)
|
|| CCorePlugin.CONTENT_TYPE_ASMSOURCE.equals(contentTypeId)
|
||||||
|| LanguageManager.getInstance().isContributedContentType(contentTypeId)
|
|| LanguageManager.getInstance().isContributedContentType(contentTypeId);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isCLanguage() {
|
public boolean isCLanguage() {
|
||||||
return (
|
return CCorePlugin.CONTENT_TYPE_CSOURCE.equals(contentTypeId)
|
||||||
CCorePlugin.CONTENT_TYPE_CSOURCE.equals(contentTypeId)
|
|| CCorePlugin.CONTENT_TYPE_CHEADER.equals(contentTypeId);
|
||||||
|| CCorePlugin.CONTENT_TYPE_CHEADER.equals(contentTypeId)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isCXXLanguage() {
|
public boolean isCXXLanguage() {
|
||||||
return (
|
return CCorePlugin.CONTENT_TYPE_CXXSOURCE.equals(contentTypeId)
|
||||||
CCorePlugin.CONTENT_TYPE_CXXSOURCE.equals(contentTypeId)
|
|| CCorePlugin.CONTENT_TYPE_CXXHEADER.equals(contentTypeId);
|
||||||
|| CCorePlugin.CONTENT_TYPE_CXXHEADER.equals(contentTypeId)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isASMLanguage() {
|
public boolean isASMLanguage() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue