Mylyn WikiText

org.eclipse.mylyn.wikitext.core.parser.markup
Class DefaultIdGenerationStrategy

java.lang.Object
  extended by org.eclipse.mylyn.wikitext.core.parser.markup.IdGenerationStrategy
      extended by org.eclipse.mylyn.wikitext.core.parser.markup.DefaultIdGenerationStrategy

public class DefaultIdGenerationStrategy
extends IdGenerationStrategy

A default ID generation strategy which removes all non-alphanumeric characters from the heading text to produce an id.

Since:
1.0
Author:
David Green

Constructor Summary
DefaultIdGenerationStrategy()
           
 
Method Summary
 String generateId(String headingText)
          produce an id for use in an HTML anchor from heading text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultIdGenerationStrategy

public DefaultIdGenerationStrategy()
Method Detail

generateId

public String generateId(String headingText)
Description copied from class: IdGenerationStrategy
produce an id for use in an HTML anchor from heading text.

Specified by:
generateId in class IdGenerationStrategy
Parameters:
headingText - the text of the heading
Returns:
an Id, or null if no Id could be computed from the given text

Mylyn WikiText

Copyright © 2007, 2009 David Green and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html