mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
debugging PathMacroManagerTest
This commit is contained in:
+2
@@ -120,10 +120,12 @@ public class PathMacroManagerTest {
|
||||
myOldFileSystem = FileSystem.FILE_SYSTEM;
|
||||
myFileSystem = new MockFileSystem();
|
||||
FileSystem.FILE_SYSTEM = myFileSystem;
|
||||
BasePathMacroManager.DEBUG = true;
|
||||
}
|
||||
|
||||
@After
|
||||
public final void restoreFilesystem() throws Exception {
|
||||
BasePathMacroManager.DEBUG = false;
|
||||
FileSystem.FILE_SYSTEM = myOldFileSystem;
|
||||
}
|
||||
|
||||
|
||||
+8
@@ -16,6 +16,7 @@
|
||||
package com.intellij.application.options;
|
||||
|
||||
import com.intellij.openapi.components.PathMacroMap;
|
||||
import com.intellij.openapi.components.impl.BasePathMacroManager;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.util.StringBuilderSpinAllocator;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
@@ -67,6 +68,13 @@ public class ReplacePathToMacroMap extends PathMacroMap {
|
||||
final String p = quotePath(path);
|
||||
final String m = "$" + macroName + "$";
|
||||
|
||||
if (BasePathMacroManager.DEBUG) {
|
||||
System.out.println("BasePathMacroManager.addFileHierarchyReplacements");
|
||||
System.out.println("path = " + p);
|
||||
System.out.println("macro = " + macroName);
|
||||
}
|
||||
|
||||
|
||||
put(p, m);
|
||||
for (String protocol : PROTOCOLS) {
|
||||
put(protocol + ":" + p, protocol + ":" + m);
|
||||
|
||||
+6
@@ -36,6 +36,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import java.util.*;
|
||||
|
||||
public class BasePathMacroManager extends PathMacroManager {
|
||||
public static boolean DEBUG = false;
|
||||
private PathMacrosImpl myPathMacros;
|
||||
|
||||
public BasePathMacroManager(@Nullable PathMacros pathMacros) {
|
||||
@@ -69,6 +70,11 @@ public class BasePathMacroManager extends PathMacroManager {
|
||||
boolean check = false;
|
||||
while (dir != null && dir.getParent() != null) {
|
||||
path = dir.getPath();
|
||||
if (DEBUG) {
|
||||
System.out.println("BasePathMacroManager.addFileHierarchyReplacements");
|
||||
System.out.println("path = " + path);
|
||||
System.out.println("macro = " + macro);
|
||||
}
|
||||
|
||||
putIfAbsent(result, "file:" + path, "file:" + macro, check);
|
||||
putIfAbsent(result, "file:/" + path, "file:/" + macro, check);
|
||||
|
||||
Reference in New Issue
Block a user