Search in sources :

Example 1 with StructureViewWrapperImpl

use of com.intellij.ide.impl.StructureViewWrapperImpl in project intellij-community by JetBrains.

the class StructureViewFactoryImpl method initToolWindow.

public void initToolWindow(ToolWindowEx toolWindow) {
    myStructureViewWrapperImpl = new StructureViewWrapperImpl(myProject, toolWindow);
    if (myRunWhenInitialized != null) {
        myRunWhenInitialized.run();
        myRunWhenInitialized = null;
    }
}
Also used : StructureViewWrapperImpl(com.intellij.ide.impl.StructureViewWrapperImpl)

Example 2 with StructureViewWrapperImpl

use of com.intellij.ide.impl.StructureViewWrapperImpl in project intellij-community by JetBrains.

the class TemplateLanguageStructureViewBuilder method updateAfterPsiChange.

private void updateAfterPsiChange() {
    if (myProject.isDisposed())
        return;
    if (myBaseStructureViewDescriptor != null && ((StructureViewComponent) myBaseStructureViewDescriptor.structureView).getTree() == null)
        return;
    ApplicationManager.getApplication().runReadAction(() -> {
        if (!myVirtualFile.isValid() || getViewProvider() == null)
            return;
        StructureViewWrapper structureViewWrapper = StructureViewFactoryEx.getInstanceEx(myProject).getStructureViewWrapper();
        if (structureViewWrapper == null)
            return;
        Language baseLanguage = getTemplateDataLanguage();
        if (baseLanguage == myTemplateDataLanguage && (myBaseStructureViewDescriptor == null || isPsiValid(myBaseStructureViewDescriptor))) {
            updateBaseLanguageView();
        } else {
            myTemplateDataLanguage = baseLanguage;
            ((StructureViewWrapperImpl) structureViewWrapper).rebuild();
        }
    });
}
Also used : Language(com.intellij.lang.Language) StructureViewComponent(com.intellij.ide.structureView.newStructureView.StructureViewComponent) StructureViewWrapperImpl(com.intellij.ide.impl.StructureViewWrapperImpl)

Aggregations

StructureViewWrapperImpl (com.intellij.ide.impl.StructureViewWrapperImpl)2 StructureViewComponent (com.intellij.ide.structureView.newStructureView.StructureViewComponent)1 Language (com.intellij.lang.Language)1