public ViewFilesPanel( FileTypeManager fileTypeManager, ActionManager actionManager, IDEFacade facade) { super(new BorderLayout(2, 2)); setOpaque(false); myFileTypeManager = fileTypeManager; myIdeFacade = facade; myShowReadOnly = Pico.getOptions().isSet(SHOW_READ_ONLY_KEY, true); myTree = new KirTree() { protected void onEnter() { super.onEnter(); if (myOpenFileAction.isEnabled()) { myOpenFileAction.actionPerformed(null); } } }; IDEAFacade.installIdeaTreeActions(myTree); add(ScrollPaneFactory.createScrollPane(myTree)); add(createActionsToolbar(actionManager), BorderLayout.NORTH); IDEAFacade.installPopupMenu(createActionGroup(), myTree, actionManager); myTree.setModel(new DefaultTreeModel(new DefaultMutableTreeNode())); setMinimumSize(new Dimension(200, 0)); }
public void showReadOnly(boolean showReadOnlyFiles) { if (myShowReadOnly != showReadOnlyFiles) { myShowReadOnly = showReadOnlyFiles; Pico.getOptions().setOption(SHOW_READ_ONLY_KEY, showReadOnlyFiles); if (myProjectsData != null) { refreshData(myUser, myProjectsData); } } }