AsciiDoc support in Eclipse

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

AsciiDoc support in Eclipse

mojavelinux
Administrator
Preliminary AsciiDoc support is coming to Eclipse (Mylyn Wiki Extras) led by @maxandersen from Red Hat. For details see https://wiki.eclipse.org/Mylyn/WikiText/AsciiDoc.

Keep in mind that this requires creating a completely new parser for AsciiDoc, which increases the importance of establishing a formal AsciiDoc grammar ({1}, {2}) and test suite (perhaps building on {3}).

Exciting times!

Reply | Threaded
Open this post in threaded view
|

Re: AsciiDoc support in Eclipse

jasondlee
Why does it need a new parser? Is the JRuby wrapper insufficient/unacceptable? More importantly, is this a pure-Java implementation? I would LOVE to be able to reduce the dependencies I need to process Asciidoc in Java.

On 5/19/15 4:34 PM, mojavelinux [via Asciidoctor :: Discussion] wrote:
Preliminary AsciiDoc support is coming to Eclipse (Mylyn Wiki Extras) led by @maxandersen from Red Hat. For details see https://wiki.eclipse.org/Mylyn/WikiText/AsciiDoc.

Keep in mind that this requires creating a completely new parser for AsciiDoc, which increases the importance of establishing a formal AsciiDoc grammar ({1}, {2}) and test suite (perhaps building on {3}).

Exciting times!




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/AsciiDoc-support-in-Eclipse-tp3239.html
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML

-- 
Jason Lee
http://cubtracker.com 
http://blogs.steeplesoft.com
http://twitter.com/jasondlee
http://blogs.steeplesoft.com/+
http://blogs.steeplesoft.com/in
Reply | Threaded
Open this post in threaded view
|

Re: AsciiDoc support in Eclipse

mojavelinux
Administrator
On Tue, May 19, 2015 at 3:42 PM, jasondlee [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Why does it need a new parser?

Essentially a requirement of being part of Mylyn WikiText. In addition, it has a vastly different AST and processing lifecycle, so of it has to be redone anyway. That said, I don't actually know all the details.
 
 More importantly, is this a pure-Java implementation?

Yes.
 
I would LOVE to be able to reduce the dependencies I need to process Asciidoc in Java.

It's both a blessing and a curse, atm. It's a blessing because we do want a pure Java implementation in the long run. It's a curse because there still isn't a clear grammar for AsciiDoc, so there's a big risk of parsing inconsistencies. It also took me over a year to get the parsing in Asciidoctor nearly consistent with AsciiDoc Python (and another year for edge cases)...so it's a long road. But those aren't reasons not to do it. We must do it. It's just going to be a journey.

-Dan


--
Reply | Threaded
Open this post in threaded view
|

Re: AsciiDoc support in Eclipse

mojavelinux
Administrator
In reply to this post by jasondlee

On Tue, May 19, 2015 at 4:53 PM, Dan Allen <[hidden email]> wrote:
so of it has to be redone anyway.

Correction: a lot of it has to be redone anyway.


--
Reply | Threaded
Open this post in threaded view
|

Re: AsciiDoc support in Eclipse

Jeremie Bresson
In reply to this post by mojavelinux
Before anyone gets overexited, I want to quote myself (see Eclipse Bug 418563):

Keep in mind that the current WikiText model is not enough to express all what you can express with asciidoc. This will be a problem. A possibility is to implement the subset of asciidoc corresponding to what Wikitext can handle.
The WikiText engine is based on regex, and I am not sure if it is possible to exchange this parser/engine. The types of blocs handled by WikiText are also limited. I am also not sure how an Asciidoc macro can be integrated in the WikiText Framework.

I think that starting as a Language in the WikiText framework is a good approach to start, but not a solution on the long time.

I dream of an Eclipse Editor capable of:
• Display inline warning, errors…
• Being able to jump (CTRL Click or F3) to another file (include directive and or xref)
• CTRL Shift G to know where an adoc file is used.
• I would also like to have buttons or shortcuts for some action (setting the selected text to bold -> this should box the selected text between "*")

This will probably be the result of a specialized eclipse editor…

I agree with mojavelinux: "Exciting times!" & "it's a long road"
Reply | Threaded
Open this post in threaded view
|

Re: AsciiDoc support in Eclipse

gour
In reply to this post by mojavelinux

mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> writes:

> It's both a blessing and a curse, atm. It's a blessing because we do want a
> pure Java implementation in the long run.

Do you mean you want to *have* it or to *be* in Java?

Iow, I understand enterpricey needs for Java implementation, but I prefer
using Ruby version or, even better, Golang one being easier for deploying.


Reply | Threaded
Open this post in threaded view
|

Re: AsciiDoc support in Eclipse

maxandersen
In reply to this post by Jeremie Bresson
Hi,

I'm the one writing most of the asciidoc support in eclipse.

A few things:

My *primary* goal for this was to get a decent editor and okey preview in Eclipse.

Anything beyond that is secondary.

For that I do not think there is any problem - at least so far I have not found anything in asciidoc that can't be handled.

Asciidoc is actually very regular and afaics fully block based.

Very little nesting if anything.

Thus not sure why you are concerned about regular expression based parser? (which btw. can be fully changed if a language want to - the "common ground" is the DocumentBuilders)

...with all that said:

wikitext has both ant and maven tasks and I actually think we can get pretty close to full asciidoc support. At least on based on my current findings.

Btw. nice feature of wikitext is that it has support for converting to its other wiki formats - so it also works like a basic  
converter.

If you can point out which part of asciidoc you don't think can be handled in wikitext I would be glad to know ;)
Reply | Threaded
Open this post in threaded view
|

Re: AsciiDoc support in Eclipse

maxandersen
In reply to this post by jasondlee
it is pure java - does not even require eclipse.

And I tried using jruby - it is just waaaaaay too slow and its dependency chain has no chance of being allowed into eclipse IDE anytime soon.

Hence why I took the wikitext approach.

Reply | Threaded
Open this post in threaded view
|

Re: AsciiDoc support in Eclipse

maxandersen
In reply to this post by maxandersen
bump ?
Reply | Threaded
Open this post in threaded view
|

Re: AsciiDoc support in Eclipse

mojavelinux
Administrator
In reply to this post by Jeremie Bresson

On Wed, May 20, 2015 at 12:18 AM, Jeremie Bresson [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I dream of an Eclipse Editor capable of:
• Display inline warning, errors…
• Being able to jump (CTRL Click or F3) to another file (include directive and or xref)
• CTRL Shift G to know where an adoc file is used.
• I would also like to have buttons or shortcuts for some action (setting the selected text to bold -> this should box the selected text between "*")

I really like these ideas. I've started a page on the wiki where we can record all these ideas for tool creators.


Feel free to add to it.

-Dan

--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen
Reply | Threaded
Open this post in threaded view
|

Re: AsciiDoc support in Eclipse

mojavelinux
Administrator
In reply to this post by gour

On Wed, May 20, 2015 at 1:51 AM, gour [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Do you mean you want to *have* it or to *be* in Java?

Iow, I understand enterpricey needs for Java implementation, but I prefer
using Ruby version or, even better, Golang one being easier for deploying.

I think we want multiple implementations for the same reason we want multiple implementations for the very reasons you mention. Different implementations are needed for different scenarios.

I do think that the Ruby implementation will very likely always be the reference implementation, but even that could change one day. The future is like that. 

-Dan


--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen
Reply | Threaded
Open this post in threaded view
|

Re: AsciiDoc support in Eclipse

mojavelinux
Administrator
In reply to this post by maxandersen
On Sun, May 24, 2015 at 2:27 PM, maxandersen [via Asciidoctor :: Discussion] <[hidden email]> wrote:

I'm the one writing most of the asciidoc support in eclipse.

Thanks Max! I really appreciate your work and for helping to bring AsciiDoc into Eclipse.
 

My *primary* goal for this was to get a decent editor and okey preview in Eclipse.

+1
 

For that I do not think there is any problem - at least so far I have not found anything in asciidoc that can't be handled.

I actually think we can get pretty close to full asciidoc support. At least on based on my current findings.

That's great news!
 

Btw. nice feature of wikitext is that it has support for converting to its other wiki formats - so it also works like a basic  
converter.

Such a powerful feature.


If you can point out which part of asciidoc you don't think can be handled in wikitext I would be glad to know ;)

On a quick glance, here's what I see with the latest nightly (2.7.0.N20151015-1452)

* description lists aren't being processed (open issue #481670)
* listing block with [source,<language>] above it isn't being recognized (open issue #474084)
  ** it would be really cool if source highlighting worked inside the listing block
* indented paragraph is not being interpreted as a literal block
* not processing role on inline text like [path]_path/to/file_ (the [path] part)
* not processing list continuation (attach blocks to a list item)
* not processing admonition on a paragraph (paragraph that starts with NOTE:, TIP:, etc)
* preview is missing a nice stylesheet

I'd be happy to file issues if you prefer.

Perhaps we should add a link to it along with some instructions on the asciidoctor.org site so that we can get more people trying it out. https://github.com/asciidoctor/asciidoctor.org/issues/440

-Dan

--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen
Reply | Threaded
Open this post in threaded view
|

Re: AsciiDoc support in Eclipse

Albert T.
Hi at all...

there is a another eclipse plugin for asciidoctor available since march 2018:
https://marketplace.eclipse.org/content/asciidoctor-editor

There is a YouTube Video List available with some videos showing the editor in action.

Here some screenshots (from eclipse marketplace)

Example3
Example2

It's currently marked as beta but it works.