You can subscribe to this list here.
2000 |
Jan
(11) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(8) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(145) |
Nov
(352) |
Dec
(329) |
2002 |
Jan
(461) |
Feb
(533) |
Mar
(632) |
Apr
(363) |
May
(619) |
Jun
(324) |
Jul
(109) |
Aug
(247) |
Sep
(167) |
Oct
(215) |
Nov
(115) |
Dec
(262) |
2003 |
Jan
(568) |
Feb
(537) |
Mar
(760) |
Apr
(493) |
May
(500) |
Jun
(284) |
Jul
(178) |
Aug
(180) |
Sep
(135) |
Oct
(230) |
Nov
(266) |
Dec
(175) |
2004 |
Jan
(121) |
Feb
(294) |
Mar
(222) |
Apr
(172) |
May
(162) |
Jun
(105) |
Jul
(93) |
Aug
(151) |
Sep
(136) |
Oct
(62) |
Nov
(74) |
Dec
(178) |
2005 |
Jan
(179) |
Feb
(288) |
Mar
(153) |
Apr
(138) |
May
(195) |
Jun
(39) |
Jul
(62) |
Aug
(41) |
Sep
(15) |
Oct
(365) |
Nov
(130) |
Dec
(199) |
2006 |
Jan
(235) |
Feb
(92) |
Mar
(262) |
Apr
(250) |
May
(345) |
Jun
(513) |
Jul
(587) |
Aug
(210) |
Sep
(216) |
Oct
(200) |
Nov
(188) |
Dec
(115) |
2007 |
Jan
(259) |
Feb
(182) |
Mar
(217) |
Apr
(109) |
May
(161) |
Jun
(205) |
Jul
(291) |
Aug
(176) |
Sep
(185) |
Oct
(190) |
Nov
(208) |
Dec
(182) |
2008 |
Jan
(141) |
Feb
(193) |
Mar
(219) |
Apr
(112) |
May
(233) |
Jun
(218) |
Jul
(149) |
Aug
(338) |
Sep
(291) |
Oct
(143) |
Nov
(131) |
Dec
(152) |
2009 |
Jan
(266) |
Feb
(178) |
Mar
(168) |
Apr
(167) |
May
(198) |
Jun
(282) |
Jul
(383) |
Aug
(341) |
Sep
(153) |
Oct
(214) |
Nov
(164) |
Dec
(278) |
2010 |
Jan
(430) |
Feb
(300) |
Mar
(214) |
Apr
(198) |
May
(271) |
Jun
(321) |
Jul
(144) |
Aug
(208) |
Sep
(275) |
Oct
(287) |
Nov
(218) |
Dec
(153) |
2011 |
Jan
(172) |
Feb
(172) |
Mar
(121) |
Apr
(62) |
May
(23) |
Jun
(155) |
Jul
(120) |
Aug
(252) |
Sep
(170) |
Oct
(206) |
Nov
(356) |
Dec
(300) |
2012 |
Jan
(412) |
Feb
(313) |
Mar
(419) |
Apr
(153) |
May
(194) |
Jun
(226) |
Jul
(115) |
Aug
(143) |
Sep
(223) |
Oct
(173) |
Nov
(121) |
Dec
(143) |
2013 |
Jan
(156) |
Feb
(109) |
Mar
(146) |
Apr
(82) |
May
(65) |
Jun
(52) |
Jul
(55) |
Aug
(347) |
Sep
(65) |
Oct
(95) |
Nov
(85) |
Dec
(37) |
2014 |
Jan
(12) |
Feb
(51) |
Mar
(31) |
Apr
(97) |
May
(60) |
Jun
(32) |
Jul
(35) |
Aug
(47) |
Sep
(16) |
Oct
(36) |
Nov
(55) |
Dec
(90) |
2015 |
Jan
(34) |
Feb
(65) |
Mar
(13) |
Apr
(13) |
May
(49) |
Jun
(10) |
Jul
(23) |
Aug
(96) |
Sep
(78) |
Oct
(38) |
Nov
(41) |
Dec
(126) |
2016 |
Jan
(29) |
Feb
(38) |
Mar
(21) |
Apr
(12) |
May
(45) |
Jun
(53) |
Jul
(40) |
Aug
(69) |
Sep
(60) |
Oct
(11) |
Nov
(19) |
Dec
(2) |
2017 |
Jan
(28) |
Feb
(17) |
Mar
(57) |
Apr
(4) |
May
(15) |
Jun
(60) |
Jul
(21) |
Aug
(5) |
Sep
(6) |
Oct
(34) |
Nov
(17) |
Dec
(28) |
2018 |
Jan
(15) |
Feb
(7) |
Mar
(13) |
Apr
(7) |
May
(2) |
Jun
(6) |
Jul
(10) |
Aug
(15) |
Sep
(6) |
Oct
|
Nov
|
Dec
|
2019 |
Jan
(2) |
Feb
(2) |
Mar
(9) |
Apr
(5) |
May
|
Jun
(6) |
Jul
(4) |
Aug
(35) |
Sep
(1) |
Oct
(6) |
Nov
(1) |
Dec
(18) |
2020 |
Jan
(1) |
Feb
|
Mar
(141) |
Apr
(196) |
May
(41) |
Jun
(3) |
Jul
(4) |
Aug
(3) |
Sep
(27) |
Oct
(2) |
Nov
(4) |
Dec
(25) |
2021 |
Jan
(8) |
Feb
(1) |
Mar
(46) |
Apr
(48) |
May
|
Jun
(9) |
Jul
(1) |
Aug
|
Sep
(5) |
Oct
(3) |
Nov
(10) |
Dec
(7) |
2022 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
(24) |
Jul
(7) |
Aug
(7) |
Sep
(13) |
Oct
(7) |
Nov
(1) |
Dec
(2) |
2023 |
Jan
(11) |
Feb
(4) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(13) |
Sep
(32) |
Oct
(10) |
Nov
(6) |
Dec
|
2024 |
Jan
|
Feb
(8) |
Mar
(4) |
Apr
(3) |
May
(22) |
Jun
|
Jul
(11) |
Aug
(8) |
Sep
|
Oct
(9) |
Nov
|
Dec
|
2025 |
Jan
|
Feb
(2) |
Mar
(16) |
Apr
(5) |
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <dal...@us...> - 2023-08-09 16:35:58
|
Revision: 25640 http://sourceforge.net/p/jedit/svn/25640 Author: daleanson Date: 2023-08-09 16:35:56 +0000 (Wed, 09 Aug 2023) Log Message: ----------- Added some deprecation annotations Modified Paths: -------------- plugins/Beauty/trunk/src/beauty/parsers/html/SimpleCharStream.java plugins/Beauty/trunk/src/beauty/parsers/java/JavaCharStream.java plugins/Beauty/trunk/src/beauty/parsers/java/SimpleCharStream.java plugins/Beauty/trunk/src/beauty/parsers/javacc/JavaCharStream.java plugins/Beauty/trunk/src/beauty/parsers/javacc/SimpleCharStream.java Modified: plugins/Beauty/trunk/src/beauty/parsers/html/SimpleCharStream.java =================================================================== --- plugins/Beauty/trunk/src/beauty/parsers/html/SimpleCharStream.java 2023-07-10 17:29:29 UTC (rev 25639) +++ plugins/Beauty/trunk/src/beauty/parsers/html/SimpleCharStream.java 2023-08-09 16:35:56 UTC (rev 25640) @@ -202,7 +202,7 @@ * @deprecated * @see #getEndColumn */ - + @Deprecated public int getColumn() { return bufcolumn[bufpos]; } @@ -211,7 +211,7 @@ * @deprecated * @see #getEndLine */ - + @Deprecated public int getLine() { return bufline[bufpos]; } Modified: plugins/Beauty/trunk/src/beauty/parsers/java/JavaCharStream.java =================================================================== --- plugins/Beauty/trunk/src/beauty/parsers/java/JavaCharStream.java 2023-07-10 17:29:29 UTC (rev 25639) +++ plugins/Beauty/trunk/src/beauty/parsers/java/JavaCharStream.java 2023-08-09 16:35:56 UTC (rev 25640) @@ -344,7 +344,7 @@ * @deprecated * @see #getEndColumn */ - + @Deprecated public int getColumn() { return bufcolumn[bufpos]; } @@ -353,7 +353,7 @@ * @deprecated * @see #getEndLine */ - + @Deprecated public int getLine() { return bufline[bufpos]; } Modified: plugins/Beauty/trunk/src/beauty/parsers/java/SimpleCharStream.java =================================================================== --- plugins/Beauty/trunk/src/beauty/parsers/java/SimpleCharStream.java 2023-07-10 17:29:29 UTC (rev 25639) +++ plugins/Beauty/trunk/src/beauty/parsers/java/SimpleCharStream.java 2023-08-09 16:35:56 UTC (rev 25640) @@ -202,7 +202,7 @@ * @deprecated * @see #getEndColumn */ - + @Deprecated public int getColumn() { return bufcolumn[bufpos]; } @@ -211,7 +211,7 @@ * @deprecated * @see #getEndLine */ - + @Deprecated public int getLine() { return bufline[bufpos]; } Modified: plugins/Beauty/trunk/src/beauty/parsers/javacc/JavaCharStream.java =================================================================== --- plugins/Beauty/trunk/src/beauty/parsers/javacc/JavaCharStream.java 2023-07-10 17:29:29 UTC (rev 25639) +++ plugins/Beauty/trunk/src/beauty/parsers/javacc/JavaCharStream.java 2023-08-09 16:35:56 UTC (rev 25640) @@ -344,7 +344,7 @@ * @deprecated * @see #getEndColumn */ - + @Deprecated public int getColumn() { return bufcolumn[bufpos]; } @@ -353,7 +353,7 @@ * @deprecated * @see #getEndLine */ - + @Deprecated public int getLine() { return bufline[bufpos]; } Modified: plugins/Beauty/trunk/src/beauty/parsers/javacc/SimpleCharStream.java =================================================================== --- plugins/Beauty/trunk/src/beauty/parsers/javacc/SimpleCharStream.java 2023-07-10 17:29:29 UTC (rev 25639) +++ plugins/Beauty/trunk/src/beauty/parsers/javacc/SimpleCharStream.java 2023-08-09 16:35:56 UTC (rev 25640) @@ -202,7 +202,7 @@ * @deprecated * @see #getEndColumn */ - + @Deprecated public int getColumn() { return bufcolumn[bufpos]; } @@ -211,7 +211,7 @@ * @deprecated * @see #getEndLine */ - + @Deprecated public int getLine() { return bufline[bufpos]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2023-07-10 17:29:30
|
Revision: 25639 http://sourceforge.net/p/jedit/svn/25639 Author: daleanson Date: 2023-07-10 17:29:29 +0000 (Mon, 10 Jul 2023) Log Message: ----------- Tag for release Added Paths: ----------- plugins/Beauty/tags/beauty-1.1/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2023-07-10 17:27:56
|
Revision: 25638 http://sourceforge.net/p/jedit/svn/25638 Author: daleanson Date: 2023-07-10 17:27:53 +0000 (Mon, 10 Jul 2023) Log Message: ----------- Prep for release Modified Paths: -------------- plugins/Beauty/trunk/beauty.props plugins/Beauty/trunk/build.xml plugins/Beauty/trunk/src/beauty/beautifiers/Java8Beautifier.java plugins/Beauty/trunk/src/beauty/beautifiers/JavaBeautifier.java plugins/Beauty/trunk/src/beauty/parsers/ErrorListener.java plugins/Beauty/trunk/src/docs/index.html Modified: plugins/Beauty/trunk/beauty.props =================================================================== --- plugins/Beauty/trunk/beauty.props 2023-07-10 17:27:18 UTC (rev 25637) +++ plugins/Beauty/trunk/beauty.props 2023-07-10 17:27:53 UTC (rev 25638) @@ -9,7 +9,7 @@ plugin.beauty.BeautyPlugin.docs=docs/index.html plugin.beauty.BeautyPlugin.depend.0=jdk 11 plugin.beauty.BeautyPlugin.depend.1=jedit 05.06.00.00 -plugin.beauty.BeautyPlugin.depend.2=plugin CommonControlsPlugin 1.7.4 +plugin.beauty.BeautyPlugin.depend.2=plugin CommonControlsPlugin 1.7.5 plugin.beauty.BeautyPlugin.depend.3=plugin antlr.AntlrPlugin 4.10 plugin.beauty.BeautyPlugin.usePluginHome=true Modified: plugins/Beauty/trunk/build.xml =================================================================== --- plugins/Beauty/trunk/build.xml 2023-07-10 17:27:18 UTC (rev 25637) +++ plugins/Beauty/trunk/build.xml 2023-07-10 17:27:53 UTC (rev 25638) @@ -1,7 +1,5 @@ <project name="Beauty" default="dist" basedir="." xmlns:if="ant:if" xmlns:unless="ant:unless"> - <echo>${java.home}</echo> <!-- read build.props to override properties set below --> - <property file="../build.properties"/> <property file="build.properties"/> Modified: plugins/Beauty/trunk/src/beauty/beautifiers/Java8Beautifier.java =================================================================== --- plugins/Beauty/trunk/src/beauty/beautifiers/Java8Beautifier.java 2023-07-10 17:27:18 UTC (rev 25637) +++ plugins/Beauty/trunk/src/beauty/beautifiers/Java8Beautifier.java 2023-07-10 17:27:53 UTC (rev 25638) @@ -16,7 +16,11 @@ import org.antlr.v4.runtime.tree.*; import org.gjt.sp.jedit.jEdit; -// This is a newer parser based on Antlr and supports java 8 language. +/** + * This is the old Antlr parser for java 8 and below. + * @deprecated The new parser for Java 17 handles all versions of java code for Java 17 and below. + */ +@Deprecated public class Java8Beautifier extends Beautifier { private int bracketStyle = 1; // JavaParser.ATTACHED; Modified: plugins/Beauty/trunk/src/beauty/beautifiers/JavaBeautifier.java =================================================================== --- plugins/Beauty/trunk/src/beauty/beautifiers/JavaBeautifier.java 2023-07-10 17:27:18 UTC (rev 25637) +++ plugins/Beauty/trunk/src/beauty/beautifiers/JavaBeautifier.java 2023-07-10 17:27:53 UTC (rev 25638) @@ -8,7 +8,11 @@ import org.gjt.sp.jedit.jEdit; -// This is the old parser for java 7 and below, it uses the javacc parser. +/** + * This is the old parser for java 7 and below, it uses the javacc parser. + * @deprecated The new parser for Java 17 handles all versions of java code for Java 17 and below. + */ +@Deprecated public class JavaBeautifier extends Beautifier { private static JavaParser parser = null; Modified: plugins/Beauty/trunk/src/beauty/parsers/ErrorListener.java =================================================================== --- plugins/Beauty/trunk/src/beauty/parsers/ErrorListener.java 2023-07-10 17:27:18 UTC (rev 25637) +++ plugins/Beauty/trunk/src/beauty/parsers/ErrorListener.java 2023-07-10 17:27:53 UTC (rev 25638) @@ -1,6 +1,5 @@ package beauty.parsers; - import java.util.*; import org.antlr.v4.runtime.*; @@ -9,6 +8,7 @@ public class ErrorListener extends BaseErrorListener { private List<ParserException> errors = new ArrayList<ParserException>(); + public List<ParserException> getErrors() { return errors; } @@ -28,9 +28,12 @@ /** * The antlr output is sometimes very verbose, so this method - * takes a long line as input, splits it into lines of no more than80 characters. + * takes a long line as input, splits it into lines of no more than 80 characters. */ private String wrapLongLine(String s) { + if (s.length() <= 80) { + return s; + } StringTokenizer st = new StringTokenizer(s, " "); StringBuilder sb = new StringBuilder(s.length()); sb.append('\n'); // it's a long line so start it on a new line @@ -47,6 +50,4 @@ } return sb.toString(); } - - -} +} \ No newline at end of file Modified: plugins/Beauty/trunk/src/docs/index.html =================================================================== --- plugins/Beauty/trunk/src/docs/index.html 2023-07-10 17:27:18 UTC (rev 25637) +++ plugins/Beauty/trunk/src/docs/index.html 2023-07-10 17:27:53 UTC (rev 25638) @@ -38,6 +38,7 @@ <li>JavaCC: needs work, formats to a combination of Sun's Java formatting standard and my own style for javacc files.</li> <li>JSON: works very well. JSON files are usually machine-generated in a single long line, so it is nice to be able to format them quickly to a more human-readable format.</li> <li>Beanshell: Works very well. It generally follows Sun's formatting standard for java files, although beanshell code is slightly different from java code, so there are some minor differences.</li> + <li>CSV: Works very well. All this one does is align the columns to make them easier to read, or collapses the columns if they are already aligned. Note this is only for COMMA separated files, other separators (e.g. tab or semi-colon) are not supported at this time.</li> </ul> <p> There are several other plugins that support the Beauty framework: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2023-07-10 17:27:19
|
Revision: 25637 http://sourceforge.net/p/jedit/svn/25637 Author: daleanson Date: 2023-07-10 17:27:18 +0000 (Mon, 10 Jul 2023) Log Message: ----------- csv beautifier Added Paths: ----------- plugins/Beauty/trunk/src/beauty/beautifiers/CSVBeautifier.java Added: plugins/Beauty/trunk/src/beauty/beautifiers/CSVBeautifier.java =================================================================== --- plugins/Beauty/trunk/src/beauty/beautifiers/CSVBeautifier.java (rev 0) +++ plugins/Beauty/trunk/src/beauty/beautifiers/CSVBeautifier.java 2023-07-10 17:27:18 UTC (rev 25637) @@ -0,0 +1,40 @@ +package beauty.beautifiers; + +import java.io.*; +import java.util.*; + +import beauty.parsers.ParserException; +import beauty.parsers.csv.*; + +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.tree.*; + +public class CSVBeautifier extends Beautifier { + + private static CSVParser parser = null; + + public String beautify(String text) throws ParserException { + try { + // set up the parser + StringReader input = new StringReader( text ); + CharStream antlrInput = CharStreams.fromReader(input); + CSVLexer lexer = new CSVLexer( antlrInput ); + CommonTokenStream tokens = new CommonTokenStream( lexer ); + CSVParser csvParser = new CSVParser( tokens ); + + // add an error handler that stops beautifying on any parsing error + csvParser.setErrorHandler(new CSVErrorHandler()); + + // parse and beautify the buffer contents + ParseTree tree = csvParser.csvFile(); + ParseTreeWalker walker = new ParseTreeWalker(); + CSVBeautyListener listener = new CSVBeautyListener(); + walker.walk( listener, tree ); + + return listener.getText(); + + } catch (Exception e) { + throw new ParserException(e); + } + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kp...@us...> - 2023-03-23 19:53:34
|
Revision: 25636 http://sourceforge.net/p/jedit/svn/25636 Author: kpouer Date: 2023-03-23 19:53:32 +0000 (Thu, 23 Mar 2023) Log Message: ----------- use a StringBuilder instead of StringBuffer and add some javadoc Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/io/RegexEncodingDetector.java Modified: jEdit/trunk/org/gjt/sp/jedit/io/RegexEncodingDetector.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/io/RegexEncodingDetector.java 2023-02-10 18:29:48 UTC (rev 25635) +++ jEdit/trunk/org/gjt/sp/jedit/io/RegexEncodingDetector.java 2023-03-23 19:53:32 UTC (rev 25636) @@ -20,6 +20,7 @@ package org.gjt.sp.jedit.io; +import javax.annotation.Nullable; import java.io.InputStream; import java.io.InputStreamReader; import java.io.IOException; @@ -57,10 +58,19 @@ this.replacement = replacement; } + /** + * Detects the encoding of the given sample. + * The sample input stream must not be closed in this method + * @param sample the sample input stream + * @return the detected encoding or null if the encoding cannot be detected + * @throws IOException if an I/O error occurs + */ @Override + @Nullable public String detectEncoding(InputStream sample) throws IOException { - InputStreamReader reader = new InputStreamReader(sample); + @SuppressWarnings("IOResourceOpenedButNotSafelyClosed") + InputStreamReader reader = new InputStreamReader(sample); final int bufferSize = 1024; char[] buffer = new char[bufferSize]; int readSize = reader.read(buffer, 0, bufferSize); @@ -103,8 +113,7 @@ int found_end = found.end(); int source_length = found_end - found_start; int length_before_match = found_start - appendPosition; - StringBuffer replaced = new StringBuffer( - length_before_match + (source_length * 2)); + var replaced = new StringBuilder(length_before_match + (source_length * 2)); found.appendReplacement(replaced, replacement); return replaced.substring(length_before_match); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ez...@us...> - 2023-02-08 17:02:40
|
Revision: 25634 http://sourceforge.net/p/jedit/svn/25634 Author: ezust Date: 2023-02-08 17:02:38 +0000 (Wed, 08 Feb 2023) Log Message: ----------- QDoc is the name. Modified Paths: -------------- plugins/Qdoc/trunk/qdoc.props Modified: plugins/Qdoc/trunk/qdoc.props =================================================================== --- plugins/Qdoc/trunk/qdoc.props 2023-02-08 16:30:32 UTC (rev 25633) +++ plugins/Qdoc/trunk/qdoc.props 2023-02-08 17:02:38 UTC (rev 25634) @@ -4,7 +4,7 @@ plugin.sidekick.qdoc.QdocSideKickPlugin.description=qdoc sidekick plugin.sidekick.qdoc.QdocSideKickPlugin.docs=docs/qdoc.html plugin.sidekick.qdoc.QdocSideKickPlugin.longdescription=description.html -plugin.sidekick.qdoc.QdocSideKickPlugin.name=Qdoc +plugin.sidekick.qdoc.QdocSideKickPlugin.name=QDoc plugin.sidekick.qdoc.QdocSideKickPlugin.usePluginHome=false plugin.sidekick.qdoc.QdocSideKickPlugin.version=1.0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ez...@us...> - 2023-02-08 16:30:35
|
Revision: 25633 http://sourceforge.net/p/jedit/svn/25633 Author: ezust Date: 2023-02-08 16:30:32 +0000 (Wed, 08 Feb 2023) Log Message: ----------- It's called QDoc, not Qdoc. Modified Paths: -------------- plugins/Qdoc/trunk/docs/qdoc.html Modified: plugins/Qdoc/trunk/docs/qdoc.html =================================================================== --- plugins/Qdoc/trunk/docs/qdoc.html 2023-02-08 16:20:43 UTC (rev 25632) +++ plugins/Qdoc/trunk/docs/qdoc.html 2023-02-08 16:30:32 UTC (rev 25633) @@ -1,6 +1,9 @@ <html> +<head><title> +QDoc Plugin</title> +</head> <body> - <h2>Qdoc Plugin</h2> + <h2>QDoc Plugin</h2> <h3>Dale Anson</h3> <p></p> <p><a href="https://doc.qt.io/qt-6/01-qdoc-manual.html">QDoc</a> is @@ -10,8 +13,8 @@ supporting hierarchical sections, cross-document links, macros and such. </p> - <p> This plugin provides Sidekick with hierarchical structure data on the currently - editing .qdoc file. The elements Qdoc SideKick cares about are: + <p> This plugin provides SideKick with hierarchical structure data on the currently + editing .qdoc file. The elements QDoc SideKick cares about are: <tt>\page \section1 \section2 \section3 \section4</tt>. </p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ez...@us...> - 2023-02-08 16:20:45
|
Revision: 25632 http://sourceforge.net/p/jedit/svn/25632 Author: ezust Date: 2023-02-08 16:20:43 +0000 (Wed, 08 Feb 2023) Log Message: ----------- Adding some docs. Modified Paths: -------------- plugins/Qdoc/trunk/docs/qdoc.html Modified: plugins/Qdoc/trunk/docs/qdoc.html =================================================================== --- plugins/Qdoc/trunk/docs/qdoc.html 2023-02-03 20:59:26 UTC (rev 25631) +++ plugins/Qdoc/trunk/docs/qdoc.html 2023-02-08 16:20:43 UTC (rev 25632) @@ -3,6 +3,18 @@ <h2>Qdoc Plugin</h2> <h3>Dale Anson</h3> <p></p> - -</body> + <p><a href="https://doc.qt.io/qt-6/01-qdoc-manual.html">QDoc</a> is + the name of a program that generates HTML, and a file format for documenting classes + in C++ or QML, and also a filename extension for structured documentation. + <tt>qdoc</tt> is like javadoc for Qt code, and also like a simplified LaTeX, + supporting hierarchical sections, cross-document links, macros and such. + </p> + + <p> This plugin provides Sidekick with hierarchical structure data on the currently + editing .qdoc file. The elements Qdoc SideKick cares about are: + <tt>\page \section1 \section2 \section3 \section4</tt>. + </p> + + +</body> </html> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2023-02-03 20:59:28
|
Revision: 25631 http://sourceforge.net/p/jedit/svn/25631 Author: daleanson Date: 2023-02-03 20:59:26 +0000 (Fri, 03 Feb 2023) Log Message: ----------- Allow for multiple pages/titles in a single document. Modified Paths: -------------- plugins/Qdoc/trunk/src/sidekick/qdoc/QdocSideKickParser.java Modified: plugins/Qdoc/trunk/src/sidekick/qdoc/QdocSideKickParser.java =================================================================== --- plugins/Qdoc/trunk/src/sidekick/qdoc/QdocSideKickParser.java 2023-01-26 17:28:51 UTC (rev 25630) +++ plugins/Qdoc/trunk/src/sidekick/qdoc/QdocSideKickParser.java 2023-02-03 20:59:26 UTC (rev 25631) @@ -102,6 +102,8 @@ int length; // there should only be one title node, but of course, the qdoc spec // doesn't enforce that, and doesn't require that there is a title node. + // Alan says there can be multiple titles, they should immediately follow + // a \page QdocNode titleNode = null; // parse the buffer @@ -127,9 +129,12 @@ node.setEndPosition(eofPosition); switch (section) { case "\\title": - node.setIcon(null); - node.setOrdinal(TITLE); - titleNode = node; + + if (titleNode == null) { + node.setIcon(null); + node.setOrdinal(TITLE); + titleNode = node; + } break; case "\\section1": node.setIcon(section1Icon); @@ -163,7 +168,7 @@ QdocNode nextNode = nodes.get(j); if (nextNode.getOrdinal() <= ordinal) { - // set the end location/position of the current node to be the same as the + // set the end location/position of the current node to be the same as the // start location/position of the next node. node.setEndLocation(nextNode.getStartLocation()); node.setEndPosition(nextNode.getStartPosition()); @@ -175,6 +180,7 @@ // arrange the parent/child relationship of the nodes if (nodes.size() > 0) { Deque<QdocNode> deck = new ArrayDeque<QdocNode>(); + QdocNode previous0 = null; QdocNode previous1 = null; QdocNode previous2 = null; QdocNode previous3 = null; @@ -181,13 +187,19 @@ for ( QdocNode node : nodes) { if (node.getOrdinal() == TITLE) { - // there should only be one title and it's already captured + previous0 = node; + deck.add(node); continue; } if (node.getOrdinal() == SECTION1) { + if (previous0 != null) { + previous0.addChild(node); + } + else { + deck.add(node); + } previous1 = node; - deck.add(node); continue; } @@ -231,17 +243,14 @@ titleNode = new QdocNode(title); titleNode.setStartLocation(startLocation); titleNode.setStartPosition(startPosition); - titleNode.setEndLocation(new Location(0, 0)); // TODO: set end to end of buffer - titleNode.setEndPosition(new SideKickPosition(0)); + titleNode.setEndLocation(eofLocation); + titleNode.setEndPosition(eofPosition); } // make a tree for sidekick out of the nodes DefaultMutableTreeNode root = parsedData.root; - DefaultMutableTreeNode titleTreeNode = new DefaultMutableTreeNode(titleNode); - root.add(titleTreeNode); - for ( QdocNode node : deck) { DefaultMutableTreeNode treeNode = new DefaultMutableTreeNode(node); - titleTreeNode.add(treeNode); + root.add(treeNode); if (node.hasChildren()) { addChildNodes(treeNode); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2023-01-26 17:28:52
|
Revision: 25630 http://sourceforge.net/p/jedit/svn/25630 Author: daleanson Date: 2023-01-26 17:28:51 +0000 (Thu, 26 Jan 2023) Log Message: ----------- Set more accurate end locations/positions so tree follows caret better. Modified Paths: -------------- plugins/Qdoc/trunk/src/sidekick/qdoc/QdocSideKickParser.java Modified: plugins/Qdoc/trunk/src/sidekick/qdoc/QdocSideKickParser.java =================================================================== --- plugins/Qdoc/trunk/src/sidekick/qdoc/QdocSideKickParser.java 2023-01-24 00:07:39 UTC (rev 25629) +++ plugins/Qdoc/trunk/src/sidekick/qdoc/QdocSideKickParser.java 2023-01-26 17:28:51 UTC (rev 25630) @@ -92,8 +92,10 @@ if (buffer.getLength() <= 0) { return parsedData; } - // parse the buffer int lineCount = buffer.getLineCount(); + // end of buffer location/position + Location eofLocation = new Location(lineCount - 1, buffer.getLineEndOffset(lineCount - 1)); + SideKickPosition eofPosition = new SideKickPosition(buffer.getLineEndOffset(lineCount - 1)); List<QdocNode> nodes = new ArrayList<QdocNode>(); Location startLocation; SideKickPosition startPosition; @@ -102,6 +104,7 @@ // doesn't enforce that, and doesn't require that there is a title node. QdocNode titleNode = null; + // parse the buffer for (int lineNumber = 0; lineNumber < lineCount; lineNumber++) { String lineText = buffer.getLineText(lineNumber); int index = lineText.indexOf("\\section"); @@ -120,8 +123,8 @@ QdocNode node = new QdocNode(title); node.setStartLocation(startLocation); node.setStartPosition(startPosition); - node.setEndLocation(new Location(lineNumber, buffer.getLineEndOffset(lineNumber))); - node.setEndPosition(new SideKickPosition(buffer.getLineEndOffset(lineNumber))); + node.setEndLocation(eofLocation); + node.setEndPosition(eofPosition); switch (section) { case "\\title": node.setIcon(null); @@ -149,6 +152,26 @@ } } + // reset the end location/position of the nodes + for (int i = 0; i < nodes.size(); i++) { + QdocNode node = nodes.get(i); + // get the ordinal of the current node + int ordinal = node.getOrdinal(); + + // go down the list to find the next node with the same or smaller ordinal + for (int j = i + 1; j < nodes.size(); j++) { + QdocNode nextNode = nodes.get(j); + + if (nextNode.getOrdinal() <= ordinal) { + // set the end location/position of the current node to be the same as the + // start location/position of the next node. + node.setEndLocation(nextNode.getStartLocation()); + node.setEndPosition(nextNode.getStartPosition()); + break; + } + } + } + // arrange the parent/child relationship of the nodes if (nodes.size() > 0) { Deque<QdocNode> deck = new ArrayDeque<QdocNode>(); @@ -208,20 +231,20 @@ titleNode = new QdocNode(title); titleNode.setStartLocation(startLocation); titleNode.setStartPosition(startPosition); - titleNode.setEndLocation(new Location(0,0)); + titleNode.setEndLocation(new Location(0, 0)); // TODO: set end to end of buffer titleNode.setEndPosition(new SideKickPosition(0)); } - // make a tree for sidekick out of the nodes DefaultMutableTreeNode root = parsedData.root; DefaultMutableTreeNode titleTreeNode = new DefaultMutableTreeNode(titleNode); root.add(titleTreeNode); - - for (QdocNode node : deck) { + + for ( QdocNode node : deck) { DefaultMutableTreeNode treeNode = new DefaultMutableTreeNode(node); titleTreeNode.add(treeNode); + if (node.hasChildren()) { - addChildNodes(treeNode); + addChildNodes(treeNode); } } } @@ -231,12 +254,14 @@ } return parsedData; } - + private void addChildNodes(DefaultMutableTreeNode parent) { - QdocNode node = (QdocNode)parent.getUserObject(); - for (QdocNode child : node.getChildren()) { + QdocNode node = (QdocNode) parent.getUserObject(); + + for ( QdocNode child : node.getChildren()) { DefaultMutableTreeNode childTreeNode = new DefaultMutableTreeNode(child); parent.add(childTreeNode); + if (child.hasChildren()) { addChildNodes(childTreeNode); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2023-01-24 00:07:41
|
Revision: 25629 http://sourceforge.net/p/jedit/svn/25629 Author: daleanson Date: 2023-01-24 00:07:39 +0000 (Tue, 24 Jan 2023) Log Message: ----------- Arranged sections into a tree. Added a title node as the top level node if there is a title. Modified Paths: -------------- plugins/Qdoc/trunk/src/sidekick/qdoc/QdocNode.java plugins/Qdoc/trunk/src/sidekick/qdoc/QdocSideKickParser.java Modified: plugins/Qdoc/trunk/src/sidekick/qdoc/QdocNode.java =================================================================== --- plugins/Qdoc/trunk/src/sidekick/qdoc/QdocNode.java 2023-01-19 17:50:23 UTC (rev 25628) +++ plugins/Qdoc/trunk/src/sidekick/qdoc/QdocNode.java 2023-01-24 00:07:39 UTC (rev 25629) @@ -1,28 +1,64 @@ package sidekick.qdoc; +import java.util.*; + import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.text.Position; + import sidekick.Asset; import sidekick.util.Location; import sidekick.util.SideKickElement; + public class QdocNode extends Asset implements Comparable<QdocNode>, SideKickElement { + private Icon icon = null; - private Icon icon = null; private Location startLocation = new Location(); + private Location endLocation = new Location(); + private Position startPosition = new Position() { + public int getOffset() { return 0; } }; + private Position endPosition = new Position() { + public int getOffset() { return 0; } }; + /* + * Ordinals indicate the depth this node should be in the tree: + * 0 title + * 1 section 1 + * 2 section 2 + * 3 section 3 + * 4 section 4 + * where larger numbers are children of the next smaller number. + */ + private int ordinal = 0; + + private QdocNode parent = null; + + private List<QdocNode> children = null; + + // ordinal definitions + public static int TITLE = 0; + + public static int SECTION1 = 1; + + public static int SECTION2 = 2; + + public static int SECTION3 = 3; + + public static int SECTION4 = 4; + + public QdocNode() { super(""); } @@ -60,15 +96,46 @@ return endPosition; } - public void setEndPosition( Position p ) { + public void setEndPosition(Position p) { endPosition = p; end = p; } - + + public void setOrdinal(int i) { + ordinal = i; + } + + public int getOrdinal() { + return ordinal; + } + + public void setParent(QdocNode parent) { + this.parent = parent; + } + + public QdocNode getParent() { + return parent; + } + + public void addChild(QdocNode node) { + if (children == null) { + children = new ArrayList<QdocNode>(); + } + children.add(node); + } + + public List<QdocNode> getChildren() { + return children; + } + + public boolean hasChildren() { + return (children != null && !children.isEmpty()); + } + public void setIcon(ImageIcon icon) { - this.icon = icon; + this.icon = icon; } - + public Icon getIcon() { return icon; } @@ -76,19 +143,51 @@ public String toString() { return name; } - + public String getShortString() { - return name; + return name; } - + public String getLongString() { - return name + ": " + getStartLocation() + ":" + getEndLocation(); + return name + ": " + getStartLocation() + ":" + getEndLocation(); } public int compareTo(QdocNode o) { if (o == null) { - return 1; + return 1; } return toString().compareToIgnoreCase(o.toString()); } -} + + public String dump() { + StringBuilder sb = new StringBuilder(); + + for (int i = 0; i < ordinal; i++) { + sb.append('\t'); + } + sb.append(getOrdinal()).append(name).append('\n'); + + if (hasChildren()) { + for ( QdocNode child : children) { + sb.append(dump(child)); + } + } + return sb.toString(); + } + + private String dump(QdocNode node) { + StringBuilder sb = new StringBuilder(); + + for (int i = 0; i < node.getOrdinal(); i++) { + sb.append('\t'); + } + sb.append(node.getOrdinal()).append(node.toString()).append('\n'); + + if (node.hasChildren()) { + for (QdocNode child : node.getChildren()) { + sb.append(dump(child)); + } + } + return sb.toString(); + } +} \ No newline at end of file Modified: plugins/Qdoc/trunk/src/sidekick/qdoc/QdocSideKickParser.java =================================================================== --- plugins/Qdoc/trunk/src/sidekick/qdoc/QdocSideKickParser.java 2023-01-19 17:50:23 UTC (rev 25628) +++ plugins/Qdoc/trunk/src/sidekick/qdoc/QdocSideKickParser.java 2023-01-24 00:07:39 UTC (rev 25629) @@ -41,6 +41,7 @@ import sidekick.SideKickParsedData; import sidekick.SideKickParser; +import static sidekick.qdoc.QdocNode.*; import sidekick.util.*; @@ -68,6 +69,14 @@ /** * Parse the contents of the given buffer. + * + * qdoc files are essentially flat, with no enforced tree structure. It is assumed + * that "\\title" will be the top level, and below title will be section1's with + * section2's below that and so on. There is nothing in the specification that + * requires this, so it is a huge assumption to think this will always be the case, + * but that is what I'm assuming here. The sidekick tree could look really funky + * if the qdoc author doesn't follow this hierarchy. + * * @param buffer the buffer to parse * @param errorSource where to send any error messages * @return data for the tree @@ -75,7 +84,6 @@ public SideKickParsedData parse(Buffer buffer, DefaultErrorSource errorSource) { String filename = buffer.getPath(); SideKickParsedData parsedData = new QdocSideKickParsedData(filename); - DefaultMutableTreeNode root = parsedData.root; ImageIcon section1Icon = EclipseIconsPlugin.getIcon("action1.gif"); ImageIcon section2Icon = EclipseIconsPlugin.getIcon("action2.gif"); ImageIcon section3Icon = EclipseIconsPlugin.getIcon("action3.gif"); @@ -89,14 +97,24 @@ List<QdocNode> nodes = new ArrayList<QdocNode>(); Location startLocation; SideKickPosition startPosition; + int length; + // there should only be one title node, but of course, the qdoc spec + // doesn't enforce that, and doesn't require that there is a title node. + QdocNode titleNode = null; for (int lineNumber = 0; lineNumber < lineCount; lineNumber++) { String lineText = buffer.getLineText(lineNumber); int index = lineText.indexOf("\\section"); + length = "\\sectionx".length(); + if (index == -1) { + index = lineText.indexOf("\\title"); + length = "\\title".length(); + } + if (index > -1) { - String section = lineText.substring(index, "\\sectionX".length()); - String title = lineText.substring(index + "\\sectionX".length(), lineText.length()); + String section = lineText.substring(index, length); + String title = lineText.substring(index + length, lineText.length()); startLocation = new Location(lineNumber, index); startPosition = new SideKickPosition(buffer.getLineStartOffset(lineNumber) + index); QdocNode node = new QdocNode(title); @@ -105,17 +123,26 @@ node.setEndLocation(new Location(lineNumber, buffer.getLineEndOffset(lineNumber))); node.setEndPosition(new SideKickPosition(buffer.getLineEndOffset(lineNumber))); switch (section) { + case "\\title": + node.setIcon(null); + node.setOrdinal(TITLE); + titleNode = node; + break; case "\\section1": node.setIcon(section1Icon); + node.setOrdinal(SECTION1); break; case "\\section2": node.setIcon(section2Icon); + node.setOrdinal(SECTION2); break; case "\\section3": node.setIcon(section3Icon); + node.setOrdinal(SECTION3); break; case "\\section4": node.setIcon(section4Icon); + node.setOrdinal(SECTION4); break; } nodes.add(node); @@ -122,13 +149,81 @@ } } + // arrange the parent/child relationship of the nodes if (nodes.size() > 0) { - DefaultMutableTreeNode treeNode = new DefaultMutableTreeNode("Qdoc"); - root.add(treeNode); + Deque<QdocNode> deck = new ArrayDeque<QdocNode>(); + QdocNode previous1 = null; + QdocNode previous2 = null; + QdocNode previous3 = null; for ( QdocNode node : nodes) { - treeNode.add(new DefaultMutableTreeNode(node)); + if (node.getOrdinal() == TITLE) { + // there should only be one title and it's already captured + continue; + } + + if (node.getOrdinal() == SECTION1) { + previous1 = node; + deck.add(node); + continue; + } + + if (node.getOrdinal() == SECTION2) { + if (previous1 != null) { + previous1.addChild(node); + } + else { + deck.add(node); + } + previous2 = node; + continue; + } + + if (node.getOrdinal() == SECTION3) { + if (previous2 != null) { + previous2.addChild(node); + } + else { + deck.add(node); + } + previous3 = node; + continue; + } + + if (node.getOrdinal() == SECTION4) { + if (previous3 != null) { + previous3.addChild(node); + } + else { + deck.add(node); + } + continue; + } } + + if (titleNode == null) { + String title = "Untitled"; + startLocation = new Location(0, 0); + startPosition = new SideKickPosition(buffer.getLineStartOffset(0)); + titleNode = new QdocNode(title); + titleNode.setStartLocation(startLocation); + titleNode.setStartPosition(startPosition); + titleNode.setEndLocation(new Location(0,0)); + titleNode.setEndPosition(new SideKickPosition(0)); + } + + // make a tree for sidekick out of the nodes + DefaultMutableTreeNode root = parsedData.root; + DefaultMutableTreeNode titleTreeNode = new DefaultMutableTreeNode(titleNode); + root.add(titleTreeNode); + + for (QdocNode node : deck) { + DefaultMutableTreeNode treeNode = new DefaultMutableTreeNode(node); + titleTreeNode.add(treeNode); + if (node.hasChildren()) { + addChildNodes(treeNode); + } + } } } catch ( Exception e) { @@ -136,4 +231,15 @@ } return parsedData; } + + private void addChildNodes(DefaultMutableTreeNode parent) { + QdocNode node = (QdocNode)parent.getUserObject(); + for (QdocNode child : node.getChildren()) { + DefaultMutableTreeNode childTreeNode = new DefaultMutableTreeNode(child); + parent.add(childTreeNode); + if (child.hasChildren()) { + addChildNodes(childTreeNode); + } + } + } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2023-01-19 17:50:25
|
Revision: 25628 http://sourceforge.net/p/jedit/svn/25628 Author: daleanson Date: 2023-01-19 17:50:23 +0000 (Thu, 19 Jan 2023) Log Message: ----------- Initial commit Added Paths: ----------- plugins/Qdoc/trunk/actions.xml plugins/Qdoc/trunk/build.xml plugins/Qdoc/trunk/description.html plugins/Qdoc/trunk/docs/ plugins/Qdoc/trunk/docs/qdoc.html plugins/Qdoc/trunk/qdoc.props plugins/Qdoc/trunk/qdoc.xml plugins/Qdoc/trunk/qt-convenience-api.qdoc plugins/Qdoc/trunk/services.xml plugins/Qdoc/trunk/src/ plugins/Qdoc/trunk/src/sidekick/ plugins/Qdoc/trunk/src/sidekick/qdoc/ plugins/Qdoc/trunk/src/sidekick/qdoc/QdocNode.java plugins/Qdoc/trunk/src/sidekick/qdoc/QdocSideKickParsedData.java plugins/Qdoc/trunk/src/sidekick/qdoc/QdocSideKickParser.java plugins/Qdoc/trunk/src/sidekick/qdoc/QdocSideKickPlugin.java Added: plugins/Qdoc/trunk/actions.xml =================================================================== --- plugins/Qdoc/trunk/actions.xml (rev 0) +++ plugins/Qdoc/trunk/actions.xml 2023-01-19 17:50:23 UTC (rev 25628) @@ -0,0 +1,4 @@ +<?xml version="1.0"?> +<!DOCTYPE ACTIONS SYSTEM "actions.dtd"> +<ACTIONS> +</ACTIONS> Property changes on: plugins/Qdoc/trunk/actions.xml ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: plugins/Qdoc/trunk/build.xml =================================================================== --- plugins/Qdoc/trunk/build.xml (rev 0) +++ plugins/Qdoc/trunk/build.xml 2023-01-19 17:50:23 UTC (rev 25628) @@ -0,0 +1,58 @@ +<?xml version="1.0" ?> +<project name="QdocSideKick" default="dist" basedir="."> + <property file="build.properties" /> + <property file="../build.properties" /> + <property name="compiler.source" value="11" /> + <property name="compiler.target" value="11" /> + <property name="compiler.userargs" value="-Xlint:unchecked -Xlint:deprecation" /> + <property name="src.dir" value="src" /> + + <!-- Documentation process + none: if you supply your own html file as this template does. + xsltproc: if you plan on using docbook + --> + <property name="docs-proc.target" value="none" /> + + <!-- jEdit installation properties. --> + <property name="build.support" value=".." /> + <property name="install.dir" value=".." /> + <property name="jedit.install.dir" value=".." /> + <property name="jedit.plugins.dir" value="${install.dir}" /> + <import file="${build.support}/plugin-build.xml" /> + + <!-- If you want any extra files to be included with your plugin's jar, + such as custom images, you need to specify them here. --> + <selector id="packageFiles"> + <and> + <or> + <filename name="**/qdoc.html" /> + </or> + </and> + </selector> + + <path id="project.class.path"> + <pathelement location="${jedit.install.dir}/jedit.jar" /> + <pathelement location="${install.dir}/ErrorList.jar"/> + <pathelement location="${install.dir}/SideKick.jar"/> + <pathelement location="${install.dir}/antlr-4.10.1-complete.jar"/> + <pathelement location="${install.dir}/EclipseIcons.jar"/> + <pathelement location="./build/classes"/> + </path> + + + <target name="build.prepare"> + <mkdir dir="${build.dir}" /> + </target> + + <!-- this is for local testing of individual files, note hard-coded path to test file --> + <target name="run" + description="Run the application." + > + <java classname="qdoc.QdocSidekickListener" fork="true"> + <classpath refid="project.class.path"/> + <arg file="/home/danson/src/jedit/plugins/Qdoc/test1.qdoc"/> + </java> + </target> + + +</project> Added: plugins/Qdoc/trunk/description.html =================================================================== --- plugins/Qdoc/trunk/description.html (rev 0) +++ plugins/Qdoc/trunk/description.html 2023-01-19 17:50:23 UTC (rev 25628) @@ -0,0 +1,3 @@ +<html> + <p>Qdoc sidekick and edit mode.</p> +</html> Property changes on: plugins/Qdoc/trunk/description.html ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: plugins/Qdoc/trunk/docs/qdoc.html =================================================================== --- plugins/Qdoc/trunk/docs/qdoc.html (rev 0) +++ plugins/Qdoc/trunk/docs/qdoc.html 2023-01-19 17:50:23 UTC (rev 25628) @@ -0,0 +1,8 @@ +<html> +<body> + <h2>Qdoc Plugin</h2> + <h3>Dale Anson</h3> + <p></p> + +</body> +</html> \ No newline at end of file Added: plugins/Qdoc/trunk/qdoc.props =================================================================== --- plugins/Qdoc/trunk/qdoc.props (rev 0) +++ plugins/Qdoc/trunk/qdoc.props 2023-01-19 17:50:23 UTC (rev 25628) @@ -0,0 +1,17 @@ +# Basic Plugin Information +plugin.sidekick.qdoc.QdocSideKickPlugin.activate=defer +plugin.sidekick.qdoc.QdocSideKickPlugin.author=Dale Anson +plugin.sidekick.qdoc.QdocSideKickPlugin.description=qdoc sidekick +plugin.sidekick.qdoc.QdocSideKickPlugin.docs=docs/qdoc.html +plugin.sidekick.qdoc.QdocSideKickPlugin.longdescription=description.html +plugin.sidekick.qdoc.QdocSideKickPlugin.name=Qdoc +plugin.sidekick.qdoc.QdocSideKickPlugin.usePluginHome=false +plugin.sidekick.qdoc.QdocSideKickPlugin.version=1.0 + +# Dependencies +plugin.qdoc.Qdoc.depend.0=jedit 05.04.00.00 +plugin.qdoc.Qdoc.depend.1=jdk 11 + +# set mode to 'qdoc' for this sidekick +sidekick.parser.qdoc.label=qdoc +mode.qdoc.sidekick.parser=qdoc Added: plugins/Qdoc/trunk/qdoc.xml =================================================================== --- plugins/Qdoc/trunk/qdoc.xml (rev 0) +++ plugins/Qdoc/trunk/qdoc.xml 2023-01-19 17:50:23 UTC (rev 25628) @@ -0,0 +1,158 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE MODE SYSTEM "xmode.dtd"><!-- --> + + +<!-- + This edit mode is for qdoc version 6 files, see https://doc.qt.io/qt-6/qdoc-index.html for details. +--> +<MODE> + <PROPS> + <PROPERTY NAME="wordBreakChars" VALUE="" /> + </PROPS> + <RULES IGNORE_CASE="FALSE" + HIGHLIGHT_DIGITS="TRUE" + DIGIT_RE="(0[lL]?|[1-9]\d{0,9}(\d{0,9}[lL])?|0[xX]\p{XDigit}{1,8}(\p{XDigit}{0,8}[lL])?|0[0-7]{1,11}([0-7]{0,11}[lL])?|([0-9]+\.[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?|[0-9]+([eE][+-]?[0-9]+[fFdD]?|([eE][+-]?[0-9]+)?[fFdD]))"> + + <SPAN TYPE="FUNCTION" NO_LINE_BREAK="TRUE"> + <BEGIN>{</BEGIN> + <END>}</END> + </SPAN> + <KEYWORDS> + + + <!-- topic commands --> + <KEYWORD1>\class</KEYWORD1> + <KEYWORD1>\enum</KEYWORD1> + <KEYWORD1>\example</KEYWORD1> + <KEYWORD1>\externalpage</KEYWORD1> + <KEYWORD1>\fn (function)</KEYWORD1> + <KEYWORD1>\group</KEYWORD1> + <KEYWORD1>\headerfile</KEYWORD1> + <KEYWORD1>\macro</KEYWORD1> + <KEYWORD1>\module</KEYWORD1> + <KEYWORD1>\namespace</KEYWORD1> + <KEYWORD1>\page</KEYWORD1> + <KEYWORD1>\property</KEYWORD1> + <KEYWORD1>\qmlattachedproperty</KEYWORD1> + <KEYWORD1>\qmlattachedsignal</KEYWORD1> + <KEYWORD1>\qmlvaluetype</KEYWORD1> + <KEYWORD1>\qmlmethod</KEYWORD1> + <KEYWORD1>\qmltype</KEYWORD1> + <KEYWORD1>\qmlproperty</KEYWORD1> + <KEYWORD1>\qmlsignal</KEYWORD1> + <KEYWORD1>\qmlmodule</KEYWORD1> + <KEYWORD1>\inqmlmodule</KEYWORD1> + <KEYWORD1>\instantiates</KEYWORD1> + <KEYWORD1>\typealias</KEYWORD1> + <KEYWORD1>\typedef</KEYWORD1> + <KEYWORD1>\variable</KEYWORD1> + + + + + + <!-- context commands --> + <KEYWORD2>\abstract</KEYWORD2> + <KEYWORD2>\default</KEYWORD2> + <KEYWORD2>\deprecated</KEYWORD2> + <KEYWORD2>\ingroup</KEYWORD2> + <KEYWORD2>\inheaderfile</KEYWORD2> + <KEYWORD2>\inherits</KEYWORD2> + <KEYWORD2>\inmodule</KEYWORD2> + <KEYWORD2>\internal</KEYWORD2> + <KEYWORD2>\nextpage</KEYWORD2> + <KEYWORD2>\nonreentrant</KEYWORD2> + <KEYWORD2>\overload</KEYWORD2> + <KEYWORD2>\preliminary</KEYWORD2> + <KEYWORD2>\previouspage</KEYWORD2> + <KEYWORD2>\qmlabstract</KEYWORD2> + <KEYWORD2>\qmldefault</KEYWORD2> + <KEYWORD2>\qtcmakepackage</KEYWORD2> + <KEYWORD2>\readonly</KEYWORD2> + <KEYWORD2>\reentrant</KEYWORD2> + <KEYWORD2>\reimp</KEYWORD2> + <KEYWORD2>\relates</KEYWORD2> + <KEYWORD2>\required</KEYWORD2> + <KEYWORD2>\since</KEYWORD2> + <KEYWORD2>\startpage</KEYWORD2> + <KEYWORD2>\subtitle</KEYWORD2> + <KEYWORD2>\threadsafe</KEYWORD2> + <KEYWORD2>\title</KEYWORD2> + <KEYWORD2>\wrapper</KEYWORD2> + + + + <!-- markup commands --> + <KEYWORD3>\a</KEYWORD3> + <KEYWORD3>\annotatedlist</KEYWORD3> + <KEYWORD3>\b</KEYWORD3> + <KEYWORD3>\badcode</KEYWORD3> + <INVALID>\bold</INVALID> + <KEYWORD3>\brief</KEYWORD3> + <KEYWORD3>\c</KEYWORD3> + <KEYWORD3>\caption</KEYWORD3> + <KEYWORD3>\code</KEYWORD3> + <KEYWORD3>\endcode</KEYWORD3> + <KEYWORD3>\codeline</KEYWORD3> + <KEYWORD3>\div</KEYWORD3> + <KEYWORD3>\dots</KEYWORD3> + <KEYWORD3>\e</KEYWORD3> + <KEYWORD3>\else</KEYWORD3> + <KEYWORD3>\endif</KEYWORD3> + <KEYWORD3>\footnote</KEYWORD3> + <KEYWORD3>\generatelist</KEYWORD3> + <KEYWORD3>\header</KEYWORD3> + <INVALID>\i</INVALID> + <KEYWORD3>\if</KEYWORD3> + <KEYWORD3>\image</KEYWORD3> + <KEYWORD3>\include</KEYWORD3> + <KEYWORD3>\input</KEYWORD3> + <KEYWORD3>\inlineimage</KEYWORD3> + <KEYWORD3>\keyword</KEYWORD3> + <KEYWORD3>\l</KEYWORD3> + <KEYWORD3>\legalese</KEYWORD3> + <KEYWORD3>\li</KEYWORD3> + <KEYWORD3>\list</KEYWORD3> + <KEYWORD3>\endlist</KEYWORD3> + <KEYWORD3>\meta</KEYWORD3> + <KEYWORD3>\noautolist</KEYWORD3> + <INVALID>\o</INVALID> + <KEYWORD3>\note</KEYWORD3> + <KEYWORD3>\omit</KEYWORD3> + <KEYWORD3>\printline</KEYWORD3> + <KEYWORD3>\printto</KEYWORD3> + <KEYWORD3>\printuntil</KEYWORD3> + <KEYWORD3>\qml</KEYWORD3> + <KEYWORD3>\quotation</KEYWORD3> + <KEYWORD3>\quotefile</KEYWORD3> + <KEYWORD3>\quotefromfile</KEYWORD3> + <KEYWORD3>\raw</KEYWORD3> + <KEYWORD3>\row</KEYWORD3> + <KEYWORD3>\sa</KEYWORD3> + <KEYWORD3>\section1</KEYWORD3> + <KEYWORD3>\section2</KEYWORD3> + <KEYWORD3>\section3</KEYWORD3> + <KEYWORD3>\section4</KEYWORD3> + <KEYWORD3>\skipline</KEYWORD3> + <KEYWORD3>\skipto</KEYWORD3> + <KEYWORD3>\skipuntil</KEYWORD3> + <KEYWORD3>\snippet</KEYWORD3> + <KEYWORD3>\span</KEYWORD3> + <KEYWORD3>\sub</KEYWORD3> + <KEYWORD3>\sup</KEYWORD3> + <KEYWORD3>\table</KEYWORD3> + <KEYWORD3>\endtable</KEYWORD3> + <KEYWORD3>\tableofcontents</KEYWORD3> + <KEYWORD3>\target</KEYWORD3> + <KEYWORD3>\tt</KEYWORD3> + <KEYWORD3>\uicontrol</KEYWORD3> + <KEYWORD3>\underline</KEYWORD3> + <KEYWORD3>\unicode</KEYWORD3> + <KEYWORD3>\warning</KEYWORD3> + <KEYWORD3>\\</KEYWORD3> + + <INVALID>\qmlclass</INVALID> + </KEYWORDS> + </RULES> + +</MODE> Property changes on: plugins/Qdoc/trunk/qdoc.xml ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: plugins/Qdoc/trunk/qt-convenience-api.qdoc =================================================================== --- plugins/Qdoc/trunk/qt-convenience-api.qdoc (rev 0) +++ plugins/Qdoc/trunk/qt-convenience-api.qdoc 2023-01-19 17:50:23 UTC (rev 25628) @@ -0,0 +1,1669 @@ +/*! +\target rgs-qtconvenience + +\page qt-convenience-api.html +\title Qt Convenience API + +\previouspage {macOS Convenience API} +\nextpage {Tk Convenience API} + +\note The Qt Convenience API is \e {only} available for \SQUISH for Qt editions. + +\target qt-convenience.function.parameters +\section1 Qt Convenience Function Parameters + +Some of Qt's convenience functions can take a +\c {modifierState} argument which indicates which +special keys are pressed at the time of a mouse click. And some of the +functions can also take a \c {button} argument which +indicates which mouse button was clicked. + +The \c {modifierState} can be one or more of the following: +\c {Qt.NoModifier}, \c {Qt.AltModifier}, \c {Qt.ControlModifier}, +\c {Qt.KeypadModifier}, \c {Qt.MetaModifier}, \c {Qt.ShiftModifier}. +If more than one is used they must be \c {OR}-d together, for example, +\c {Qt.AltModifier|Qt.ShiftModifier}. The form shown here works +for Python and JavaScript. For Perl and Ruby replace the period with two +colons, e.g., \c {Qt::ControlModifier}, and for Tcl use the +\c {enum} function, e.g., \c {enum Qt ControlModifier}. + +The \c {button} can be any one of: +\c {Qt.NoButton}, \c {Qt.LeftButton}, \c {Qt.MidButton}, \c {Qt.RightButton}. + +\list + \li For Perl use the following syntax: \c {Qt::LeftButton}. + \li For Ruby use the following syntax: \c {Qt::LEFT_BUTTON}. + \li For Tcl use the following syntax: \c {enum Qt LeftButton}. +\endlist + +\target qt-native.dialogs.on.kde +\section1 Native Dialogs on KDE + +To ensure the most reliable recording and replaying of tests, \SQUISH +uses Qt's own dialogs (e.g., for choosing colors, files, and fonts), +rather than the underlying platform's native dialogs. + +Unfortunately, on KDE, Qt uses the KDE dialogs and this can cause problems +when developing cross-platform test scripts. The solution is to set the +\c {QT_PLATFORM_PLUGIN} environment variable to an invalid value, such as +\c {QT_PLATFORM_PLUGIN=nonesuch}. This can be done, for instance, in the +\squishide's \l {ide.the-settings.view}{Test Suite Settings view}'s +Environment section. + +\section1 Qt Convenience Functions + +Here are some quick links to the Qt Convenience API's functions: + +\table + \row + \li \list + \li \l {qt-activateItem-function} {activateItem(itemObject)} + \li \l {qt-activateLink-function} {activateLink(objectOrName, Url)} + \li \l {qt-castToQMenuData-function} {QMenuData castToQMenuData(object)} + \li \l {qt-castToQObject-function} {QObject castToQObject(object)} + \li \l {qt-clickButton-function} {clickButton(objectOrName)} + \li \l {qt-clickItem-function} + {clickItem(objectOrName, itemOrIndex, x, y, modifierState, button)} + \li \l {qt-clickTab-function} {clickTab(objectOrName, tabText)} + \li \l {qt-doubleClick-function} + {doubleClick(objectOrName)} + \li \l {qt-doubleClick-function} + {doubleClick(objectOrName, x, y, modifierState, button)} + \li \l {qt-doubleClickItem-function} + {doubleClickItem(objectOrName, itemText, x, y, modifierState, button)} + \li \l {qt-doubleTap-function} {doubleTap(objectOrName)} + \li \l {qt-dragAndDrop-function} + {dragAndDrop(source_objectOrName, sx, sy, target_objectOrName, tx, ty, action)} + \li \l {qt-dragItemBy-function} + {dragItemBy(objectOrName, x, y, dx, dy, modifierState, button)} + \li \l {qt-dropOn-function}{dropOn(target_objectOrName, tx, ty, action)} + \li \l {qt-flick-function}{flick(objectOrName, x, y, dx, dy, cdx, cdy)} + \li \l {qt-gesture-function} {gesture(objectOrName, touches)} + \li \l {qt-hideKeyboard-function} {hideKeyboard()} + \endlist + + \li \list + \li \l {qt-installEventHandler-function} + {installEventHandler(eventName, handlerFunctionName)} + \li \l {qt-installLazySignalHandler-function} + {installLazySignalHandler(name, signalSignature, handlerFunctionName)} + \li \l {qt-installSignalHandler-function} + {installSignalHandler(objectOrName, signalSignature, handlerFunctionName)} + \li \l {qt-longMouseClick-function} + {longMouseClick(objectOrName, x, y, modifierState, button)} + \li \l {qt-longMouseDrag-function} + {longMouseDrag(objectOrName, x, y, dx, dy, modifierState, button)} + \li \l {qt-mouseClick-function} + {mouseClick(objectOrName, x, y, modifierState, button)} + \li \l {qt-mouseDrag-function} + {mouseDrag(objectOrName, x, y, dx, dy, modifierState, button)} + \li \l {qt-mouseWheel-function} + {mouseWheel(objectOrName, x, y, xdegrees, ydegrees)} + \li \l {qt-nativeMouseClick-function} + {nativeMouseClick(objectOrName, x, y, modifierState, button)} + \li \l {qt-openContextMenu-function} + {openContextMenu(objectOrName, x, y, modifierState)} + \li \l {qt-openItemContextMenu-function} + {openItemContextMenu(objectOrName, itemText, x, y, modifierState)} + \li \l {qt-pressAndHold-function} {pressAndHold(objectOrName, x, y)} + \li \l {qt-qmlContext-function} {qmlContext(object)} + \li \l {qt-qmlEngine-function} {qmlEngine(object)} + \li \l {qt-readGesture-function} {readGesture(gesture-file)} + \li \l {qt-scrollTo-function} {scrollTo(objectOrName, position)} + \endlist + + \li \list + \li \l {qt-sendEvent-function} {sendEvent(eventName, objectOrName, ...)} + \li \l {qt-setFocus-function} {setFocus(objectOrName)} + \li \l {qt-setMouseTracking-function} {setMouseTracking(className, onOrOff)} + \li \l {qt-setRecordMouseDrag-function} + {setRecordMouseDrag(className, onOrOff)} + \li \l {qt-setWindowState-function} {setWindowState(objectOrName, windowState)} + \li \l {qt-spinUp-function} {spinUp(objectOrName)} + \li \l {qt-spinDown-function} {spinDown(objectOrName)} + \li \l {qt-startDrag-function} {startDrag(source_objectOrName, sx, sy)} + \li \l {qt-tapObject-function} {tapObject(objectOrName)} + \li \l {qt-touchAndDrag-function} {touchAndDrag(objectOrName, x, y, dx, dy)} + \li \l {qt-touchPress-function} {touchPress(objectOrName, x, y)} + \li \l {qt-touchRelease-function} {touchRelease(objectOrName, x, y)} + \li \l {qt-type-function} {type(objectOrName, text)} + \li \l {qt-uninstallEventHandler-function} + {uninstallEventHandler(eventName, handlerFunctionName)} + \li \l {qt-uninstallLazySignalHandler-function} + {uninstallLazySignalHandler(name, signalSignature, handlerFunctionName)} + \li \l {qt-uninstallSignalHandler-function} + {uninstallSignalHandler(objectOrName, signalSignature, handlerFunctionName)} + \li \l {qt-waitForSignal-function} {waitForSignal(object, signalSignature)} + \endlist + +\endtable + +\target qt-activateItem-function +\section2 activateItem(itemObject) + +\section2 activateItem(objectOrName, itemText) + +This function activates the specified \c{itemObject}, +or the item specified by \c {itemText} in the +popup menu, context menu, or menu bar denoted by +\c {objectOrName}. + +The ampersand characters (&) that indicate keyboard shortcuts should not be +included in the item text. If a character in a string is formatted with an +underscore (_), meaning that the text inside the program contains an &, +write the text without special characters or formatting. For example, for +\e "&Add", write \e "Add". + +\target qt-activateLink-function +\section2 activateLink(objectOrName, Url) + +This function activates the link with the URL address specified +\c {Url} inside the +\c {objectOrName} widget. The function works for +QTextBrowser and QLabel and its subclasses. + +\target qt-castToQMenuData-function +\section2 QMenuData castToQMenuData(object) + +This function casts the \c {object} of type +QMenuBar, QPopupMenu, or one of their subclasses, to an object of type +QMenuData. The reason the function is needed at all is that test scripts +for Qt 2 and Qt 3 AUTs often need to access a QPopupMenu +or QMenuBar's QMenuData, but due to squishidl's limitation of single +inheritance this is not possible. Nor can \SQUISH's \l {cast-function} +{Object cast(object, type)} function be used in this case because it +only supports casting up or down in the inheritance chain. Qt 4 +uses a different menu inheritance structure that only uses +single-inheritance, so Qt 4 menus can be handled directly. + +\note The \c {castToQMenuData} function is for testing Qt 2 and Qt 3 +applications. It is neither needed nor available for Qt 4 applications. + +\target qt-castToQObject-function +\section2 QObject castToQObject(object) + +This function casts the \c {object} to a QObject. +The \c {object} must be a subclass of QObject and +QGraphicsItem—or a class derived from QGraphicsItem—and +where QObject is inherited first. It is not necessary to use this +function for QGraphicsObjects and QGraphicsWidgets since \SQUISH +already knows that these are both QObjects and QGraphicsItems at the +same time. + +\note If this function is called on an object that is \e {not} +derived from QObject and QGraphicsItem—or a class derived from +QGraphicsItem—with QObject inherited first, \SQUISH will +crash. + +\note The \c {castToQObject} function is only available for +applications using Qt 4.2 or later since the graphics/view APIs +were only introduced in that version of Qt. + +Unfortunately QGraphicsItem does not provide support for introspection. +This means that although \SQUISH provides full access to all the +built-in QGraphicsItem classes and their properties and +methods—including their QObject properties and methods if they +inherit QObject and the \c {castToQObject} function is +used—none of the properties or methods you add to your own +QGraphicsItem subclasses can be accessed by \SQUISH. + +For examples of testing Qt's graphics/view classes see \l {ugsqtw-gfxview} +{How to Test Graphics Views, Graphics Scenes and Graphics Items}. + +\target qt-clickButton-function +\section2 clickButton(objectOrName) + +This function clicks the specified \c{objectOrName} +button. + +\target qt-clickItem-function + +\section2 clickItem(objectOrName, itemOrIndex, x, y, modifierState, button) + +This function clicks the mouse on the item with the specified +\c {itemOrIndex} inside the given +\c {objectOrName} view widget. This function is +typically used to access items inside views such as lists, tables, +and trees. + +For tables the \c {itemOrIndex} +is a string with the format \e {row/column}, e.g., +\c {"4/21"}. For the tree views the \c {itemOrIndex} +is a list of segments separated by the \e {"."} +character. Each segment may optionally contain a +\e {_X} suffix where \e {X} is +interpreted as 1-base occurrence index. If any of the involved tree +items contains the \c {"."},\c {"_"} or \c {"\" +} characters in its text, these characters need to be escaped in +the \c {itemOrIndex} as \c {"\."},\c { +"\_"} and \c {"\\"} respectively in order to avoid being +iterpreted as special characters. (Note that the script interpreter +may require additional escaping for the \c {"\"} character.) +The sequence of the segments corresponds to the tree path of the +returned item. For example the \c {"Item1.Sub\.ItemX_3.Leaf"} +finds an item with text \c {"Leaf" } that is a direct child of +the third item with the text \c {"Sub.ItemX"} among the +children of the root node with text \c {"Item1"}. For other +views it is the relevant item's text. + +The click is made at position \c {x} and +\c {y} (in the \c +{itemOrIndex} item's coordinates) using the specified +\c {button} and with the +\c {modifierState} modifier state. It is +safe to pass 0 for the coordinates and for the state. Normally, we +would pass \c {Qt.LeftButton} for the button. + +\SQUISH supports this function for view widgets +of type \l {https://doc.qt.io/qt-5/qabstractitemview.html} {QAbstractItemView}, +and its subclasses, including \l {https://doc.qt.io/qt-5/qlistview.html} {QListView}, \l {https://doc.qt.io/qt-5/qtableview.html} {QTableView}, and +\l {https://doc.qt.io/qt-5/qtreeview.html} {QTreeView}, +and also older Qt 3 classes such as \l {https://doc.qt.io/qt-4.8/q3iconview.html} {Q3IconView}, +\l {https://doc.qt.io/qt-4.8/q3listbox.html} {Q3ListBox}, +\l {https://doc.qt.io/qt-4.8/q3table.html} {Q3Table}, and +also classes derived from these types. + +\l {qt-convenience.function.parameters} {Qt Convenience Function Parameters} +lists valid values for the \c {modifierState} and +the \c {button} arguments. + +\target qt-clickTab-function + +\section2 clickTab(objectOrName, tabText) + +This function clicks on the tab that has the specified +\c {tabText} on the +\c {objectOrName} tab widget. (Note that &'s +should not be included in the \c {tabText}, so if the +tab's text is, say, "\e {A}dvanced"—meaning that the text +inside the program is really "&Advanced"—we just +write plain "Advanced".) + +\target qt-doubleClick-function + +\section2 doubleClick(objectOrName) + +\section2 doubleClick(objectOrName, x, y, modifierState, button) + +This overload double-clicks the mouse on the +\c {objectOrName} widget at position +\c {x} and \c {y} (in the +\c {objectOrName} widget's coordinates) using the +specified \c {button} and the +\c {modifierState} modifier. + +If the single-argument overload is used, the \c {Qt.LeftButton} without +modifiers is used to double-click on the center of \c {objectOrName}. + +\l {qt-convenience.function.parameters} {Qt Convenience Function Parameters} +lists valid values for the \c {modifierState} and +the \c {button} arguments. + +\target qt-doubleClickItem-function + +\section2 doubleClickItem(objectOrName, itemText, x, y, modifierState, button) + +This function double-clicks the mouse on the item with the specified +\c {itemText} inside the given +\c {objectOrName} view widget. The click is made at +position \c {x} and +\c {y} (in the +\c {itemText} item's coordinates) using the specified +\c {button} and with the +\c {modifierState} modifier state. + +\SQUISH supports this function for view widgets of +type +\l {https://doc.qt.io/qt-4.8/qabstractitemview.html} {QAbstractItemView}, +and its subclasses, including +\l {https://doc.qt.io/qt-4.8/qlistview.html} {QListView}, +\l {https://doc.qt.io/qt-4.8/qtableview.html} {QTableView}, +and +\l {https://doc.qt.io/qt-4.8/qtreeview.html} {QTreeView}, +and also older Qt 3 classes such as +\l {https://doc.qt.io/qt-4.8/q3iconview.html} {Q3IconView}, +\l {https://doc.qt.io/qt-4.8/q3listbox.html} {Q3ListBox}, +\l {https://doc.qt.io/qt-4.8/q3table.html} {Q3Table}, and +also classes derived from these types. + +\l {qt-convenience.function.parameters} {Qt Convenience Function Parameters} +lists valid values for the \c {modifierState} and +the \c {button} arguments. + +\target qt-doubleTap-function + +\section2 doubleTap(objectOrName) + +\section2 doubleTap(objectOrName, x, y) + +\section2 doubleTap(objectOrName, x, y, modifiers) + +This function double-taps on the \c {objectOrName} widget. + +If \c{x} and \c{y} +arguments (in the \c{objectOrName} widget's +coordinates) have been provided, the taps will happen there, otherwise replay +will happen at the center of the widget. + +If the \c{modifiers} argument has been provided, +the taps will happen with keyboard modifiers pressed, otherwise replay will happen +without any keyboard modifiers being pressed. + +Tapping is supported on objects of type +\l {https://doc.qt.io/qt-5/qquickitem.html} {QQuickItem} and +\l {https://doc.qt.io/qt-5/qwindow.html} {QWindow}. + +\target qt-dragAndDrop-function + +\section2 dragAndDrop(source_objectOrName, sx, sy, target_objectOrName, tx, ty, action) + +This function performs a drag and drop operation. It begins by +initiating a drag on the \c {source_objectOrName} +widget starting at position \c {sx} and +\c {sy} (in the +\c {source_objectOrName} widget's coordinates), and +then it does the drop on the \c {target_objectOrName} +widget at position \c {tx} and +\c {ty} (in the +\c {target_objectOrName} widget's coordinates). +The \c {action} is an integer (enum)—for +Qt 4 it can be \c {Qt::CopyAction} or +\c {Qt::LinkAction}, and for Qt 3 it can be +\c {QDropEvent::Copy} or \c {QDropEvent::Link}. + +\target qt-dragItemBy-function + +\section2 dragItemBy(objectOrName, x, y, dx, dy, modifierState, button) + +This function performs a drag operation. It initiates a drag of the +specified \c{objectOrName} widget starting at +position \c{x} and \c +{y} (in the +\c {objectOrName} widget's coordinates), using the +specified \c {button} and with the +\c {modifierState} modifier state. The +\c {objectOrName} widget is dragged by +\c {dx} pixels horizontally and by +\c {dy} pixels vertically. + +\target qt-dropOn-function + +\section2 dropOn(target_objectOrName, tx, ty, action) + +This function performs a drop that was initiated by a call to the +\l {qt-startDrag-function} {startDrag(source_objectOrName, sx, sy)} function. +It does the drop on the +\c {target_objectOrName} widget at position +\c {tx} and \c {ty} +(in the +\c {target_objectOrName} widget's coordinates). +See \l {qt-dragAndDrop-function} +{dragAndDrop(source_objectOrName, sx, sy, target_objectOrName, tx, ty, action)} +for possible values of +the \c {action} parameter. + +Normally the \l {qt-dragAndDrop-function} +{dragAndDrop(source_objectOrName, sx, sy, target_objectOrName, tx, ty, action)} function is +used to perform a drag and drop in a single action. However, in some +situations it may be necessary to move the mouse over a different object +before the drop can take place. In such cases the test code would look +something like this: + +\code + startDrag(sourceObject, sx, sy) + mouseMove(otherObject, x, y) + dropOn(targetObject, tx, ty, action) +\endcode + +\target qt-flick-function +\section2 flick(objectOrName, x, y, dx, dy, cdx, cdy) + +This function performs a "flick" operation (a +move or scroll on a QML \c {Flickable}). It initiates a flick +of the specified \c {objectOrName} item—which +\e {must} be a QML \c {Flickable}—starting +with the mouse at position \c {x} and +\c {y} (in the \c +{objectOrName} +item's coordinates) and moving the mouse by \c {dx} +pixels horizontally and by \c {dy} pixels vertically. +At the same time the position of the \c {objectOrName} +item's contents is moved relative to its previous position by +\c {cdx} pixels horizontally and by +\c {cdy} pixels vertically. + +\target qt-gesture-function +\section2 gesture(objectOrName, touches) + +This function plays a gesture. The specified +\c {objectOrName} can refer to any object that is +visible and serves for synchronization only. +The specified \c {touches} refers to a +\l {qt-GestureBuilder-class} {GestureBuilder} object, which can be +retrieved using \l {qt-readGesture-function} {readGesture(gesture-file)}. + +Gesture replay is supported on objects of type +\l {https://doc.qt.io/qt-5/qwindow.html} {QWindow} and +\l {https://doc.qt.io/qt-5/qwidget.html} {QWidget}. + +\target qt-hideKeyboard-function +\section2 hideKeyboard() + +This function hides the on-screen keyboard when it is showing. + +\target qt-installEventHandler-function + +\section2 installEventHandler(eventName, handlerFunctionName) + +\section2 installEventHandler(className, eventName, handlerFunctionName) + +\section2 installEventHandler(object, eventName, handlerFunctionName) + +This function installs an event handler that is applied to all objects +of the \c {className} class or to the specified +\c {object} or globally (if no +\c {className} or \c +{object} is specified). The script function named in +\c {handlerFunctionName} (which can be passed +as a string or as a function reference), will be called when an event of +the \c {eventName} type occurs on an object of the +\c {className} class, or to the specified +\c {object}, or globally. + +The \c {eventName} can be the name any standard Qt +event type such as \c {QKeyEvent} event or \c {QMouseEvent}, or one of the +\SQUISH convenience event types listed below: + +\list + \li \b {Crash}: + This event occurs if the AUT crashes. + \li \b {DialogOpened}: + This event occurs when a top-level QDialog is shown. + \li \b {MainWindowOpened}: + This event occurs when a top-level QMainWindow is shown. + \li \b {MessageBoxOpened}: + This event occurs when a top-level QMessageBox is shown. + \li \b {Timeout}: + This event occurs when the \SQUISH response timeout is + reached. + \li \b {ToplevelWidgetOpened}: + This event occurs when any other kind of top-level widget is + shown. +\endlist + + +The function named in \c {handlerFunctionName} is +called with a single argument—the object on which the event occurred. + +\note In Python scripts, you can specify the callback function to invoke by +passing an actual function or a lambda function. + +For examples, see \l {ugs-eventhandlers} {How to Use Event Handlers}. + +\note The \c {installEventHandler} function will only work if it is called +\e {after} the AUT has been started by using the \l {startApplication-function} +{ApplicationContext startApplication(autName)} function, for example. + +\target qt-installLazySignalHandler-function +\section2 installLazySignalHandler(name, signalSignature, handlerFunctionName) + +This function installs a Qt (not Unix) signal handler that eavesdrops +on the object identified by the given symbolic or real +\c {name}. The \c +{signalSignature} must be the exact signature used in C++ with no parameter +names—for example, \c {"activated(int)"} or +\c {"triggered(QAction*)"}. The +\c {handlerFunctionName} (which must be passed as a +string, not as a function reference), will be called whenever the +specified widget emits the specified signal and will be passed a +reference to the object that emitted the signal, followed by all the +signal's arguments (if there are any). + +This function is very flexible in that the object identified by the +\c {name} does \e {not} have to exist +at the time the function is called, since the object will be looked for +whenever the signal is emitted. The price to be paid for this +flexibility is that the use of this function can significantly slow down +playback if the signal is emitted a lot. If possible it is better to use +the less flexible \l {qt-installSignalHandler-function} +{installSignalHandler(objectOrName, signalSignature, handlerFunctionName)} +function instead. + +Where possible the signal's arguments are passed as types that can be +handled normally such as numbers, strings, or their actual Qt types such +as \c {QAction} or \c {QTableWidgetItem}. However, some +types are sent as plain \SQUISH \c {Object}s; custom types +and other unrecognized types are passed as strings. + +\target qt-installSignalHandler-function + +\section2 installSignalHandler(objectOrName, signalSignature, handlerFunctionName) + +This function installs a Qt (not Unix!) signal handler that eavesdrops +on the specified \c {objectOrName} widget. +The \c {signalSignature} must be the exact signature +used in C++ with no parameter names—for example, +\c {"activated(int)"} or \c {"triggered(QAction*)"}. The +\c {handlerFunctionName} (which must be passed as a +string, not as a function reference), will be called whenever the +specified widget emits the specified signal and will be passed a +reference to the object that emitted the signal, followed by all the +signal's arguments (if there are any). + +\note When defining signal handlers of QML signals, the argument types +still must be the C++ types. In particular, this means that for a +\c {real} QML argument, you must use the C++ \c {double} type, +and for a \c {string} QML type, you must use \c {QString}. + +As is usual with \SQUISH functions, the +\c {objectOrName} widget \e {must} +exist at the time this function is called. This requirement is relaxed +by the \l {qt-installLazySignalHandler-function} +{installLazySignalHandler(name, signalSignature, handlerFunctionName)} function +which can only accept a symbolic or real name, but of an object that +need not exist when the function is called. Nonetheless, it is best to +use this \c {installSignalHandler} function whenever possible +since it is potentially a lot faster than the +\l {qt-installLazySignalHandler-function} +{installLazySignalHandler(name, signalSignature, handlerFunctionName)} function. + +Where possible the signal's arguments are passed as types that can be +handled normally such as numbers, strings, or their actual Qt types such +as \c {QAction} or \c {QTableWidgetItem}. However, some +types are sent as plain \SQUISH \c {Object}s; custom types +and other unrecognized types are passed as strings. + +For an example, see \l {ugs-qt-signal-handlers} {How to Use Qt Signal Handlers}. + +\target qt-longMouseClick-function +\section2 longMouseClick(objectOrName, x, y, modifierState, button) + +\section2 longMouseClick(objectOrName, x, y, button) + +\section2 longMouseClick(objectOrName, modifierState, button) + +\section2 longMouseClick(objectOrName, button) + +\section2 longMouseClick(objectOrName) + +This function clicks the mouse on the specified +\c {objectOrName} widget with a fixed delay of about one +second between pressing and releasing the mouse button. Apart from the delay +this function behaves identical to mouseClick, see \l {qt-mouseClick-function} +{mouseClick(objectOrName, x, y, modifierState, button)} for more details. + +The \c {longMouseClick} function is supported on +objects of type \l {https://doc.qt.io/qt-5/qquickitem.html}{QQuickItem} and +\l {https://doc.qt.io/qt-5/qwindow.html}{QWindow}. + +\target qt-longMouseDrag-function +\section2 longMouseDrag(objectOrName, x, y, dx, dy, modifierState, button) + +This function performs a mouse drag operation with a fixed delay of about one +second between pressing the mouse button and starting to move the mouse cursor. +Apart from the delay this function behaves identical to +\c {mouseDrag}. See \l {qt-mouseDrag-function} +{mouseDrag(objectOrName, x, y, dx, dy, modifierState, button)}. + +The \c {longMouseDrag} function is supported on +objects of type \l {https://doc.qt.io/qt-5/qquickitem.html}{QQuickItem} and +\l {https://doc.qt.io/qt-5/qwindow.html}{QWindow}. + +\target qt-mouseClick-function +\section2 mouseClick(objectOrName, x, y, modifierState, button) + +\section2 mouseClick(objectOrName) + +This function clicks the mouse on the specified +\c {objectOrName} widget. The click is made at +position \c {x} and +\c {y} (in the +\c {objectOrName} widget's coordinates) using the +specified \c {button} and with the +\c {modifierState} modifier state. + +If only the \c{objectOrName} is specified, +the object is clicked in the middle by the \c {Qt::LeftButton} button and with no +keyboard modifiers pressed. + +If this function is used to click \c {Q3ListView} +objects, \c {Q3TableItem} objects, or web objects inside +\c {QtWebKit} objects, the \c {modifierState} +and \c {button} parameters are optional. + +\l {qt-convenience.function.parameters} {Qt Convenience Function Parameters} +lists valid values for the \c {modifierState} and +the \c {button} arguments. + +\target qt-mouseDrag-function +\section2 mouseDrag(objectOrName, x, y, dx, dy, modifierState, button) + +This function performs a mouse drag operation. It initiates a mouse drag +of the specified \c {objectOrName} widget starting at +position \c {x} and +\c {y} (in the +\c {objectOrName} widget's coordinates), using the +specified \c {button} and with the +\c {modifierState} modifier state. The +\c {objectOrName} widget is dragged by +\c {dx} pixels horizontally and by +\c {dy} pixels vertically. + +See \l {qt-longMouseDrag-function} +{longMouseDrag(objectOrName, x, y, dx, dy, modifierState, button)} when the mouse drag +needs to be executed "more slowly", with more delay in between the +individual steps of the drag. + +\l {qt-convenience.function.parameters} {Qt Convenience Function Parameters} +lists valid values for the \c {modifierState} and +the \c {button} arguments. + +\target qt-mouseWheel-function +\section2 mouseWheel(objectOrName, x, y, xdegrees, ydegrees) + +This function performs a mouse wheel operation, emulating rotation of the +horizontal and/or vertical wheel of a mouse. Replay happens on the specified +\c {objectOrName} object at position +\c {x} and \c {y} +(in the \c {objectOrName} objects's coordinates), +using the specified \c {xdegrees} and +\c {ydegrees} values for the amount of wheel rotation. + +The \c {mouseWheel} function is supported on +objects of type \l {https://doc.qt.io/qt-5/qquickitem.html} {QQuickItem} and +\l {https://doc.qt.io/qt-5/qwindow.html} {QWindow}. + +\target qt-nativeMouseClick-function +\section2 nativeMouseClick(objectOrName, x, y, modifierState, button) + +This function simulates a native mouse click on the specified +\c {objectOrName} widget at position +\c {x} and \c {y} (in the +\c {objectOrName} widget's coordinates), using the +specified \c {button} and with the +\c {modifierState} modifier state. + +\l {qt-convenience.function.parameters} {Qt Convenience Function Parameters} +lists valid values for the \c {modifierState} and +the \c {button} arguments. + +\target qt-openContextMenu-function + +\section2 openContextMenu(objectOrName, x, y, modifierState) + +This function simulates the user opening a context menu by clicking the +specified \c {objectOrName} widget at position +\c {x} and \c {y} (in the +\c {objectOrName} widget's coordinates), and with the +\c {modifierState} modifier state. + +\l {qt-convenience.function.parameters} {Qt Convenience Function Parameters} +lists valid values for the \c {modifierState} +argument. + +\target qt-openItemContextMenu-function + +\section2 openItemContextMenu(objectOrName, itemText, x, y, modifierState) + +This function simulates the user opening a context menu by clicking the +menu option with the specified \c {itemText} inside the +\c {objectOrName} view widget at position +\c {x} and \c {y} (in the +\c {itemText} item's coordinates), and with the +\c {modifierState} modifier state. + +\SQUISH supports this function for view widgets of type +\l {https://doc.qt.io/qt-4.8/qabstractitemview.html} {QAbstractItemView}, +and its subclasses, including \l {https://doc.qt.io/qt-4.8/qlistview.html} +{QListView}, \l {https://doc.qt.io/qt-4.8/qtableview.html} {QTableView}, and +\l {https://doc.qt.io/qt-4.8/qtreeview.html} {QTreeView}, +and also older Qt 3 classes such as \l {https://doc.qt.io/qt-4.8/q3iconview.html} +{Q3IconView}, \l {https://doc.qt.io/qt-4.8/q3listbox.html} {Q3ListBox}, +\l {https://doc.qt.io/qt-4.8/q3table.html} {Q3Table}, and +also classes derived from these types. + +\l {qt-convenience.function.parameters} {Qt Convenience Function Parameters} +lists valid values for the \c {modifierState} +argument. + +\target qt-pressAndHold-function + +\section2 pressAndHold(objectOrName, x, y) + +\section2 pressAndHold(objectOrName, x, y, dx, dy) + +This function performs a press and hold operation on the specified +\c {objectOrName} item—starting with the mouse +at position \c {x} and +\c {y} (in +the \c {objectOrName} item's coordinates) and +optionally moving the mouse by \c {dx} pixels +horizontally and by \c {dy} pixels vertically if these +offsets are specified. (Note that \c {dx} and +\c {dy} are relative to the starting mouse position in +QML scene coordinates, not in \c {objectOrName} item +coordinates which is normally the case.) + +The \c {pressAndHold} function is supported on +objects of type \l {https://doc.qt.io/archives/qt-4.8/qdeclarativeitem.html} +{QDeclarativeItem}. + +The press and hold operation performed by this function is similar to +what the \l {qt-dragItemBy-function} +{dragItemBy(objectOrName, x, y, dx, dy, modifierState, button)} function does, +except for the \e hold (the initial pause when the mouse is first +pressed down). QML scenes support press and hold by using an invisible +\c {MouseArea} item that is overlaid on top of one or more of +the scene's QML items. \SQUISH doesn't record actions for invisible +items so for a press and hold it records the item at the mouse (or +finger for touch screens) position that is actually under the +\c {MouseArea}. + +\section3 Other Object Types + +For objects of type \l {https://doc.qt.io/qt-5/qquickitem.html}{QQuickItem}, +you can use either \l {qt-longMouseClick-function} +{longMouseClick(objectOrName, x, y, modifierState, button)} or +\l {qt-longMouseDrag-function} +{longMouseDrag(objectOrName, x, y, dx, dy, modifierState, button)}. + +For other objects it should be possible to emulate the effect of \c {pressAndHold()} +by using a combination of the following functions: + +\list + \li \l {snooze-function} {snooze(seconds)} + \li \l {mouseMove-function} {mouseMove(x, y)} + \li \l {mousePress-function} {mousePress()} + \li \l {mouseRelease-function} {mouseRelease()} +\endlist + +For example: + +\code + function main() + { + //... + + mouseMove(waitForObject(":target_object_name"), 5, 5); + mousePress(waitForObject(":target_object_name")); + snooze(3); + mouseRelease(waitForObject(":target_object_name")); + + //... + } +\endcode + +\target qt-qmlContext-function +\section2 qmlContext(object) + +This function returns the \c {QQmlContext} for the +object, or 0 if no context has been set. This is equivalent to calling the +C++ function \c {QQmlEngine::contextForObject}. +A QML Context is a container for properties and allows +data to be exposed to QML from C++. For an example of its use, +see +\l {https://www.froglogic.com/blog/tip-of-the-week/accessing-qqmlcontext-properties-in-squish-test-scripts/} {this blog post}. + +\target qt-qmlEngine-function + +\section2 qmlEngine(object) + +Returns the \c {QQmlEngine} associated with object, if +any. This is equivalent to +\c {QQmlEngine::contextForObject(object)->engine()}, but more +efficient. The \c {QQmlEngine} class provides an environment +for instantiating QML components. + +\target qt-readGesture-function + +\section2 readGesture(gesture-file) + +This function opens a gesture file from a test suite directory and returns +a \l {qt-GestureBuilder-class} {GestureBuilder} object. +This can then be passed to \l {qt-gesture-function} {gesture(objectOrName, touches)}. +The specified \c {gesture-file} refers to the filename. + +\target qt-scrollTo-function + +\section2 scrollTo(objectOrName, position) + +This function scrolls the \c {objectOrName} widget to +the given \c {position}. The +\c {position} is an absolute value (i.e., a pixel +offset). + +\target qt-sendEvent-function + +\section2 sendEvent(eventName, objectOrName, ...) + +This function sends an event of type \c {eventName} to +the \c {objectOrName} widget. All the other arguments +(\c {...}) are passed on to the event +constructor—they are typically coordinates, button states, and +similar. The \c {eventName} is any of the Qt events +supported by \SQUISH — this includes all the most commonly used +ones, such as, +\c {"QCloseEvent"}, +\c {"QHideEvent"}, +\c {"QKeyEvent"}, +\c {"QMouseEvent"}, +\c {"QMoveEvent"}, +\c {"QShowEvent"}, +\c {"QTabletEvent"}, +and +\c {"QWheelEvent"}. + +\target qt-setFocus-function + +\section2 setFocus(objectOrName) + +This method changes the keyboard input focus to the object specified by +\c {objectOrName}. + +Changing the keyboard input focus is currently supported on objects of type +\l {https://doc.qt.io/qt-5/qquickitem.html} {QQuickItem}, +\l {https://doc.qt.io/qt-5/qwidget.html} {QWidget} and +\l {https://doc.qt.io/qt-5/qwindow.html} {QWindow}. + +\target qt-setMouseTracking-function + +\section2 setMouseTracking(className, onOrOff) + +This function can be used in \c {init} files to disable +or enable the recording of \c {MouseMove} events for certain +widget classes. The class to disable or enable mouse tracking for is +specified by the \c {className} parameter. Pass an +\c {onOrOff} parameter value of \c {true} to +enable mouse tracking or of \c {false} to disable mouse +tracking. (By default mouse tracking is off.) + +\section3 Wrapper-Specific Initialization + +The \c {init} files are Tcl scripts that are registered +with the squishrunner and then read before starting any tests. The +registration process is explained in \l {rg-squishrunner-cli--config} +{Configuring squishrunner}. +Although \c {init} files must be written in Tcl, this +does not affect the scripting language used for test suites, which may +be in any of the scripting languages that \SQUISH supports. + +We can have as many \c {init} scripts as we like for each +GUI toolkit or we can put all the initialization statements in a single +Tcl script per toolkit. However many \c {init} scripts we use, +they must all be registered with the squishrunner. + +\section3 Example + +\code + setMouseTracking ScribbleArea true +\endcode + +This sets mouse tracking on for an AUT's custom \c {ScribbleArea} class. + +To make this work, we must tell \SQUISH to execute a file that contains +this Tcl script at startup when it is used to test a Qt-based AUT: + +\code + squishrunner --config addInitScript Qt /home/harri/qt_init1.tcl +\endcode + +An absolute path must be used. + +\target qt-setRecordMouseDrag-function +\section2 setRecordMouseDrag(className, onOrOff) + +This function can be used in \c {init} files to disable +or enable the recording of \c {mouseDrag} statements for certain +widget classes. The class to disable mouse dragging for is specified by +the \c {className} parameter. Pass an +\c {onOrOff} parameter value of \c {true} to +enable mouse drag recording or of \c {false} to disable mouse +drag recording. (By default mouse drag recording is on.) + +See also \l{Wrapper-Specific Initialization}. + +The \c {init} files are Tcl scripts that are registered +with the server and then read before starting any tests. The +registration process is explained in \l {rg-squishrunner-cli--config} +{Configuring squishrunner}. + +\section3 Example + +\code + setRecordMouseDrag ScribbleArea false +\endcode + +This switches off mouse drag recording for an AUT's custom \c {ScribbleArea} +class. + +To make this work, we must tell \SQUISH to execute a file that contains +this Tcl script at startup when it is used to test a Qt-based AUT: + +\code + squishrunner --config addInitScript Qt /home/harri/qt_init2.tcl +\endcode + +An absolute path must be used. + +\target qt-setWindowState-function +\section2 setWindowState(objectOrName, windowState) + +This function sets the state of the given +\c {objectOrName} window to that specified by the +\c {windowState} enumeration. + +Note that using this function only makes sense for +top-level windows. + +Valid window state values are: +\c {WindowState.Fullscreen}, +\c {WindowState.Maximize}, +\c {WindowState.Minimize}, and +\c {WindowState.Normal}. + +The form shown above works for Python and JavaScript. + +For Perl use this: \c {WindowState::Maximize}, etc. + +For Ruby use this: \c {WindowState::MAXIMIZE}, etc. + +For Tcl use this: \c {enum WindowState Maximize}, etc. + +\target qt-spinUp-function + +\section2 spinUp(objectOrName) + +This function clicks the "up" button on the +\c {objectOrName} spinbox. The function works for +\l {https://doc.qt.io/qt-4.8/qabstractspinbox.html} {QAbstractSpinBox} +and its subclasses, such as \l {https://doc.qt.io/qt-4.8/qspinbox.html} +{QSpinBox} and \l {https://doc.qt.io/qt-4.8/qdoublespinbox.html} {QDoubleSpinBox}. + +\target qt-spinDown-function + +\section2 spinDown(objectOrName) + +This function clicks the "down" button on the +\c {objectOrName} spinbox. The function works for +\l {https://doc.qt.io/qt-4.8/qabstractspinbox.html} {QAbstractSpinBox} +and its subclasses, such as \l {https://doc.qt.io/qt-4.8/qspinbox.html} +{QSpinBox} and \l {https://doc.qt.io/qt-4.8/qdoublespinbox.html}{QDoubleSpinBox}. + +\target qt-startDrag-function + +\section2 startDrag(source_objectOrName, sx, sy) + +This function initiates a drag on the +\c {source_objectOrName} widget starting at position +\c {sx} and \c {sy} +(in the \c {source_objectOrName} widget's coordinates). +The drop can be done using the +\l {qt-dropOn-function} {dropOn(target_objectOrName, tx, ty, action)} function. + +\target qt-tapObject-function +\section2 tapObject(objectOrName) + +\section2 tapObject(objectOrName, x, y) + +\section2 tapObject(objectOrName, x, y, modifiers) + +This function taps on the specified \c {objectOrName} widget. +The \c {x} and \c {y} +coordinates as well +as the \c {modifiers} keyboard modifiers are optional. If +they are not specified, the tap is made in the center of the widget using no +keyboard modifiers. On the other hand, if the additional coordinate parameters +are given, the tap is made at position \c {x} and +\c {y} in the \c +{objectOrName} widget's coordinates. + +Tapping is supported on objects of type +\l {https://doc.qt.io/qt-5/qquickitem.html} {QQuickItem}, +\l {https://doc.qt.io/qt-5/qwindow.html} {QWindow} and +\l {https://doc.qt.io/qt-5/qwidget.html} {QWidget}. + +\target qt-touchAndDrag-function +\section2 touchAndDrag(objectOrName, x, y, dx, dy) + +\section2 touchAndDrag(objectOrName, x, y, dx, dy, modifiers) + +\section2 touchAndDrag(objectOrName, x, y, dx, dy, modifiers, delayAfterPress) + +This function performs a touch-based drag operation. It initiates a touch drag +of the specified \c {objectOrName} widget starting at +position \c {x} and \c +{y} (in the +\c {objectOrName} widget's coordinates). The +\c {objectOrName} widget is dragged by +\c {dx} pixels horizontally and by +\c {dy} pixels vertically. + +If specified, the keyboard modifiers provided in +\c {modifiers} are set while performing the drag. + +If specified, the number of milliseconds provided in +\c {delayAfterPress} is waited before the drag +starts. + +Touch-based dragging is supported on objects of type +\l {https://doc.qt.io/qt-5/qquickitem.html} {QQuickItem} and +\l {https://doc.qt.io/qt-5/qwindow.html} {QWindow}. + +\target qt-touchPress-function +\section2 touchPress(objectOrName, x, y) + +\section2 touchPress(objectOrName, x, y, modifiers) + +This function performs a touch-based press operation. It replays a touch press +on the specified \c {objectOrName} widget at position +\c {x} and \c {y} (in the +\c {objectOrName} widget's coordinates). + +If specified, the keyboard modifiers provided in +\c {modifiers} are set while performing the operation. + +Since the object and Qt itself rely on press and release operations to always +happen in pairs a call to \c {touchPress} should always be +paired with a call to \c {touchRelease} to ensure a consistent +state. For most cases using just \c {tapObject} is sufficient. + +A single touch press can be performed on objects of type +\l {https://doc.qt.io/qt-5/qquickitem.html} {QQuickItem} and +\l {https://doc.qt.io/qt-5/qwindow.html} {QWindow}. + +\target qt-touchRelease-function +\section2 touchRelease(objectOrName, x, y) + +\section2 touchRelease(objectOrName, x, y, modifiers) + +This function performs a touch-based release operation. It replays a touch +release on the specified \c {objectOrName} widget at position +\c {x} and \c {y} (in the +\c {objectOrName} widget's coordinates). + +If specified, the keyboard modifiers provided in +\c {modifiers} are set while performing the operation. + +Since the object and Qt itself rely on press and release operations to always +happen in pairs a call to \c {touchRelease} should always be +preceded by a call to \c {touchPress} to ensure a consistent +state. For most cases using just \c {tapObject} is sufficient. + +A single touch release can be performed on objects of type +\l {https://doc.qt.io/qt-5/qquickitem.html} {QQuickItem} and +\l {https://doc.qt.io/qt-5/qwindow.html} {QWindow}. + +\target qt-type-function +\section2 type(objectOrName, text) + +This function types the specified \c {text} (as if the +user had used the keyboard) into the \c {objectOrName} +editable widget. If the text is surrounded by angle brackets (<>), +it is interpreted as a key combination, e.g +\c {"<Ctrl+Return>"}. The input is case-sensitive, so +\c {type(object, "R")} is different from +\c {type(object, "r")}. (For a list of the +supported special keys see the \l {nativeType-function} {nativeType(keys)} +function's documentation.) + +Unlike \l {nativeType-function} {nativeType(keys)}, \c {type()} treats +\c {Ctrl} and \c {Command} as the same key +on all platforms. This means that you can write \c {type("<Ctrl+c>")} +in a test script and it will result in \c {Ctrl+r} on Linux and +Windows and in \c {Command+r} on macOS. In turn, to make \SQUISH press +the actual \c {Ctrl} key on macOS, you need to use Qt terminology: +\c {type("<Meta+r>")}. + +\note In Qt 3, if the key combination is surrounded by an additional pair of +angle brackets, an accelerator event is sent instead of a key event. For example, +\c {"<<Alt+A>>"}. + +\target qt-uninstallEventHandler-function +\section2 uninstallEventHandler(eventName, handlerFunctionName) + +\section2 uninstallEventHandler(className, eventName, handlerFunctionName) + +\section2 uninstallEventHandler(object, eventName, handlerFunctionName) + +This function uninstalls an event handler that has been previously +installed using \l {qt-installEventHandler-function} +{installEventHandler(eventName, handlerFunctionName)}. + +\target qt-uninstallSignalHandler-function +\section2 uninstallSignalHandler(objectOrName, signalSignature, handlerFunctionName) + +This function uninstalls a signal handler that has been previously +installed using \l {qt-installSignalHandler-function} +{installSignalHandler(objectOrName, signalSignature, handlerFunctionName)}. +\target qt-uninstallLazySignalHandler-function + +\section2 uninstallLazySignalHandler(name, signalSignature, handlerFunctionName) + +This function uninstalls a signal handler that has been previously +installed using \l {qt-installLazySignalHandler-function} +{installLazySignalHandler(name, signalSignature, handlerFunctionName)}. + +\target qt-waitForSignal-function +\section2 waitForSignal(object, signalSignature) + +\section2 waitForSignal(object, signalSignature, timeoutMSec) + +This function waits for Qt (not Unix!) signal to be emitted by +the given object. The \c {object} is a reference +to object and can be obtained from one of the functions returning +object references (e.g. \l {waitForObject-function} {Object waitForObject(objectOrName)} +or \l {findObject-function} {Object findObject(objectName)}. The +\c {signalSignature} +must be a string, and contain the exact signature used in C++ with no parameter +names (see \l {qt-installSignalHandler-function} +{installSignalHandler(objectOrName, signalSignature, handlerFunctionName)} for examples +of valid signatures). The duration of the waiting loop is defined by the +\l {testSettings.waitForObjectTimeout-property} {testSettings.waitForObjectTimeout} +property or if the +optional \c {timeoutMSec} parameter is used, that many +milliseconds. If the signal doesn't arrive within the given timeout, (catchable) +\c {RuntimeError} exception is raised. + +\tab {tab-418} {tab-418-python} {python} {checked} +\tab {tab-418} {tab-418-javascript} {javascript} {} +\tab {tab-418}... [truncated message content] |
From: <dal...@us...> - 2023-01-19 17:48:54
|
Revision: 25627 http://sourceforge.net/p/jedit/svn/25627 Author: daleanson Date: 2023-01-19 17:48:52 +0000 (Thu, 19 Jan 2023) Log Message: ----------- no comment Modified Paths: -------------- plugins/Beauty/trunk/src/beauty/parsers/java/ParseException.java Modified: plugins/Beauty/trunk/src/beauty/parsers/java/ParseException.java =================================================================== --- plugins/Beauty/trunk/src/beauty/parsers/java/ParseException.java 2023-01-19 17:22:42 UTC (rev 25626) +++ plugins/Beauty/trunk/src/beauty/parsers/java/ParseException.java 2023-01-19 17:48:52 UTC (rev 25627) @@ -11,6 +11,7 @@ * mechanisms so long as you retain the public fields. */ public class ParseException extends Exception { + /** * This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates @@ -23,7 +24,7 @@ * print the error message in the form: * ParseException: <result of getMessage> */ - public ParseException(Token currentTokenVal, int [] [] expectedTokenSequencesVal, String [] tokenImageVal) { + public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal) { super(""); specialConstructor = true; currentToken = currentTokenVal; @@ -49,7 +50,6 @@ super(message); specialConstructor = false; } - /** * This variable determines which constructor was used to create * this object and thereby affects the semantics of the @@ -69,7 +69,7 @@ * of integers represents a sequence of tokens (by their ordinal * values) that is expected at this point of the parse. */ - public int [] [] expectedTokenSequences; + public int[][] expectedTokenSequences; /** * This is a reference to the "tokenImage" array of the generated @@ -76,8 +76,9 @@ * parser within which the parse error occurred. This array is * defined in the generated ...Constants interface. */ - public String [] tokenImage; + public String[] tokenImage; + /** * This method has the standard behavior when this object has been * created using the standard constructors. Otherwise, it uses @@ -136,12 +137,12 @@ retval += expected.toString(); return retval; } - /** * The end of line string for this machine. */ protected String eol = System.getProperty("line.separator", "\n"); + /** * Used to convert raw characters to their escaped version * when these raw version cannot be used as part of an ASCII @@ -183,11 +184,11 @@ default: if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); + String s = "0000" + Integer.toString(ch, 16); + retval.append("\\u" + s.substring(s.length() - 4, s.length())); } else { - retval.append(ch); + retval.append(ch); } continue; } @@ -194,5 +195,4 @@ } return retval.toString(); } - } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2023-01-19 17:22:43
|
Revision: 25626 http://sourceforge.net/p/jedit/svn/25626 Author: daleanson Date: 2023-01-19 17:22:42 +0000 (Thu, 19 Jan 2023) Log Message: ----------- no comment Added Paths: ----------- plugins/Qdoc/trunk/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2023-01-19 17:22:31
|
Revision: 25625 http://sourceforge.net/p/jedit/svn/25625 Author: daleanson Date: 2023-01-19 17:22:30 +0000 (Thu, 19 Jan 2023) Log Message: ----------- no comment Added Paths: ----------- plugins/Qdoc/tags/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2023-01-19 17:22:11
|
Revision: 25624 http://sourceforge.net/p/jedit/svn/25624 Author: daleanson Date: 2023-01-19 17:22:10 +0000 (Thu, 19 Jan 2023) Log Message: ----------- no comment Added Paths: ----------- plugins/Qdoc/branches/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2023-01-19 17:21:18
|
Revision: 25623 http://sourceforge.net/p/jedit/svn/25623 Author: daleanson Date: 2023-01-19 17:21:16 +0000 (Thu, 19 Jan 2023) Log Message: ----------- for Qdoc plugin Added Paths: ----------- plugins/Qdoc/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2023-01-11 20:42:48
|
Revision: 25622 http://sourceforge.net/p/jedit/svn/25622 Author: daleanson Date: 2023-01-11 20:42:45 +0000 (Wed, 11 Jan 2023) Log Message: ----------- Removed dependency on system diff for tests, now using built-in ant functions. Also changed some hard coded paths to relative paths in the json tests so the tests can work on other machines. Modified Paths: -------------- plugins/Beauty/trunk/ant_java_test.xml plugins/Beauty/trunk/ant_json_test.xml plugins/Beauty/trunk/build.xml Modified: plugins/Beauty/trunk/ant_java_test.xml =================================================================== --- plugins/Beauty/trunk/ant_java_test.xml 2023-01-11 20:41:28 UTC (rev 25621) +++ plugins/Beauty/trunk/ant_java_test.xml 2023-01-11 20:42:45 UTC (rev 25622) @@ -46,9 +46,6 @@ collapseMultipleBlankLinesTo = 1 wrapLineLength = 120 - NOTE: THESE TESTS EXEC THE SYSTEM DIFF!!! THEY WILL FAIL IF DIFF IS - NOT INSTALLED OR NOT ON THE PATH!!! - ======================================================================== --> <target name="test" depends="IF_PERMITS,AllInOne11,AllInOne17,AllInOne8,BasicClass,BasicClass3,BlockTest,Comments, Comments2,Element1,EnumTest,Ids,ImportsAndAnnos,ManyStringsConcat,module-info,outer,PatternMatching4instanceof, @@ -64,12 +61,9 @@ input="./test/test_files/java/before/Yield.java" output="./test/test_files/java/after/Yield.java" /> </java> - <exec executable="diff" outputproperty="Yielddiff"> - <arg value="./test/test_files/java/after/Yield.java"/> - <arg value="./test/test_files/java/expected/Yield.java"/> - </exec> <condition property="Yield" value="true"> - <equals arg1="${Yielddiff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/Yield.java" + file2="./test/test_files/java/expected/Yield.java" /> </condition> <echo if:set="Yield">Yield passed</echo> <fail unless:set="Yield">Yield failed: ${Yielddiff}</fail> @@ -84,12 +78,9 @@ input="./test/test_files/java/before/TextBlocks.java" output="./test/test_files/java/after/TextBlocks.java" /> </java> - <exec executable="diff" outputproperty="TextBlocksdiff"> - <arg value="./test/test_files/java/after/TextBlocks.java"/> - <arg value="./test/test_files/java/expected/TextBlocks.java"/> - </exec> <condition property="TextBlocks" value="true"> - <equals arg1="${TextBlocksdiff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/TextBlocks.java" + file2="./test/test_files/java/expected/TextBlocks.java" /> </condition> <echo if:set="TextBlocks">TextBlocks passed</echo> <fail unless:set="TextBlocks">TextBlocks failed: ${TextBlocksdiff}</fail> @@ -104,12 +95,9 @@ input="./test/test_files/java/before/SwitchExpressions.java" output="./test/test_files/java/after/SwitchExpressions.java" /> </java> - <exec executable="diff" outputproperty="SwitchExpressionsdiff"> - <arg value="./test/test_files/java/after/SwitchExpressions.java"/> - <arg value="./test/test_files/java/expected/SwitchExpressions.java"/> - </exec> <condition property="SwitchExpressions" value="true"> - <equals arg1="${SwitchExpressionsdiff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/SwitchExpressions.java" + file2="./test/test_files/java/expected/SwitchExpressions.java" /> </condition> <echo if:set="SwitchExpressions">SwitchExpressions passed</echo> <fail unless:set="SwitchExpressions">SwitchExpressions failed: ${SwitchExpressionsdiff}</fail> @@ -124,12 +112,9 @@ input="./test/test_files/java/before/SealedClasses.java" output="./test/test_files/java/after/SealedClasses.java" /> </java> - <exec executable="diff" outputproperty="SealedClassesdiff"> - <arg value="./test/test_files/java/after/SealedClasses.java"/> - <arg value="./test/test_files/java/expected/SealedClasses.java"/> - </exec> <condition property="SealedClasses" value="true"> - <equals arg1="${SealedClassesdiff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/SealedClasses.java" + file2="./test/test_files/java/expected/SealedClasses.java" /> </condition> <echo if:set="SealedClasses">SealedClasses passed</echo> <fail unless:set="SealedClasses">SealedClasses failed: ${SealedClassesdiff}</fail> @@ -144,12 +129,9 @@ input="./test/test_files/java/before/Records.java" output="./test/test_files/java/after/Records.java" /> </java> - <exec executable="diff" outputproperty="Recordsdiff"> - <arg value="./test/test_files/java/after/Records.java"/> - <arg value="./test/test_files/java/expected/Records.java"/> - </exec> <condition property="Records" value="true"> - <equals arg1="${Recordsdiff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/Records.java" + file2="./test/test_files/java/expected/Records.java" /> </condition> <echo if:set="Records">Records passed</echo> <fail unless:set="Records">Records failed: ${Recordsdiff}</fail> @@ -164,12 +146,9 @@ input="./test/test_files/java/before/Pizza.java" output="./test/test_files/java/after/Pizza.java" /> </java> - <exec executable="diff" outputproperty="Pizzadiff"> - <arg value="./test/test_files/java/after/Pizza.java"/> - <arg value="./test/test_files/java/expected/Pizza.java"/> - </exec> <condition property="Pizza" value="true"> - <equals arg1="${Pizzadiff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/Pizza.java" + file2="./test/test_files/java/expected/Pizza.java" /> </condition> <echo if:set="Pizza">Pizza passed</echo> <fail unless:set="Pizza">Pizza failed: ${Pizzadiff}</fail> @@ -184,12 +163,9 @@ input="./test/test_files/java/before/PatternMatching4switchExp.java" output="./test/test_files/java/after/PatternMatching4switchExp.java" /> </java> - <exec executable="diff" outputproperty="PatternMatching4switchExpdiff"> - <arg value="./test/test_files/java/after/PatternMatching4switchExp.java"/> - <arg value="./test/test_files/java/expected/PatternMatching4switchExp.java"/> - </exec> <condition property="PatternMatching4switchExp" value="true"> - <equals arg1="${PatternMatching4switchExpdiff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/PatternMatching4switchExp.java" + file2="./test/test_files/java/expected/PatternMatching4switchExp.java" /> </condition> <echo if:set="PatternMatching4switchExp">PatternMatching4switchExp passed</echo> <fail unless:set="PatternMatching4switchExp">PatternMatching4switchExp failed: ${PatternMatching4switchExpdiff}</fail> @@ -204,12 +180,9 @@ input="./test/test_files/java/before/PatternMatching4instanceof.java" output="./test/test_files/java/after/PatternMatching4instanceof.java" /> </java> - <exec executable="diff" outputproperty="PatternMatching4instanceofdiff"> - <arg value="./test/test_files/java/after/PatternMatching4instanceof.java"/> - <arg value="./test/test_files/java/expected/PatternMatching4instanceof.java"/> - </exec> <condition property="PatternMatching4instanceof" value="true"> - <equals arg1="${PatternMatching4instanceofdiff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/PatternMatching4instanceof.java" + file2="./test/test_files/java/expected/PatternMatching4instanceof.java" /> </condition> <echo if:set="PatternMatching4instanceof">PatternMatching4instanceof passed</echo> <fail unless:set="PatternMatching4instanceof">PatternMatching4instanceof failed: ${PatternMatching4instanceofdiff}</fail> @@ -224,12 +197,9 @@ input="./test/test_files/java/before/outer.java" output="./test/test_files/java/after/outer.java" /> </java> - <exec executable="diff" outputproperty="outerdiff"> - <arg value="./test/test_files/java/after/outer.java"/> - <arg value="./test/test_files/java/expected/outer.java"/> - </exec> <condition property="outer" value="true"> - <equals arg1="${outerdiff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/outer.java" + file2="./test/test_files/java/expected/outer.java" /> </condition> <echo if:set="outer">outer passed</echo> <fail unless:set="outer">outer failed: ${outerdiff}</fail> @@ -244,12 +214,9 @@ input="./test/test_files/java/before/module-info.java" output="./test/test_files/java/after/module-info.java" /> </java> - <exec executable="diff" outputproperty="module-infodiff"> - <arg value="./test/test_files/java/after/module-info.java"/> - <arg value="./test/test_files/java/expected/module-info.java"/> - </exec> <condition property="module-info" value="true"> - <equals arg1="${module-infodiff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/module-info.java" + file2="./test/test_files/java/expected/module-info.java" /> </condition> <echo if:set="module-info">module-info passed</echo> <fail unless:set="module-info">module-info failed: ${module-infodiff}</fail> @@ -264,12 +231,9 @@ input="./test/test_files/java/before/ManyStringsConcat.java" output="./test/test_files/java/after/ManyStringsConcat.java" /> </java> - <exec executable="diff" outputproperty="ManyStringsConcatdiff"> - <arg value="./test/test_files/java/after/ManyStringsConcat.java"/> - <arg value="./test/test_files/java/expected/ManyStringsConcat.java"/> - </exec> <condition property="ManyStringsConcat" value="true"> - <equals arg1="${ManyStringsConcatdiff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/ManyStringsConcat.java" + file2="./test/test_files/java/expected/ManyStringsConcat.java" /> </condition> <echo if:set="ManyStringsConcat">ManyStringsConcat passed</echo> <fail unless:set="ManyStringsConcat">ManyStringsConcat failed: ${ManyStringsConcatdiff}</fail> @@ -284,12 +248,9 @@ input="./test/test_files/java/before/ImportsAndAnnos.java" output="./test/test_files/java/after/ImportsAndAnnos.java" /> </java> - <exec executable="diff" outputproperty="ImportsAndAnnosdiff"> - <arg value="./test/test_files/java/after/ImportsAndAnnos.java"/> - <arg value="./test/test_files/java/expected/ImportsAndAnnos.java"/> - </exec> <condition property="ImportsAndAnnos" value="true"> - <equals arg1="${ImportsAndAnnosdiff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/ImportsAndAnnos.java" + file2="./test/test_files/java/expected/ImportsAndAnnos.java" /> </condition> <echo if:set="ImportsAndAnnos">ImportsAndAnnos passed</echo> <fail unless:set="ImportsAndAnnos">ImportsAndAnnos failed: ${ImportsAndAnnosdiff}</fail> @@ -304,12 +265,9 @@ input="./test/test_files/java/before/Ids.java" output="./test/test_files/java/after/Ids.java" /> </java> - <exec executable="diff" outputproperty="Idsdiff"> - <arg value="./test/test_files/java/after/Ids.java"/> - <arg value="./test/test_files/java/expected/Ids.java"/> - </exec> <condition property="Ids" value="true"> - <equals arg1="${Idsdiff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/Ids.java" + file2="./test/test_files/java/expected/Ids.java" /> </condition> <echo if:set="Ids">Ids passed</echo> <fail unless:set="Ids">Ids failed: ${Idsdiff}</fail> @@ -324,12 +282,9 @@ input="./test/test_files/java/before/EnumTest.java" output="./test/test_files/java/after/EnumTest.java" /> </java> - <exec executable="diff" outputproperty="EnumTestdiff"> - <arg value="./test/test_files/java/after/EnumTest.java"/> - <arg value="./test/test_files/java/expected/EnumTest.java"/> - </exec> <condition property="EnumTest" value="true"> - <equals arg1="${EnumTestdiff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/EnumTest.java" + file2="./test/test_files/java/expected/EnumTest.java" /> </condition> <echo if:set="EnumTest">EnumTest passed</echo> <fail unless:set="EnumTest">EnumTest failed: ${EnumTestdiff}</fail> @@ -344,12 +299,9 @@ input="./test/test_files/java/before/Element1.java" output="./test/test_files/java/after/Element1.java" /> </java> - <exec executable="diff" outputproperty="Element1diff"> - <arg value="./test/test_files/java/after/Element1.java"/> - <arg value="./test/test_files/java/expected/Element1.java"/> - </exec> <condition property="Element1" value="true"> - <equals arg1="${Element1diff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/Element1.java" + file2="./test/test_files/java/expected/Element1.java" /> </condition> <echo if:set="Element1">Element1 passed</echo> <fail unless:set="Element1">Element1 failed: ${Element1diff}</fail> @@ -364,12 +316,9 @@ input="./test/test_files/java/before/Comments2.java" output="./test/test_files/java/after/Comments2.java" /> </java> - <exec executable="diff" outputproperty="Comments2diff"> - <arg value="./test/test_files/java/after/Comments2.java"/> - <arg value="./test/test_files/java/expected/Comments2.java"/> - </exec> <condition property="Comments2" value="true"> - <equals arg1="${Comments2diff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/Comments2.java" + file2="./test/test_files/java/expected/Comments2.java" /> </condition> <echo if:set="Comments2">Comments2 passed</echo> <fail unless:set="Comments2">Comments2 failed: ${Comments2diff}</fail> @@ -384,12 +333,9 @@ input="./test/test_files/java/before/Comments.java" output="./test/test_files/java/after/Comments.java" /> </java> - <exec executable="diff" outputproperty="Commentsdiff"> - <arg value="./test/test_files/java/after/Comments.java"/> - <arg value="./test/test_files/java/expected/Comments.java"/> - </exec> <condition property="Comments" value="true"> - <equals arg1="${Commentsdiff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/Comments.java" + file2="./test/test_files/java/expected/Comments.java" /> </condition> <echo if:set="Comments">Comments passed</echo> <fail unless:set="Comments">Comments failed: ${Commentsdiff}</fail> @@ -404,12 +350,9 @@ input="./test/test_files/java/before/BlockTest.java" output="./test/test_files/java/after/BlockTest.java" /> </java> - <exec executable="diff" outputproperty="BlockTestdiff"> - <arg value="./test/test_files/java/after/BlockTest.java"/> - <arg value="./test/test_files/java/expected/BlockTest.java"/> - </exec> <condition property="BlockTest" value="true"> - <equals arg1="${BlockTestdiff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/BlockTest.java" + file2="./test/test_files/java/expected/BlockTest.java" /> </condition> <echo if:set="BlockTest">BlockTest passed</echo> <fail unless:set="BlockTest">BlockTest failed: ${BlockTestdiff}</fail> @@ -424,13 +367,9 @@ input="./test/test_files/java/before/IF_PERMITS.java" output="./test/test_files/java/after/IF_PERMITS.java" /> </java> - <exec executable="diff" outputproperty="diff"> - <arg value="-a"/> - <arg value="./test/test_files/java/after/IF_PERMITS.java"/> - <arg value="./test/test_files/java/expected/IF_PERMITS.java"/> - </exec> <condition property="IF_PERMITS" value="true"> - <equals arg1="${diff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/IF_PERMITS.java" + file2="./test/test_files/java/expected/IF_PERMITS.java" /> </condition> <echo if:set="IF_PERMITS">IF_PERMITS passed</echo> <fail unless:set="IF_PERMITS">IF_PERMITS failed: ${diff}</fail> @@ -445,12 +384,9 @@ input="./test/test_files/java/before/AllInOne11.java" output="./test/test_files/java/after/AllInOne11.java" /> </java> - <exec executable="diff" outputproperty="AllInOne11diff"> - <arg value="./test/test_files/java/after/AllInOne11.java"/> - <arg value="./test/test_files/java/expected/AllInOne11.java"/> - </exec> <condition property="AllInOne11" value="true"> - <equals arg1="${AllInOne11diff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/AllInOne11.java" + file2="./test/test_files/java/expected/AllInOne11.java" /> </condition> <echo if:set="AllInOne11">AllInOne11 passed</echo> <fail unless:set="AllInOne11">AllInOne11 failed: ${AllInOne11diff}</fail> @@ -465,12 +401,9 @@ input="./test/test_files/java/before/AllInOne17.java" output="./test/test_files/java/after/AllInOne17.java" /> </java> - <exec executable="diff" outputproperty="AllInOne17diff"> - <arg value="./test/test_files/java/after/AllInOne17.java"/> - <arg value="./test/test_files/java/expected/AllInOne17.java"/> - </exec> <condition property="AllInOne17" value="true"> - <equals arg1="${AllInOne17diff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/AllInOne17.java" + file2="./test/test_files/java/expected/AllInOne17.java" /> </condition> <echo if:set="AllInOne17">AllInOne17 passed</echo> <fail unless:set="AllInOne17">AllInOne17 failed: ${AllInOne17diff}</fail> @@ -485,12 +418,9 @@ input="./test/test_files/java/before/AllInOne8.java" output="./test/test_files/java/after/AllInOne8.java" /> </java> - <exec executable="diff" outputproperty="AllInOne8diff"> - <arg value="./test/test_files/java/after/AllInOne8.java"/> - <arg value="./test/test_files/java/expected/AllInOne8.java"/> - </exec> <condition property="AllInOne8" value="true"> - <equals arg1="${AllInOne8diff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/AllInOne8.java" + file2="./test/test_files/java/expected/AllInOne8.java" /> </condition> <echo if:set="AllInOne8">AllInOne8 passed</echo> <fail unless:set="AllInOne8">AllInOne8 failed: ${AllInOne8diff}</fail> @@ -505,12 +435,9 @@ input="./test/test_files/java/before/BasicClass.java" output="./test/test_files/java/after/BasicClass.java" /> </java> - <exec executable="diff" outputproperty="BasicClassdiff"> - <arg value="./test/test_files/java/after/BasicClass.java"/> - <arg value="./test/test_files/java/expected/BasicClass.java"/> - </exec> <condition property="BasicClass" value="true"> - <equals arg1="${BasicClassdiff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/BasicClass.java" + file2="./test/test_files/java/expected/BasicClass.java" /> </condition> <echo if:set="BasicClass">BasicClass passed</echo> <fail unless:set="BasicClass">BasicClass failed: ${BasicClassdiff}</fail> @@ -525,12 +452,9 @@ input="./test/test_files/java/before/BasicClass3.java" output="./test/test_files/java/after/BasicClass3.java" /> </java> - <exec executable="diff" outputproperty="BasicClass3diff"> - <arg value="./test/test_files/java/after/BasicClass3.java"/> - <arg value="./test/test_files/java/expected/BasicClass3.java"/> - </exec> <condition property="BasicClass3" value="true"> - <equals arg1="${BasicClass3diff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/BasicClass3.java" + file2="./test/test_files/java/expected/BasicClass3.java" /> </condition> <echo if:set="BasicClass3">BasicClass3 passed</echo> <fail unless:set="BasicClass3">BasicClass3 failed: ${BasicClass3diff}</fail> Modified: plugins/Beauty/trunk/ant_json_test.xml =================================================================== --- plugins/Beauty/trunk/ant_json_test.xml 2023-01-11 20:41:28 UTC (rev 25621) +++ plugins/Beauty/trunk/ant_json_test.xml 2023-01-11 20:42:45 UTC (rev 25622) @@ -24,26 +24,17 @@ </path> </target> - <!-- ======================================================================= - NOTE: THESE TESTS EXEC THE SYSTEM DIFF!!! THEY WILL FAIL IF DIFF IS - NOT INSTALLED OR NOT ON THE PATH!!! - - TODO: change out the echos with a fail. - ======================================================================== --> <target name="test" depends="test1, test2, test3, test4"> </target> <target name="test1" depends="setClasspath"> - <java classname="beauty.parsers.json.JSONBeautyListener" fork="true" output="/home/danson/src/jedit/plugins/Beauty/test/test_files/json/after/test1.json"> + <java classname="beauty.parsers.json.JSONBeautyListener" fork="true" output="./test/test_files/json/after/test1.json"> <classpath refid="classpathref"/> - <arg file="/home/danson/src/jedit/plugins/Beauty/test/test_files/json/before/test1.json"/> + <arg file="./test/test_files/json/before/test1.json"/> </java> - <exec executable="diff" outputproperty="test1diff"> - <arg value="/home/danson/src/jedit/plugins/Beauty/test/test_files/json/after/test1.json"/> - <arg value="/home/danson/src/jedit/plugins/Beauty/test/test_files/json/expected/test1.json"/> - </exec> <condition property="test1" value="true"> - <equals arg1="${test1diff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/test1.java" + file2="./test/test_files/java/expected/test1.java" /> </condition> <echo if:set="test1">test1 passed</echo> <fail unless:set="test1">test1 failed: ${test1diff}</fail> @@ -50,16 +41,13 @@ </target> <target name="test2" depends="setClasspath"> - <java classname="beauty.parsers.json.JSONBeautyListener" fork="true" output="/home/danson/src/jedit/plugins/Beauty/test/test_files/json/after/test2.json" > + <java classname="beauty.parsers.json.JSONBeautyListener" fork="true" output="./test/test_files/json/after/test2.json" > <classpath refid="classpathref"/> - <arg file="/home/danson/src/jedit/plugins/Beauty/test/test_files/json/before/test2.json"/> + <arg file="./test/test_files/json/before/test2.json"/> </java> - <exec executable="diff" outputproperty="test2diff"> - <arg value="/home/danson/src/jedit/plugins/Beauty/test/test_files/json/after/test2.json"/> - <arg value="/home/danson/src/jedit/plugins/Beauty/test/test_files/json/expected/test2.json"/> - </exec> <condition property="test2" value="true"> - <equals arg1="${test2diff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/test2.java" + file2="./test/test_files/java/expected/test2.java" /> </condition> <echo if:set="test2">test2 passed</echo> <fail unless:set="test2">test2 failed: ${test2diff}</fail> @@ -66,16 +54,13 @@ </target> <target name="test3" depends="setClasspath"> - <java classname="beauty.parsers.json.JSONBeautyListener" fork="true" output="/home/danson/src/jedit/plugins/Beauty/test/test_files/json/after/test3.json"> + <java classname="beauty.parsers.json.JSONBeautyListener" fork="true" output="./test/test_files/json/after/test3.json"> <classpath refid="classpathref"/> - <arg file="/home/danson/src/jedit/plugins/Beauty/test/test_files/json/before/test3.json"/> + <arg file="./test/test_files/json/before/test3.json"/> </java> - <exec executable="diff" outputproperty="test3diff"> - <arg value="/home/danson/src/jedit/plugins/Beauty/test/test_files/json/after/test3.json"/> - <arg value="/home/danson/src/jedit/plugins/Beauty/test/test_files/json/expected/test3.json"/> - </exec> <condition property="test3" value="true"> - <equals arg1="${test3diff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/test3.java" + file2="./test/test_files/java/expected/test3.java" /> </condition> <echo if:set="test3">test3 passed</echo> <fail unless:set="test3">test3 failed: ${test3diff}</fail> @@ -82,16 +67,13 @@ </target> <target name="test4" depends="setClasspath"> - <java classname="beauty.parsers.json.JSONBeautyListener" fork="true" output="/home/danson/src/jedit/plugins/Beauty/test/test_files/json/after/test4.json" > + <java classname="beauty.parsers.json.JSONBeautyListener" fork="true" output="./test/test_files/json/after/test4.json" > <classpath refid="classpathref"/> - <arg file="/home/danson/src/jedit/plugins/Beauty/test/test_files/json/before/test4.json"/> + <arg file="./test/test_files/json/before/test4.json"/> </java> - <exec executable="diff" outputproperty="test4diff"> - <arg value="/home/danson/src/jedit/plugins/Beauty/test/test_files/json/after/test4.json"/> - <arg value="/home/danson/src/jedit/plugins/Beauty/test/test_files/json/expected/test4.json"/> - </exec> <condition property="test4" value="true"> - <equals arg1="${test4diff}" arg2=""/> + <filesmatch file1="./test/test_files/java/after/test4.java" + file2="./test/test_files/java/expected/test4.java" /> </condition> <echo if:set="test4">test4 passed</echo> <fail unless:set="test4">test4 failed: ${test4diff}</fail> Modified: plugins/Beauty/trunk/build.xml =================================================================== --- plugins/Beauty/trunk/build.xml 2023-01-11 20:41:28 UTC (rev 25621) +++ plugins/Beauty/trunk/build.xml 2023-01-11 20:42:45 UTC (rev 25622) @@ -295,7 +295,7 @@ - <!-- this is for testing, note hard-coded path to test file --> + <!-- this is for local testing of individual files, note hard-coded path to test file --> <target name="run" description="Run the application." depends="setClasspath"> @@ -311,12 +311,7 @@ <target name="all" depends="javacc,dist"/> <target name="test"> - <property environment="env" /> - <available file="diff" - filepath="${env.PATH}" - property="diff.present"/> - <ant if:true="${diff.present}" antfile="ant_java_test.xml" /> - <ant if:true="${diff.present}" antfile="ant_json_test.xml" /> - <echo unless:true="${diff.present}">Diff not available, no tests run.</echo> + <ant antfile="ant_java_test.xml" /> + <ant antfile="ant_json_test.xml" /> </target> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2023-01-11 20:41:31
|
Revision: 25621 http://sourceforge.net/p/jedit/svn/25621 Author: daleanson Date: 2023-01-11 20:41:28 +0000 (Wed, 11 Jan 2023) Log Message: ----------- some clean up for indenting Modified Paths: -------------- plugins/Beauty/trunk/src/beauty/parsers/java/java/JavaParserBeautyListener.java Modified: plugins/Beauty/trunk/src/beauty/parsers/java/java/JavaParserBeautyListener.java =================================================================== --- plugins/Beauty/trunk/src/beauty/parsers/java/java/JavaParserBeautyListener.java 2023-01-10 17:41:23 UTC (rev 25620) +++ plugins/Beauty/trunk/src/beauty/parsers/java/java/JavaParserBeautyListener.java 2023-01-11 20:41:28 UTC (rev 25621) @@ -476,14 +476,7 @@ if (lines.length > 1) { // if it's multiple lines, just indent them, don't wrap because the lines // are probably already arranged - StringBuilder indented = new StringBuilder(); - ++tabCount; - for (String line : lines) { - indented.append(indent(line)).append('\n'); - } - --tabCount; - indented.insert(0, '\n'); - variableInitializer = indented.toString(); + variableInitializer = indentAgain(variableInitializer); rb = indent(rb); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2023-01-10 17:41:27
|
Revision: 25620 http://sourceforge.net/p/jedit/svn/25620 Author: daleanson Date: 2023-01-10 17:41:23 +0000 (Tue, 10 Jan 2023) Log Message: ----------- fixed formatting for switch block statement groups, was inproperly indented Modified Paths: -------------- plugins/Beauty/trunk/src/beauty/parsers/java/java/JavaParserBeautyListener.java Modified: plugins/Beauty/trunk/src/beauty/parsers/java/java/JavaParserBeautyListener.java =================================================================== --- plugins/Beauty/trunk/src/beauty/parsers/java/java/JavaParserBeautyListener.java 2022-12-24 15:23:15 UTC (rev 25619) +++ plugins/Beauty/trunk/src/beauty/parsers/java/java/JavaParserBeautyListener.java 2023-01-10 17:41:23 UTC (rev 25620) @@ -3803,9 +3803,7 @@ } else { // it's several statements - ++tabCount; - blockStatements = indent(blockStatements); - --tabCount; + blockStatements = indentAgain(blockStatements); } if (!switchLabels.endsWith("\n")) { switchLabels = switchLabels + '\n'; // NOPMD This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2022-12-24 15:23:17
|
Revision: 25619 http://sourceforge.net/p/jedit/svn/25619 Author: daleanson Date: 2022-12-24 15:23:15 +0000 (Sat, 24 Dec 2022) Log Message: ----------- Updating test files. Removed Paths: ------------- plugins/Beauty/trunk/test/test files/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2022-12-24 15:22:15
|
Revision: 25618 http://sourceforge.net/p/jedit/svn/25618 Author: daleanson Date: 2022-12-24 15:22:13 +0000 (Sat, 24 Dec 2022) Log Message: ----------- Updating test files. Modified Paths: -------------- plugins/Beauty/trunk/build.xml plugins/Beauty/trunk/src/beauty/parsers/java/ParseException.java plugins/Beauty/trunk/src/beauty/parsers/java/java/JavaParserBeautyListener.java plugins/Beauty/trunk/test/test_files/java/after/AllInOne17.java plugins/Beauty/trunk/test/test_files/java/after/AllInOne8.java plugins/Beauty/trunk/test/test_files/java/after/BasicClass3.java plugins/Beauty/trunk/test/test_files/java/after/PatternMatching4switchExp.java plugins/Beauty/trunk/test/test_files/java/expected/AllInOne17.java plugins/Beauty/trunk/test/test_files/java/expected/AllInOne8.java plugins/Beauty/trunk/test/test_files/java/expected/BasicClass3.java plugins/Beauty/trunk/test/test_files/java/expected/PatternMatching4switchExp.java Modified: plugins/Beauty/trunk/build.xml =================================================================== --- plugins/Beauty/trunk/build.xml 2022-11-19 23:40:05 UTC (rev 25617) +++ plugins/Beauty/trunk/build.xml 2022-12-24 15:22:13 UTC (rev 25618) @@ -295,7 +295,7 @@ - <!-- this is for testing --> + <!-- this is for testing, note hard-coded path to test file --> <target name="run" description="Run the application." depends="setClasspath"> Modified: plugins/Beauty/trunk/src/beauty/parsers/java/ParseException.java =================================================================== --- plugins/Beauty/trunk/src/beauty/parsers/java/ParseException.java 2022-11-19 23:40:05 UTC (rev 25617) +++ plugins/Beauty/trunk/src/beauty/parsers/java/ParseException.java 2022-12-24 15:22:13 UTC (rev 25618) @@ -11,182 +11,188 @@ * mechanisms so long as you retain the public fields. */ public class ParseException extends Exception { + /** + * This constructor is used by the method "generateParseException" + * in the generated parser. Calling this constructor generates + * a new object of this type with the fields "currentToken", + * "expectedTokenSequences", and "tokenImage" set. The boolean + * flag "specialConstructor" is also set to true to indicate that + * this constructor was used to create this object. + * This constructor calls its super class with the empty string + * to force the "toString" method of parent class "Throwable" to + * print the error message in the form: + * ParseException: <result of getMessage> + */ + public ParseException(Token currentTokenVal, int [] [] expectedTokenSequencesVal, String [] tokenImageVal) { + super(""); + specialConstructor = true; + currentToken = currentTokenVal; + expectedTokenSequences = expectedTokenSequencesVal; + tokenImage = tokenImageVal; + } - /** - * This constructor is used by the method "generateParseException" - * in the generated parser. Calling this constructor generates - * a new object of this type with the fields "currentToken", - * "expectedTokenSequences", and "tokenImage" set. The boolean - * flag "specialConstructor" is also set to true to indicate that - * this constructor was used to create this object. - * This constructor calls its super class with the empty string - * to force the "toString" method of parent class "Throwable" to - * print the error message in the form: - * ParseException: <result of getMessage> - */ - public ParseException(Token currentTokenVal, - int[][] expectedTokenSequencesVal, - String[] tokenImageVal - ) - { - super(""); - specialConstructor = true; - currentToken = currentTokenVal; - expectedTokenSequences = expectedTokenSequencesVal; - tokenImage = tokenImageVal; - } + /** + * The following constructors are for use by you for whatever + * purpose you can think of. Constructing the exception in this + * manner makes the exception behave in the normal way - i.e., as + * documented in the class "Throwable". The fields "errorToken", + * "expectedTokenSequences", and "tokenImage" do not contain + * relevant information. The JavaCC generated code does not use + * these constructors. + */ + public ParseException() { + super(); + specialConstructor = false; + } - /** - * The following constructors are for use by you for whatever - * purpose you can think of. Constructing the exception in this - * manner makes the exception behave in the normal way - i.e., as - * documented in the class "Throwable". The fields "errorToken", - * "expectedTokenSequences", and "tokenImage" do not contain - * relevant information. The JavaCC generated code does not use - * these constructors. - */ + public ParseException(String message) { + super(message); + specialConstructor = false; + } - public ParseException() { - super(); - specialConstructor = false; - } + /** + * This variable determines which constructor was used to create + * this object and thereby affects the semantics of the + * "getMessage" method (see below). + */ + protected boolean specialConstructor; - public ParseException(String message) { - super(message); - specialConstructor = false; - } + /** + * This is the last token that has been consumed successfully. If + * this object has been created due to a parse error, the token + * followng this token will (therefore) be the first error token. + */ + public Token currentToken; - /** - * This variable determines which constructor was used to create - * this object and thereby affects the semantics of the - * "getMessage" method (see below). - */ - protected boolean specialConstructor; + /** + * Each entry in this array is an array of integers. Each array + * of integers represents a sequence of tokens (by their ordinal + * values) that is expected at this point of the parse. + */ + public int [] [] expectedTokenSequences; - /** - * This is the last token that has been consumed successfully. If - * this object has been created due to a parse error, the token - * followng this token will (therefore) be the first error token. - */ - public Token currentToken; + /** + * This is a reference to the "tokenImage" array of the generated + * parser within which the parse error occurred. This array is + * defined in the generated ...Constants interface. + */ + public String [] tokenImage; - /** - * Each entry in this array is an array of integers. Each array - * of integers represents a sequence of tokens (by their ordinal - * values) that is expected at this point of the parse. - */ - public int[][] expectedTokenSequences; + /** + * This method has the standard behavior when this object has been + * created using the standard constructors. Otherwise, it uses + * "currentToken" and "expectedTokenSequences" to generate a parse + * error message and returns it. If this object has been created + * due to a parse error, and you do not catch it (it gets thrown + * from the parser), then this method is called during the printing + * of the final stack trace, and hence the correct error message + * gets displayed. + */ + public String getMessage() { + if (!specialConstructor) { + return super.getMessage(); + } + StringBuffer expected = new StringBuffer(); + int maxSize = 0; - /** - * This is a reference to the "tokenImage" array of the generated - * parser within which the parse error occurred. This array is - * defined in the generated ...Constants interface. - */ - public String[] tokenImage; + for (int i = 0; i < expectedTokenSequences.length; i++) { + if (maxSize < expectedTokenSequences[i].length) { + maxSize = expectedTokenSequences[i].length; + } - /** - * This method has the standard behavior when this object has been - * created using the standard constructors. Otherwise, it uses - * "currentToken" and "expectedTokenSequences" to generate a parse - * error message and returns it. If this object has been created - * due to a parse error, and you do not catch it (it gets thrown - * from the parser), then this method is called during the printing - * of the final stack trace, and hence the correct error message - * gets displayed. - */ - public String getMessage() { - if (!specialConstructor) { - return super.getMessage(); + for (int j = 0; j < expectedTokenSequences[i].length; j++) { + expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' '); + } + + if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { + expected.append("..."); + } + expected.append(eol).append(" "); + } + String retval = "Encountered \""; + Token tok = currentToken.next; + + for (int i = 0; i < maxSize; i++) { + if (i != 0) { + retval += " "; + } + + if (tok.kind == 0) { + retval += tokenImage[0]; + break; + } + retval += add_escapes(tok.image); + tok = tok.next; + } + retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; + retval += "." + eol; + + if (expectedTokenSequences.length == 1) { + retval += "Was expecting:" + eol + " "; + } + else { + retval += "Was expecting one of:" + eol + " "; + } + retval += expected.toString(); + return retval; } - StringBuffer expected = new StringBuffer(); - int maxSize = 0; - for (int i = 0; i < expectedTokenSequences.length; i++) { - if (maxSize < expectedTokenSequences[i].length) { - maxSize = expectedTokenSequences[i].length; - } - for (int j = 0; j < expectedTokenSequences[i].length; j++) { - expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' '); - } - if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { - expected.append("..."); - } - expected.append(eol).append(" "); - } - String retval = "Encountered \""; - Token tok = currentToken.next; - for (int i = 0; i < maxSize; i++) { - if (i != 0) retval += " "; - if (tok.kind == 0) { - retval += tokenImage[0]; - break; - } - retval += add_escapes(tok.image); - tok = tok.next; - } - retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; - retval += "." + eol; - if (expectedTokenSequences.length == 1) { - retval += "Was expecting:" + eol + " "; - } else { - retval += "Was expecting one of:" + eol + " "; - } - retval += expected.toString(); - return retval; - } - /** - * The end of line string for this machine. - */ - protected String eol = System.getProperty("line.separator", "\n"); - - /** - * Used to convert raw characters to their escaped version - * when these raw version cannot be used as part of an ASCII - * string literal. - */ - protected String add_escapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; + /** + * The end of line string for this machine. + */ + protected String eol = System.getProperty("line.separator", "\n"); + + /** + * Used to convert raw characters to their escaped version + * when these raw version cannot be used as part of an ASCII + * string literal. + */ + protected String add_escapes(String str) { + StringBuffer retval = new StringBuffer(); + char ch; + + for (int i = 0; i < str.length(); i++) { + switch (str.charAt(i)) { + case 0: + continue; + case '\b': + retval.append("\\b"); + continue; + case '\t': + retval.append("\\t"); + continue; + case '\n': + retval.append("\\n"); + continue; + case '\f': + retval.append("\\f"); + continue; + case '\r': + retval.append("\\r"); + continue; + case '\"': + retval.append("\\\""); + continue; + case '\'': + retval.append("\\\'"); + continue; + case '\\': + retval.append("\\\\"); + continue; + + default: + + if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { + String s = "0000" + Integer.toString(ch, 16); + retval.append("\\u" + s.substring(s.length() - 4, s.length())); + } + else { + retval.append(ch); + } + continue; + } } - } - return retval.toString(); - } + return retval.toString(); + } -} +} \ No newline at end of file Modified: plugins/Beauty/trunk/src/beauty/parsers/java/java/JavaParserBeautyListener.java =================================================================== --- plugins/Beauty/trunk/src/beauty/parsers/java/java/JavaParserBeautyListener.java 2022-11-19 23:40:05 UTC (rev 25617) +++ plugins/Beauty/trunk/src/beauty/parsers/java/java/JavaParserBeautyListener.java 2022-12-24 15:22:13 UTC (rev 25618) @@ -1435,7 +1435,7 @@ * | expression bop='|' expression * | expression bop='&&' expression * | expression bop='||' expression - * | <assoc=right> expression bop='?' expression ':' expression + * | <assoc=right> expression bop='?' expression ':' expression (ternary expression) * | <assoc=right> expression * bop=('=' | '+=' | '-=' | '*=' | '/=' | '&=' | '|=' | '^=' | '>>=' | '>>>=' | '<<=' | '%=') * expression @@ -1738,12 +1738,12 @@ return; } else if (expressionCount == 3) { - // only have one case with 3 expressions + // only have one case with 3 expressions, this is a ternary expression //<assoc=right> expression bop='?' expression ':' expression - String exp2 = pop(); - String colon = pop(); // : - String exp1 = pop(); - String question = pop(); // ? + String exp2 = trimFront( pop() ); + String colon = pop().trim(); // : + String exp1 = pop().trim(); + String question = pop().trim(); // ? StringBuilder expression = new StringBuilder(pop()); expression.append(padOperator(question)).append(exp1).append(padOperator(colon)).append(exp2); push(expression); @@ -4162,7 +4162,6 @@ // get the brackets endPart.insert(0, pop()); // ] endPart.insert(0, pop()); // [ - endPart.insert(0, ' '); // any annotations? if (ctx.annotation() != null) { @@ -5025,7 +5024,7 @@ /** * Formats a regular block comment. This method splits the - * given comment into lines, indents each line, and ensures there is a * at the + * given comment into lines, indents each line, and ensures there is a * and space at the * start of each line. * @param comment A block comment. * @return The formatted comment. Modified: plugins/Beauty/trunk/test/test_files/java/after/AllInOne17.java =================================================================== --- plugins/Beauty/trunk/test/test_files/java/after/AllInOne17.java 2022-11-19 23:40:05 UTC (rev 25617) +++ plugins/Beauty/trunk/test/test_files/java/after/AllInOne17.java 2022-12-24 15:22:13 UTC (rev 25618) @@ -267,7 +267,7 @@ switch (obj) { case null -> f(0); case String s -> f(1); - case int [] a -> f(2); + case int[] a -> f(2); default -> f(-1); } } @@ -277,7 +277,7 @@ case null -> f(0); case Long l -> f(1); case Integer i -> f(1); - case int [] a -> f(2); + case int[] a -> f(2); default -> f(-1); } } Modified: plugins/Beauty/trunk/test/test_files/java/after/AllInOne8.java =================================================================== --- plugins/Beauty/trunk/test/test_files/java/after/AllInOne8.java 2022-11-19 23:40:05 UTC (rev 25617) +++ plugins/Beauty/trunk/test/test_files/java/after/AllInOne8.java 2022-12-24 15:22:13 UTC (rev 25618) @@ -2,7 +2,7 @@ // Source: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/index.html // Lambdas public class Lambdas { - public static void main(String [] args) { + public static void main(String[] args) { // use predicate composition to remove matching names List<Name> list = new ArrayList<>(); @@ -64,8 +64,8 @@ autodetect(this.beans, ((AutodetectCapableMBeanInfoAssembler) this.assembler) :: includeBean); TriFunction<Integer, String, Integer, Computer> c6Function = Computer :: new; Computer c3 = c6Function.apply(2008, "black", 90); - Function<Integer, Computer []> computerCreator = Computer [] :: new; - Computer [] computerArray = computerCreator.apply(5); + Function<Integer, Computer[]> computerCreator = Computer[] :: new; + Computer[] computerArray = computerCreator.apply(5); } } @@ -91,11 +91,11 @@ // Instanceof class InstanceOf { - public static void main(String [] args) { - if (args instanceof String []) { + public static void main(String[] args) { + if (args instanceof String[]) { } - if (args instanceof a.String []) { + if (args instanceof a.String[]) { } } @@ -103,7 +103,7 @@ // Unicode class Unicode { - public static void main(String [] args) { + public static void main(String[] args) { System.out.println("A = \uuu0041"); } @@ -112,7 +112,7 @@ // More Annotations public class Annos { public @interface Dummy4 { - String [] value(); + String[] value(); } @Documented @@ -119,7 +119,7 @@ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) public @interface Dummy03 { - Dummy3 [] value(); + Dummy3[] value(); } @Documented @@ -126,7 +126,7 @@ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) public @interface Dummy01 { - Dummy1 [] value(); + Dummy1[] value(); } @Documented @@ -152,13 +152,13 @@ @Dummy4("#1") @Dummy1 @Dummy3 - public static <T extends @Dummy2 @Dummy3 Object> @Dummy1 @Dummy3 T @Dummy1 @Dummy3 [] foo(@Dummy1 T @Dummy2 @Dummy3 [] arr, @Dummy1 @Dummy3 T @Dummy1 @Dummy3... t) { - return (@Dummy1 @Dummy3 T []) null; + public static <T extends @Dummy2 @Dummy3 Object> @Dummy1 @Dummy3 T @Dummy1 @Dummy3[] foo(@Dummy1 T @Dummy2 @Dummy3[] arr, @Dummy1 @Dummy3 T @Dummy1 @Dummy3... t) { + return (@Dummy1 @Dummy3 T[]) null; } @Dummy4("") - public static <@Dummy1 @Dummy2 T extends @Dummy1 @Dummy3 Object> @Dummy1 @Dummy3 T @Dummy1 @Dummy3 [] @Dummy1 @Dummy2 [] foo2(@Dummy1 T @Dummy2 @Dummy3 [] @Dummy1 @Dummy3 [] arr) { - return (@Dummy1 @Dummy2 T [] @Dummy1 @Dummy2 []) null; + public static <@Dummy1 @Dummy2 T extends @Dummy1 @Dummy3 Object> @Dummy1 @Dummy3 T @Dummy1 @Dummy3[] @Dummy1 @Dummy2[] foo2(@Dummy1 T @Dummy2 @Dummy3[] @Dummy1 @Dummy3[] arr) { + return (@Dummy1 @Dummy2 T[] @Dummy1 @Dummy2[]) null; } @Documented @@ -179,12 +179,12 @@ public static <@Dummy3 T> void foo33(T t, Gen<@Dummy1 @Dummy3 ?> c) { } - public static <@Dummy3 T, @Dummy1 S> void foo333(T t, Gen<@Dummy1 @Dummy3 T @Dummy1 []> c) { + public static <@Dummy3 T, @Dummy1 S> void foo333(T t, Gen<@Dummy1 @Dummy3 T @Dummy1[]> c) { } @Dummy3 - public static <@Dummy3 T extends @Dummy3 Gen<@Dummy1 ? super @Dummy1 T>> @Dummy3 T @Dummy3 [] f(@Dummy3 T @Dummy3... t) { - return (@Dummy3 T @Dummy3 []) null; + public static <@Dummy3 T extends @Dummy3 Gen<@Dummy1 ? super @Dummy1 T>> @Dummy3 T @Dummy3[] f(@Dummy3 T @Dummy3... t) { + return (@Dummy3 T @Dummy3[]) null; } interface TI1 { Modified: plugins/Beauty/trunk/test/test_files/java/after/BasicClass3.java =================================================================== --- plugins/Beauty/trunk/test/test_files/java/after/BasicClass3.java 2022-11-19 23:40:05 UTC (rev 25617) +++ plugins/Beauty/trunk/test/test_files/java/after/BasicClass3.java 2022-12-24 15:22:13 UTC (rev 25618) @@ -27,7 +27,7 @@ // See http://docs.oracle.com/javase/7/docs/technotes/guides/language/underscores-literals.html public class LexerTest { - static void main(String [] args) { + static void main(String[] args) { long creditCardNumber = 1234_5678_9012_3456L; long socialSecurityNumber = 999_99_9999L; float pi = 3.14_15F; @@ -132,7 +132,7 @@ public static void methodCalls() { new Object().getClass().hashCode(); new String[]{"test"}[0].getLength(); - String [] strings; + String[] strings; (strings = new String[]{"test"})[0].charAt(0); strings[0].length(); Foo foo = new Foo().new Bar(); @@ -144,7 +144,7 @@ } public class ImportsTest { - public static void main(String [] args) { + public static void main(String[] args) { /* The following line is equivalent to * java.util.Random random = new java.util.Random(); * It would've been incorrect without the import declaration @@ -155,7 +155,7 @@ } public class HelloWorld { - public static void main(String [] args) { + public static void main(String[] args) { /* The following line is equivalent to: * System.out.println("Hello World!"); * and would have been incorrect without the import declaration. @@ -260,7 +260,7 @@ outer: for ( String str : stringsArr) { - char [] strChars = str.toCharArray(); + char[] strChars = str.toCharArray(); for ( char ch : strChars) { if (ch == ' ') { @@ -334,19 +334,19 @@ assert n != 0 : "n was equal to zero"; // Reference types ------------------- // Arrays - int [] numbers = new int[5]; + int[] numbers = new int[5]; numbers[0] = 2; int x = numbers[0]; // Initializers ------------------- // Long syntax - int [] XXXXXXXnumbers = new int[]{999, 888, 777, 666, 555}; + int[] XXXXXXXnumbers = new int[]{999, 888, 777, 666, 555}; // Short syntax - int [] numbers2 = {20, 1, 42, 15, 34}; + int[] numbers2 = {20, 1, 42, 15, 34}; // Multi-dimensional arrays - int [] [] numbers = new int[3][3]; + int[][] numbers = new int[3][3]; numbers[1][2] = 2; - int [] [] numbers2 = {{2, 3, 2}, {1, 2, 6}, {2, 4, 5}}; - int [] [] numbers = new int[2][]; // Initialization of the first dimension only + int[][] numbers2 = {{2, 3, 2}, {1, 2, 6}, {2, 4, 5}}; + int[][] numbers = new int[2][]; // Initialization of the first dimension only numbers[0] = new int[3]; numbers[1] = new int[2]; // Prefix & postfix @@ -532,7 +532,7 @@ System.out.println(CustomClass.class.getName() + ": constructor runtime"); } - public static void main(String [] args) { + public static void main(String[] args) { CustomClass nc = new CustomClass(); hello(); AbstractClass.hello(); // also valid Modified: plugins/Beauty/trunk/test/test_files/java/after/PatternMatching4switchExp.java =================================================================== --- plugins/Beauty/trunk/test/test_files/java/after/PatternMatching4switchExp.java 2022-11-19 23:40:05 UTC (rev 25617) +++ plugins/Beauty/trunk/test/test_files/java/after/PatternMatching4switchExp.java 2022-12-24 15:22:13 UTC (rev 25618) @@ -9,7 +9,7 @@ switch (obj) { case null -> f(0); case String s -> f(1); - case int [] a -> f(2); + case int[] a -> f(2); default -> f(-1); } } @@ -19,7 +19,7 @@ case null -> f(0); case Long l -> f(1); case Integer i -> f(1); - case int [] a -> f(2); + case int[] a -> f(2); default -> f(-1); } } Modified: plugins/Beauty/trunk/test/test_files/java/expected/AllInOne17.java =================================================================== --- plugins/Beauty/trunk/test/test_files/java/expected/AllInOne17.java 2022-11-19 23:40:05 UTC (rev 25617) +++ plugins/Beauty/trunk/test/test_files/java/expected/AllInOne17.java 2022-12-24 15:22:13 UTC (rev 25618) @@ -267,7 +267,7 @@ switch (obj) { case null -> f(0); case String s -> f(1); - case int [] a -> f(2); + case int[] a -> f(2); default -> f(-1); } } @@ -277,7 +277,7 @@ case null -> f(0); case Long l -> f(1); case Integer i -> f(1); - case int [] a -> f(2); + case int[] a -> f(2); default -> f(-1); } } Modified: plugins/Beauty/trunk/test/test_files/java/expected/AllInOne8.java =================================================================== --- plugins/Beauty/trunk/test/test_files/java/expected/AllInOne8.java 2022-11-19 23:40:05 UTC (rev 25617) +++ plugins/Beauty/trunk/test/test_files/java/expected/AllInOne8.java 2022-12-24 15:22:13 UTC (rev 25618) @@ -2,7 +2,7 @@ // Source: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/index.html // Lambdas public class Lambdas { - public static void main(String [] args) { + public static void main(String[] args) { // use predicate composition to remove matching names List<Name> list = new ArrayList<>(); @@ -64,8 +64,8 @@ autodetect(this.beans, ((AutodetectCapableMBeanInfoAssembler) this.assembler) :: includeBean); TriFunction<Integer, String, Integer, Computer> c6Function = Computer :: new; Computer c3 = c6Function.apply(2008, "black", 90); - Function<Integer, Computer []> computerCreator = Computer [] :: new; - Computer [] computerArray = computerCreator.apply(5); + Function<Integer, Computer[]> computerCreator = Computer[] :: new; + Computer[] computerArray = computerCreator.apply(5); } } @@ -91,11 +91,11 @@ // Instanceof class InstanceOf { - public static void main(String [] args) { - if (args instanceof String []) { + public static void main(String[] args) { + if (args instanceof String[]) { } - if (args instanceof a.String []) { + if (args instanceof a.String[]) { } } @@ -103,7 +103,7 @@ // Unicode class Unicode { - public static void main(String [] args) { + public static void main(String[] args) { System.out.println("A = \uuu0041"); } @@ -112,7 +112,7 @@ // More Annotations public class Annos { public @interface Dummy4 { - String [] value(); + String[] value(); } @Documented @@ -119,7 +119,7 @@ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) public @interface Dummy03 { - Dummy3 [] value(); + Dummy3[] value(); } @Documented @@ -126,7 +126,7 @@ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) public @interface Dummy01 { - Dummy1 [] value(); + Dummy1[] value(); } @Documented @@ -152,13 +152,13 @@ @Dummy4("#1") @Dummy1 @Dummy3 - public static <T extends @Dummy2 @Dummy3 Object> @Dummy1 @Dummy3 T @Dummy1 @Dummy3 [] foo(@Dummy1 T @Dummy2 @Dummy3 [] arr, @Dummy1 @Dummy3 T @Dummy1 @Dummy3... t) { - return (@Dummy1 @Dummy3 T []) null; + public static <T extends @Dummy2 @Dummy3 Object> @Dummy1 @Dummy3 T @Dummy1 @Dummy3[] foo(@Dummy1 T @Dummy2 @Dummy3[] arr, @Dummy1 @Dummy3 T @Dummy1 @Dummy3... t) { + return (@Dummy1 @Dummy3 T[]) null; } @Dummy4("") - public static <@Dummy1 @Dummy2 T extends @Dummy1 @Dummy3 Object> @Dummy1 @Dummy3 T @Dummy1 @Dummy3 [] @Dummy1 @Dummy2 [] foo2(@Dummy1 T @Dummy2 @Dummy3 [] @Dummy1 @Dummy3 [] arr) { - return (@Dummy1 @Dummy2 T [] @Dummy1 @Dummy2 []) null; + public static <@Dummy1 @Dummy2 T extends @Dummy1 @Dummy3 Object> @Dummy1 @Dummy3 T @Dummy1 @Dummy3[] @Dummy1 @Dummy2[] foo2(@Dummy1 T @Dummy2 @Dummy3[] @Dummy1 @Dummy3[] arr) { + return (@Dummy1 @Dummy2 T[] @Dummy1 @Dummy2[]) null; } @Documented @@ -179,12 +179,12 @@ public static <@Dummy3 T> void foo33(T t, Gen<@Dummy1 @Dummy3 ?> c) { } - public static <@Dummy3 T, @Dummy1 S> void foo333(T t, Gen<@Dummy1 @Dummy3 T @Dummy1 []> c) { + public static <@Dummy3 T, @Dummy1 S> void foo333(T t, Gen<@Dummy1 @Dummy3 T @Dummy1[]> c) { } @Dummy3 - public static <@Dummy3 T extends @Dummy3 Gen<@Dummy1 ? super @Dummy1 T>> @Dummy3 T @Dummy3 [] f(@Dummy3 T @Dummy3... t) { - return (@Dummy3 T @Dummy3 []) null; + public static <@Dummy3 T extends @Dummy3 Gen<@Dummy1 ? super @Dummy1 T>> @Dummy3 T @Dummy3[] f(@Dummy3 T @Dummy3... t) { + return (@Dummy3 T @Dummy3[]) null; } interface TI1 { Modified: plugins/Beauty/trunk/test/test_files/java/expected/BasicClass3.java =================================================================== --- plugins/Beauty/trunk/test/test_files/java/expected/BasicClass3.java 2022-11-19 23:40:05 UTC (rev 25617) +++ plugins/Beauty/trunk/test/test_files/java/expected/BasicClass3.java 2022-12-24 15:22:13 UTC (rev 25618) @@ -27,7 +27,7 @@ // See http://docs.oracle.com/javase/7/docs/technotes/guides/language/underscores-literals.html public class LexerTest { - static void main(String [] args) { + static void main(String[] args) { long creditCardNumber = 1234_5678_9012_3456L; long socialSecurityNumber = 999_99_9999L; float pi = 3.14_15F; @@ -132,7 +132,7 @@ public static void methodCalls() { new Object().getClass().hashCode(); new String[]{"test"}[0].getLength(); - String [] strings; + String[] strings; (strings = new String[]{"test"})[0].charAt(0); strings[0].length(); Foo foo = new Foo().new Bar(); @@ -144,7 +144,7 @@ } public class ImportsTest { - public static void main(String [] args) { + public static void main(String[] args) { /* The following line is equivalent to * java.util.Random random = new java.util.Random(); * It would've been incorrect without the import declaration @@ -155,7 +155,7 @@ } public class HelloWorld { - public static void main(String [] args) { + public static void main(String[] args) { /* The following line is equivalent to: * System.out.println("Hello World!"); * and would have been incorrect without the import declaration. @@ -260,7 +260,7 @@ outer: for ( String str : stringsArr) { - char [] strChars = str.toCharArray(); + char[] strChars = str.toCharArray(); for ( char ch : strChars) { if (ch == ' ') { @@ -334,19 +334,19 @@ assert n != 0 : "n was equal to zero"; // Reference types ------------------- // Arrays - int [] numbers = new int[5]; + int[] numbers = new int[5]; numbers[0] = 2; int x = numbers[0]; // Initializers ------------------- // Long syntax - int [] XXXXXXXnumbers = new int[]{999, 888, 777, 666, 555}; + int[] XXXXXXXnumbers = new int[]{999, 888, 777, 666, 555}; // Short syntax - int [] numbers2 = {20, 1, 42, 15, 34}; + int[] numbers2 = {20, 1, 42, 15, 34}; // Multi-dimensional arrays - int [] [] numbers = new int[3][3]; + int[][] numbers = new int[3][3]; numbers[1][2] = 2; - int [] [] numbers2 = {{2, 3, 2}, {1, 2, 6}, {2, 4, 5}}; - int [] [] numbers = new int[2][]; // Initialization of the first dimension only + int[][] numbers2 = {{2, 3, 2}, {1, 2, 6}, {2, 4, 5}}; + int[][] numbers = new int[2][]; // Initialization of the first dimension only numbers[0] = new int[3]; numbers[1] = new int[2]; // Prefix & postfix @@ -532,7 +532,7 @@ System.out.println(CustomClass.class.getName() + ": constructor runtime"); } - public static void main(String [] args) { + public static void main(String[] args) { CustomClass nc = new CustomClass(); hello(); AbstractClass.hello(); // also valid Modified: plugins/Beauty/trunk/test/test_files/java/expected/PatternMatching4switchExp.java =================================================================== --- plugins/Beauty/trunk/test/test_files/java/expected/PatternMatching4switchExp.java 2022-11-19 23:40:05 UTC (rev 25617) +++ plugins/Beauty/trunk/test/test_files/java/expected/PatternMatching4switchExp.java 2022-12-24 15:22:13 UTC (rev 25618) @@ -9,7 +9,7 @@ switch (obj) { case null -> f(0); case String s -> f(1); - case int [] a -> f(2); + case int[] a -> f(2); default -> f(-1); } } @@ -19,7 +19,7 @@ case null -> f(0); case Long l -> f(1); case Integer i -> f(1); - case int [] a -> f(2); + case int[] a -> f(2); default -> f(-1); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2022-11-19 23:40:07
|
Revision: 25617 http://sourceforge.net/p/jedit/svn/25617 Author: daleanson Date: 2022-11-19 23:40:05 +0000 (Sat, 19 Nov 2022) Log Message: ----------- Added items to plugin menu, these items are the same as the text area context menu and only work on the currently displayed file. Modified Paths: -------------- plugins/SVNPlugin/trunk/SVNPlugin.props plugins/SVNPlugin/trunk/src/docs/index.html plugins/SVNPlugin/trunk/src/ise/plugin/svn/gui/OutputPanel.java Added Paths: ----------- plugins/SVNPlugin/trunk/src/ise/plugin/svn/gui/PluginMenu.java Modified: plugins/SVNPlugin/trunk/SVNPlugin.props =================================================================== --- plugins/SVNPlugin/trunk/SVNPlugin.props 2022-10-28 22:13:37 UTC (rev 25616) +++ plugins/SVNPlugin/trunk/SVNPlugin.props 2022-11-19 23:40:05 UTC (rev 25617) @@ -1,6 +1,8 @@ #----------------------------------- # Properties for SVNPlugin #----------------------------------- + +# workaround for old trident library svnkit.ssh.client=apache # general plugin properties @@ -7,7 +9,7 @@ plugin.ise.plugin.svn.SVNPlugin.activate=defer plugin.ise.plugin.svn.SVNPlugin.name=SVNPlugin plugin.ise.plugin.svn.SVNPlugin.author=Dale Anson -plugin.ise.plugin.svn.SVNPlugin.version=1.10.8 +plugin.ise.plugin.svn.SVNPlugin.version=1.10.9 plugin.ise.plugin.svn.SVNPlugin.description=Subversion plugin # docs @@ -21,7 +23,6 @@ plugin.ise.plugin.svn.SVNPlugin.depend.4=plugin jdiff.JDiffPlugin 3.3.0 plugin.ise.plugin.svn.SVNPlugin.depend.5=plugin infoviewer.InfoViewerPlugin 1.6.3 plugin.ise.plugin.svn.SVNPlugin.depend.6=plugin jnaplugin.JNAPlugin 3.5.2 -#plugin.ise.plugin.svn.SVNPlugin.jars=antlr-runtime-3.4.jar jsch.agentproxy.connector-factory-0.0.7.jar jsch.agentproxy.core-0.0.7.jar jsch.agentproxy.pageant-0.0.7.jar jsch.agentproxy.sshagent-0.0.7.jar jsch.agentproxy.svnkit-trilead-ssh2-0.0.7.jar jsch.agentproxy.usocket-jna-0.0.7.jar jsch.agentproxy.usocket-nc-0.0.7.jar sequence-library-1.0.3.jar sqljet-1.1.10.jar svnkit-1.8.12.jar svnkit-cli-1.8.12.jar trilead-ssh2-1.0.0-build220.jar plugin.ise.plugin.svn.SVNPlugin.jars=antlr-runtime-3.4.jar eddsa-0.3.0.jar jcl-over-slf4j-1.7.32.jar lz4-java-1.4.1.jar sequence-library-1.0.4.jar slf4j-api-1.7.32.jar sqljet-1.1.14.jar sshd-common-2.8.0.jar sshd-core-2.8.0.jar svnkit-1.10.8.jar svnkit-cli-1.10.8.jar svnkit-javahl16-1.10.8.jar # titles for DockableWindowManager @@ -48,9 +49,8 @@ ise.plugin.svn.pv.password.label=Password: # plugin menu items -plugin.ise.plugin.svn.SVNPlugin.menu.label=Subversion -plugin.ise.plugin.svn.SVNPlugin.menu=subversion subversion.browser -subversion.label=SVN Console +plugin.ise.plugin.svn.SVNPlugin.menu.code=new ise.plugin.svn.gui.PluginMenu() +subversion.console.label=SVN Console # action labels svn.action.add.label=Add @@ -171,6 +171,7 @@ ise.plugin.svn.gui.br.code.21=ise.plugin.svn.gui.br.Unlock # pre-defined svn property names. Do not remove the leading comma from these values, it is important. +# -- this is pretty lame, just check for the comment in the code and add it if it's missing. ise.plugin.svn.gui.PropertyEditor.defaultFilePropNames=,svn:executable,svn:mime-type,svn:ignore,svn:keywords,svn:eol-style,svn:externals,svn:special ise.plugin.svn.gui.PropertyEditor.defaultDirPropNames=,svn:mime-type,svn:ignore,svn:keywords,svn:eol-style,svn:externals,svn:special,bugtraq:url,bugtraq:warnifnoissue,bugtraq:label,bugtraq:message,bugtraq:number,bugtraq:append,bugtraq:logregex,tsvn:logtemplate Modified: plugins/SVNPlugin/trunk/src/docs/index.html =================================================================== --- plugins/SVNPlugin/trunk/src/docs/index.html 2022-10-28 22:13:37 UTC (rev 25616) +++ plugins/SVNPlugin/trunk/src/docs/index.html 2022-11-19 23:40:05 UTC (rev 25617) @@ -77,7 +77,7 @@ </ol> </p> <p> -Access the dockables via the Plugins menu, Plugins -> SVN Plugin -> SVN Browser or SVN Console. +Access the dockables via the Plugins menu, Plugins -> SVN Plugin -> SVN Browser or SVN Console. The Plugins menu also provides a number of SVN commands, these commands work on the currently displayed file. </p> <p> You can dock them for easier access using Utilities -> Global Options... -> Docking. Modified: plugins/SVNPlugin/trunk/src/ise/plugin/svn/gui/OutputPanel.java =================================================================== --- plugins/SVNPlugin/trunk/src/ise/plugin/svn/gui/OutputPanel.java 2022-10-28 22:13:37 UTC (rev 25616) +++ plugins/SVNPlugin/trunk/src/ise/plugin/svn/gui/OutputPanel.java 2022-11-19 23:40:05 UTC (rev 25617) @@ -72,7 +72,7 @@ tabs = new JTabbedPane(); //Icon close_icon = GUIUtilities.loadIcon( "closebox.gif" ); //tabs.setCloseIcons(close_icon, close_icon, close_icon); - tabs.addTab( "SVN Console", getConsolePanel() ); + tabs.addTab( jEdit.getProperty("subversion.console.label", "SVN Console"), getConsolePanel() ); add( tabs ); // add a mouse listener to be able to close results tabs Added: plugins/SVNPlugin/trunk/src/ise/plugin/svn/gui/PluginMenu.java =================================================================== --- plugins/SVNPlugin/trunk/src/ise/plugin/svn/gui/PluginMenu.java (rev 0) +++ plugins/SVNPlugin/trunk/src/ise/plugin/svn/gui/PluginMenu.java 2022-11-19 23:40:05 UTC (rev 25617) @@ -0,0 +1,506 @@ +/* + * Copyright (c) 2007, Dale Anson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package ise.plugin.svn.gui; + +import ise.plugin.svn.PVHelper; +import ise.plugin.svn.action.*; +import ise.plugin.svn.data.*; +import ise.plugin.svn.library.GUIUtils; + +import java.awt.event.*; +import java.io.File; +import java.util.*; + +import javax.swing.*; +import javax.swing.event.*; + +import org.gjt.sp.jedit.View; +import org.gjt.sp.jedit.jEdit; +import org.gjt.sp.jedit.menu.DynamicMenuProvider; +import org.tmatesoft.svn.core.wc.SVNRevision; + + +/** + * Subversion menu to add to the jEdit Plugins menu. + */ +public class PluginMenu implements DynamicMenuProvider { + protected View view = null; + + public void update(JMenu menu) { + view = jEdit.getActiveView(); + // SVNConsole + JMenuItem item = new JMenuItem(jEdit.getProperty("subversion.console.label", "SVN Console")); + item.addActionListener(getSVNConsoleActionListener()); + menu.add(item); + // SVN Browser + item = new JMenuItem(jEdit.getProperty("subversion.browser.label", "SVN Browser")); + item.addActionListener(getSVNBrowserActionListener()); + menu.add(item); + // separator + menu.addSeparator(); + /* these items act on working copies. This is the order in the PV + * context menu: + * + * status + * update + * commit + * - + * revert + * add + * resolve + * delete + * ignore + * - + * info + * log + * properties + * diff + * merge + * time lapse + * - + * checkout + * switch + * cleanup + * - + * copy + * move + * import + * export + * - + * lock + * unlock + */ + item = new JMenuItem(jEdit.getProperty("ips.Status", "Status")); + item.addActionListener(getStatusActionListener()); + menu.add(item); + item = new JMenuItem(jEdit.getProperty("ips.Update...", "Update...")); + item.addActionListener(getUpdateActionListener()); + menu.add(item); + item = new JMenuItem(jEdit.getProperty("ips.Commit...", "Commit...")); + item.addActionListener(getCommitActionListener()); + menu.add(item); + menu.addSeparator(); + item = new JMenuItem(jEdit.getProperty("ips.Revert...", "Revert...")); + item.addActionListener(getRevertActionListener()); + menu.add(item); + item = new JMenuItem(jEdit.getProperty("ips.Add...", "Add...")); + item.addActionListener(getAddActionListener()); + menu.add(item); + item = new JMenuItem(jEdit.getProperty("ips.Resolve_Conflicts...", "Resolve Conflicts...")); + item.addActionListener(getResolveConflictsActionListener()); + menu.add(item); + item = new JMenuItem(jEdit.getProperty("ips.Mark_File_Resolved...", "Mark File Resolved...")); + item.addActionListener(getResolvedActionListener()); + menu.add(item); + item = new JMenuItem(jEdit.getProperty("ips.Delete...", "Delete...")); + item.addActionListener(getDeleteActionListener()); + menu.add(item); + item = new JMenuItem(jEdit.getProperty("ips.Ignore...", "Ignore...")); + item.addActionListener(getIgnoreActionListener()); + menu.add(item); + menu.addSeparator(); + item = new JMenuItem(jEdit.getProperty("ips.Info...", "Info...")); + item.addActionListener(getInfoActionListener()); + menu.add(item); + item = new JMenuItem(jEdit.getProperty("ips.Log...", "Log...")); + item.addActionListener(getLogActionListener()); + menu.add(item); + item = new JMenuItem(jEdit.getProperty("ips.Blame", "Blame")); + item.addActionListener(getBlameActionListener()); + menu.add(item); + item = new JMenuItem(jEdit.getProperty("ips.Properties...", "Properties...")); + item.addActionListener(getPropertyActionListener()); + menu.add(item); + item = new JMenuItem(jEdit.getProperty("ips.Diff...", "Diff...")); + item.addActionListener(getDiffActionListener()); + menu.add(item); + item = new JMenuItem(jEdit.getProperty("ips.Merge", "Merge") + "..."); + item.addActionListener(getMergeActionListener()); + menu.add(item); + /// TODO: uncomment these when time lapse works + // item = new JMenuItem( jEdit.getProperty("ips.TimeLapse...", "Time Lapse") ); + // item.addActionListener( getTimeLapseActionListener() ); + // menu.add( item ); + menu.addSeparator(); + item = new JMenuItem(jEdit.getProperty("ips.Checkout", "Checkout")); + item.addActionListener(getCheckoutActionListener()); + menu.add(item); + item = new JMenuItem(jEdit.getProperty("ips.Switch", "Switch")); + item.addActionListener(getSwitchActionListener()); + menu.add(item); + item = new JMenuItem(jEdit.getProperty("ips.Cleanup...", "Cleanup...")); + item.addActionListener(getCleanupActionListener()); + menu.add(item); + menu.addSeparator(); + item = new JMenuItem(jEdit.getProperty("ips.Copy", "Copy")); + item.addActionListener(getCopyActionListener()); + menu.add(item); + item = new JMenuItem(jEdit.getProperty("ips.Move", "Move")); + item.addActionListener(getMoveActionListener()); + menu.add(item); + item = new JMenuItem(jEdit.getProperty("ips.Import", "Import")); + item.addActionListener(getImportActionListener()); + menu.add(item); + item = new JMenuItem(jEdit.getProperty("ips.Export", "Export")); + item.addActionListener(getExportActionListener()); + menu.add(item); + menu.addSeparator(); + item = new JMenuItem(jEdit.getProperty("ips.Lock", "Lock")); + item.addActionListener(getLockActionListener()); + menu.add(item); + item = new JMenuItem(jEdit.getProperty("ips.Unlock", "Unlock")); + item.addActionListener(getUnlockActionListener()); + menu.add(item); + } + + public boolean updateEveryTime() { + return false; + } + + private ActionListener getSVNConsoleActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + view.getDockableWindowManager().toggleDockableWindow("subversion"); + } + + }; + } + + private ActionListener getSVNBrowserActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + view.getDockableWindowManager().toggleDockableWindow("subversion.browser"); + } + + }; + } + + public String toString() { + return jEdit.getProperty("ips.Subversion", "Subversion"); + } + + // get a list containing a single path representing the file in the current + // buffer. + private List<String> getPaths() { + List<String> paths = new ArrayList<String>(); + String path = view.getBuffer().getPath(); + paths.add(path); + return paths; + } + + private ActionListener getStatusActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + StatusAction action = new StatusAction(view, getPaths(), null, null); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getRevertActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + RevertAction action = new RevertAction(view, getPaths(), null, null); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getAddActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + AddAction action = new AddAction(view, getPaths(), null, null); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getResolveConflictsActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + ResolveConflictDialog dialog = new ResolveConflictDialog(view, view.getBuffer().getPath()); + dialog.setVisible(true); + } + + }; + } + + private ActionListener getResolvedActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + ResolvedAction action = new ResolvedAction(view, getPaths(), null, null); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getDeleteActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + DeleteAction action = new DeleteAction(view, getPaths(), null, null); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getIgnoreActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + IgnoreAction action = new IgnoreAction(view, view.getBuffer().getPath()); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getInfoActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + InfoAction action = new InfoAction(view, getPaths(), null, null); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getLogActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + LogAction action = new LogAction(view, getPaths(), null, null); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getBlameActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + BlameAction action = new BlameAction(view, getPaths(), null, null); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getPropertyActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + PropertyData data = new PropertyData(); + data.setPaths(getPaths()); + data.setPathsAreURLs(false); + data.setHasDirectory(false); + data.setRemote(false); + data.setRevision(SVNRevision.WORKING); + PropertyAction action = new PropertyAction(view, data); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getDiffActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + DiffAction action = new DiffAction(view, getPaths().get(0), null, null); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getMergeActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + MergeDialog dialog = new MergeDialog(view, getPaths().get(0)); + GUIUtils.center(view, dialog); + dialog.setVisible(true); + MergeData data = dialog.getData(); + + if (data == null) { + return; // user canceled + } + MergeAction action = new MergeAction(view, data); + action.actionPerformed(ae); + } + + }; + } + + /// TODO: uncomment when time lapse works + private ActionListener getCheckoutActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + CheckoutData data = new CheckoutData(null, null, null); + CheckoutAction action = new CheckoutAction(view, data); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getSwitchActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + UpdateData data = new UpdateData(); + data.setPaths(getPaths()); + SwitchAction action = new SwitchAction(view, data); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getCleanupActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + CleanupAction action = new CleanupAction(view, getPaths(), null, null); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getCopyActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + // show the copy dialog + List<File> files = new ArrayList<File>(); + files.add(new File(getPaths().get(0))); + String default_destination = files.size() == 1 ? files.get(0).getAbsolutePath() : PVHelper.getProjectRoot(view); + CopyDialog dialog = new CopyDialog(view, files, default_destination, null); // TODO: fill in remote destination + GUIUtils.center(view, dialog); + dialog.setVisible(true); + CopyData data = dialog.getData(); + + if (data == null) { + return; // user canceled + } + // do the copy + CopyAction action = new CopyAction(view, data); + action.actionPerformed(null); + } + + }; + } + + private ActionListener getMoveActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + // show the copy dialog + List<File> files = new ArrayList<File>(); + files.add(new File(getPaths().get(0))); + String default_destination = files.size() == 1 ? files.get(0).getAbsolutePath() : PVHelper.getProjectRoot(view); + MoveDialog dialog = new MoveDialog(view, files, default_destination); + GUIUtils.center(view, dialog); + dialog.setVisible(true); + CopyData data = dialog.getData(); + + if (data == null) { + return; // user canceled + } + MoveAction action = new MoveAction(view, data); + action.actionPerformed(null); + } + + }; + } + + private ActionListener getImportActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + ImportAction action = new ImportAction(view); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getExportActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + List<File> file = new ArrayList<File>(); + file.add(new File(getPaths().get(0))); + ExportAction action = new ExportAction(view, file, null, null); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getLockActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + LockAction action = new LockAction(view, getPaths(), null, null, false); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getUnlockActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + UnlockAction action = new UnlockAction(view, getPaths(), null, null, false); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getUpdateActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + UpdateAction action = new UpdateAction(view, getPaths(), null, null); + action.actionPerformed(ae); + } + + }; + } + + private ActionListener getCommitActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent ae) { + TreeMap<String, String> paths = new TreeMap<String, String>(); + + for ( String path : getPaths()) { + paths.put(path, ""); + } + CommitAction action = new CommitAction(view, paths, null, null); + action.actionPerformed(ae); + } + + }; + } + +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2022-10-28 22:13:40
|
Revision: 25616 http://sourceforge.net/p/jedit/svn/25616 Author: daleanson Date: 2022-10-28 22:13:37 +0000 (Fri, 28 Oct 2022) Log Message: ----------- Fixed a couple of deprecation warnings. Modified Paths: -------------- plugins/SVNPlugin/trunk/src/ise/plugin/svn/gui/ResolveConflictDialog.java plugins/SVNPlugin/trunk/src/ise/plugin/svn/pv/SVNAction.java Modified: plugins/SVNPlugin/trunk/src/ise/plugin/svn/gui/ResolveConflictDialog.java =================================================================== --- plugins/SVNPlugin/trunk/src/ise/plugin/svn/gui/ResolveConflictDialog.java 2022-10-28 22:04:01 UTC (rev 25615) +++ plugins/SVNPlugin/trunk/src/ise/plugin/svn/gui/ResolveConflictDialog.java 2022-10-28 22:13:37 UTC (rev 25616) @@ -114,8 +114,8 @@ } Arrays.sort( files, new Comparator<File>() { public int compare( File a, File b ) { - Integer first = new Integer( a.getName().substring( toMatch.length() ) ); - Integer second = new Integer( b.getName().substring( toMatch.length() ) ); + Integer first = Integer.parseInt( a.getName().substring( toMatch.length() ) ); + Integer second = Integer.parseInt( b.getName().substring( toMatch.length() ) ); return first.compareTo( second ); } } Modified: plugins/SVNPlugin/trunk/src/ise/plugin/svn/pv/SVNAction.java =================================================================== --- plugins/SVNPlugin/trunk/src/ise/plugin/svn/pv/SVNAction.java 2022-10-28 22:04:01 UTC (rev 25615) +++ plugins/SVNPlugin/trunk/src/ise/plugin/svn/pv/SVNAction.java 2022-10-28 22:13:37 UTC (rev 25616) @@ -111,7 +111,7 @@ } JMenuItem item = null; try { - NodeActor action = ( NodeActor ) Class.forName( classname ).newInstance(); + NodeActor action = ( NodeActor ) Class.forName( classname ).getDeclaredConstructor().newInstance(); item = new JMenuItem( label ); item.addActionListener( ( ActionListener ) action ); menu.add( item ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2022-10-28 22:04:04
|
Revision: 25615 http://sourceforge.net/p/jedit/svn/25615 Author: daleanson Date: 2022-10-28 22:04:01 +0000 (Fri, 28 Oct 2022) Log Message: ----------- Updated to svnkit 1.10.8, which fixes the E210002 error from the obsolete trilead ssh library. Modified Paths: -------------- plugins/SVNPlugin/trunk/SVNPlugin.props plugins/SVNPlugin/trunk/build.xml plugins/SVNPlugin/trunk/src/ise/plugin/svn/SVNPlugin.java plugins/SVNPlugin/trunk/src/ise/plugin/svn/command/Checkout.java Added Paths: ----------- plugins/SVNPlugin/trunk/lib/eddsa-0.3.0.jar plugins/SVNPlugin/trunk/lib/jcl-over-slf4j-1.7.32.jar plugins/SVNPlugin/trunk/lib/lz4-java-1.4.1.jar plugins/SVNPlugin/trunk/lib/sequence-library-1.0.4.jar plugins/SVNPlugin/trunk/lib/slf4j-api-1.7.32.jar plugins/SVNPlugin/trunk/lib/sqljet-1.1.14.jar plugins/SVNPlugin/trunk/lib/sshd-common-2.8.0.jar plugins/SVNPlugin/trunk/lib/sshd-core-2.8.0.jar plugins/SVNPlugin/trunk/lib/svnkit-1.10.8.jar plugins/SVNPlugin/trunk/lib/svnkit-cli-1.10.8.jar plugins/SVNPlugin/trunk/lib/svnkit-javahl16-1.10.8.jar Removed Paths: ------------- plugins/SVNPlugin/trunk/lib/jsch.agentproxy.connector-factory-0.0.7.jar plugins/SVNPlugin/trunk/lib/jsch.agentproxy.core-0.0.7.jar plugins/SVNPlugin/trunk/lib/jsch.agentproxy.pageant-0.0.7.jar plugins/SVNPlugin/trunk/lib/jsch.agentproxy.sshagent-0.0.7.jar plugins/SVNPlugin/trunk/lib/jsch.agentproxy.svnkit-trilead-ssh2-0.0.7.jar plugins/SVNPlugin/trunk/lib/jsch.agentproxy.usocket-jna-0.0.7.jar plugins/SVNPlugin/trunk/lib/jsch.agentproxy.usocket-nc-0.0.7.jar plugins/SVNPlugin/trunk/lib/sequence-library-1.0.3.jar plugins/SVNPlugin/trunk/lib/sqljet-1.1.10.jar plugins/SVNPlugin/trunk/lib/svnkit-1.8.12.jar plugins/SVNPlugin/trunk/lib/svnkit-cli-1.8.12.jar plugins/SVNPlugin/trunk/lib/trilead-ssh2-1.0.0-build220.jar Modified: plugins/SVNPlugin/trunk/SVNPlugin.props =================================================================== --- plugins/SVNPlugin/trunk/SVNPlugin.props 2022-10-28 21:38:54 UTC (rev 25614) +++ plugins/SVNPlugin/trunk/SVNPlugin.props 2022-10-28 22:04:01 UTC (rev 25615) @@ -1,12 +1,13 @@ #----------------------------------- # Properties for SVNPlugin #----------------------------------- +svnkit.ssh.client=apache # general plugin properties plugin.ise.plugin.svn.SVNPlugin.activate=defer plugin.ise.plugin.svn.SVNPlugin.name=SVNPlugin plugin.ise.plugin.svn.SVNPlugin.author=Dale Anson -plugin.ise.plugin.svn.SVNPlugin.version=1.8.12 +plugin.ise.plugin.svn.SVNPlugin.version=1.10.8 plugin.ise.plugin.svn.SVNPlugin.description=Subversion plugin # docs @@ -13,14 +14,15 @@ plugin.ise.plugin.svn.SVNPlugin.docs=docs/index.html # dependencies -plugin.ise.plugin.svn.SVNPlugin.depend.0=jdk 1.7.0 -plugin.ise.plugin.svn.SVNPlugin.depend.1=jedit 05.02.01.00 +plugin.ise.plugin.svn.SVNPlugin.depend.0=jdk 11 +plugin.ise.plugin.svn.SVNPlugin.depend.1=jedit 05.06.00.00 plugin.ise.plugin.svn.SVNPlugin.depend.2=plugin projectviewer.ProjectPlugin 3.5.3 plugin.ise.plugin.svn.SVNPlugin.depend.3=plugin CommonControlsPlugin 1.7.4 plugin.ise.plugin.svn.SVNPlugin.depend.4=plugin jdiff.JDiffPlugin 3.3.0 plugin.ise.plugin.svn.SVNPlugin.depend.5=plugin infoviewer.InfoViewerPlugin 1.6.3 plugin.ise.plugin.svn.SVNPlugin.depend.6=plugin jnaplugin.JNAPlugin 3.5.2 -plugin.ise.plugin.svn.SVNPlugin.jars=antlr-runtime-3.4.jar jsch.agentproxy.connector-factory-0.0.7.jar jsch.agentproxy.core-0.0.7.jar jsch.agentproxy.pageant-0.0.7.jar jsch.agentproxy.sshagent-0.0.7.jar jsch.agentproxy.svnkit-trilead-ssh2-0.0.7.jar jsch.agentproxy.usocket-jna-0.0.7.jar jsch.agentproxy.usocket-nc-0.0.7.jar sequence-library-1.0.3.jar sqljet-1.1.10.jar svnkit-1.8.12.jar svnkit-cli-1.8.12.jar trilead-ssh2-1.0.0-build220.jar +#plugin.ise.plugin.svn.SVNPlugin.jars=antlr-runtime-3.4.jar jsch.agentproxy.connector-factory-0.0.7.jar jsch.agentproxy.core-0.0.7.jar jsch.agentproxy.pageant-0.0.7.jar jsch.agentproxy.sshagent-0.0.7.jar jsch.agentproxy.svnkit-trilead-ssh2-0.0.7.jar jsch.agentproxy.usocket-jna-0.0.7.jar jsch.agentproxy.usocket-nc-0.0.7.jar sequence-library-1.0.3.jar sqljet-1.1.10.jar svnkit-1.8.12.jar svnkit-cli-1.8.12.jar trilead-ssh2-1.0.0-build220.jar +plugin.ise.plugin.svn.SVNPlugin.jars=antlr-runtime-3.4.jar eddsa-0.3.0.jar jcl-over-slf4j-1.7.32.jar lz4-java-1.4.1.jar sequence-library-1.0.4.jar slf4j-api-1.7.32.jar sqljet-1.1.14.jar sshd-common-2.8.0.jar sshd-core-2.8.0.jar svnkit-1.10.8.jar svnkit-cli-1.10.8.jar svnkit-javahl16-1.10.8.jar # titles for DockableWindowManager subversion.title=SVN Modified: plugins/SVNPlugin/trunk/build.xml =================================================================== --- plugins/SVNPlugin/trunk/build.xml 2022-10-28 21:38:54 UTC (rev 25614) +++ plugins/SVNPlugin/trunk/build.xml 2022-10-28 22:04:01 UTC (rev 25615) @@ -24,7 +24,7 @@ <mkdir dir="${src.dir}"/> <!-- java source and target version for compile --> - <property name="target" value="1.6"/> + <property name="target" value="11"/> <!-- library directory, location for third party jars --> <property name="lib.dir" location="lib"/> @@ -97,8 +97,7 @@ target="${target}" source="${target}" bootclasspath="${bootclasspath}" - includeantruntime="false" - extdirs="${extdirs}"> + includeantruntime="false"> <classpath refid="classpathref" /> <compilerarg value="-Xlint:unchecked"/> </javac> Added: plugins/SVNPlugin/trunk/lib/eddsa-0.3.0.jar =================================================================== (Binary files differ) Index: plugins/SVNPlugin/trunk/lib/eddsa-0.3.0.jar =================================================================== --- plugins/SVNPlugin/trunk/lib/eddsa-0.3.0.jar 2022-10-28 21:38:54 UTC (rev 25614) +++ plugins/SVNPlugin/trunk/lib/eddsa-0.3.0.jar 2022-10-28 22:04:01 UTC (rev 25615) Property changes on: plugins/SVNPlugin/trunk/lib/eddsa-0.3.0.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: plugins/SVNPlugin/trunk/lib/jcl-over-slf4j-1.7.32.jar =================================================================== (Binary files differ) Index: plugins/SVNPlugin/trunk/lib/jcl-over-slf4j-1.7.32.jar =================================================================== --- plugins/SVNPlugin/trunk/lib/jcl-over-slf4j-1.7.32.jar 2022-10-28 21:38:54 UTC (rev 25614) +++ plugins/SVNPlugin/trunk/lib/jcl-over-slf4j-1.7.32.jar 2022-10-28 22:04:01 UTC (rev 25615) Property changes on: plugins/SVNPlugin/trunk/lib/jcl-over-slf4j-1.7.32.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: plugins/SVNPlugin/trunk/lib/jsch.agentproxy.connector-factory-0.0.7.jar =================================================================== (Binary files differ) Deleted: plugins/SVNPlugin/trunk/lib/jsch.agentproxy.core-0.0.7.jar =================================================================== (Binary files differ) Deleted: plugins/SVNPlugin/trunk/lib/jsch.agentproxy.pageant-0.0.7.jar =================================================================== (Binary files differ) Deleted: plugins/SVNPlugin/trunk/lib/jsch.agentproxy.sshagent-0.0.7.jar =================================================================== (Binary files differ) Deleted: plugins/SVNPlugin/trunk/lib/jsch.agentproxy.svnkit-trilead-ssh2-0.0.7.jar =================================================================== (Binary files differ) Deleted: plugins/SVNPlugin/trunk/lib/jsch.agentproxy.usocket-jna-0.0.7.jar =================================================================== (Binary files differ) Deleted: plugins/SVNPlugin/trunk/lib/jsch.agentproxy.usocket-nc-0.0.7.jar =================================================================== (Binary files differ) Added: plugins/SVNPlugin/trunk/lib/lz4-java-1.4.1.jar =================================================================== (Binary files differ) Index: plugins/SVNPlugin/trunk/lib/lz4-java-1.4.1.jar =================================================================== --- plugins/SVNPlugin/trunk/lib/lz4-java-1.4.1.jar 2022-10-28 21:38:54 UTC (rev 25614) +++ plugins/SVNPlugin/trunk/lib/lz4-java-1.4.1.jar 2022-10-28 22:04:01 UTC (rev 25615) Property changes on: plugins/SVNPlugin/trunk/lib/lz4-java-1.4.1.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: plugins/SVNPlugin/trunk/lib/sequence-library-1.0.3.jar =================================================================== (Binary files differ) Added: plugins/SVNPlugin/trunk/lib/sequence-library-1.0.4.jar =================================================================== (Binary files differ) Index: plugins/SVNPlugin/trunk/lib/sequence-library-1.0.4.jar =================================================================== --- plugins/SVNPlugin/trunk/lib/sequence-library-1.0.4.jar 2022-10-28 21:38:54 UTC (rev 25614) +++ plugins/SVNPlugin/trunk/lib/sequence-library-1.0.4.jar 2022-10-28 22:04:01 UTC (rev 25615) Property changes on: plugins/SVNPlugin/trunk/lib/sequence-library-1.0.4.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: plugins/SVNPlugin/trunk/lib/slf4j-api-1.7.32.jar =================================================================== (Binary files differ) Index: plugins/SVNPlugin/trunk/lib/slf4j-api-1.7.32.jar =================================================================== --- plugins/SVNPlugin/trunk/lib/slf4j-api-1.7.32.jar 2022-10-28 21:38:54 UTC (rev 25614) +++ plugins/SVNPlugin/trunk/lib/slf4j-api-1.7.32.jar 2022-10-28 22:04:01 UTC (rev 25615) Property changes on: plugins/SVNPlugin/trunk/lib/slf4j-api-1.7.32.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: plugins/SVNPlugin/trunk/lib/sqljet-1.1.10.jar =================================================================== (Binary files differ) Added: plugins/SVNPlugin/trunk/lib/sqljet-1.1.14.jar =================================================================== (Binary files differ) Index: plugins/SVNPlugin/trunk/lib/sqljet-1.1.14.jar =================================================================== --- plugins/SVNPlugin/trunk/lib/sqljet-1.1.14.jar 2022-10-28 21:38:54 UTC (rev 25614) +++ plugins/SVNPlugin/trunk/lib/sqljet-1.1.14.jar 2022-10-28 22:04:01 UTC (rev 25615) Property changes on: plugins/SVNPlugin/trunk/lib/sqljet-1.1.14.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: plugins/SVNPlugin/trunk/lib/sshd-common-2.8.0.jar =================================================================== (Binary files differ) Index: plugins/SVNPlugin/trunk/lib/sshd-common-2.8.0.jar =================================================================== --- plugins/SVNPlugin/trunk/lib/sshd-common-2.8.0.jar 2022-10-28 21:38:54 UTC (rev 25614) +++ plugins/SVNPlugin/trunk/lib/sshd-common-2.8.0.jar 2022-10-28 22:04:01 UTC (rev 25615) Property changes on: plugins/SVNPlugin/trunk/lib/sshd-common-2.8.0.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: plugins/SVNPlugin/trunk/lib/sshd-core-2.8.0.jar =================================================================== (Binary files differ) Index: plugins/SVNPlugin/trunk/lib/sshd-core-2.8.0.jar =================================================================== --- plugins/SVNPlugin/trunk/lib/sshd-core-2.8.0.jar 2022-10-28 21:38:54 UTC (rev 25614) +++ plugins/SVNPlugin/trunk/lib/sshd-core-2.8.0.jar 2022-10-28 22:04:01 UTC (rev 25615) Property changes on: plugins/SVNPlugin/trunk/lib/sshd-core-2.8.0.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: plugins/SVNPlugin/trunk/lib/svnkit-1.10.8.jar =================================================================== (Binary files differ) Index: plugins/SVNPlugin/trunk/lib/svnkit-1.10.8.jar =================================================================== --- plugins/SVNPlugin/trunk/lib/svnkit-1.10.8.jar 2022-10-28 21:38:54 UTC (rev 25614) +++ plugins/SVNPlugin/trunk/lib/svnkit-1.10.8.jar 2022-10-28 22:04:01 UTC (rev 25615) Property changes on: plugins/SVNPlugin/trunk/lib/svnkit-1.10.8.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: plugins/SVNPlugin/trunk/lib/svnkit-1.8.12.jar =================================================================== (Binary files differ) Added: plugins/SVNPlugin/trunk/lib/svnkit-cli-1.10.8.jar =================================================================== (Binary files differ) Index: plugins/SVNPlugin/trunk/lib/svnkit-cli-1.10.8.jar =================================================================== --- plugins/SVNPlugin/trunk/lib/svnkit-cli-1.10.8.jar 2022-10-28 21:38:54 UTC (rev 25614) +++ plugins/SVNPlugin/trunk/lib/svnkit-cli-1.10.8.jar 2022-10-28 22:04:01 UTC (rev 25615) Property changes on: plugins/SVNPlugin/trunk/lib/svnkit-cli-1.10.8.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: plugins/SVNPlugin/trunk/lib/svnkit-cli-1.8.12.jar =================================================================== (Binary files differ) Added: plugins/SVNPlugin/trunk/lib/svnkit-javahl16-1.10.8.jar =================================================================== (Binary files differ) Index: plugins/SVNPlugin/trunk/lib/svnkit-javahl16-1.10.8.jar =================================================================== --- plugins/SVNPlugin/trunk/lib/svnkit-javahl16-1.10.8.jar 2022-10-28 21:38:54 UTC (rev 25614) +++ plugins/SVNPlugin/trunk/lib/svnkit-javahl16-1.10.8.jar 2022-10-28 22:04:01 UTC (rev 25615) Property changes on: plugins/SVNPlugin/trunk/lib/svnkit-javahl16-1.10.8.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: plugins/SVNPlugin/trunk/lib/trilead-ssh2-1.0.0-build220.jar =================================================================== (Binary files differ) Modified: plugins/SVNPlugin/trunk/src/ise/plugin/svn/SVNPlugin.java =================================================================== --- plugins/SVNPlugin/trunk/src/ise/plugin/svn/SVNPlugin.java 2022-10-28 21:38:54 UTC (rev 25614) +++ plugins/SVNPlugin/trunk/src/ise/plugin/svn/SVNPlugin.java 2022-10-28 22:04:01 UTC (rev 25615) @@ -79,6 +79,7 @@ } public void start() { + System.setProperty("svnkit.ssh.client", "apache"); } public static File getSvnStorageDir() { Modified: plugins/SVNPlugin/trunk/src/ise/plugin/svn/command/Checkout.java =================================================================== --- plugins/SVNPlugin/trunk/src/ise/plugin/svn/command/Checkout.java 2022-10-28 21:38:54 UTC (rev 25614) +++ plugins/SVNPlugin/trunk/src/ise/plugin/svn/command/Checkout.java 2022-10-28 22:04:01 UTC (rev 25615) @@ -31,12 +31,14 @@ import java.io.*; import java.util.*; +import org.tmatesoft.svn.core.SVNDepth; import org.tmatesoft.svn.core.wc.SVNUpdateClient; +import org.tmatesoft.svn.core.wc.SVNRevision; import org.tmatesoft.svn.core.wc.ISVNOptions; import org.tmatesoft.svn.core.wc.SVNClientManager; import org.tmatesoft.svn.core.wc.SVNWCUtil; -import org.tmatesoft.svn.core.wc2.SvnCheckout; -import org.tmatesoft.svn.core.wc2.SvnTarget; +import org.tmatesoft.svn.core.internal.wc2.SvnWcGeneration; +import org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory; import org.tmatesoft.svn.core.SVNException; import org.tmatesoft.svn.core.SVNURL; @@ -44,25 +46,28 @@ import ise.plugin.svn.data.CheckoutData; import ise.plugin.svn.SVNPlugin; +import org.tmatesoft.svn.core.wc.SVNStatus; +import org.tmatesoft.svn.core.wc.SVNStatusClient; +import org.tmatesoft.svn.core.wc.SVNWCClient; import org.gjt.sp.jedit.jEdit; public class Checkout { - @SuppressWarnings( "deprecation" ) - // SVNURL.parseURIEncoded + @SuppressWarnings("deprecation") // SVNURL.parseURIEncoded public long doCheckout( CheckoutData cd ) throws CommandInitializationException, SVNException { if ( cd == null ) { throw new CommandInitializationException( "CheckoutData is null." ); } + // validate data values if ( cd.getPaths() == null || cd.getURL() == null ) { - return -1; // nothing to do + return -1; // nothing to do } File localPath = new File( cd.getPaths().get( 0 ) ); if ( localPath == null ) { - return -1; // nothing to do + return -1; // nothing to do } if ( cd.getOut() == null ) { throw new CommandInitializationException( "Invalid output stream." ); @@ -79,50 +84,45 @@ ISVNOptions options = SVNWCUtil.createDefaultOptions( true ); // use the svnkit client manager - SVNClientManager clientManager = SVNClientManager.newInstance( options, SVNWCUtil.createDefaultAuthenticationManager( SVNPlugin.getSvnStorageDir(), cd.getUsername(), cd.getDecryptedPassword() ) ); + SVNClientManager clientManager = SVNClientManager.newInstance( options, SVNWCUtil.createDefaultAuthenticationManager(SVNPlugin.getSvnStorageDir(), cd.getUsername(), cd.getDecryptedPassword() ) ); // get a client for checkout SVNUpdateClient client = clientManager.getUpdateClient(); - - // set the working copy format for the checked out files int wc_format = cd.getWorkingCopyFormat(); - if ( wc_format == -1 ) { - wc_format = jEdit.getIntegerProperty( "ise.plugin.svn.defaultWCVersion" ); + if (wc_format == -1) { + wc_format = jEdit.getIntegerProperty("ise.plugin.svn.defaultWCVersion"); } + client.getOperationsFactory().setPrimaryWcGeneration(wc_format == SVNAdminAreaFactory.WC_FORMAT_16 ? SvnWcGeneration.V16 : SvnWcGeneration.V17); + + // set an event handler so that messages go to the data streams for display + client.setEventHandler( new SVNCommandEventProcessor( out, cd.getErr(), false ) ); - // NOTE: better code from svnkit folks: - /* - final SvnCheckout checkout = svnOperationFactory.createCheckout(); - checkout.setSource(SvnTarget.fromURL(url)); - checkout.setSingleTarget(SvnTarget.fromFile(workingCopyDirectory)); - checkout.setTargetWorkingCopyFormat(targetWorkingCopyFormat); - checkout.run(); - - Possible values of targetWorkingCopyFormat are - - SVNAdminArea14Factory.WC_FORMAT - SVNAdminArea15Factory.WC_FORMAT - SVNAdminArea16Factory.WC_FORMAT - ISVNWCDb.WC_FORMAT_17 - ISVNWCDb.WC_FORMAT_18 - */ - final SvnCheckout checkout = client.getOperationsFactory().createCheckout(); - checkout.setSource(SvnTarget.fromURL(SVNURL.parseURIDecoded( cd.getURL() ))); - checkout.setSingleTarget(SvnTarget.fromFile(localPath)); - checkout.setTargetWorkingCopyFormat(wc_format); - - // set an event handler so that messages go to the data streams for display - client.getOperationsFactory().setEventHandler( new SVNCommandEventProcessor( out, cd.getErr(), false ) ); + long revision = client.doCheckout( SVNURL.parseURIDecoded( cd.getURL() ), localPath, SVNRevision.HEAD, SVNRevision.HEAD, SVNDepth.INFINITY, false ); - Long revision = checkout.run(); - - out.flush(); out.close(); clientManager.dispose(); + // possibly change working copy format + int current_wc_format = getWCVersion( localPath ); + int default_wc_format = jEdit.getIntegerProperty( "ise.plugin.svn.defaultWCVersion", SVNAdminAreaFactory.WC_FORMAT_15 ); + if ( current_wc_format != default_wc_format ) { + SVNWCClient wc_client = SVNClientManager.newInstance().getWCClient(); + wc_client.doSetWCFormat( localPath, default_wc_format ); + } return revision; } + private int getWCVersion( File path ) { + try { + SVNStatusClient st_client = SVNClientManager.newInstance().getStatusClient(); + SVNStatus status = st_client.doStatus( path, false ); + return status.getWorkingCopyFormat(); + } + catch ( Exception e ) { + return SVNAdminAreaFactory.WC_FORMAT_15; + } + } + } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |