XML Mode

Post any comments, suggestions, annoyances or ideas for future releases here. Please do not post bug reports or questions here.
Post Reply
amix

XML Mode

Post by amix » Wed Apr 13, 2005 4:49 pm

Hi!

I am missing an XML mode to Zeus.

Namely a representation of the current document in a tree-hirarchy and a more sophisticated syntax-highlighter, though, it might very well be, that the latter one could be configured by me, I don't know how, yet.

The code-folding and the tree-view are similare to each other. Both would be good to have (so one can quickly travel through the document) but one of both might be sufficient.

As I see the Workplace-Pane already handles tree-views. Wouldn't it be good to enable an additional such tab for HTML and XML documents, parsing the tree-structure ? ;-)

As for the syntax-highlighter it would be nice, if class and id could be shown in another color as well as CDATA blocks.^

A combined XML/Javascript highlighter would be a bomb, of course :-)

Guest

Post by Guest » Thu Apr 14, 2005 1:07 am

Hi Amix,
Namely a representation of the current document in a tree-hirarchy
Zeus by design, tries to be very generic and by this I mean it tries to not favour one language over another. The net result is Zeus is missing many language specific features :(

But image if Zeus tried to be a specialized editor for XML, Python, Perl, Ruby, Lua etc. It would turn into an editor with lots of features, but many features would only work for one particular language. Such an editor would not only be very confusing to the user, it would be a nightmare to configure and to maintain. For these reason Zeus leaves the specialized language features to the specialized language editors :)

But that is not to say such features will never get added to Zeus. The rule is all requests for new features are considered but the language generic features get the first priority.
and a more sophisticated syntax-highlighter
There is no denying that this is a problem :( The current highlighter does not do XML highlighting as well as it should :(
though, it might very well be, that the latter one could be configured by me
It is definitely worth while tweaking the current settings.
Both would be good to have (so one can quickly travel through the document) but one of both might be sufficient.
The current Zeus release offers a few features to help with document navigation. For example the code folding offers two keyboard functions to help navigate between the folds:

Code: Select all

FoldingFindNext     - Move the cursor to the next line fold location.
FoldingFindPrevious - Move the cursor to the previous line fold location.
Another option might be the using the function regular expression feature. As an example if the (name[ ]*=)|(attribute[ ]*=) regular expression was added to the XML document type, this would define any line containing name= or attribute= to be a function. This would mean the View, Function List, Function Next and Function Previous menu items could then be used to navigate the document for these lines.
As I see the Workplace-Pane already handles tree-views. Wouldn't it be good to enable an additional such tab for HTML and XML documents, parsing the tree-structure?
I agree the Zeus XML and HTML support definitely does need some improvements. So when time is found to do this re-work, this feature request will also get investigated :)
A combined XML/Javascript highlighter would be a bomb, of course
This is defintiely one of the long term plans. The current Zeus document type model works quite well, but a better approach would be to allow a document type to be defined as one or more document types.

Jussi

amix

Post by amix » Tue May 10, 2005 7:34 am

Anonymous wrote:Hi Amix,
Namely a representation of the current document in a tree-hirarchy
But image if Zeus tried to be a specialized editor for XML, Python, Perl, Ruby, Lua etc. It would turn into an editor with lots of features, but many features would only work for one particular language. Such an editor would not only be very confusing to the user, it would be a nightmare to configure and to maintain. For these reason Zeus leaves the specialized language features to the specialized language editors :)
I *hate* specialized language editors ;-) That is why I am evaluating Zeus. I also hate text-widgets within mail-user-agents, but that just as a side-note. One editor should be enough and all specialities should be a configuration. Like Email-mode, HTML-mode, XML-mode, C-mode, Python-mode, etc. The nicest and most powerful (besides Emacs) editor I have ever used (and I tried a *lot* is GoldED for AmigaOS. http://golded.dietmar-eilert.de uhm, seems to be offline now). However, since AmigaOS is gone, I need to find something else.
As I see the Workplace-Pane already handles tree-views. Wouldn't it be good to enable an additional such tab for HTML and XML documents, parsing the tree-structure?
I agree the Zeus XML and HTML support definitely does need some improvements. So when time is found to do this re-work, this feature request will also get investigated :)[/quote]

:) What I meant to say was nothing too sophisticated. I do not know how you have implemented internal representation of the document within the editor. I could imagine, that it would be possible to create hooks to each line of text and represent it similare to a DOM within Zeus. I am not talking of a DOM the user could use, but as soon all the text is being represented hirarchically within Zeus plugin-programmers could use this hirarchy and transform it. (like applying regexp on every single line and do the logic in the plugin). Parsing of an XML document and displaying it as a tree shouldn't be too difficult and having the editor jump to line-numbers in sync might be easy then. Don't you have already jump to linenumbers for debuggers ? If I remember correctly... It would not be too different from it. And as soon you'd have an index to the text, you also could implmenet something to set breakpoints with the mouse.. uhm, ahm... ;-)

Anyway, I like Zeus already a lot. You seem to do it with love, and that makes using it a loveley task.

Thanks, l8er.
Andreas

Guest

Post by Guest » Wed May 11, 2005 2:05 am

Hi Andreas,
Parsing of an XML document and displaying it as a tree shouldn't be too difficult and having the editor jump to line-numbers in sync might be easy then.
This is definitely how I see this feature working. In general the information contained in the Workspace/Class Browser/Files navigator is nothing more than a collection of tree nodes with each node containing some text, a line number and a file name. I would imagine an new XML pane in this navigator would do nothing more than parse the currently active XML file and create the tree nodes using this parse information.

This would definitely be nice feature to have and I agree it should not be too difficult to implement. But at present the current focus is on improving the intellisensing, by adding support for multiple extenal tag databases and this is taking up all of the development effort :(

When the intellisensing is done and the next version released, once again there will be more time to look at this and many other new features :)

Cheers Jussi

Post Reply
kuchnie warszawa opinie

Who is online

Users browsing this forum: No registered users and 4 guests