mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-55470 Undefined Path Variables error is shown if for some files svn:keywords revision property is set
This commit is contained in:
+8
-7
@@ -19,6 +19,7 @@ import com.intellij.openapi.application.PathMacros;
|
||||
import com.intellij.openapi.components.PathMacroMap;
|
||||
import com.intellij.util.NotNullFunction;
|
||||
import org.jdom.Element;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Arrays;
|
||||
@@ -45,24 +46,24 @@ public class PathMacrosCollector extends PathMacroMap {
|
||||
myMatcher = MACRO_PATTERN.matcher("");
|
||||
}
|
||||
|
||||
public static Set<String> getMacroNames(Element root) {
|
||||
return getMacroNames(root, null);
|
||||
}
|
||||
|
||||
public static Set<String> getMacroNames(Element root, @Nullable final NotNullFunction<Object, Boolean> filter) {
|
||||
return getMacroNames(root, filter, null);
|
||||
}
|
||||
|
||||
public static Set<String> getMacroNames(Element root, @Nullable final NotNullFunction<Object, Boolean> filter, @Nullable final NotNullFunction<Object, Boolean> recursiveFilter) {
|
||||
public static Set<String> getMacroNames(Element root, @Nullable final NotNullFunction<Object, Boolean> filter, @Nullable final NotNullFunction<Object, Boolean> recursiveFilter, @NotNull final PathMacros pathMacros) {
|
||||
final PathMacrosCollector collector = new PathMacrosCollector();
|
||||
collector.substitute(root, true, false, filter, recursiveFilter);
|
||||
final HashSet<String> result = new HashSet<String>(collector.myMacroMap.keySet());
|
||||
result.removeAll(ourSystemMacroNames);
|
||||
result.removeAll(PathMacrosImpl.getToolMacroNames());
|
||||
result.removeAll(PathMacros.getInstance().getIgnoredMacroNames());
|
||||
result.removeAll(pathMacros.getIgnoredMacroNames());
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Set<String> getMacroNames(Element root, @Nullable final NotNullFunction<Object, Boolean> filter, @Nullable final NotNullFunction<Object, Boolean> recursiveFilter) {
|
||||
return getMacroNames(root, filter, recursiveFilter, PathMacros.getInstance());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String substituteRecursively(String text, boolean caseSensitive) {
|
||||
if (text == null || text.length() == 0) return text;
|
||||
@@ -84,7 +85,7 @@ public class PathMacrosCollector extends PathMacroMap {
|
||||
protocol = FILE_PROTOCOL;
|
||||
} else if (text.length() > 6 && text.charAt(0) == 'j') {
|
||||
protocol = JAR_PROTOCOL;
|
||||
} else if (!('$' == text.charAt(0))) {
|
||||
} else if ('$' != text.charAt(0)) {
|
||||
return text;
|
||||
}
|
||||
|
||||
|
||||
+3
@@ -240,6 +240,9 @@ public class StorageUtil {
|
||||
return false; // do not proceed environment variables from run configurations
|
||||
}
|
||||
|
||||
if ("MESSAGE".equals(parentName) && "value".equals(attribute.getName())) return false;
|
||||
if ("option".equals(parentName) && "LAST_COMMIT_MESSAGE".equals(parent.getAttributeValue("name"))) return false;
|
||||
|
||||
// do not proceed macros in searchConfigurations (structural search)
|
||||
if ("replaceConfiguration".equals(parentName) || "searchConfiguration".equals(parentName)) return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user