Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] TextMate grammar and hyperlinks

Hi Mike

Grammars in Orion currently do not allow hyperlinks to be generated, only CSS class names (which are derived from the grammar's "name" rules).

I believe hyperlinks could be contributed by writing an async highlight provider that produces the appropriate style ranges. A range having this shape would probably work:

{
  tagName: "a",
  attributes: {
    href: "http://example.org"
  }
  // 'start' and 'end' fields omitted.
  // Ranges produced by an async highlighter must be be bundled inside a StyleReadyEvent object -- see docs
}

However I have not tested this.

Mark


On Tue, Nov 5, 2013 at 2:03 PM, Mike Kucera <mkucera@xxxxxxxxxx> wrote:

Hi,

I'm working on a COBOL grammar for use with the orion.editor.TextMateStyler and I have one question: how do I create ctrl-click hyperlinks? I think I need to somehow attach a 'href' attribute to the style object but I don't know how to do that from the grammar.

Thanks.


Mike Kucera
Rational Developer for AIX and Linux
IBM Toronto Lab
mkucera@xxxxxxxxxx
 
 


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


GIF image

GIF image


Back to the top