Search in sources :

Example 1 with PlaceHolder

use of com.intellij.ui.PlaceHolder in project intellij-community by JetBrains.

the class ViewStructureAction method createPopup.

@Nullable
public static FileStructurePopup createPopup(@NotNull Project project, @NotNull FileEditor fileEditor) {
    StructureViewBuilder structureViewBuilder = fileEditor.getStructureViewBuilder();
    if (structureViewBuilder == null)
        return null;
    StructureView structureView = structureViewBuilder.createStructureView(fileEditor, project);
    StructureViewModel model = structureView.getTreeModel();
    if (model instanceof PlaceHolder) {
        //noinspection unchecked
        ((PlaceHolder) model).setPlace(TreeStructureUtil.PLACE);
    }
    return createStructureViewPopup(project, fileEditor, structureView);
}
Also used : StructureViewBuilder(com.intellij.ide.structureView.StructureViewBuilder) StructureView(com.intellij.ide.structureView.StructureView) PlaceHolder(com.intellij.ui.PlaceHolder) StructureViewModel(com.intellij.ide.structureView.StructureViewModel) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

StructureView (com.intellij.ide.structureView.StructureView)1 StructureViewBuilder (com.intellij.ide.structureView.StructureViewBuilder)1 StructureViewModel (com.intellij.ide.structureView.StructureViewModel)1 PlaceHolder (com.intellij.ui.PlaceHolder)1 Nullable (org.jetbrains.annotations.Nullable)1