use of org.jetbrains.idea.svn.dialogs.WCInfoWithBranches in project intellij-community by JetBrains.
the class RootsAndBranches method createPanels.
private void createPanels(final RepositoryLocation location, final Runnable afterRefresh) {
final Task.Backgroundable backgroundable = new Task.Backgroundable(myProject, "Subversion: loading working copies data..", false) {
public void run(@NotNull final ProgressIndicator indicator) {
indicator.setIndeterminate(true);
final Map<String, SvnMergeInfoRootPanelManual> panels = new HashMap<>();
final Map<String, MergeInfoHolder> holders = new HashMap<>();
final List<WCInfoWithBranches> roots = myDataLoader.loadRoots();
SwingUtilities.invokeLater(() -> {
if (myDisposed)
return;
final JPanel mainPanel = prepareData(panels, holders, roots);
myMergePanels.clear();
myHolders.clear();
myMergePanels.putAll(panels);
myHolders.putAll(holders);
if (myPanelWrapper != null) {
myPanelWrapper.removeAll();
if (myMergePanels.isEmpty()) {
final JPanel emptyPanel = new JPanel(new GridBagLayout());
final GridBagConstraints gb = new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0);
final JLabel label = new JLabel("No Subversion 1.5 working copies\nof 1.5 repositories in the project");
label.setUI(new MultiLineLabelUI());
emptyPanel.add(label, gb);
gb.fill = GridBagConstraints.HORIZONTAL;
myPanelWrapper.add(emptyPanel, gb);
} else {
for (MergeInfoHolder holder : myHolders.values()) {
holder.updateMixedRevisionsForPanel();
}
myPanelWrapper.add(mainPanel, new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
}
myPanelWrapper.repaint();
} else {
myPanel = mainPanel;
}
if (afterRefresh != null) {
afterRefresh.run();
}
});
}
};
ProgressManager.getInstance().run(backgroundable);
}
Aggregations