org.kie.api.builder.Message.getColumn()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(209)

本文整理了Java中org.kie.api.builder.Message.getColumn()方法的一些代码示例,展示了Message.getColumn()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getColumn()方法的具体详情如下:
包路径:org.kie.api.builder.Message
类名称:Message
方法名:getColumn

Message.getColumn介绍

[英]Returns the column number in the resource of the issue that caused the creation of this Message
[中]返回导致创建此消息的问题的资源中的列号

代码示例

代码示例来源:origin: deepu105/drools-demo

private static String prettyBuildMessage(Message msg) {
  return "Message: {"
    + "id="+ msg.getId()
    + ", level=" + msg.getLevel()
    + ", path=" + msg.getPath()
    + ", line=" + msg.getLine()
    + ", column=" + msg.getColumn()
    + ", text=\"" + msg.getText() + "\""
    + "}";
}

代码示例来源:origin: gratiartis/qzr

private static String prettyBuildMessage(Message msg) {
  return "Message: {"
    + "id="+ msg.getId()
    + ", level=" + msg.getLevel()
    + ", path=" + msg.getPath()
    + ", line=" + msg.getLine()
    + ", column=" + msg.getColumn()
    + ", text=\"" + msg.getText() + "\""
    + "}";
}

代码示例来源:origin: deepu105/drools-demo

private static String prettyBuildMessage(Message msg) {
  return "Message: {"
    + "id="+ msg.getId()
    + ", level=" + msg.getLevel()
    + ", path=" + msg.getPath()
    + ", line=" + msg.getLine()
    + ", column=" + msg.getColumn()
    + ", text=\"" + msg.getText() + "\""
    + "}";
}

代码示例来源:origin: org.kie.guvnor/guvnor-commons-builder

private BuildMessage convertMessage( final Message message ) {
  final BuildMessage m = new BuildMessage();
  switch ( message.getLevel() ) {
    case ERROR:
      m.setLevel( BuildMessage.Level.ERROR );
      break;
    case WARNING:
      m.setLevel( BuildMessage.Level.WARNING );
      break;
    case INFO:
      m.setLevel( BuildMessage.Level.INFO );
      break;
  }
  m.setId( message.getId() );
  m.setArtifactID( artifactId );
  m.setLine( message.getLine() );
  if ( message.getPath() != null && !message.getPath().isEmpty() ) {
    m.setPath( handles.get( RESOURCE_PATH + "/" + message.getPath() ) );
  }
  m.setColumn( message.getColumn() );
  m.setText( message.getText() );
  return m;
}

代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend

static BuildMessage convertMessage(final Message message,
                  Handles handles) {
  final BuildMessage m = new BuildMessage();
  switch (message.getLevel()) {
    case ERROR:
      m.setLevel(Level.ERROR);
      break;
    case WARNING:
      m.setLevel(Level.WARNING);
      break;
    case INFO:
      m.setLevel(Level.INFO);
      break;
  }
  m.setId(message.getId());
  m.setLine(message.getLine());
  m.setPath(convertPath(message.getPath(),
             handles));
  m.setColumn(message.getColumn());
  m.setText(convertMessageText(message));
  return m;
}

相关文章