Revision e4fecad...
Go back to digest for 20th March 2011Features in Development Tools
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.
REVIEW: 100874
File Changes
- interfaces/ibuddydocumentfinder.cpp
- interfaces/ibuddydocumentfinder.h
- shell/tests/documentcontrollertest.cpp
- shell/tests/documentcontrollertest.h
- shell/tests/shellbuddytest.cpp
- shell/tests/shellbuddytest.h
- interfaces/CMakeLists.txt
- interfaces/idocumentcontroller.h
- shell/documentcontroller.cpp
- shell/documentcontroller.h
- sublime/area.cpp
- sublime/area.h
- sublime/controller.cpp
- sublime/controller.h
- shell/settings/uiconfig.kcfg
- shell/settings/uiconfig.ui
- shell/tests/CMakeLists.txt
- sublime/tests/areaoperationtest.cpp
- sublime/tests/areaoperationtest.h