eclipse 在配置外部工具时可使用如下变量:
https://zhidao.baidu.com/question/2270345897179374188.html
在配置外部工具时可使用如下变量:
${workspace_loc}:
workspace的绝对路径
${workspace_loc:}:
所指定的resource的绝对路径。resource path是相对于workspace root的完整路径。
注意:${workspace_loc:/myproject/myfile.txt}和${workspace_loc}/myproject/myfile.txt不一定相同,因为前者表示的myfile.txt可能位于workspace之外。
${project_loc}:
当前所选择的resource所在的project或正构建的project或所选择的的绝对路径
${project_loc:}:
所指定的resource所在的project的绝对路径。resource path是相对于workspace root的相对路径。
${project_path}
当前选择的资源所在的project或者正构建的project的相对于workspace root的相对路径。
${project_name}
当前选择的资源所在的project或者正构建的project的名称
${container_loc}:
当前所选择的资源的parent的绝对路径
${container_loc:}
所指定的resource的parent的绝对路径
${resource_loc}
当前选定的资源的绝对路径
${resource_loc:}
所指定的资源的绝对路径
${container_path}
当前选定的资源的parent的相对于workspace root的路径
${resource_path}
当前选定的资源的相对于workspace root的路径
${container_name}
当前选定的资源的parent的名称
${resource_name}
当前选定的资源的名称
${build_type}
在外部工具作为构建的一部分时表示构建的类型。值可以是“full”、“incremental”、“auto”。如果外部工具运行于构建之外,值为“none”
假设workspace目录为c:\eclipse\workspace。
有两个project:MyProject1和MyProject2。
MyProject1位于workspace之内。
MyProject2位于workspace目录之外:c:\projects\MyProject2。
选中资源/MyProject2/MyFolder/MyFile.txt,则运行外部工具时,各对应变量值如下:
Variable Examples Expanded Results
${workspace_loc} c:\eclipse\workspace
${workspace_loc:/MyProject1/MyFile.txt} c:\eclipse\workspace\MyProject\MyFile.txt
${workspace_loc:/MyProject2/MyFile.txt} c:\projects\MyProject2\MyFile.txt
${project_loc} c:\projects\MyProject2
${project_loc:/MyProject1/MyFile.txt} c:\eclipse\workspace\MyProject
${container_loc} c:\projects\MyProject2\MyFolder
${resource_loc} c:\projects\MyProject2\MyFile.txt
${project_path} /MyProject2
${container_path} /MyProject2/MyFolder
${resource_path} /MyProject2/MyFolder/MyFile.txt
${project_name} MyProject2
${container_name} MyFolder
${resource_name} MyFile.txt
${build_type} none
· 全网最简单!3分钟用满血DeepSeek R1开发一款AI智能客服,零代码轻松接入微信、公众号、小程
· .NET 10 首个预览版发布,跨平台开发与性能全面提升
· 《HelloGitHub》第 107 期
· 从文本到图像:SSE 如何助力 AI 内容实时呈现?(Typescript篇)
· 全程使用 AI 从 0 到 1 写了个小工具
2018-03-23 不装mono,你的.NET程序照样可以在Linux上运行!
2018-03-23 .net framework4与其client profile版本的区别