Friday, June 25, 2010

More PalEdit Progress

For those who didn't know, I've been finally getting around to cleaning up PalEdit, Paladin's text editor. It is based on Pe and in its current publicly-available state, isn't all that different from Pe. I'm in the process of fixing that. On the surface Pe is a great all-purpose text editor. I'm not that fond of it personally just because I only write code in C++ under Zeta and Haiku with rare stints into Python land under Ubuntu.

When I started working on Paladin, I needed a text editor to go with it, and Pe won over Scintilla for quickly getting things going. Since that time, I haven't really done much with it aside from some integration with Paladin's build system -- that is until now.

The actual code for Pe is a mess. I've mentioned multiple times my disdain and loathing of the resource system that it uses and the tool that compiles them, rez. Rez is hard to use because the errors it generates are not at all helpful and it merely compiles C-like text file into regular resource files. Very few of the extensions are actually useful, and with Paladin being specifically a C/C++ environment, all the extra languages used are unneeded. Internally, the archictecture also needs cleaned up, especially the code that handles the syntax highlighting for the different languages.

Rather than rewrite the thing, which is foolish, I've been doing some major refactoring of the code. The result at this point is a stripped down editor with syntax highlighting that is one quarter the size of the current PalEdit executable. It still needs quite a bit of work to be feature complete and there are bugs still left to squash, but when finished, it will be much easier to add stuff on, to maintain, and to also embed into other applications. It will be possible to finally integrate the editor into the rest of Paladin, whether or not I do it remains to be seen, though.


  1. Looking forward to the finished product. Keep up the good work. :)

  2. IIRC, the messy Pe structure is what refrained current maintainers of adding new functionality to it or make improvements in other ways.

    It seems obvious that none had the will to clean it up, so it stays the way you found it.

    Have you considered the possibility of sharing your refactored Pe code with the current Pe maintainers? I mean, before you remove too much from it :-P (Pe needs to keep being general purpose anb not C/C++ only).

    Take care, and thanks for your work!

  3. That's great news. I used BeOS back in the day or R5 and use Haiku as my main OS now. I'm tinkering with an application for haiku and use Paladin to program with. I love its speed and simplicity. I miss code completion, but since I'm new to the Haiku/BeOS API, the BeBook is my best friend.

  4. Since Paladin is wont to lock on me, I'd prefer having PalEdit as a separate app. Of course, having a stable Paladin would be even better... :) (In fact Paladin is the only annoying app that keeps crashing on me in Haiku... You said somewhere you have stability issues with Haiku. Are those known problems with open tickets? Would you like to write a bit more about that?)

    What would be nice is a search tool inside Paladin that finds strings in all project files. And, is it hard to have some kind of shortcut to the BeBook, like a context menu on a function that jumps to the right page in the BeBook?

  5. Sorry about the comment issues, guys. Anyway, there are a lot of things that I've ripped out that probably wouldn't be difficult to put back into Pe.

    Code completion is something that is #1 on my hit list of features -- I'm still trying to figure out how to do it, but reworking the editor has given me a start.

    The lockups that Paladin has are strictly limited to Haiku. Zeta and R5 have never had this problem, so it's been difficult to track down. I'm still working on it. I think it's a royal pain in the neck, but I'm also trying workarounds in the mean time. Nothing yet, though. :(

    Reference features and project searches are very high on the feature list, too. I really miss that a lot, but using the grep Tracker addon is a decent workaround until then.