【问题标题】:See declaration of method in html file (Concordion)请参阅 html 文件中的方法声明 (Concordion)
【发布时间】:2016-09-23 07:19:47
【问题描述】:

你们是否知道如何查看corncordion HtML 文件中使用的方法的声明,而不是搜索整个项目?

例如:

   <th concordion:assertEquals="#Object.field">Expected Name</th>
   <th concordion : assertEquals= "#Object.method">Expected</th>

P.S:我也尝试过 concordion 支持插件,但没有帮助。 P.S2:我正在使用 IntelliJ IDEA

【问题讨论】:

    标签: java concordion


    【解决方案1】:

    您在 Post Script 中提到的 Concordion support 插件应该可以满足您的要求。

    我目前正在使用带有 Concordion 支持插件 0.11.1 的 Idea 社区版 2016.3.5

    在代码/规范/定义之间导航

    给出下面的例子sn-p

     <!-- searchString and ignoreCase are defined elsewhere in document -->
     <table concordion:verifyRows="#field: helper().withNames(#searchString,#ignoreCase)">
    
     <!-- clicking on #field below navigates to the above definition -->
     <th concordion:assertEquals="#field">Expected Name</th>
    
    • 点击 helper 导航到我的支持类中的 helper 属性
    • 点击 withNames 导航到我的助手实例的 withNames 方法
    • 点击 field / searchString / ignoreCase 导航到受尊重的声明

    如果我记得,如果没有正确的项目结构(文件 -> 项目结构)设置,它最初就无法工作。

    • 我的规范(html / md 文件)必须设置为“测试资源”
    • 后备装置(.java / .scala 等)必须设置为“测试源”

    此时,代码编辑器左侧也出现了图标,用于在规范和夹具之间导航。

    HTML 扩展导航似乎工作得很好,除了需要@FullOGNL 注释和一些可能的短格式符号的更复杂的表达式。

    我在使用 HTML + Java 8 / Scala、Markdown + Java 8 / Scala 方面取得了成功

    如果您能够提供特定的可测试 sn-p(即 Github + Maven / Gradle 简单项目),其代码可以正确编译/执行但 IDE 导航失败,那么有人可能会提供比这更好或更有用的答案我已经提供了。

    【讨论】:

      猜你喜欢
      • 2018-09-11
      • 1970-01-01
      • 1970-01-01
      • 2013-08-22
      • 1970-01-01
      • 1970-01-01
      • 2013-02-25
      • 2019-01-24
      • 2016-12-13
      相关资源
      最近更新 更多