mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-180991 vcs: show relative paths for changes that are grouped by module
This commit is contained in:
+6
@@ -16,12 +16,15 @@
|
||||
|
||||
package com.intellij.openapi.vcs.changes.ui;
|
||||
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.module.ModuleUtilCore;
|
||||
import com.intellij.openapi.util.SystemInfoRt;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.vcs.FilePath;
|
||||
import com.intellij.openapi.vcs.changes.Change;
|
||||
import com.intellij.openapi.vcs.changes.ChangesUtil;
|
||||
import com.intellij.ui.SimpleTextAttributes;
|
||||
import com.intellij.vcsUtil.VcsUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -87,6 +90,9 @@ public class ChangesBrowserFilePathNode extends ChangesBrowserNode<FilePath> {
|
||||
if (o instanceof Change) {
|
||||
return ChangesUtil.getAfterPath((Change)o);
|
||||
}
|
||||
if (o instanceof Module) {
|
||||
return VcsUtil.getFilePath(ModuleUtilCore.getModuleDirPath((Module)o));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
+4
@@ -18,6 +18,7 @@ package com.intellij.openapi.vcs.changes.ui;
|
||||
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.module.ModuleType;
|
||||
import com.intellij.openapi.module.ModuleUtilCore;
|
||||
import com.intellij.ui.SimpleTextAttributes;
|
||||
|
||||
/**
|
||||
@@ -34,6 +35,9 @@ public class ChangesBrowserModuleNode extends ChangesBrowserNode<Module> {
|
||||
|
||||
renderer.append(module.isDisposed() ? "" : module.getName(), SimpleTextAttributes.REGULAR_ATTRIBUTES);
|
||||
appendCount(renderer);
|
||||
|
||||
appendParentPath(renderer, ModuleUtilCore.getModuleDirPath(module));
|
||||
|
||||
if (module.isDisposed()) {
|
||||
renderer.setIcon(ModuleType.EMPTY.getIcon());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user