• 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

  • 相关阅读:
    指针
    第一条:了解Objective-C语言的起源
    Java项目怎么使用Swagger生成API文档?
    springmvc 中@Controller和@RestController的区别
    Java ExecutorService四种线程池的例子与说明
    怎样解决Myeclipse内存溢出?
    过时date.toLocaleString()的解决方法
    maven中修改可用的版本
    String转换为Map
    tomcat在Debug模式下无法启动解决办法
  • 原文地址:https://www.cnblogs.com/zhoading/p/16042457.html
Copyright © 2020-2023  润新知