|
List Info
Thread: diff view
|
|
| diff view |
  Russian Federation |
2007-12-07 11:29:30 |
Hello,
I would like to eventually implement a special view for diff
files.
That is, when a file with extension .diff is opened, I don't
want it
to be opened with Kate, but rather using a custom code, that
will
allow, among other things, to apply individual hunks of the
diff file.
(Whether such custom code will be implementing using
Kompare, or really
custom code, is not important here).
So, how can I make kdevelop, when opening file with specific
extension
or mime type, to use a designated plugin?
- Volodya
_______________________________________________
KDevelop-devel mailing list
KDevelop-devel kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
|
|
| Re: diff view |

|
2007-12-07 12:01:06 |
On Friday 07 December 2007 18:29:30 Vladimir Prus wrote:
> Hello,
>
> I would like to eventually implement a special view for
diff files.
> That is, when a file with extension .diff is opened, I
don't want it
> to be opened with Kate, but rather using a custom code,
that will
> allow, among other things, to apply individual hunks of
the diff file.
> (Whether such custom code will be implementing using
Kompare, or really
> custom code, is not important here).
>
> So, how can I make kdevelop, when opening file with
specific extension
> or mime type, to use a designated plugin?
>
> - Volodya
I cannot tell about this one.
But generally about the diff thing:
For the teamwork plugin, I have already implemented a
mechanism to highlight
all applied hunks of a diff file in the editor, and to jump
between the
hunks. I think a similarly integrated thing would be perfect
for selectively
applying diff-files, and might be implemented without too
much work based on
the ripped kdiff3 library that's already in teamwork:
1. When opening a diff-file, you would need to see some
side-panel where you
see all the hunks.
2. When you click a hunk, you would jump to the location of
the hunk in the
source-file, where the according text is highlighted(maybe
green for applied,
blue for not applied, and red for conflict)
3. When the cursor is within such a hunk in the source file,
you could somehow
see the alternative text for that hunk, and either
apply/unapply the hunk.
For just showing a diff file, a kompare part would be just
perfect.
greetings, David
_______________________________________________
KDevelop-devel mailing list
KDevelop-devel kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
|
|
| Re: diff view |

|
2007-12-07 12:33:13 |
David Nolden wrote:
> On Friday 07 December 2007 18:29:30 Vladimir Prus
wrote:
>> Hello,
>>
>> I would like to eventually implement a special view
for diff files.
>> That is, when a file with extension .diff is
opened, I don't want it
>> to be opened with Kate, but rather using a custom
code, that will
>> allow, among other things, to apply individual
hunks of the diff file.
>> (Whether such custom code will be implementing
using Kompare, or really
>> custom code, is not important here).
>>
>> So, how can I make kdevelop, when opening file with
specific extension
>> or mime type, to use a designated plugin?
>>
>> - Volodya
> I cannot tell about this one.
>
> But generally about the diff thing:
> For the teamwork plugin, I have already implemented a
mechanism to
> highlight all applied hunks of a diff file in the
editor, and to jump
> between the hunks. I think a similarly integrated thing
would be perfect
> for selectively applying diff-files, and might be
implemented without too
> much work based on the ripped kdiff3 library that's
already in teamwork:
>
> 1. When opening a diff-file, you would need to see some
side-panel where
> you see all the hunks.
I'm not sure -- side panel is too narrow for showing hunks
effectively.
> 2. When you click a hunk, you would jump to the
location of the hunk in
> the source-file, where the according text is
highlighted(maybe green for
> applied, blue for not applied, and red for conflict)
>
> 3. When the cursor is within such a hunk in the source
file, you could
> somehow see the alternative text for that hunk, and
either apply/unapply
> the hunk.
>
> For just showing a diff file, a kompare part would be
just perfect.
I actually kinda like the Emacs way -- which splits the
windows horizontally,
and the patch is on top, while the files being modified are
on the bottom.
But there's zillion ways to apply a patch file, and some
experimentation
is needed, that's why I'm starting with a technical question
of using
non-kate thing to show a particular file.
- Volodya
>
> greetings, David
_______________________________________________
KDevelop-devel mailing list
KDevelop-devel kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
|
|
| Re: diff view |

