[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jedit-cvs
Subject:    [ jEdit-commits ] SF.net SVN: jedit:[23808] plugins/XML/trunk
From:       daleanson () users ! sourceforge ! net
Date:       2014-12-23 21:16:59
Message-ID: E1Y3WpI-00016Y-7T () sfs-ml-1 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 23808
          http://sourceforge.net/p/jedit/svn/23808
Author:   daleanson
Date:     2014-12-23 21:16:58 +0000 (Tue, 23 Dec 2014)
Log Message:
-----------
Use ParseError and SideKickPosition from SideKick rather than separate classes. \
Bumped SideKick dependency to 1.7.

Modified Paths:
--------------
    plugins/XML/trunk/XML.props
    plugins/XML/trunk/ivy.xml
    plugins/XML/trunk/sidekick/json/JsonParser.java
    plugins/XML/trunk/sidekick/json/parser/JSONSideKickListener.java
    plugins/XML/trunk/sidekick/json/parser/SideKickErrorListener.java

Removed Paths:
-------------
    plugins/XML/trunk/sidekick/json/parser/ParseException.java
    plugins/XML/trunk/sidekick/json/parser/SideKickPosition.java

Modified: plugins/XML/trunk/XML.props
===================================================================
--- plugins/XML/trunk/XML.props	2014-12-23 21:09:47 UTC (rev 23807)
+++ plugins/XML/trunk/XML.props	2014-12-23 21:16:58 UTC (rev 23808)
@@ -10,7 +10,7 @@
 plugin.xml.XmlPlugin.depend.1=jedit 05.00.01.00
 plugin.xml.XmlPlugin.depend.2=plugin xerces.XercesPlugin 2.9.1
 plugin.xml.XmlPlugin.depend.3=plugin errorlist.ErrorListPlugin 1.9
-plugin.xml.XmlPlugin.depend.4=plugin sidekick.SideKickPlugin 1.3
+plugin.xml.XmlPlugin.depend.4=plugin sidekick.SideKickPlugin 1.7
 plugin.xml.XmlPlugin.depend.5=optional plugin beauty.BeautyPlugin 0.7.0
 plugin.xml.XmlPlugin.depend.6=plugin CommonControlsPlugin 1.5
 plugin.xml.XmlPlugin.depend.7=plugin eclipseicons.EclipseIconsPlugin 1.0

Modified: plugins/XML/trunk/ivy.xml
===================================================================
--- plugins/XML/trunk/ivy.xml	2014-12-23 21:09:47 UTC (rev 23807)
+++ plugins/XML/trunk/ivy.xml	2014-12-23 21:16:58 UTC (rev 23808)
@@ -3,11 +3,12 @@
     <dependencies>
         	<dependency org="jedit-plugins" name="XercesPlugin" rev="2.9.1"/>
         	<dependency org="jedit-plugins" name="ErrorList" rev="1.9"/>
-        	<dependency org="jedit-plugins" name="SideKick" rev="1.3"/>
+        	<!-- <dependency org="jedit-plugins" name="SideKick" rev="1.7"/> -->
         	<dependency org="jedit-plugins" name="Beauty" rev="0.7.0"/>
         	<dependency org="jedit-plugins" name="CommonControls" rev="1.5"/>
         	<dependency org="jedit-plugins" name="EclipseIcons" rev="1.0"/>
         	<dependency org="jedit-plugins" name="Hyperlinks" rev="1.1.0"/>
         	<dependency org="jedit-plugins" name="Templates" rev="4.1.2"/>
+        	<!-- <dependency org="jedit-plugins" name="AntlrPlugin" rev="4.4"/> -->
     </dependencies>
 </ivy-module>
\ No newline at end of file

Modified: plugins/XML/trunk/sidekick/json/JsonParser.java
===================================================================
--- plugins/XML/trunk/sidekick/json/JsonParser.java	2014-12-23 21:09:47 UTC (rev \
                23807)
+++ plugins/XML/trunk/sidekick/json/JsonParser.java	2014-12-23 21:16:58 UTC (rev \
23808) @@ -43,7 +43,7 @@
 
 import sidekick.SideKickParsedData;
 import sidekick.SideKickParser;
-import sidekick.util.*;
+import sidekick.util.ParseError;
 
 import errorlist.DefaultErrorSource;
 import errorlist.ErrorSource;
@@ -131,11 +131,11 @@
 
     /* the parser accumulates errors as it parses.  This method passed them all
     to the ErrorList plugin. */
-    private void handleErrors( Buffer buffer, DefaultErrorSource errorSource, \
List<ParseException> errors ) { +    private void handleErrors( Buffer buffer, \
DefaultErrorSource errorSource, List<sidekick.util.ParseError> errors ) {  if ( \
errors == null || errors.isEmpty() ) {  return;
         }
-        for ( ParseException pe : errors ) {
+        for ( sidekick.util.ParseError pe : errors ) {
             errorSource.addError( ErrorSource.ERROR, buffer.getPath(), \
pe.getLineNumber(), pe.getColumn(), pe.getColumn() + pe.getLength(), pe.getMessage() \
);  }
     }

Modified: plugins/XML/trunk/sidekick/json/parser/JSONSideKickListener.java
===================================================================
--- plugins/XML/trunk/sidekick/json/parser/JSONSideKickListener.java	2014-12-23 \
                21:09:47 UTC (rev 23807)
+++ plugins/XML/trunk/sidekick/json/parser/JSONSideKickListener.java	2014-12-23 \
21:16:58 UTC (rev 23808) @@ -5,6 +5,7 @@
 import org.antlr.v4.runtime.tree.TerminalNode;
 
 import sidekick.util.Location;
+import sidekick.util.SideKickPosition;
 
 import java.util.ArrayDeque;
 import java.util.Deque;

Deleted: plugins/XML/trunk/sidekick/json/parser/ParseException.java
===================================================================
--- plugins/XML/trunk/sidekick/json/parser/ParseException.java	2014-12-23 21:09:47 \
                UTC (rev 23807)
+++ plugins/XML/trunk/sidekick/json/parser/ParseException.java	2014-12-23 21:16:58 \
UTC (rev 23808) @@ -1,31 +0,0 @@
-package sidekick.json.parser;
-
-public class ParseException extends Exception {
-    private String message;
-    private int lineNumber;
-    private int column;
-    private int length;
-    
-    public ParseException(String message, int lineNumber, int column, int length) {
-        this.message = message;
-        this.lineNumber = lineNumber;
-        this.column = column;
-        this.length = length;
-    }
-    
-    public String getMessage() {
-        return message;   
-    }
-    
-    public int getLineNumber() {
-        return lineNumber;   
-    }
-    
-    public int getColumn() {
-        return column;   
-    }
-    
-    public int getLength() {
-        return length;   
-    }
-}
\ No newline at end of file

Modified: plugins/XML/trunk/sidekick/json/parser/SideKickErrorListener.java
===================================================================
--- plugins/XML/trunk/sidekick/json/parser/SideKickErrorListener.java	2014-12-23 \
                21:09:47 UTC (rev 23807)
+++ plugins/XML/trunk/sidekick/json/parser/SideKickErrorListener.java	2014-12-23 \
21:16:58 UTC (rev 23808) @@ -4,11 +4,13 @@
 
 import java.util.*;
 
+import sidekick.util.ParseError;
+
 public class SideKickErrorListener extends BaseErrorListener {
 
-    private List<ParseException> errors = new ArrayList<ParseException>();
+    private List<ParseError> errors = new ArrayList<ParseError>();
 
-    public List<ParseException> getErrors() {
+    public List<ParseError> getErrors() {
         return errors;
     }
 
@@ -20,7 +22,7 @@
             int endOffset = e.getOffendingToken().getStopIndex();
             length = endOffset - startOffset;
         }
-        ParseException pe = new ParseException( msg, line - 1, charPositionInLine, \
length ); +        ParseError pe = new ParseError( msg, line - 1, charPositionInLine, \
length );  errors.add( pe );
     }
 }
\ No newline at end of file

Deleted: plugins/XML/trunk/sidekick/json/parser/SideKickPosition.java
===================================================================
--- plugins/XML/trunk/sidekick/json/parser/SideKickPosition.java	2014-12-23 21:09:47 \
                UTC (rev 23807)
+++ plugins/XML/trunk/sidekick/json/parser/SideKickPosition.java	2014-12-23 21:16:58 \
UTC (rev 23808) @@ -1,17 +0,0 @@
-package sidekick.json.parser;
-
-import javax.swing.text.Position;
-
-// a concrete implementation of Position
-public class SideKickPosition implements Position {
-    
-    private int offset;
-    
-    public SideKickPosition(int offset) {
-        this.offset = offset;   
-    }
-    
-    public int getOffset() {
-        return offset;   
-    }
-}
\ No newline at end of file

This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.


------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
jEdit-CVS mailing list
jEdit-CVS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic