Skip to main content



      Home
Home » Eclipse Projects » Mylyn » [wikitext] id in HeadingBlock
[wikitext] id in HeadingBlock [message #759175] Sun, 27 November 2011 06:11 Go to next message
Eclipse UserFriend
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 14:15 Go to previous message
Eclipse UserFriend
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:Integrating a plugin with Mylyn
Goto Forum:
  


Current Time: Wed Jun 18 17:49:32 EDT 2025

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

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

Back to the top