Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mylyn » [wikitext] id in HeadingBlock
[wikitext] id in HeadingBlock [message #759175] Sun, 27 November 2011 11:11 Go to next message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 118
Registered: November 2010
Senior Member
I am working on Bug 291239: Google WikiSyntax for Wikitext.

As I looked in the other syntax implementation, I wonder why they add an I to the heading block (using the IdGenerator):

final Attributes attributes = new Attributes();
if (attributes.getId() == null) {
	attributes.setId(state.getIdGenerator().newId("h" + level, text)); //$NON-NLS-1$
}
builder.beginHeading(level, attributes);


I can imagine this is used in the Outline View (using the editor) or for ToC in some format like Docbook or EclipseHelp... Is this correct? Should I also add this id, or can I ignore it?

Thanks for your answer.
Re: [wikitext] id in HeadingBlock [message #759221 is a reply to message #759175] Sun, 27 November 2011 19:15 Go to previous message
David Green is currently offline David Green
Messages: 135
Registered: July 2009
Senior Member
Jeremie,

I recommend setting the Id. The id is useful when generating table of
contents or linking in other ways.

David

On 11/27/2011 3:11 AM, Jeremie Bresson wrote:
> I am working on https://bugs.eclipse.org/bugs/show_bug.cgi?id=291239.
>
> As I looked in the other syntax implementation, I wonder why they add an
> I to the heading block (using the IdGenerator):
>
> final Attributes attributes = new Attributes();
> if (attributes.getId() == null) {
> attributes.setId(state.getIdGenerator().newId("h" + level, text));
> //$NON-NLS-1$
> }
> builder.beginHeading(level, attributes);
>
>
> I can imagine this is used in the Outline View (using the editor) or for
> ToC in some format like Docbook or EclipseHelp... Is this correct?
> Should I also add this id, or can I ignore it?
>
> Thanks for your answer.
>
Previous Topic:PHP Explorer is ghosted / greyed out
Next Topic:Task list position lost after update to task
Goto Forum:
  


Current Time: Mon Sep 22 12:26:30 GMT 2014

Powered by FUDForum. Page generated in 0.09464 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software