Results 1 to 20 of 216

Thread: QCodeEdit

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    Quote Originally Posted by kaos View Post
    Each token gets a unique id when the lexer file gets parsed. With this unique id several infos about the token are saved (the name, the language, etc)
    But then how do you handle parsing numbers for instance? It must be done with a more complex DFA than a keyword and allow for many more than one single token... I guess you meant that the id is associated with the DFA matching state or am I missing something?
    Current Qt projects : QCodeEdit, RotiDeCode

  2. #2
    Join Date
    Sep 2007
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QCodeEdit

    Quote Originally Posted by fullmetalcoder View Post
    But then how do you handle parsing numbers for instance? It must be done with a more complex DFA than a keyword and allow for many more than one single token... I guess you meant that the id is associated with the DFA matching state or am I missing something?
    Ah, yeah.
    Well, all the tokens get compiled into one big automaton per group where the final state carries information which token id to emit when the match completes at that final state.

  3. #3
    Join Date
    May 2007
    Location
    England
    Posts
    56
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    I just noticed the license syntax selection is fooled by dots in the file name.
    For example

    example/example lib/qpanellayout.cpp

    produces a correctly colourcoded file, while

    cp lib/qpanellayout.cpp a.1.cpp
    example/example a.1.cpp

    Shows no colourcoding at all. I think the extension is the text after the final dot in a file name.

  4. #4
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    Quote Originally Posted by Usability View Post
    I just noticed the license syntax selection is fooled by dots in the file name.
    For example

    example/example lib/qpanellayout.cpp

    produces a correctly colourcoded file, while

    cp lib/qpanellayout.cpp a.1.cpp
    example/example a.1.cpp

    Shows no colourcoding at all. I think the extension is the text after the final dot in a file name.
    The issue must come from a use of QFileInfo::completeSuffix()... I'll correct it ASAP.
    Current Qt projects : QCodeEdit, RotiDeCode

  5. #5
    Join Date
    May 2007
    Location
    England
    Posts
    56
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    How do you feel about making ctrl-f always take you to the find box?
    Currently you have to first check if the find box is open, because if it is, you need to key two ctrl-f to get there. (The first one just closes the box, the second opens it again and takes you in).

    I think it would be much easier this way. Conventionally you use escape to leave a dialog, not a repeat of the key that opened it.

  6. #6
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    Quote Originally Posted by Usability View Post
    How do you feel about making ctrl-f always take you to the find box?
    I'll have that sorted out ASAP.

    BTW, the suffix issue has been fixed in case you didn't notice.
    Current Qt projects : QCodeEdit, RotiDeCode

  7. #7
    Join Date
    Feb 2007
    Posts
    24
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QCodeEdit

    Hi fmc,
    A couple of issues/observations for edyuk.
    • First, I don't understand... Is not the trunk in SVN repo not the most recent code??? Huh? This quite unorthodox, isn't it. I've never seen this before. Quote from the website:
      ...and, as many people dislike (or don't even know) SVN, I ended up releasing a new package to avoid confusions with the very old one left on Sourceforg donwloads servers...

      You can get it in the downloads section and enjoy all the improvements.
    • The ./build script reports a syntax error
      Qt Code:
      1. oxbo% ./build -h
      2. ./build: 60: Syntax error: Bad substitution
      To copy to clipboard, switch view to plain text mode 
    • Using qt-4.4, a Make error regarding QAtomic and QBasicAtomic (4.4 has QAtomicInt and QAtomicPointer, Before 4.4 there is no "QAtomic*" at all according to the class refs)
      Qt Code:
      1. In file included from ../../../../src/edyuk-1.0.0-pre1/3rdparty/qcodeedit2/lib/qeditor.cpp:19:
      2. ../../../../src/edyuk-1.0.0-pre1/3rdparty/qcodeedit2/lib/document/qdocument_p.h:32:19: error: QAtomic: No such file or directory
      3. ../../../../src/edyuk-1.0.0-pre1/3rdparty/qcodeedit2/lib/document/qdocument_p.h:215: error: ‘QBasicAtomic’ does not name a type
      4. ../../../../src/edyuk-1.0.0-pre1/3rdparty/qcodeedit2/lib/document/qdocument_p.h: In member function ‘void QDocumentCursorHandle::ref()’:
      5. ../../../../src/edyuk-1.0.0-pre1/3rdparty/qcodeedit2/lib/document/qdocument_p.h:202: error: ‘m_ref’ was not declared in this scope
      6. ../../../../src/edyuk-1.0.0-pre1/3rdparty/qcodeedit2/lib/document/qdocument_p.h: In member function ‘void QDocumentCursorHandle::deref()’:
      7. ../../../../src/edyuk-1.0.0-pre1/3rdparty/qcodeedit2/lib/document/qdocument_p.h:203: error: ‘m_ref’ was not declared in this scope
      8. ../../../../src/edyuk-1.0.0-pre1/3rdparty/qcodeedit2/lib/document/qdocument_p.h:203: error: ‘m_ref’ was not declared in this scope
      9. ../../../../src/edyuk-1.0.0-pre1/3rdparty/qcodeedit2/lib/qeditor.cpp: In member function ‘virtual bool QEditor::moveKeyEvent(QDocumentCursor&, QKeyEvent*, bool*)’:
      10. ../../../../src/edyuk-1.0.0-pre1/3rdparty/qcodeedit2/lib/qeditor.cpp:1973: warning: unused variable ‘prevcol’
      11. make[2]: *** [.build/4.4.0-tp1-unix/obj/release/qeditor.o] Error 1
      12. make[2]: Leaving directory `/d/bld/edyuk/src/lib'
      13. make[1]: *** [release] Error 2
      14. make[1]: Leaving directory `/d/bld/edyuk/src/lib'
      15. make: *** [sub-src-lib-lib-pro-make_default] Error 2
      16. makeobj[0]: Leaving directory `/d/bld/edyuk'
      To copy to clipboard, switch view to plain text mode 
    This was just a first look, before investigating reasons or fixes.

    Thank you,
    -travlr
    Last edited by travlr; 26th December 2007 at 15:34.

  8. #8
    Join Date
    May 2007
    Location
    England
    Posts
    56
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    Double click in the editor got broken recently. With a slightly older QCodeEdit, double clicking selects a word. In the latest svn, double click does nothing.

  9. #9
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    @travlr :
    • There must be a misunderstanding somehow... SVN repo always hold the most recent code AND from time to time I package the content of the repo and put in on Sf.net dowload servers so that more people can play with it (as some are reluctant to use SVN...)
    • Would you be running under BSD? Or some exotic UNIX system? I must admit I'm not an expert of clean shell scripting and I'd be able if someone could help me to improve the portability of the build script...
    • Do you know what I need to do in order to make it compatible with Qt 4.4 then? Looks like it's just a matter of include files. Or did the QBasicAtomic class disappear completely in the utter nothingness?
    • Some of your comments concern Edyuk ad not QCodeEdit so it may be better to post in the appropriate thread.

    @Usability : I fixed the double click regression.
    Current Qt projects : QCodeEdit, RotiDeCode

  10. #10
    Join Date
    May 2007
    Location
    England
    Posts
    56
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    Double click working again, thanks!

  11. #11
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    Quote Originally Posted by Usability View Post
    How do you feel about making ctrl-f always take you to the find box?
    Done.

    A couple other changes have happened lately. Among which the addition of a line change panel which indicates the modified lines since last save.
    Current Qt projects : QCodeEdit, RotiDeCode

  12. #12
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    A couple more good news :
    • caduel has just fixed the code to work with Qt 4.4 (well actually it broke Qt 4.3 backward compat but I fixed that by now so everything is fine regarding this issue
    • I achieved very significant speed improvements when editing veryl arge files (especially near the end where it used to lag...)
    • Fixed cursor auto update mechanism in combination with cursor mirrors (typing enter when using cursor mirrors used to wreck cursor positions in a somewhat weird way.)
    Current Qt projects : QCodeEdit, RotiDeCode

  13. #13
    Join Date
    Jan 2006
    Posts
    371
    Thanks
    14
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    What was the problem with Qt 4.4? it should compile perfectly, since 4.4 is source compatible with 4.3.

  14. #14
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    Quote Originally Posted by elcuco View Post
    What was the problem with Qt 4.4? it should compile perfectly, since 4.4 is source compatible with 4.3.
    It's described in a previous post... Contrary to what one could expect there's been some, at least one, API changes which happened in the QBasicAtomic class (got hidden since the introduction of QAtomicInt AFAIK). This class is a low level atomic counter used in reference counting (in both text lines and cursors).
    Current Qt projects : QCodeEdit, RotiDeCode

  15. #15
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QCodeEdit

    They weren't part of the public API, were they?
    J-P Nurmi

  16. #16
    Join Date
    Jan 2006
    Posts
    371
    Thanks
    14
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    Quote Originally Posted by fullmetalcoder View Post
    It's described in a previous post... Contrary to what one could expect there's been some, at least one, API changes which happened in the QBasicAtomic class (got hidden since the introduction of QAtomicInt AFAIK). This class is a low level atomic counter used in reference counting (in both text lines and cursors).
    BTW, I am getting compilation problems on 4.3. What version do you support ...? 4.4? 4.3?

  17. #17
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    Quote Originally Posted by elcuco View Post
    BTW, I am getting compilation problems on 4.3. What version do you support ...? 4.4? 4.3?
    I'd like to support both but I can't test Qt 4.4
    As for your compile troubles could provide me the following informations :
    • OS
    • Qt version
    • compiler
    • QCodeEdit version (i.e package or SVN rev)
    • full compile log (do a make distclean first if you are using a SVN copy)
    They weren't part of the public API, were they?
    The QAtomic and QBasicAtomic class are not documented but they are accessible (i.e. not located somewhere in "private" headers) and as they are widely used throughout Qt and the only way to achieve atomic ref counting I assumed they would not be a source of troubles and used them...
    Current Qt projects : QCodeEdit, RotiDeCode

  18. #18
    Join Date
    Jan 2008
    Posts
    22
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QCodeEdit

    i hope the development of QCodeEdit continues, as i have a few reports/requests

    Issues
    ==========================
    - while scrolling the linenumber column changes width while scrolling (becomes wider) as the digit of current visible line grows down the file. this "dynamic" grow is quite unusual. why don't you make the width of the linenumber column "static" and change the width only if the row count changes ( e. g. from 99 to 100 or from 999 to 1000 )?

    - column selection: i see that i can select columns wise. what i don't see is the actual selection.

    Features
    ===========================
    for convenience sake i declare here an entity: ( current line/lines of current selection ) = current content

    - make it possible to delete current content along with the corresponding lines. ( e. g. CTRL + D in Eclipse )
    - make it possible to move current content inside the editor. ( e. g. ALT + UP, ALT + DOWN )
    - make it possible to duplicate current content inside the editor. ( e. g. CTRL + ALT + UP, CTRL + ALT + DOWN )
    - tab ( or user defined key ) triggered snippets. ( e. g. textmate )

    that's all for now great work so far
    Last edited by NoobSaibot; 12th January 2008 at 07:50.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.