IntelliJ IDEA不是“超链接”在Maven Run工具窗口中输出文件 [英] IntelliJ IDEA not "hyperlinking" to source files in Maven Run tool window
问题描述
我已经使用intellij 2年了,并且喜欢它。但是在更新到2016.3.4后,它停止在运行窗口中突出显示路径位置。
I have been using intellij for 2 years now and love it. however after updating to 2016.3.4 it stopped highlighting path locations in the run window.
我曾经只能点击突出显示的路径,它会跳转到文件和行。
I used to be able to just click on the highlighted path and it would jump to the file and line.
来自maven-checkstyle-plugin的输出示例应为可点击:
example of output from maven-checkstyle-plugin which should be "clickable" :
[ERROR] C:\Users\userName\Documents\project.main\src\main\java\MyClass.java:36: Only one statement per line allowed. [OneStatementPerLine]
这是非常令人沮丧的任何想法如何让intellij再次这样做将是太棒了。
This is extremely frustrating and any idea of how to get intellij to do this again would be fantastic.
最小,完整且可验证的示例
复制此项在IntelliJ IDEA中创建名为bug的项目
To Replicate this Create a project in IntelliJ IDEA called "bug"
IntelliJ IDEA 2016.3.4
Build #IU-163.12024.16, built on January 31, 2017
创建文件夹
bug-> CodeStyle
和此文件夹中的文件
checkstyle.xml
bug->CodeStyle and a file in this folder "checkstyle.xml"
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="charset" value="UTF-8"/>
<property name="severity" value="error"/>
<property name="fileExtensions" value="java,"/>
<module name="FileTabCharacter"/>
<module name="TreeWalker">
<module name="RegexpSinglelineJava">
<property name="format" value="System\.(out|err).*?$"/>
<property name="ignoreComments" value="true"/>
</module>
</module>
</module>
pom
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>bugExample</groupId>
<artifactId>bug</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<configuration>
<configLocation>CodeStyle/checkstyle.xml</configLocation>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
</configuration>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>6.18</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
和一个Class Example.java
and a Class Example.java
public class Example {
public Example() {
System.out.println("This is not allowed");
}
}
现在在maven项目工具点击生命周期,然后验证。
And now in the maven project Tool Click life-cycle, and then Validate.
运行终端中的输出:
[INFO] Starting audit...
[ERROR] C:\Users\Username\bug\src\main\java\Example.java:7: Line matches the illegal pattern 'System\.(out|err).*?$'. [RegexpSinglelineJava]
Audit done.
所以问题是 Example.java
它不是可点击的,它已经过去。
So the problem is that Example.java
is Not "Clickable", it has been in the past.
推荐答案
感谢您的示例,我已经报告了一个错误IntelliJ IDEA Maven集成,随时投票:
Thanks for the example, I've reported a bug for IntelliJ IDEA Maven integration, feel free to vote:
- IDEA-169034 Maven工具输出中无法单击文件路径
- IDEA-169034 File paths are not clickable in the Maven tool output
这篇关于IntelliJ IDEA不是“超链接”在Maven Run工具窗口中输出文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!