[RkWard-devel] Context sensitive history

Roland Vollgaf vro at cs.tu-berlin.de
Tue Jan 16 14:23:36 UTC 2007


On Tuesday 16 January 2007 11:54, Thomas Friedrichsmeier wrote:
> Hi,
> 
> On Monday 15 January 2007 22:04, Roland Vollgaf wrote:
> > what do you think about this: Let the user enter begin and open marks for
> > the regions he want to run. Therfore the IconBorder seems to be well
> > suited. I enabled two more marks in the MarkInterfaceExtension, one 
showing
> > an opening bracket and one a closing one. The action "run_region" then 
runs
> > the region inside the pair of brackets containing the cursor. Not as 
> > elegant as automatic region determination, but for the first it does the
> > job. Multiple regions can be defined, but not nested.
> 
> since I hardly ever use the icon border, this did not occur to me. Looks 
like 
> a good interim solution though, until later we can detect those ranges 
> automatically.
> 
> > I'm appending a patch and two icons. Propabliy the way I included strings
> > and pixmaps is not actually correct  in terms i18n etc.  I think some
> > dedicated icons  for the "run_xxxx" actions are overdue, but I don't how
> > they are correctly linked into the project (thus I just picked an 
arbitrary
> > existing icon, play_pause)
> 
> Before I apply this, a question (and a minor nitpick):
> If the regions can not be nested (or at least it will not work, if they are 
> nested), and I can see why they can't be, why have separate opening and 
> closing markers at all? Couldn't we just use a single type of marker (maybe 
> visualized as '}{'), and then getRegion () would simply return everything 
> between the previous (or top) and next (or bottom) of these markers. Or am I 
> overlooking something?
The idea was that not all regions should be "runable".  The regions between 
'}' and '{'  may contain garbage or assignments, which could mess up your 
current workspace when run accidentely.  Therefore I think separate start and 
end marks provide the better functionality. Actually I had the idea to ensure 
that the marks  are set in the correct order (an alternating sequence of 
start end end marks) right when they are set by the user. But, as far as I 
understand, this would require to derive an own document interface from 
Kate::Document in order to  overload 
KTextEditor::MarkerInterfaceExtension.markChanged(), and I didn't want to 
change too much of the existing code. But maybe it's worth to do, anyway.



 
> The nitpick: When working on RKWard files (or at least pre-existing files), 
> could you set up your editor (kate?) to use tabs instead of spaces for 
> indentation? On most lines you have tabs, but the ifs then use spaces for 
> extra indentation. Just so the source files look consistent.
Yes, my fault. I used emacs' indent functionality. Stupid enough, before I 
diff'ed the files I inserted spaces here and there to be conformal with the 
indent depth in the rest of the files. Think I'll have to configure my emacs 
properly.



Best,
Roland






More information about the Rkward-devel mailing list