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

List:       kwrite-devel
Subject:    Re: Review Request 113720: Python plugins refactored
From:       "Alex Turbov" <i.zaufi () gmail ! com>
Date:       2013-11-11 2:21:51
Message-ID: 20131111022151.23743.50960 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/113720/
-----------------------------------------------------------

(Updated Nov. 11, 2013, 2:21 a.m.)


Review request for Kate and Shaheed Haque.


Changes
-------

Here is a next step and bunch of changes to make it looks like a final patch (production code):
Add separate CMakeLists.txt for pate/src/plugins/.
Module initialization refactored:
  - engine now just ordinal data-member of Plugin, so deleted properly
  - in case of Engine failure reason will be provided
  - make sure the engine is alive when access it...
  - provide a passive popup w/ exact reason if it doesn't
  - introduce i18nc for failure reasons (and replace existed i18n calls)
Turn PluginState from "public" structure into a class w/ read-only
accessors and rename members into camelCase.
Fix a bug w/ loading disabled modules.
Sort modules list by name in the manager.
Constness and coding style consistency.

I don't know if anyone tired to apply smth from this review (probably it can be not so easy because of \
few missed (intermediate commits)), so I've added one single (squashed) patch against master...

PS: Domink, sorry for style changes mixed w/ a refactoring code... %)


Repository: kate


Description
-------

Search installed Python plugins via trader. 
Introduce `Kate/PythonPlugin` service type. 
Make plugins management look-n-feel as C++ plugins.
Enabled plugins now are per session (stored under "Enabled Plugins" key of the pate config group), so it \
is possible to have different plugins in different sessions (just like C++ plugins).

Sample .desktop file:

[Desktop Entry]
Type=Service
ServiceTypes=Kate/PythonPlugin
X-KDE-Library=cmake_utils/cmake_utils.py
Name=CMake Utilities
Comment=Code completer, cache and help browser
X-Python-2-Compatible=false
X-Python-3-Compatible=true