|
2007-12-07 14:01:59 |
On 07.12.07 20:29:30, Vladimir Prus wrote:
> I would like to eventually implement a special view for
diff files.
Thats coincidence. I just today took a look again at kompare
and kdiff3
> That is, when a file with extension .diff is opened, I
don't want it
> to be opened with Kate, but rather using a custom code,
that will
> allow, among other things, to apply individual hunks of
the diff file.
> (Whether such custom code will be implementing using
Kompare, or really
> custom code, is not important here).
>
> So, how can I make kdevelop, when opening file with
specific extension
> or mime type, to use a designated plugin?
Provide your own IDocument implementation and register it
with the
document controller. Check the designer plugin for details.
And btw: I want a special diff-view as well for the VCS
integration. My
main goals there are:
- side-by-side view of 2 files and "connection" of
diff-hunks, similar
to eclipse
- 3 way diff+merge support, for merging conflicts
Basically I'd like to have kdiff3 (including an editor area)
integrated
into KDevelop4. But that would mean porting it to KDE4 first
(and
kompare is unmaintained since quite some time now)
Andreas
--
You are fighting for survival in your own sweet and gentle
way.
_______________________________________________
KDevelop-devel mailing list
KDevelop-devel kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
|
|
| Runtime Dependecy on kdesdk |

|
2007-12-07 14:28:13 |
On 07.12.07 19:01:06, David Nolden wrote:
> For just showing a diff file, a kompare part would be
just perfect.
That would create a runtime-dep on kdesdk, I'd like to know
wether thats
ok? If so I could improve the current vcs-diff widget a lot
by using
kompare if its available...
Andreas
--
Green light in A.M. for new projects. Red light in P.M. for
traffic tickets.
_______________________________________________
KDevelop-devel mailing list
KDevelop-devel kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
|
|
| Re: Runtime Dependecy on kdesdk |
  Ukraine |
2007-12-07 14:38:08 |
On Friday 07 December 2007 22:28, Andreas Pakulat wrote:
> On 07.12.07 19:01:06, David Nolden wrote:
> > For just showing a diff file, a kompare part would
be just perfect.
> That would create a runtime-dep on kdesdk, I'd like to
know wether thats
> ok? If so I could improve the current vcs-diff widget a
lot by using
> kompare if its available...
I think we had such dependency in kdev3 and that was ok
actually. You can
always try to find kompare part and substitude it with kate
when it's absent.
_______________________________________________
KDevelop-devel mailing list
KDevelop-devel kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
|
|
| Re: Runtime Dependecy on kdesdk |

|
2007-12-07 14:51:41 |
On 07.12.07 22:38:08, Alexander Dymo wrote:
> On Friday 07 December 2007 22:28, Andreas Pakulat
wrote:
> > On 07.12.07 19:01:06, David Nolden wrote:
> > > For just showing a diff file, a kompare part
would be just perfect.
> > That would create a runtime-dep on kdesdk, I'd
like to know wether thats
> > ok? If so I could improve the current vcs-diff
widget a lot by using
> > kompare if its available...
> I think we had such dependency in kdev3 and that was ok
actually. You can
> always try to find kompare part and substitude it with
kate when it's absent.
kate doesn't work, as it needs a url and I don't have a
file, I only
have a QString.
Ok, I'll do that then now.
Andreas
--
You may be gone tomorrow, but that doesn't mean that you
weren't here today.
_______________________________________________
KDevelop-devel mailing list
KDevelop-devel kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
|
|
| Re: diff view |

|
2007-12-07 15:06:08 |
On 07.12.07 19:01:06, David Nolden wrote:
> For just showing a diff file, a kompare part would be
just perfect.
I just noticed: kompare doesn't exist in kde4. Neither does
kdiff3. So
much for having a basic diff widget in kdevelop4.0
Andreas
--
You have Egyptian flu: you're going to be a mummy.
_______________________________________________
KDevelop-devel mailing list
KDevelop-devel kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
|
|
[1-8]
|
|