@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); }
@Nullable public static FileStructurePopup createPopup(final Editor editor, Project project, @Nullable Navigatable navigatable, final FileEditor fileEditor) { final StructureViewBuilder structureViewBuilder = fileEditor.getStructureViewBuilder(); if (structureViewBuilder == null) return null; StructureView structureView = structureViewBuilder.createStructureView(fileEditor, project); final StructureViewModel model = structureView.getTreeModel(); if (model instanceof PlaceHolder) { //noinspection unchecked ((PlaceHolder)model).setPlace(PLACE); } return createStructureViewPopup(model, editor, project, navigatable, structureView); }
@Nullable public static FileStructurePopup createPopup(@Nonnull Project project, @Nonnull 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); }
public static boolean isInStructureViewPopup(@NotNull PlaceHolder<String> model) { return PLACE.equals(model.getPlace()); }
public static boolean isInStructureViewPopup(@Nonnull PlaceHolder<String> model) { return PLACE.equals(model.getPlace()); }