Commit Graph

21 Commits

Author SHA1 Message Date
hjk
daad8e238e Editors: Provide a base implementation for duplicate{,Supported}
Helps avoiding trivial re-implementations.

Change-Id: Iaa2e6b92503a2b9553432568c2047c28899c7ea6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-05-27 14:27:16 +02:00
jkobus
569d29dc3e Use minisplitter inside diff editor
Change-Id: Ia2388e8c50185f80111fcf96aedb8143088e9a1c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
2013-05-26 20:13:41 +02:00
jkobus
74604a231d React to fontSettingsChanged inside diff editor
Change-Id: I72e5cd61ea67d87a3f82843ee1f3b42d13142dff
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-26 20:13:37 +02:00
jkobus
2ddb726dd5 Add file list combobox to diff editor
Change-Id: I2a40207ed3c4a5c07ba544d681aed6649a0b1a11
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-24 14:14:06 +02:00
jkobus
b8acf23ec4 Synchronize horizontal scroll bars in diff editor
Synchronize horizontal scroll bars by default.
Added corner widget to toggle synchronization off.

Change-Id: I52316f1d9399b9ad21a346d65873b37ce0a9b98f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-05-23 11:53:23 +02:00
jkobus
8311e20246 Fix highlight artifacts in diff editor
Which appeared after pressing "..." mark and scrolling right.

Change-Id: I779d4a7e76ebb01857d7313b5099a5482c455136
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-05-22 16:15:33 +02:00
jkobus
55717e1167 Respect tab settings in diff editor
Currently it's not possible to respect language specific tab
settings in diff editor. It can happen that one view
contains C++/Qt Quick files, while tab settings
are common for the whole view.

Change-Id: I45c6113afd7d41667b68a4daba0ac0fa4472b4e9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-05-22 11:19:34 +02:00
jkobus
97a86c50dc Basic integration of diff editor inside git plugin
Change-Id: I7675fc1d994020f94f42f6bd7b4f75aa29e6edf6
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-15 16:24:38 +02:00
jkobus
20625d5498 Implement jumping to original file on double click
Change-Id: I25f2624df65826b93604ff7df2485162691498d0
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-05-07 10:55:56 +02:00
jkobus
e844bee1da Add file descriptions, enable file folding
Change-Id: Ie90ac9fb74e9c4b8cfba16d065d1b8751125e83c
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-05-06 10:31:54 +02:00
jkobus
895b89dbdf Fix a crash on changing context lines with block selection
Crash occurs in diff editor when there is a block selection
and you are changing context lines number.

This workarounds the crash, but it seems that
when BaseTextEditorWidget has a blockSelection
calling "clear()" and "setPlainText()"
causes the crash. When I turn off the
blockSelection before calling "clear()" it helps.

Change-Id: I0133862a2d7e2914c16368b7efa9986b4d56ff39
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-04-24 15:31:32 +02:00
jkobus
ce0efbda46 Omit separator lines when copying selected text
In addition rename int start -> startPosition and int end -> endPosition
to avoid a name clash with QTextBlock start inside
BaseTextEditorWidget::createMimeDataFromSelection().

Change-Id: I7f54e4046913b5d5d9ddd3c07fd2747b4ca6f3fb
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-04-24 13:17:53 +02:00
jkobus
5219faf0e2 Refactor code
Create a common method for a similar code.
Simplify some logical operations.

Change-Id: If25703c51ea96fe5a64698f6fa3ffd6f5cb1b2c5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-23 16:35:22 +02:00
jkobus
5f5b7fa4c1 Remove unused variables
Remove unused fields and one virtual method,
rename alwaysShows -> contextChunk and revert
its logical value.

Change-Id: I11fd60202aa5b7978b772764a40c99029cac82a3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-23 14:33:33 +02:00
jkobus
186c457d6c Implement expanding / shrinking skipped lines
Change-Id: I6921b7a39288f6a9747574b1a8e75d571f4723ce
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-04-15 18:09:35 +02:00
jkobus
77abd02787 Get rid of QChar::LineSeparator
It was causing troubles while scrolling. Replace it with
\n and hack selection. Simplify the code. Now every line
is a separate block. Prepare for expanding skipped lines.

Change-Id: I8d305681c575abdaaf9cdbf26de864dd3a906d3a
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-04-12 14:55:08 +02:00
jkobus
41fa8c3528 Add cleanupSemantics method, produce nicer diff output
Change-Id: I877e06c930c219ad23af4b7c6078d8c8db3706e9
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-03-14 09:36:15 +01:00
jkobus
4c75dd71ed Optimize painting of skipped lines, don't paint "..."
Change-Id: I4a803ca899438ea0067c9a6244dffc77bc7109dd
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-03-07 00:47:14 +01:00
jkobus
9abb8563e3 Standardize IEditor subclass names, don't capitalize namespaces
Change-Id: I13ac8d4286b292c03019a7a564feee2c36475bf9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-22 11:39:22 +01:00
Friedemann Kleint
6d3c271d53 Rename namespace DIFFEditor to DiffEditor.
Change-Id: Ia87098de61f38530806e1cf87b69d0bfc66e250c
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-02-21 17:13:06 +01:00
jkobus
0e91d10878 Experimental integration of DiffEditor
After enabling the plugin go to Tools|Diff...

Change-Id: I793b6faedb93f58039df0a62e82fe04a017978ee
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-02-18 18:15:51 +01:00