blob: 832bafe1bdbdfd7f61ea11b39c9fb48159cf06c2 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
* 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:
* Istvan Rath - initial API and implementation
*******************************************************************************/
package org.eclipse.viatra2.editor.text.light;
public interface IVTEConstants
{
public static String[] vtmlKeywords= {
"namespace","import","instanceOf",
"typeOf","supertypeOf","subtypeOf",
"isFinalType","isAggregation","isAnySource",
"isAnyTarget","inverse","multiplicity",
"true","false","entity","relation",
"many_to_many","many_to_one","one_to_many",
"one_to_one"};
public static String[] vtmlimpkeyid= {
"import","instanceOf","typeOf",
"supertypeOf","subtypeOf",
"isFinalType","isAggregation","isAnySource",
"isAnyTarget","inverse","multiplicity",
"true","false","entity","relation"
};
public static String[] vtmlkeyid= {
"instanceOf","typeOf",
"supertypeOf","subtypeOf",
"isFinalType","isAggregation","isAnySource",
"isAnyTarget","inverse","multiplicity",
"true","false","entity","relation"
};
public static String[] vtmlinsideMult =
{
"many_to_many","many_to_one","one_to_many",
"one_to_one"
};
public static String[] vtmltruefalse =
{
"true","false"
};
// what about ref(), toDouble() etc? they are not native functions, are they keywords?...
public static String[] vtclKeywords= {
"namespace", "import","instanceOf","typeOf","supertypeOf",
"subtypeOf", "contains","entity","relation",
"undef","true","false",
"many_to_many","many_to_one","one_to_many","one_to_one",
"rule","fail","in","out","inout",
"update","seq","print","println","log","fatal","error","warning",
"info","exists","try","if","else","parallel",
"random","forall","with","do","below","apply","choose",
"iterate","let","call","new","delete","setValue","rename",
"move","setFrom","setTo","copy","asmfunction","gtrule",
"precondition","postcondition","action","find","pattern",
"or","check","neg","transformation","machine","skip",
"setAnySource","setAnyTarget","setMultiplicity","setAggregation",
"setInverse", "shareable", "copy_boundary_edges", "skip_boundary_edges"};
public static String[] vtcloutside1 = {
"namespace","import","transformation","machine"};
public static String[] vtcloutside2 = {
"import","transformation","machine"
};
public static String[] vtcloutside3 = {
"transformation","machine"
};
public static String[] vtclinasmdef = {
"rule","gtrule","asmfunction","pattern"
};
public static String[] vtclinrulebody = {
"update","seq","print","println","log","exists","try","if","else","parallel",
"random","forall","with","do","below","apply","choose",
"iterate","let","call","new","delete","setValue","rename",
"move","setFrom","setTo","copy","fail","setAnySource",
"setAnyTarget","setMultiplicity","setAggregation","setInverse"
};
public static String[] vtclingtrule = {
"precondition","postcondition","action"
};
public static String[] vtclingtpatternbody = {
"instanceOf","typeOf","supertypeOf",
"subtypeOf","check","neg","find","pattern"
};
public static String[] vtclafterfind = {
"in","below"
};
public static String[] vtclafterapply = {
"in","below"
};
public static String[] vtclafterprepostc = {
"find","pattern"
};
public static String[] vtclinlogrule = {
"fatal","error","warning","info","debug"
};
public static String[] vtclin = {
"in"
};
public static String[] vtclinforall = {
"with","do"
};
public static String[] vtclinbelow = {
"in","below"
};
public static String[] vtclinout = {
"in","out","inout"
};
String DEFAULT = "default";
String KEYWORD = "keyword";
String STRING = "string";
String COMMENT = "comment";
String PREFIX = "VTMLEditor" + ".";
String PREFIX_COLOR = PREFIX + "color.";
/** color for default vte text */
String COLOR_DEFAULT = PREFIX_COLOR + DEFAULT;
/** color for vte keyword text */
String COLOR_KEYWORD = PREFIX_COLOR + KEYWORD;
/** color for vte string text */
String COLOR_STRING = PREFIX_COLOR + STRING;
/** color for vte comment text */
String COLOR_COMMENT = PREFIX_COLOR + COMMENT;
static final boolean KEYWORD_BOLD = true;
static final boolean TYPE_KEYWORD_BOLD = true;
static final boolean CONSTANT_BOLD = true;
static final boolean COMMENT_BOLD = false;
static final boolean STRING_BOLD = false;
static final boolean DEFAULT_BOLD = false;
static final boolean KEYWORD_ITALIC = true;
static final boolean TYPE_KEYWORD_ITALIC= true;
static final boolean CONSTANT_ITALIC = true;
static final boolean COMMENT_ITALIC = false;
static final boolean STRING_ITALIC = false;
static final boolean DEFAULT_ITALIC = false;
public static final String EDITOR_COMMENT_COLOR = "__vte_comment_color";
public static final String EDITOR_COMMENT_BOLD = "__vte_comment_bold";
public static final String EDITOR_COMMENT_ITALIC = "__vte_comment_italic";
public static final String EDITOR_STRING_COLOR = "__vte_string_color";
public static final String EDITOR_STRING_BOLD = "__vte_string_bold";
public static final String EDITOR_STRING_ITALIC = "__vte_string_italic";
public static final String EDITOR_KEYWORD_COLOR = "__vte_keyword_color";
public static final String EDITOR_KEYWORD_BOLD = "__vte_keyword_bold";
public static final String EDITOR_KEYWORD_ITALIC = "__vte_keyword_italic";
public static final String EDITOR_DEFAULT_COLOR = "__vte_other_color";
public static final String EDITOR_DEFAULT_BOLD = "__vte_other_bold";
public static final String EDITOR_DEFAULT_ITALIC = "__vte_other_italic";
// keep in same order as ColorToken.getTokens()
public static final String[] preferences = new String[] {
EDITOR_DEFAULT_COLOR, EDITOR_DEFAULT_BOLD, EDITOR_DEFAULT_ITALIC,
EDITOR_KEYWORD_COLOR, EDITOR_KEYWORD_BOLD, EDITOR_KEYWORD_ITALIC,
EDITOR_STRING_COLOR, EDITOR_STRING_BOLD, EDITOR_STRING_ITALIC,
EDITOR_COMMENT_COLOR, EDITOR_COMMENT_BOLD, EDITOR_COMMENT_ITALIC,
};
public static final String editorHighlight[][] = {
{"Default", EDITOR_DEFAULT_COLOR, EDITOR_DEFAULT_BOLD, EDITOR_DEFAULT_ITALIC },
{"Keyword", EDITOR_KEYWORD_COLOR, EDITOR_KEYWORD_BOLD, EDITOR_KEYWORD_ITALIC },
{"Strings", EDITOR_STRING_COLOR, EDITOR_STRING_BOLD, EDITOR_STRING_ITALIC },
{"Comment", EDITOR_COMMENT_COLOR, EDITOR_COMMENT_BOLD, EDITOR_COMMENT_ITALIC }
};
}