The patch contains .desktop files only for plugins I wrote (and use) myself. Other plugins still need \
.desktop files (I don't know exactly which Python they are require)


Diffs
-----

  addons/kate/pate/src/utilities.cpp 3ed19d6 
  addons/kate/pate/src/utilities.h d88af0f 
  addons/kate/pate/src/plugins/format.desktop PRE-CREATION 
  addons/kate/pate/src/plugins/expand.desktop PRE-CREATION 
  addons/kate/pate/src/plugins/commentar.desktop PRE-CREATION 
  addons/kate/pate/src/plugins/color_tools.desktop PRE-CREATION 
  addons/kate/pate/src/plugins/cmake_utils/cmake_utils.desktop PRE-CREATION 
  addons/kate/pate/src/plugins/block.desktop PRE-CREATION 
  addons/kate/pate/src/plugin.cpp 85c84a3 
  addons/kate/pate/src/plugin.h 77369c6 
  addons/kate/pate/src/manager.ui 82213ee 
  addons/kate/pate/src/katepythonplugin.desktop PRE-CREATION 
  addons/kate/pate/src/engine.cpp 5484473 
  addons/kate/pate/src/engine.h 6c70ab9 
  addons/kate/pate/src/CMakeLists.txt 78bbdc0 

Diff: http://git.reviewboard.kde.org/r/113720/diff/


Testing
-------


File Attachments (updated)
----------------

Python Plugins Management
  http://git.reviewboard.kde.org/media/uploaded/files/2013/11/08/f711a85f-34f7-4b2c-99d2-f1c375fcf88f__python-plugins-redesigned.png
 the next (intermediate) commit after the original
  http://git.reviewboard.kde.org/media/uploaded/files/2013/11/11/0087837c-71aa-4b54-988b-5ce0c219c1b6__0001-few-more-.desktop-files.patch
 The next revision after first review
  http://git.reviewboard.kde.org/media/uploaded/files/2013/11/11/3d91861b-2d2c-45e0-8b26-ec33d9958dd0__0002-Add-separate-CMakeLists.txt-for-pate-src-plugins.patch
 Single patch for everything! (made against master w/ squashed commits)
  http://git.reviewboard.kde.org/media/uploaded/files/2013/11/11/2bcd97ab-ec4c-4bb0-856a-de41e28ec28d__0001-Python-plugins-refactored-as-a-single-patch.patch



Thanks,

Alex Turbov


[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="http://git.reviewboard.kde.org/r/113720/">http://git.reviewboard.kde.org/r/113720/</a>
     </td>
    </tr>
   </table>
   <br />




<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: \
url('http://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 Shaheed Haque.</div>
<div>By Alex Turbov.</div>


<p style="color: grey;"><i>Updated Nov. 11, 2013, 2:21 a.m.</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</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;">Here is a next step and bunch of changes to \
make it looks like a final patch (production code): Add separate CMakeLists.txt for pate/src/plugins/.
Module initialization refactored:
  - engine now just ordinal data-member of Plugin, so deleted properly
  - in case of Engine failure reason will be provided
  - make sure the engine is alive when access it...
  - provide a passive popup w/ exact reason if it doesn&#39;t
  - introduce i18nc for failure reasons (and replace existed i18n calls)
Turn PluginState from &quot;public&quot; structure into a class w/ read-only
accessors and rename members into camelCase.
Fix a bug w/ loading disabled modules.
Sort modules list by name in the manager.
Constness and coding style consistency.

I don&#39;t know if anyone tired to apply smth from this review (probably it can be not so easy because \
of few missed (intermediate commits)), so I&#39;ve added one single (squashed) patch against master...

PS: Domink, sorry for style changes mixed w/ a refactoring code... %)</pre>
  </td>
 </tr>
</table>







<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;">Search installed Python plugins via trader.  \
Introduce `Kate/PythonPlugin` service type.  Make plugins management look-n-feel as C++ plugins.
Enabled plugins now are per session (stored under &quot;Enabled Plugins&quot; key of the pate config \
group), so it is possible to have different plugins in different sessions (just like C++ plugins).

Sample .desktop file:

[Desktop Entry]
Type=Service
ServiceTypes=Kate/PythonPlugin
X-KDE-Library=cmake_utils/cmake_utils.py
Name=CMake Utilities
Comment=Code completer, cache and help browser
X-Python-2-Compatible=false
X-Python-3-Compatible=true

The patch contains .desktop files only for plugins I wrote (and use) myself. Other plugins still need \
.desktop files (I don&#39;t know exactly which Python they are require)</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>addons/kate/pate/src/utilities.cpp <span style="color: grey">(3ed19d6)</span></li>

 <li>addons/kate/pate/src/utilities.h <span style="color: grey">(d88af0f)</span></li>

 <li>addons/kate/pate/src/plugins/format.desktop <span style="color: grey">(PRE-CREATION)</span></li>

 <li>addons/kate/pate/src/plugins/expand.desktop <span style="color: grey">(PRE-CREATION)</span></li>

 <li>addons/kate/pate/src/plugins/commentar.desktop <span style="color: grey">(PRE-CREATION)</span></li>

 <li>addons/kate/pate/src/plugins/color_tools.desktop <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>addons/kate/pate/src/plugins/cmake_utils/cmake_utils.desktop <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>addons/kate/pate/src/plugins/block.desktop <span style="color: grey">(PRE-CREATION)</span></li>

 <li>addons/kate/pate/src/plugin.cpp <span style="color: grey">(85c84a3)</span></li>

 <li>addons/kate/pate/src/plugin.h <span style="color: grey">(77369c6)</span></li>

 <li>addons/kate/pate/src/manager.ui <span style="color: grey">(82213ee)</span></li>

 <li>addons/kate/pate/src/katepythonplugin.desktop <span style="color: grey">(PRE-CREATION)</span></li>

 <li>addons/kate/pate/src/engine.cpp <span style="color: grey">(5484473)</span></li>

 <li>addons/kate/pate/src/engine.h <span style="color: grey">(6c70ab9)</span></li>

 <li>addons/kate/pate/src/CMakeLists.txt <span style="color: grey">(78bbdc0)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/113720/diff/" style="margin-left: 3em;">View Diff</a></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments (updated)</h1>

<ul>

 <li><a href="http://git.reviewboard.kde.org/media/uploaded/files/2013/11/08/f711a85f-34f7-4b2c-99d2-f1c375fcf88f__python-plugins-redesigned.png">Python \
Plugins Management</a></li>

 <li><a href="http://git.reviewboard.kde.org/media/uploaded/files/2013/11/11/0087837c-71aa-4b54-988b-5ce0c219c1b6__0001-few-more-.desktop-files.patch">the \
next (intermediate) commit after the original</a></li>

 <li><a href="http://git.reviewboard.kde.org/media/uploaded/files/2013/11/11/3d91861b-2d2c-45e0-8b26-ec33d9958dd0__0002-Add-separate-CMakeLists.txt-for-pate-src-plugins.patch">The \
next revision after first review</a></li>

 <li><a href="http://git.reviewboard.kde.org/media/uploaded/files/2013/11/11/2bcd97ab-ec4c-4bb0-856a-de41e28ec28d__0001-Python-plugins-refactored-as-a-single-patch.patch">Single \
patch for everything! (made against master w/ squashed commits)</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