1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2010-08-23 05:04:50 +00:00
parent 7dafe8ec23
commit 06cdef2d93

View file

@ -559,7 +559,6 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
@Override
protected IBuffer openBuffer(IProgressMonitor pm) throws CModelException {
// create buffer - translation units only use default buffer factory
BufferManager bufManager = getBufferManager();
IBuffer buffer = getBufferFactory().createBuffer(this);
@ -650,36 +649,28 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
}
public boolean isHeaderUnit() {
return (
CCorePlugin.CONTENT_TYPE_CHEADER.equals(contentTypeId)
|| CCorePlugin.CONTENT_TYPE_CXXHEADER.equals(contentTypeId)
);
return CCorePlugin.CONTENT_TYPE_CHEADER.equals(contentTypeId)
|| CCorePlugin.CONTENT_TYPE_CXXHEADER.equals(contentTypeId);
}
public boolean isSourceUnit() {
if (isHeaderUnit())
return false;
return (
CCorePlugin.CONTENT_TYPE_CSOURCE.equals(contentTypeId)
return CCorePlugin.CONTENT_TYPE_CSOURCE.equals(contentTypeId)
|| CCorePlugin.CONTENT_TYPE_CXXSOURCE.equals(contentTypeId)
|| CCorePlugin.CONTENT_TYPE_ASMSOURCE.equals(contentTypeId)
|| LanguageManager.getInstance().isContributedContentType(contentTypeId)
);
|| LanguageManager.getInstance().isContributedContentType(contentTypeId);
}
public boolean isCLanguage() {
return (
CCorePlugin.CONTENT_TYPE_CSOURCE.equals(contentTypeId)
|| CCorePlugin.CONTENT_TYPE_CHEADER.equals(contentTypeId)
);
return CCorePlugin.CONTENT_TYPE_CSOURCE.equals(contentTypeId)
|| CCorePlugin.CONTENT_TYPE_CHEADER.equals(contentTypeId);
}
public boolean isCXXLanguage() {
return (
CCorePlugin.CONTENT_TYPE_CXXSOURCE.equals(contentTypeId)
|| CCorePlugin.CONTENT_TYPE_CXXHEADER.equals(contentTypeId)
);
return CCorePlugin.CONTENT_TYPE_CXXSOURCE.equals(contentTypeId)
|| CCorePlugin.CONTENT_TYPE_CXXHEADER.equals(contentTypeId);
}
public boolean isASMLanguage() {