Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
div
classnavigation
HTML Table
width100%
Table Row (tr)
Table Cell (td)
Align
alignleft
Previous
span
classsep
|
span
classtext
Prerequisites
Table Cell (td)
Align
aligncenter
Top
span
classsep
|
span
classtext
Custom Language Support
Table Cell (td) Align
alignright
Next
span
classsep
|
span
classtext
Grammar and Parser Wiki Markup
{div:class=navigation}
{table:width=100%}
 {tr}
  {td} {align:left}[Previous|Prerequisites] {span:class=sep}\|{span} {span:class=text}Prerequisites{span}{align} {td}
  {td} {align:center}[Top|Custom Language Support] {span:class=sep}\|{span} {span:class=text}Custom Language Support{span}{align} {td}
  {td} {align:right}[Next|Grammar and Parser] {span:class=sep}\|{span} {span:class=text}Grammar and Parser{span}{align} {td}
 {tr}
{table}
{div}

1. Define a language

Code Block
package com.simpleplugin;

import com.intellij.lang.Language;

public class SimpleLanguage extends Language {
    public static final SimpleLanguage INSTANCE = new SimpleLanguage();

    private SimpleLanguage() {
        super("Simple");
    }
}

2. Define an icon

Copy the icon to

span
classid
Wiki Markup
{span:class=id}com.simpleplugin.icons{span}
package.

Code Block
package com.simpleplugin;

import com.intellij.openapi.util.IconLoader;

import javax.swing.*;

public class SimpleIcons {
    public static final Icon FILE = IconLoader.getIcon("/com/simpleplugin/icons/jar-gray.png");
}

...

Create a file with extension

.simple
span
classid
Wiki Markup
{span:class=id}.simple{span}
and IntelliJ IDEA will automatically associate it with our language.

div
classnavigation
HTML Table
width100%
Table Row (tr)
Table Cell (td)
Align
alignleft
Previous
span
classsep
|
span
classtext
Prerequisites
Table Cell (td)
Align
aligncenter
Top
span
classsep
|
span
classtext
Custom Language Support
Table Cell (td) Align
alignright
Next
span
classsep
|
span
classtext
Grammar and Parser Wiki Markup
{div:class=navigation}
{table:width=100%}
 {tr}
  {td} {align:left}[Previous|Prerequisites] {span:class=sep}\|{span} {span:class=text}Prerequisites{span}{align} {td}
  {td} {align:center}[Top|Custom Language Support] {span:class=sep}\|{span} {span:class=text}Custom Language Support{span}{align} {td}
  {td} {align:right}[Next|Grammar and Parser] {span:class=sep}\|{span} {span:class=text}Grammar and Parser{span}{align} {td}
 {tr}
{table}
{div}