|
From: Matthieu C. <cho...@gm...> - 2010-11-23 08:13:55
|
Hi, some more responses inline 2010/11/22 Aaron Digulla <di...@he...>: > Am 22.11.2010 20:59, schrieb Alan Ezust: >>> So I'm willing to give jEdit a try now. Some questions: >>> >>> - Is it correct that the current TextPane can't handle embedded objects? >> >> The TextArea is embedded in an EditPane. >> There are TextAreaExtensions that can be offered by plugins. >> What do you mean by embedded objects? > > Images, buttons, etc. Not it is not possible at this time. > Can jEdit work with proportional fonts? Does word wrap work as expected > or does it wrap only at character positions? I don't think it is possible to mix fonts in the TextArea yet, it would require several changes in jEdit's core, and probably plugins. >> Anything is "possible", I suppose. >> We usually start with a specific feature request, and it turns into a >> plugin or a patch. There are other plugins that offer >> TextAreaExtensions that might help you get where you need (see >> CandyFolds, for example) and if the TextAreaExtension needs to be >> extended to do something we haven't thought about, then you can make >> a feature request or submit a plugin or patch. We recommend writing >> as much as possible of your idea in a separate plugin, which you can >> add to our SVN code repository at any time. > > Sounds good. > >>> - Can I update the styles asynchronously? Spell checking is slow; I plan >>> to run this in a background task starting with the current line, then >>> the first line on the screen and then the whole text. Is there an >>> example how I can add styles to the text from a background task? >>> >>> - Is it possible to stack text styles in jEdit? >> >> Do you mean push and pop different TextArea font settings on a stack? > > No, I mean styles like underline, italics, bold, colors. How flexible is > the renderer? Do I have to merge the styles myself or can I say "I want > the characters 10-20 bold and 5-15 italics and underline 10-25" in three > different style objects and the renderer will draw them on top of each > other, taking care of overlaps, etc.? It is not possible yet. I think using different font size is one thing, and using bold, italic, underline is another one. First the text is tokenized, I don't think we can change that, but jEdit could be extended so that it would be possible to override the style of a specific portion of the text (it would be nice, so the text color or style could be changed according to the parsers for example) > >>> - Would it be possible to move the code into a directory src/? I'm >>> working with unit tests and I don't want to mix them with the production >>> code. >> >> What code are you talking about exactly? unit tests or something else? > > I'm talking about the jEdit sources. In my projects, I put the code > under src/ and all the tests under test/. That way, it is simple to keep > them separate, compile source before the tests, run all the tests, etc. > > Do you have any unit tests? Where are they? > >> Are you writing a plugin? or some enhancement to jEdit core? > > I was thinking about working on the core but if I can do everything I > need with a plugin, that's OK, too. But I'm pretty sure I'll need some > changes in the core... > >>> - I noticed that all text actions are methods in the TextArea class. >>> What do you think about creating actions for them? >> >> You mean Swing Actions? Because this code predates Swing and Slava had >> to come up with his own way of serializing actions to/from XML and >> beanshell in order to make macros and actions work. > > Are there plans to turn TextArea.backspace() into an action? (doesn't > have to be based on Swing actions) TextArea is a pretty big class and > I'd cut it down. I don't understand this one, backspace() is already an action in textarea-actions.xml <ACTION NAME="backspace"> <CODE> textArea.backspace(); </CODE> </ACTION> And about those actions in xml, another reason are the plugins. In the plugin loading mechanism, a plugin can be loaded but not started. In that case, jEdit reads the actions.xml to know what are the actions, but do not load the classes. The classes of the plugin are loaded by the ClassLoader only if one of those actions is called Matthieu |