[Kommander-devel] KTextEditor in Kommander

Andras Mantia amantia at kde.org
Thu Aug 17 23:14:06 EDT 2006


On Thursday 17 August 2006 19:42, Eric Laffoon wrote:
> On Thursday 17 August 2006 3:37 am, Andras Mantia wrote:
> > On Thursday 17 August 2006 12:33, Andras Mantia wrote:
> > > Highlighting mode cannot be changed right now. The solutions
> > > would be: - change from the context menu
> > > - a dropdown combo in the editor dialog
>
> The highlighting is great, except we really only have two absolute
> blocks. It would be more meaningful if we did...
> @function() - highlighted - ("content") not highlighted
That is possible.

> @functiongroup.function - probably same highlighting as function

This one should already work.

> @widget.method - ideally different highlight

This will not work, as highlighting is based on regexp matching and not 
on content. Except is if we list all the possible function names in the 
highlighting file and we assign a different color to them.

> This should not be too difficult as these can be neatly extracted.
> Attached is a file I used to make the dcop aide dialog. As we
> eventually will support the new script too this may make things a lot
> easier.

I don't think we could correctly highlight such a file. This is PHP and 
Kommander. In Katepart it isn't possible to mix highlighting files, so 
you say one part is highlighted as Kommander the other as PHP. The 
current Kommander highlighting is based on bash highlighting as bash is 
the most used language with Kommander. But even there if you have a @ 
command inside quotation marks, it won't be highlighted. This would be 
possible if we would completely ignore everything else and just 
highlight the Kommander commands. Do you want that?

>
> > It works now from a context menu. The setting is not saved though,
> > so once you close the editor, it's gone. There could be implemented
> > a saving of this configuration in the Kommander XML file.
>
> You mean in the*.kmdr file? I believe Michal said we had a good place
> there for random data.

Yes and no. Things like bookmarks, highlighting information should go to 
the .kmdr file. Settings like find options should go to the 
kommanderrc.

> I have to go eat breakfast and do some things but I'm eager to try
> this out. It's very exciting. I also wanted some form of revert/undo
> for after testing a file and I expect undo will not work after
> closing the editor, but it's still very nice to have it.

Undo/redo works inside the editor unless you close the dialog or switch 
to another widget's dialog. This has very good reasoning: the editor is 
different object in each case, so undo/redo information cannot be 
stored. Sincerely I don't know how this could be solved in a good way. 
There could be a global undo/redo stack which snapshots the whole .kmdr 
file content for example when an associated text is edited, so it would 
be possible to undo all the changes made to a widget's text in one go. 
But this is up to the whole Kommander application to implement it and 
choose the points where undo information is saved.

-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://momo.creolmail.org/pipermail/kommander-devel/attachments/20060817/52d2f99f/attachment.pgp


More information about the Kommander-devel mailing list