@Override protected void addFolderGroupComponents() { super.addFolderGroupComponents(); for (PyRootTypeProvider provider : myRootTypeProviders) { MultiMap<ContentEntry, VirtualFilePointer> roots = provider.getRoots(); if (!roots.get(getContentEntry()).isEmpty()) { final JComponent sourcesComponent = createFolderGroupComponent( provider.getName() + " Folders", provider.createFolders(getContentEntry()), provider.getColor(), null); this.add( sourcesComponent, new GridBagConstraints( 0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 10, 0), 0, 0)); } } }
public VirtualFilePointer getRoot(PyRootTypeProvider provider, @NotNull final String url) { for (VirtualFilePointer filePointer : provider.getRoots().get(getContentEntry())) { if (Comparing.equal(filePointer.getUrl(), url)) { return filePointer; } } return null; }
public void addRoot(PyRootTypeProvider provider, @NotNull final VirtualFilePointer root) { provider.getRoots().putValue(getContentEntry(), root); fireUpdate(); }