-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.wiki.ui.language;\r
-\r
-import org.eclipse.mylyn.internal.wikitext.mediawiki.core.phrase.EscapePhraseModifier;\r
-import org.eclipse.mylyn.internal.wikitext.mediawiki.core.phrase.SimplePhraseModifier;\r
-import org.eclipse.mylyn.wikitext.core.parser.DocumentBuilder.SpanType;\r
-import org.eclipse.mylyn.wikitext.core.parser.markup.phrase.HtmlCommentPhraseModifier;\r
-import org.eclipse.mylyn.wikitext.core.parser.markup.phrase.LimitedHtmlEndTagPhraseModifier;\r
-import org.eclipse.mylyn.wikitext.core.parser.markup.phrase.LimitedHtmlStartTagPhraseModifier;\r
-\r
-/**\r
- * A markup language for <a href="http://www.mediawiki.org">MediaWiki</a> <a\r
- * href="http://en.wikipedia.org/wiki/Wikitext">Wikitext markup</a>, which is the wiki format used by <a\r
- * href="http://www.wikipedia.org>WikiPedia</a> and <a href="http://www.wikimedia.org/">several other major sites</a>.\r
- * \r
- * @author David Green\r
- * @since 1.0\r
- */\r
-@SuppressWarnings("restriction")\r
-public class MediaWikiLanguage extends org.eclipse.mylyn.wikitext.mediawiki.core.MediaWikiLanguage {\r
- public MediaWikiLanguage() {\r
- super();\r
- }\r
-\r
- @Override\r
- protected void addStandardPhraseModifiers(PatternBasedSyntax phraseModifierSyntax) {\r
- phraseModifierSyntax.beginGroup("(?:(?<=[\\s\\.,\\\"'?!;:\\)\\(\\{\\}\\[\\]])|^)(?:", 0); //$NON-NLS-1$\r
- phraseModifierSyntax.add(new EscapePhraseModifier());\r
- phraseModifierSyntax.add(new SimplePhraseModifier("'''''", new SpanType[] { SpanType.BOLD, SpanType.ITALIC }, //$NON-NLS-1$\r
- true));\r
- phraseModifierSyntax.add(new SimplePhraseModifier("'''", SpanType.BOLD, true)); //$NON-NLS-1$\r
- phraseModifierSyntax.add(new SimplePhraseModifier("''", SpanType.ITALIC, true)); //$NON-NLS-1$\r
- phraseModifierSyntax.endGroup(")(?=\\W|$)", 0); //$NON-NLS-1$\r
-\r
- boolean escapingHtml = configuration == null ? false : configuration.isEscapingHtmlAndXml();\r
-\r
- if (!escapingHtml) {\r
- String[] allowedHtmlTags = new String[] { // HANDLED BY LineBreakToken "<br>",\r
- // HANDLED BY LineBreakToken "<br/>",\r
- "b", "big", "blockquote", "caption", "center", "cite", "code", "dd", "del", "div", "dl", "dt", "em", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$ //$NON-NLS-13$\r
- "font", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "ins", "li", "ol", "p", "pre", "rb", "rp", "rt", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$ //$NON-NLS-13$ //$NON-NLS-14$ //$NON-NLS-15$ //$NON-NLS-16$ //$NON-NLS-17$\r
- "ruby", "s", "small", "span", "strike", "strong", "sub", "sup", "table", "td", "th", "tr", "tt", "u", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$ //$NON-NLS-13$ //$NON-NLS-14$\r
- "ul", "var", //$NON-NLS-1$ //$NON-NLS-2$\r
- "applet", "object", "embed" };\r
- phraseModifierSyntax.add(new LimitedHtmlEndTagPhraseModifier(allowedHtmlTags));\r
- phraseModifierSyntax.add(new LimitedHtmlStartTagPhraseModifier(allowedHtmlTags));\r
- phraseModifierSyntax.add(new HtmlCommentPhraseModifier());\r
- }\r
- }\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * 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
+ *
+ * Contributors:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.wiki.ui.language;
+
+import org.eclipse.mylyn.wikitext.mediawiki.internal.phrase.EscapePhraseModifier;
+import org.eclipse.mylyn.wikitext.mediawiki.internal.phrase.SimplePhraseModifier;
+import org.eclipse.mylyn.wikitext.parser.DocumentBuilder.SpanType;
+import org.eclipse.mylyn.wikitext.parser.markup.phrase.HtmlCommentPhraseModifier;
+import org.eclipse.mylyn.wikitext.parser.markup.phrase.LimitedHtmlEndTagPhraseModifier;
+import org.eclipse.mylyn.wikitext.parser.markup.phrase.LimitedHtmlStartTagPhraseModifier;
+
+/**
+ * A markup language for <a href="http://www.mediawiki.org">MediaWiki</a> <a
+ * href="http://en.wikipedia.org/wiki/Wikitext">Wikitext markup</a>, which is the wiki format used by <a
+ * href="http://www.wikipedia.org>WikiPedia</a> and <a href="http://www.wikimedia.org/">several other major sites</a>.
+ *
+ * @author David Green
+ * @since 1.0
+ */
+@SuppressWarnings("restriction")
+public class MediaWikiLanguage extends org.eclipse.mylyn.wikitext.mediawiki.MediaWikiLanguage {
+ public MediaWikiLanguage() {
+ super();
+ }
+
+ @Override
+ protected void addStandardPhraseModifiers(PatternBasedSyntax phraseModifierSyntax) {
+ phraseModifierSyntax.beginGroup("(?:(?<=[\\s\\.,\\\"'?!;:\\)\\(\\{\\}\\[\\]])|^)(?:", 0); //$NON-NLS-1$
+ phraseModifierSyntax.add(new EscapePhraseModifier());
+ phraseModifierSyntax.add(new SimplePhraseModifier("'''''", new SpanType[] { SpanType.BOLD, SpanType.ITALIC }, //$NON-NLS-1$
+ true));
+ phraseModifierSyntax.add(new SimplePhraseModifier("'''", SpanType.BOLD, true)); //$NON-NLS-1$
+ phraseModifierSyntax.add(new SimplePhraseModifier("''", SpanType.ITALIC, true)); //$NON-NLS-1$
+ phraseModifierSyntax.endGroup(")(?=\\W|$)", 0); //$NON-NLS-1$
+
+ boolean escapingHtml = configuration == null ? false : configuration.isEscapingHtmlAndXml();
+
+ if (!escapingHtml) {
+ String[] allowedHtmlTags = new String[] { // HANDLED BY LineBreakToken "<br>",
+ // HANDLED BY LineBreakToken "<br/>",
+ "b", "big", "blockquote", "caption", "center", "cite", "code", "dd", "del", "div", "dl", "dt", "em", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$ //$NON-NLS-13$
+ "font", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "ins", "li", "ol", "p", "pre", "rb", "rp", "rt", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$ //$NON-NLS-13$ //$NON-NLS-14$ //$NON-NLS-15$ //$NON-NLS-16$ //$NON-NLS-17$
+ "ruby", "s", "small", "span", "strike", "strong", "sub", "sup", "table", "td", "th", "tr", "tt", "u", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$ //$NON-NLS-13$ //$NON-NLS-14$
+ "ul", "var", //$NON-NLS-1$ //$NON-NLS-2$
+ "applet", "object", "embed" };
+ phraseModifierSyntax.add(new LimitedHtmlEndTagPhraseModifier(allowedHtmlTags));
+ phraseModifierSyntax.add(new LimitedHtmlStartTagPhraseModifier(allowedHtmlTags));
+ phraseModifierSyntax.add(new HtmlCommentPhraseModifier());
+ }
+ }
}
\ No newline at end of file