Review Request: Add buddy document architecture to kdevplatform
Martin Heide
martin.heide at gmx.net
Wed Mar 16 17:58:22 UTC 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100874/
-----------------------------------------------------------
(Updated March 16, 2011, 5:58 p.m.)
Review request for KDevelop.
Changes
-------
hint how to apply patch
Summary (updated)
-------
!! To apply patch, use (instead of git apply)
patch -p1 < kdevplatform-buddy-1.patch
(bug in reviewboard, sorry) !!
(This review request is based on https://git.reviewboard.kde.org/r/100795/ , to separate cleanup and buddy document features)
Works together with the review request https://git.reviewboard.kde.org/r/100796/ in kdevelop. Apply them both before compiling.
Add document buddy architecture :
Allow kdevelop language plugins to manage related documents (like foo.h and foo.cpp for cpp plugin)
Language plugins may implement IBuddyDocumentFinder to define the rules (how to know if two documents are buddies).
Language plugins that implement IBuddyDocumentFinder must register themselves.
An option was added to the UIConfig to open documents side by side with its buddies.
Buddy documents work like this: Assume that the option is enabled in the config, and there exist the following tabs:
| foo.h | bar.cpp |
If now the user opens foo.cpp, then this tab will be placed to the right of foo.h.
Another feature: Assume that both buddy documents and the option "Open new tab after current" are enabled. There are the following tabs:
| *foo.h* | foo.cpp | bar.h | (foo.h is the active tab)
Normally, if the user opens somefile.cpp now, the tab would be placed between foo.h and foo.cpp, which would separate the buddies. So we changed the bahavior: the new tab will be placed after foo.cpp instead.
Diffs
-----
interfaces/CMakeLists.txt 170cf63
interfaces/ibuddydocumentfinder.h PRE-CREATION
interfaces/ibuddydocumentfinder.cpp PRE-CREATION
interfaces/idocumentcontroller.h d036afa
shell/documentcontroller.h 8dc3706
shell/documentcontroller.cpp bc0a3dd
shell/settings/uiconfig.kcfg 60dccb2
shell/settings/uiconfig.ui 61f4b08
shell/tests/CMakeLists.txt b093565
shell/tests/documentcontrollertest.h PRE-CREATION
shell/tests/documentcontrollertest.cpp PRE-CREATION
shell/tests/shellbuddytest.h PRE-CREATION
shell/tests/shellbuddytest.cpp PRE-CREATION
sublime/area.h df0e2bb
sublime/area.cpp efa8025
sublime/controller.h e8b4794
sublime/controller.cpp a8dd38a
sublime/tests/areaoperationtest.h 0e0f08e
sublime/tests/areaoperationtest.cpp 28dbeff
Diff: http://git.reviewboard.kde.org/r/100874/diff
Testing
-------
Created shell-buddytest and sublime-documentcontrollertest. Both pass.
Fixed an error in sublime-areaoperationtest (which was not related to the buddy document feature, but to the option "Open new tab after current").
Screenshots
-----------
New UiSettings
http://git.reviewboard.kde.org/r/100874/s/103/
Thanks,
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20110316/1e33bdfe/attachment.html>
More information about the KDevelop-devel
mailing list