blob: 61a4ed177dca86865c73f02db019810b3c0652b0 [file] [log] [blame]
package org.eclipse.dltk.ui.text.blocks;
import org.eclipse.dltk.ui.text.util.TextUtils;
public class Keyword {
private final String text;
private final Recognition recognition;
private final KeywordRole role;
public Keyword(String text, KeywordRole role, Recognition recognition) {
this.text = text;
this.role = role;
this.recognition = recognition;
}
public KeywordRole getRole() {
return role;
}
public String getText() {
return text;
}
public String getPattern() {
return recognition.decorateRegularExploression(TextUtils.Pattern_quote(text));
}
public Recognition getRecognition() {
return recognition;
}
public String toString() {
return text;
}
}