mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't show no files for empty change lists
IDEA-CR-5051
This commit is contained in:
+4
-2
@@ -56,8 +56,10 @@ public class ChangesBrowserChangeListNode extends ChangesBrowserNode<ChangeList>
|
||||
final String freezed = myClManager.isFreezed();
|
||||
if (freezed != null) {
|
||||
renderer.append(spaceAndThinSpace() + freezed, SimpleTextAttributes.GRAYED_ATTRIBUTES);
|
||||
} else if (myClManager.isInUpdate()) {
|
||||
renderer.append(", " + VcsBundle.message("changes.nodetitle.updating"), SimpleTextAttributes.GRAYED_ATTRIBUTES);
|
||||
}
|
||||
else if (myClManager.isInUpdate()) {
|
||||
renderer.append((getCountText().isEmpty() ? spaceAndThinSpace() : ", ") + VcsBundle.message("changes.nodetitle.updating"),
|
||||
SimpleTextAttributes.GRAYED_ATTRIBUTES);
|
||||
}
|
||||
if (! myChangeListRemoteState.getState()) {
|
||||
renderer.append(spaceAndThinSpace());
|
||||
|
||||
@@ -210,9 +210,11 @@ public class ChangesBrowserNode<T> extends DefaultMutableTreeNode {
|
||||
appendCount(renderer);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected String getCountText() {
|
||||
int count = getCount();
|
||||
int dirCount = getDirectoryCount();
|
||||
if (dirCount == 0 && count == 0) return "";
|
||||
if (dirCount == 0) {
|
||||
return spaceAndThinSpace() + VcsBundle.message("changes.nodetitle.changecount", count);
|
||||
}
|
||||
@@ -225,7 +227,7 @@ public class ChangesBrowserNode<T> extends DefaultMutableTreeNode {
|
||||
}
|
||||
|
||||
protected void appendCount(final ColoredTreeCellRenderer renderer) {
|
||||
final String countText = getCountText();
|
||||
String countText = getCountText();
|
||||
renderer.append(countText, SimpleTextAttributes.GRAYED_ATTRIBUTES);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user