use of com.intellij.openapi.vcs.changes.ui.FilePathChangesTreeList in project intellij-community by JetBrains.
the class GitSimplePathsBrowser method createBrowser.
@NotNull
private static FilePathChangesTreeList createBrowser(@NotNull Project project, @NotNull Collection<String> absolutePaths) {
List<FilePath> filePaths = toFilePaths(absolutePaths);
FilePathChangesTreeList browser = new FilePathChangesTreeList(project, filePaths, false, false, null, null);
browser.setChangesToDisplay(filePaths);
return browser;
}
use of com.intellij.openapi.vcs.changes.ui.FilePathChangesTreeList in project intellij-community by JetBrains.
the class UndoApplyPatchDialog method createCenterPanel.
@Nullable
@Override
protected JComponent createCenterPanel() {
final JPanel panel = new JPanel(new BorderLayout());
int numFiles = myFailedFilePaths.size();
JPanel labelsPanel = new JPanel(new BorderLayout());
String detailedText = numFiles == 0 ? "" : String.format("Failed to apply %s below.<br>", StringUtil.pluralize("file", numFiles));
final JLabel infoLabel = new JBLabel(XmlStringUtil.wrapInHtml(detailedText + "Would you like to rollback all applied?"));
labelsPanel.add(infoLabel, BorderLayout.NORTH);
if (myShouldInformAboutBinaries) {
JLabel warningLabel = new JLabel("Rollback will not affect binaries");
warningLabel.setIcon(UIUtil.getBalloonWarningIcon());
labelsPanel.add(warningLabel, BorderLayout.CENTER);
}
panel.add(labelsPanel, BorderLayout.NORTH);
if (numFiles > 0) {
FilePathChangesTreeList browser = new FilePathChangesTreeList(myProject, myFailedFilePaths, false, false, null, null) {
@Override
public Dimension getPreferredSize() {
return new Dimension(infoLabel.getPreferredSize().width, 50);
}
};
browser.setChangesToDisplay(myFailedFilePaths);
panel.add(ScrollPaneFactory.createScrollPane(browser), BorderLayout.CENTER);
}
return panel;
}
Aggregations