我创建了一个"外部工具"运行void Main()
{
var t = typeof(DemoClass);
var typeTree = GetTypeTree(t);
List<PropertyInfo> info = typeof(DemoClass)
.GetProperties(BindingFlags.Public | BindingFlags.Instance)
.OrderByDescending(x => typeTree.IndexOf(x.DeclaringType))
.ThenBy(GetOrderNumber).ToList();
foreach (var prop in info)
Console.WriteLine(prop.Name);
}
int? GetOrderNumber(PropertyInfo prop) {
var attr = prop.GetCustomAttributes<TestAttribute>(true).FirstOrDefault();
if (attr != null)
return attr.order;
else
return null;
}
IList<Type> GetTypeTree(Type t) {
var types = new List<Type>();
while (t.BaseType != null) {
types.Add(t);
t = t.BaseType;
}
return types;
}
命令并将其设置为在最终运行我的应用程序之前运行。但由于tail
没有结束,它永远不会运行我的应用程序!如何使IntelliJ异步运行外部工具,以便它不会停止运行配置中的所有步骤?