mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
CPP-5040: Hide CMake-specific macros in non-CMake run configurations
GitOrigin-RevId: 3fe2cb86e48970d5d99bb494f6572b6ae427e239
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c320c38795
commit
998ca6cb4c
+13
-2
@@ -156,10 +156,21 @@ public class CommonProgramParametersPanel extends JPanel implements PanelWithAnc
|
||||
}
|
||||
|
||||
public static void addMacroSupport(@NotNull ExtendableTextField textField) {
|
||||
addMacroSupport(textField, MacrosDialog.Filters.ALL, null);
|
||||
doAddMacroSupport(textField, MacrosDialog.Filters.ALL, null);
|
||||
}
|
||||
|
||||
protected static void addMacroSupport(@NotNull ExtendableTextField textField,
|
||||
protected void addMacroSupport(@NotNull ExtendableTextField textField,
|
||||
@NotNull Predicate<? super Macro> macroFilter,
|
||||
@Nullable Map<String, String> userMacros) {
|
||||
final Predicate<? super Macro> commonMacroFilter = getCommonMacroFilter();
|
||||
doAddMacroSupport(textField, t -> commonMacroFilter.test(t) && macroFilter.test(t), userMacros);
|
||||
}
|
||||
|
||||
protected @NotNull Predicate<? super Macro> getCommonMacroFilter() {
|
||||
return MacrosDialog.Filters.ALL;
|
||||
}
|
||||
|
||||
private static void doAddMacroSupport(@NotNull ExtendableTextField textField,
|
||||
@NotNull Predicate<? super Macro> macroFilter,
|
||||
@Nullable Map<String, String> userMacros) {
|
||||
if (Registry.is("allow.macros.for.run.configurations")) {
|
||||
|
||||
Reference in New Issue
Block a user