if (!(configuration instanceof PHPStructuredTextViewerConfiguration)) {
return;
}
fViewerConfiguration = configuration;
PHPStructuredTextViewerConfiguration phpConfiguration = (PHPStructuredTextViewerConfiguration) configuration;
IContentAssistant newPHPAssistant = phpConfiguration
.getPHPContentAssistant(this, true);
// Uninstall content assistant created in super:
if (fContentAssistant != null) {
fContentAssistant.uninstall();
}
// Assign, and configure our content assistant:
fContentAssistant = newPHPAssistant;
if (fContentAssistant != null) {
fContentAssistant.install(this);
if (fContentAssistant instanceof IContentAssistantExtension2
&& fContentAssistant instanceof IContentAssistantExtension4)
fContentAssistantFacade = new ContentAssistantFacade(
fContentAssistant);
fContentAssistantInstalled = true;
} else {
// 248036 - disable the content assist operation if no content
// assistant
enableOperation(CONTENTASSIST_PROPOSALS, false);
}
fOutlinePresenter = phpConfiguration.getOutlinePresenter(this);
if (fOutlinePresenter != null) {
fOutlinePresenter.install(this);
}
fHierarchyPresenter = phpConfiguration
.getHierarchyPresenter(this, true);
if (fHierarchyPresenter != null) {
fHierarchyPresenter.install(this);
}
}