From: <kp...@us...> - 2010-06-03 08:47:51
|
Revision: 17968 http://jedit.svn.sourceforge.net/jedit/?rev=17968&view=rev Author: kpouer Date: 2010-06-03 08:47:45 +0000 (Thu, 03 Jun 2010) Log Message: ----------- update checkstyle Modified Paths: -------------- plugins/Checkstyle/trunk/Checkstyle.props plugins/Checkstyle/trunk/build.xml plugins/Checkstyle/trunk/src/com/kpouer/jedit/checkstyle/CheckstyleParse.java Added Paths: ----------- plugins/Checkstyle/trunk/lib/commons-logging-1.1.1.jar Removed Paths: ------------- plugins/Checkstyle/trunk/lib/checkstyle-5.0.jar plugins/Checkstyle/trunk/lib/commons-beanutils-core-1.8.0.jar plugins/Checkstyle/trunk/lib/google-collect-snapshot-20090211.jar Modified: plugins/Checkstyle/trunk/Checkstyle.props =================================================================== --- plugins/Checkstyle/trunk/Checkstyle.props 2010-06-03 08:34:49 UTC (rev 17967) +++ plugins/Checkstyle/trunk/Checkstyle.props 2010-06-03 08:47:45 UTC (rev 17968) @@ -9,7 +9,7 @@ plugin.com.kpouer.jedit.checkstyle.CheckstylePlugin.depend.2=plugin errorlist.ErrorListPlugin 1.9 plugin.com.kpouer.jedit.checkstyle.CheckstylePlugin.description=Checkstyle will check your java coding style according to coding rules plugin.com.kpouer.jedit.checkstyle.CheckstylePlugin.usePluginHome=true -plugin.com.kpouer.jedit.checkstyle.CheckstylePlugin.jars=checkstyle-5.1.jar commons-beanutils-core-1.8.3.jar google-collect-1.0.jar antlr.jar +plugin.com.kpouer.jedit.checkstyle.CheckstylePlugin.jars=checkstyle-5.1.jar commons-beanutils-1.8.3.jar google-collect-1.0.jar antlr.jar commons-logging-1.1.1.jar plugin.com.kpouer.jedit.checkstyle.CheckstylePlugin.docs=docs/Checkstyle.html plugin.com.kpouer.jedit.checkstyle.CheckstylePlugin.menu=checkstyle-check-current-buffer plugin.com.kpouer.jedit.checkstyle.CheckstylePlugin.browser-menu=vfs.checkstyle Modified: plugins/Checkstyle/trunk/build.xml =================================================================== --- plugins/Checkstyle/trunk/build.xml 2010-06-03 08:34:49 UTC (rev 17967) +++ plugins/Checkstyle/trunk/build.xml 2010-06-03 08:47:45 UTC (rev 17968) @@ -11,9 +11,9 @@ <import file="${build.support}/plugin-build.xml"/> <path id="project.class.path"> - <pathelement location="lib/checkstyle-5.0.jar"/> - <pathelement location="lib/commons-beanutils-core-1.8.0.jar"/> - <pathelement location="lib/google-collect-snapshot-20090211.jar"/> + <pathelement location="lib/checkstyle-5.1.jar"/> + <pathelement location="lib/commons-beanutils-core-1.8.3.jar"/> + <pathelement location="lib/google-collect-1.0.jar"/> <pathelement location="lib/antlr.jar"/> <pathelement location="${jedit.install.dir}/jedit.jar"/> <pathelement location="${install.dir}/ErrorList.jar"/> Deleted: plugins/Checkstyle/trunk/lib/checkstyle-5.0.jar =================================================================== (Binary files differ) Deleted: plugins/Checkstyle/trunk/lib/commons-beanutils-core-1.8.0.jar =================================================================== (Binary files differ) Added: plugins/Checkstyle/trunk/lib/commons-logging-1.1.1.jar =================================================================== (Binary files differ) Property changes on: plugins/Checkstyle/trunk/lib/commons-logging-1.1.1.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: plugins/Checkstyle/trunk/lib/google-collect-snapshot-20090211.jar =================================================================== (Binary files differ) Modified: plugins/Checkstyle/trunk/src/com/kpouer/jedit/checkstyle/CheckstyleParse.java =================================================================== --- plugins/Checkstyle/trunk/src/com/kpouer/jedit/checkstyle/CheckstyleParse.java 2010-06-03 08:34:49 UTC (rev 17967) +++ plugins/Checkstyle/trunk/src/com/kpouer/jedit/checkstyle/CheckstyleParse.java 2010-06-03 08:47:45 UTC (rev 17968) @@ -3,7 +3,7 @@ * :tabSize=8:indentSize=8:noTabs=false: * :folding=explicit:collapseFolds=1: * - * Copyright (C) 2009 Matthieu Casanova + * Copyright (C) 2010 Matthieu Casanova * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -25,6 +25,7 @@ import com.puppycrawl.tools.checkstyle.PropertiesExpander; import com.puppycrawl.tools.checkstyle.api.*; import errorlist.DefaultErrorSource; +import errorlist.ErrorSource; import org.gjt.sp.jedit.Buffer; import org.gjt.sp.jedit.Mode; import org.gjt.sp.jedit.io.FileVFS; @@ -35,6 +36,7 @@ import org.gjt.sp.jedit.syntax.ModeProvider; import org.gjt.sp.util.IOUtilities; import org.gjt.sp.util.Log; +import org.xml.sax.InputSource; import javax.swing.text.Segment; import java.io.File; @@ -48,9 +50,9 @@ */ public class CheckstyleParse implements Runnable, AuditListener { - private List<File> file; + private final List<File> file; - private DefaultErrorSource errorSource; + private final DefaultErrorSource errorSource; private Buffer buffer; @@ -159,9 +161,10 @@ return null; } - private Configuration getConfiguration(InputStream stream) throws CheckstyleException + private static Configuration getConfiguration(InputStream stream) throws CheckstyleException { - return ConfigurationLoader.loadConfiguration(stream, new PropertiesExpander(System.getProperties()), false); + InputSource is = new InputSource(stream); + return ConfigurationLoader.loadConfiguration(is, new PropertiesExpander(System.getProperties()), false); } private Configuration getConfiguration(String path) @@ -264,13 +267,13 @@ SeverityLevel severityLevel = auditEvent.getSeverityLevel(); int level; - if (severityLevel.equals(SeverityLevel.ERROR)) + if (severityLevel == SeverityLevel.ERROR) { - level = DefaultErrorSource.ERROR; + level = ErrorSource.ERROR; } else { - level = DefaultErrorSource.WARNING; + level = ErrorSource.WARNING; } int start = column == 0 ? 0 : column - 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |