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
|
||||
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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue