[Qt-creator] Git interactive rebase

David Schulz david.schulz at digia.com
Thu Feb 14 09:08:57 CET 2013


If you want to open a file in an already created editor take a look at 

When an editor will be closed the EditorManager emits 
editorAboutToClose(Core::IEditor *).

For the highlighting of keywords you should take a look at 
SyntaxHighlighter and the derived classes.



On 02/14/2013 08:28 AM, Orgad Shaneh wrote:
> Hi,
> I'm trying to create interactive rebase support for Git plugin. WIP 
> change can be found here <https://codereview.qt-project.org/47834>.
> I created a small tool that communicates with qtc using a local 
> socket. It is used as GIT_EDITOR.
> I need some help with this, since I'm not familiar with the 
> editors/documents architecture.
> When the action is triggered, a log editor is opened with "Waiting for 
> data". Log editor is used to enable interaction with commits (describe 
> etc.).
> When git rebase decides to open the editor, the stub passes the todo 
> filename on the socket.
> *Q: *Is there a way to assign a file to an editor (including its 
> content) after it is opened? I'd like to still use the same log editor 
> but make it work on the todo file (i.e. Save should overwrite the file 
> rather than prompting the user for file name).
> The stub expects a reply (anything) on the socket, then it exits. This 
> reply should be sent when the editor is closed.
> *Q: *Is there a signal or a virtual callback that is called when the 
> editor is closed? Destructor maybe?
> I would like the editor to highlight some keywords using different 
> colors (pick, squash, fixup etc...) like it is done in Vim (supplied 
> with msysGit). How do I do this? :)
> Any other comments on the design or the code are welcome.
> Thanks,
> - Orgad
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator

David Schulz

Digia Germany GmbH
Rudower Chausse 13, 12489 D-Berlin
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B,
Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius
Email: david.schulz at digia.com
Tel: +49 30 63 92 32 55

Digia Germany is a group company of Digia Plc,
Valimotie 21, FI-00380 Helsinki Finland
Visit us at: www.digia.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20130214/1626ea35/attachment.html>

More information about the Qt-creator mailing list