Menu

#1082 QDocSidekick

None
closed-accepted
None
5
2024-08-16
2024-05-22
Dale Anson
No

{{{ QDocSideKick 1.0
Source: Source code is in SVN with the tag 1.0
Announcement: Initial release. Brand new plugin for working with QDoc files https://doc.qt.io/qt-6/01-qdoc-manual.html.. While the manual says "QDoc finds QDoc comments in .cpp files and in .qdoc files", this QDocSideKick plugin only works with .qdoc files.
Requires Java 11
Requires jEdit 05.04.00.00

Short Description: QDocSideKick

Long Description: <html>

SideKick for QDoc files


}}}

Discussion

  • Eric Le Lay

    Eric Le Lay - 2024-07-19
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
    
     {{{ QDoc 1.0
         Source: Source code is in SVN with the tag 1.0
    
    • status: open --> pending
    • assigned_to: Eric Le Lay
     
  • Eric Le Lay

    Eric Le Lay - 2024-07-19

    Hi Dale,
    sorry for taking so long to look into this.

    1. please confirm the plugin name should be QDoc: it uses qdoc.props and is located in svn in plugins/QDoc but the ticket summary was QDocSidekick so I have a doubt.
    2. dependencies to the Sidekick and EclipseIcons plugins are missing in qdoc.props. Maybe also to ErrorList but it's already a Sidekick dependency.
     
  • Eric Le Lay

    Eric Le Lay - 2024-07-19

    Please provide an example qdoc file.
    I've tried with the example at https://doc.qt.io/qt-6/05-qdoc-commands-documentstructure.html and I get a StringIndexOutOfBound when parsing it (see attached file).

    Jedit 5.4.0, Java 11, ubuntu container.
    Stacktrace:
    ~~~
    [java] 5:17:29 PM [SwingWorker-pool-1-thread-3] [error] SwingWorker-pool-1-thread-3: java.lang.StringIndexOutOfBoundsException: begin 12, end 9, length 30
    [java] 5:17:29 PM [SwingWorker-pool-1-thread-3] [error] SwingWorker-pool-1-thread-3: at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
    [java] 5:17:29 PM [SwingWorker-pool-1-thread-3] [error] SwingWorker-pool-1-thread-3: at java.base/java.lang.String.substring(String.java:1874)
    [java] 5:17:29 PM [SwingWorker-pool-1-thread-3] [error] SwingWorker-pool-1-thread-3: at sidekick.qdoc.QdocSideKickParser.parse(QdocSideKickParser.java:121)
    [java] 5:17:29 PM [SwingWorker-pool-1-thread-3] [error] SwingWorker-pool-1-thread-3: at sidekick.SideKick$ParseRequestWorker.doInBackground(SideKick.java:550)
    [java] 5:17:29 PM [SwingWorker-pool-1-thread-3] [error] SwingWorker-pool-1-thread-3: at sidekick.SideKick$ParseRequestWorker.doInBackground(SideKick.java:526)
    [java] 5:17:29 PM [SwingWorker-pool-1-thread-3] [error] SwingWorker-pool-1-thread-3: at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
    [java] 5:17:29 PM [SwingWorker-pool-1-thread-3] [error] SwingWorker-pool-1-thread-3: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    [java] 5:17:29 PM [SwingWorker-pool-1-thread-3] [error] SwingWorker-pool-1-thread-3: at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
    [java] 5:17:29 PM [SwingWorker-pool-1-thread-3] [error] SwingWorker-pool-1-thread-3: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    [java] 5:17:29 PM [SwingWorker-pool-1-thread-3] [error] SwingWorker-pool-1-thread-3: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    [java] 5:17:29 PM [SwingWorker-pool-1-thread-3] [error] SwingWorker-pool-1-thread-3: at java.base/java.lang.Thread.run(Thread.java:829)
    ~~~

     
  • Dale Anson

    Dale Anson - 2024-07-19

    Thanks, Eric, I'd kind of forgotten about this one also. I'll look into it. This was sort of a one-off plugin for Alan, I'm guessing he's the only one actually using it.

     
  • Dale Anson

    Dale Anson - 2024-07-19
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,11 +1,10 @@
    -
    -{{{ QDoc 1.0
    +{{{ QDocSideKick 1.0
         Source: Source code is in SVN with the tag 1.0
    -    Announcement: Initial release. Brand new plugin for working with QDoc files https://doc.qt.io/qt-6/01-qdoc-manual.html.. While the manual says &#34;QDoc finds QDoc comments in .cpp files and in .qdoc files&#34;, this QDoc plugin only works with .qdoc files.
    +    Announcement: Initial release. Brand new plugin for working with QDoc files https://doc.qt.io/qt-6/01-qdoc-manual.html.. While the manual says &#34;QDoc finds QDoc comments in .cpp files and in .qdoc files&#34;, this QDocSideKick plugin only works with .qdoc files.
         Requires Java 11
         Requires jEdit 05.04.00.00
    
    -    Short Description: QDoc SideKick
    +    Short Description: QDocSideKick
    
         Long Description: &lt;html&gt;
        &lt;p&gt;SideKick for QDoc files&lt;/p&gt;
    
     
  • Dale Anson

    Dale Anson - 2024-07-19

    Eric, it should be good now. I've renamed things more consistently, so it should be QDocSideKick. There is an example file in the source named "qt-convenience-api.qdoc" to test with.

     
  • Eric Le Lay

    Eric Le Lay - 2024-07-20

    Thanks Dale for the fixes. Indeed the example was already there and it is well parsed.
    I was able to build the plugin and can release as is, but could you consider including this fix so indented \section1 works?

    Example:

    /*!
        \section1 Basic Qt
    
        This is the first section.
    
    
            \section2 Getting Started
    
            This is the first subsection.
    
    
                \section3 Hello Qt
    
                This is the first subsubsection.
    
    
                \section3 Making Connections
    
                This is the second subsubsection.
    
    
                \section3 Using the Reference Documentation
    
                This is the third subsubsection.
    
    
            \section2 Creating Dialogs
    
            This is the second subsection.
    
    
                \section3 Subclassing QDialog
    
                This is the first subsubsection.
    
                ...
    
    
        \section1 Intermediate Qt
    
        This is the second section.
    
    
            \section2 Layout Management
    
            This is the second section's first subsection.
    
    
                \section3 Basic Layouts
    
                This is the first subsubsection.
    
            ...
    */
    

    In QDocSideKickParser.java, line 121

    -                    String section = lineText.substring(index, length);
    +                    String section = lineText.substring(index, index + length);
    

    Thanks,

     
  • Eric Le Lay

    Eric Le Lay - 2024-07-31
    • status: pending --> closed-accepted
     
  • Eric Le Lay

    Eric Le Lay - 2024-07-31

    Released to plugin central

     
  • Alan Ezust

    Alan Ezust - 2024-08-16

    Thanks, Eric and Dale!

    Thanks, Eric, I'd kind of forgotten about this one also. I'll look into it. This was sort of a one-off plugin for Alan, I'm guessing he's the only one actually using it.

    Actually, I have some coworkers who might use it too.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.