Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] HTML content assist

hey, this is really cool! Couple of comments...
- don't forget to reload the web editing plugin to get the functionality
- Our CSS and JS support is in the editor plugin, presumably so that editor consumers could get the content assist without having to have the rest of the Orion client. So I wonder if your content assist should live there? I suppose Mark will have guidance when he returns.

Nice work...You are right, it is straightforward. (It motivates me to beef up the CSS content assist to include css3 keywords, media queries, property suggestions.)

susan

Inactive hide details for John Arthorne ---12/16/2011 01:49:53 PM---I just released basic HTML content assist in master. It relJohn Arthorne ---12/16/2011 01:49:53 PM---I just released basic HTML content assist in master. It relies on some fixes/enhancements to the co

From: John Arthorne <John_Arthorne@xxxxxxxxxx>
To: orion-dev@xxxxxxxxxxx
Date: 12/16/2011 01:49 PM
Subject: [orion-dev] HTML content assist
Sent by: orion-dev-bounces@xxxxxxxxxxx





I just released basic HTML content assist in master. It relies on some fixes/enhancements to the content assist infrastructure that is also in master, so you will need all the latest and greatest client code to run it. Some notes:

- It currently just auto-completes on HTML element names. It doesn't fill in attributes except for some of the most common cases (image, anchor)
- Only the elements in the HTML 5 spec are included
- For elements that typically start a multi-line block, it will insert a new line and appropriate indentation
- For elements that have a closing tag, the completion will position the cursor between the open/close elements. For empty elements like <br>, <hr>, etc, it positions the cursor at the end
- If you hit Ctrl+Space in a completely empty HTML file it will auto-complete a basic well-formed HTML5 document (good for demos!)

I'll probably keep hacking on it next week, but in the meantime feel free to try it out and report bugs/enhancements against Orion > Client in bugzilla.

As an aside, I think this was good validation of how easy to use the Orion language extension model is. I just had to write one 130 line script that generated all the proposals, and the orion infrastructure did all the rest of the work. Most of our content assist before now was just flat lists of keywords, but writing a more context aware proposal engine with indentation, cursor positioning, etc, was not a big step up. For anyone curious, here is the complete source:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/tree/bundles/org.eclipse.orion.client.core/web/plugins/webEditingPlugin/htmlContentAssist.js

John_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev

GIF image


Back to the top