小编ccD*_*ict的帖子

使用带有maven-checkstyle-plugin的checkstyle/google_checks.xml时出错

我正在尝试使用checkvenles google_checks.xmlmaven-checkstyle-plugin.如果我将google_checks.xml与最新的checkstyle intelliJ插件一起使用,一切都是正确的,但是当我尝试通过maven-checkstyle插件进行配置时,我收到此错误:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.13:check (default-cli) on project XX_XX_XX: Failed during checkstyle configuration: cannot initialize module TreeWalker - Unable to instantiate AvoidEscapedUnicodeCharacters:
Unable to instantiate AvoidEscapedUnicodeCharactersCheck 
Run Code Online (Sandbox Code Playgroud)

我的pom.xml看起来像这样:

   <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">
<properties>
    [...]
    <checkstyle.file.path>develop/checkstyle/google_checks.xml</checkstyle.file.path>
</properties>
[...]
<build>
    <plugins>
        [...]
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <version>2.13</version>
            <configuration>
                <configLocation>${checkstyle.file.path}</configLocation>
                <failOnViolation>false</failOnViolation>
            </configuration>
        </plugin>
    </plugins>
</build>
<reporting>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <version>2.9.1</version>
            <configuration>
                <configLocation>${checkstyle.file.path}</configLocation>
                <failOnViolation>false</failOnViolation>
            </configuration>
        </plugin>
    </plugins>
</reporting>
Run Code Online (Sandbox Code Playgroud)

你们有什么可能是错的建议吗?

java intellij-idea checkstyle maven

10
推荐指数
1
解决办法
8754
查看次数

Eclipse Kepler代码完成无法正常工作

我正在处理一个包含处理pop3的命令的枚举,因此我想存储将在枚举中的每个命令执行的过程.这就是我建立的:

现在,当我尝试编辑其中一个时,我的Eclipse代码完成功能无效

 @Override
        public void doWork(Socket clientSocket, DataOutputStream outToServer, BufferedReader inFromServer, EmailAccount emailAccount) {
            // TODO Auto-generated method stub
        }
Run Code Online (Sandbox Code Playgroud)

方法.我已经在首选项中启用了所有提案类型 - > Java - >编辑器 - > COntent Assist - > Advanced

你有什么建议吗?

public enum CodecompletionTest {
CONST1("FOO", new Event() {

    @Override
    public void doWork(int foo, String bar) {
        // no codecompletion in here
    }

});

private CodecompletionTest(String fo, Event bar) {
    // do smth with fo and bar
}

private interface Event {
    /**
     * Verarbeitung spezifisch ausführen …
Run Code Online (Sandbox Code Playgroud)

java eclipse enums code-completion eclipse-kepler

2
推荐指数
1
解决办法
5936
查看次数