[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: Re: Review Request 115422: semi-intelligent keyword-based generic code completion model based on syn
From: "Sven Brauch" <svenbrauch () googlemail ! com>
Date: 2014-02-04 18:01:23
Message-ID: 20140204180123.4923.62647 () probe ! kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115422/
-----------------------------------------------------------
(Updated Feb. 4, 2014, 6:01 p.m.)
Status
------
This change has been marked as submitted.
Review request for Kate and KDevelop.
Repository: kate
Description
-------
This patch provides a new completion model which gathers items from the syntax files. \
It simply suggests all words which are listed as keywords for the highlighting \
context which is active at the position where completion was invoked.
To avoid storing all the places where the highlighting context changes, an option was \
added to the function which calculates the highlight, which allows to optionally get \
all the context changes in a QVector. When completion is invoked, the current line is \
re-highlighted, and the context switches are extracted; from that the highlighting \
context at the cursor position is determined. The keyword items from this context \
become the items of the completion model.
An option is provided in the settings dialog to turn this new model off.
Diffs
-----
part/utils/kateglobal.h 491e8f8
part/utils/kateglobal.cpp f322074
part/view/kateview.cpp 9d9cff6
part/CMakeLists.txt 51af1b8
part/completion/katekeywordcompletion.h PRE-CREATION
part/completion/katekeywordcompletion.cpp PRE-CREATION
part/dialogs/completionconfigtab.ui 7cdb94f
part/dialogs/katedialogs.cpp aa0acba
part/syntax/katehighlight.h f3eb81b
part/syntax/katehighlight.cpp cd8b6a7
part/syntax/katehighlighthelpers.h 3f16f87
part/syntax/katehighlighthelpers.cpp f5c1823
part/utils/kateconfig.h a932533
part/utils/kateconfig.cpp 7667aee
Diff: https://git.reviewboard.kde.org/r/115422/diff/
Testing
-------
Tested with various languages. Checked if there are any obvious interferences with \
kdevelop's supported languages.
File Attachments
----------------
CSS
https://git.reviewboard.kde.org/media/uploaded/files/2014/02/01/92f2d072-5263-46c1-9edb-cdb81557b736__css.png
CSS + HTML
https://git.reviewboard.kde.org/media/uploaded/files/2014/02/01/9c5a98d6-a8ff-4ba8-9deb-f0ab0dc37ec6__mixed.png
lua
https://git.reviewboard.kde.org/media/uploaded/files/2014/02/01/315da290-5610-4083-8d8c-daaacabb3346__lua.png
bash ;)
https://git.reviewboard.kde.org/media/uploaded/files/2014/02/01/0e806ffe-902b-4cf5-b750-68bcac80365b__bas.png
PHP
https://git.reviewboard.kde.org/media/uploaded/files/2014/02/01/94271927-ab7b-4221-bb84-65ead2c1afac__php.png
gnuplot
https://git.reviewboard.kde.org/media/uploaded/files/2014/02/01/b9aad427-6c1b-4c33-9c9d-c95625e26066__gnuplot.png
gnuplot; note that it has different completion items now, depending on context <3
https://git.reviewboard.kde.org/media/uploaded/files/2014/02/01/24f9fb51-31ed-4f3f-8d3f-3ad36e698e1a__gnuplot2.png
Thanks,
Sven Brauch
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/115422/">https://git.reviewboard.kde.org/r/115422/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#e0e0e0" width="100%" cellpadding="8" style="border: 1px gray \
solid;"> <tr>
<td>
<h1 style="margin-right: 0.2em; padding: 0; font-size: 10pt;">This change has been \
marked as submitted.</h1> </td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Kate and KDevelop.</div>
<div>By Sven Brauch.</div>
<p style="color: grey;"><i>Updated Feb. 4, 2014, 6:01 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kate
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">This patch provides a new completion model which gathers items from the \
syntax files. It simply suggests all words which are listed as keywords for the \
highlighting context which is active at the position where completion was invoked.
To avoid storing all the places where the highlighting context changes, an option was \
added to the function which calculates the highlight, which allows to optionally get \
all the context changes in a QVector. When completion is invoked, the current line is \
re-highlighted, and the context switches are extracted; from that the highlighting \
context at the cursor position is determined. The keyword items from this context \
become the items of the completion model.
An option is provided in the settings dialog to turn this new model off.
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Tested with various languages. Checked if there are any obvious \
interferences with kdevelop's supported languages.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>part/utils/kateglobal.h <span style="color: grey">(491e8f8)</span></li>
<li>part/utils/kateglobal.cpp <span style="color: grey">(f322074)</span></li>
<li>part/view/kateview.cpp <span style="color: grey">(9d9cff6)</span></li>
<li>part/CMakeLists.txt <span style="color: grey">(51af1b8)</span></li>
<li>part/completion/katekeywordcompletion.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>part/completion/katekeywordcompletion.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>part/dialogs/completionconfigtab.ui <span style="color: \
grey">(7cdb94f)</span></li>
<li>part/dialogs/katedialogs.cpp <span style="color: grey">(aa0acba)</span></li>
<li>part/syntax/katehighlight.h <span style="color: grey">(f3eb81b)</span></li>
<li>part/syntax/katehighlight.cpp <span style="color: grey">(cd8b6a7)</span></li>
<li>part/syntax/katehighlighthelpers.h <span style="color: \
grey">(3f16f87)</span></li>
<li>part/syntax/katehighlighthelpers.cpp <span style="color: \
grey">(f5c1823)</span></li>
<li>part/utils/kateconfig.h <span style="color: grey">(a932533)</span></li>
<li>part/utils/kateconfig.cpp <span style="color: grey">(7667aee)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/115422/diff/" style="margin-left: \
3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments \
</h1>
<ul>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/02/01/92f2d072-5263-46c1-9edb-cdb81557b736__css.png">CSS</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/02/01/9c5a98d6-a8ff-4ba8-9deb-f0ab0dc37ec6__mixed.png">CSS \
+ HTML</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/02/01/315da290-5610-4083-8d8c-daaacabb3346__lua.png">lua</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/02/01/0e806ffe-902b-4cf5-b750-68bcac80365b__bas.png">bash \
;)</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/02/01/94271927-ab7b-4221-bb84-65ead2c1afac__php.png">PHP</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/02/01/b9aad427-6c1b-4c33-9c9d-c95625e26066__gnuplot.png">gnuplot</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/02/01/24f9fb51-31ed-4f3f-8d3f-3ad36e698e1a__gnuplot2.png">gnuplot; \
note that it has different completion items now, depending on context <3</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic