Code Monkey home page Code Monkey logo

Comments (3)

TsukimiRini avatar TsukimiRini commented on August 25, 2024

必须实现的attr:Mybatis中,XML文件里select、update等语句标签上的属性id,在FOCUS中以select[id="queryID"]形式出现。
之前讨论的是只在layer上加attr,但是实际上有占较大比重的情况需要用这样的rule解决:

r-parameterType:
  use:
    lang: XML
    file: (*xmlFile).xml
    identifier: "select[id=(&queryId)]/parameterType"
    inline:
      identifier: (*paramTypePackage:dot)
  def:
    lang: JAVA
    file: (*paramTypePackage:slash).java

讨论: 可以考虑把id这个attr转化一下覆盖到标签下的部分子元素而不是只给语句标签本身,比如给像parameterType这样的标签属性也附加上比如queryID这样的attr。

from code2graph.

TsukimiRini avatar TsukimiRini commented on August 25, 2024

@shigma 可以描述下现在attr在config中的写法以及在构建uri时加attr的代码写法吗,可以直接贴例子

from code2graph.

shigma avatar shigma commented on August 25, 2024

构建 uri 添加 attr:

layer.addAttribute(key, value)

配置语法:

use:
    lang: XML
    file: (*xmlFile).xml
    identifier: "select/parameterType"
    queryId: xxx
    inline:
        identifier: (*paramTypePackage:dot)

from code2graph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.