Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 370259

Summary: Create a web tools plug-in containing HTML language tools
Product: [ECD] Orion Reporter: Susan McCourt <susan>
Component: ClientAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, john.arthorne, mamacdon, Michael_Rennie
Version: 0.4   
Target Milestone: 6.0 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Susan McCourt CLA 2012-01-31 13:35:35 EST
I opened
bundles/org.eclipse.orion.client.core/about.html

There is no outline showing and no failure in the console.  (content type issue?)
Comment 1 John Arthorne CLA 2012-01-31 13:49:47 EST
Are you using the HTML outline plugin:

http://jarthorn.github.com/html-tools/htmlOutlinePlugin.html

Or just using built in outline?
Comment 2 Mark Macdonald CLA 2012-01-31 17:32:17 EST
You're probably seeing the weird element-ID-based outline produced by jslint. Our about.html's don't have any IDs in them so the outline appears empty.
Comment 3 Susan McCourt CLA 2012-01-31 21:34:10 EST
(In reply to comment #2)
> You're probably seeing the weird element-ID-based outline produced by jslint.
> Our about.html's don't have any IDs in them so the outline appears empty.

yes.  For some reason I thought html outline was part of the build now.  But maybe I was thinking of CSS lint.
Comment 4 John Arthorne CLA 2012-02-01 09:31:00 EST
The HTML tools plugin is currently here:

https://github.com/jarthorn/html-tools

We should consider distributing this as part of Orion. I'll repurpose this bug for that, since there is no particular problem with about.html (apart from lack of element ids).

It uses a third party library for html parsing, that we'll need a CQ for. I was holding off a bit because I'm not certain if this is the best HTML parser to settle on. One drawback is that it fails badly on malformed HTML, but I don't know of any recoverable HTML parsers written in JavaScript.

I'll leave this bug open to make a decision about it.
Comment 5 Michael Rennie CLA 2014-03-21 10:37:30 EDT
Since we want to get rid of jslint (bug 403301), we will need to adopt other tools to lint / outline HTML.
Comment 6 Michael Rennie CLA 2014-03-21 11:11:58 EDT
*** Bug 421868 has been marked as a duplicate of this bug. ***
Comment 7 Curtis Windatt CLA 2014-03-27 15:47:56 EDT
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/?h=cwindatt%2FBug370259_AddHTMLPluginToClient
Branch for my work, bundle there is functioning correctly

From https://wiki.eclipse.org/Orion/How_Tos/How_to_write_an_Orion_SDK_plugin
Still need to do the following:
- Update the ant build file (couldn't find any bundle specific entries there)
- Update the server build

For the outliner/parser:
https://github.com/tautologistics/node-htmlparser - This is the one John is using currently, no recent updates
https://github.com/blowsie/Pure-JavaScript-HTML5-Parser - Uses a SAX style API, has merged several pull requests in the past few months
https://github.com/nzakas/parser-lib - Description calls this a collection of parsers, but the readme only talks about a CSS parser (which we may want in the future anyways).
Comment 8 Mark Macdonald CLA 2014-03-27 16:07:34 EDT
(In reply to Curtis Windatt from comment #7)
> From https://wiki.eclipse.org/Orion/How_Tos/How_to_write_an_Orion_SDK_plugin
> Still need to do the following:
> - Update the ant build file (couldn't find any bundle specific entries there)
> - Update the server build
> 

Ahh.. this wiki page is out of date. Getting new JS modules into the build is described here:

https://wiki.eclipse.org/Orion/Releng_Builds#Minification

I'll update the SDK plugin wiki entry.
Comment 9 Curtis Windatt CLA 2014-04-09 17:04:08 EDT
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/?h=cwindatt%2FBug370259_WebToolsPlugin
I ended up having to create a new branch to merge the change with the master branch (conflicts as well as fatal errors occurred).

Tomorrow I will have to do:
1) Test in the Orion client
2) Make the server side changes
3) Get someone familiar with the build (Mark?) to review the changes
4) Delete the old topic branch
Comment 11 Michael Rennie CLA 2014-04-14 12:43:27 EDT
(In reply to Curtis Windatt from comment #10)
> http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/
> ?id=3cafe6e3276a4f291426becfcbe80087761c3140
> 
> http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/
> ?id=aa6d7912099d682c2e3080ccea8543d3b6b837e9
> 
> http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/
> ?id=5ad7fe4315c28114878544422a7e23149e73721b
> 
> Merged with master, Mark is making some final build/server side touchups.

Looks like it is all working now. We can open any additional enhancements in their own bugs, like bug 432760