diff --git a/log.txt b/log.txt
new file mode 100644
index 00000000..929ae390
--- /dev/null
+++ b/log.txt
@@ -0,0 +1 @@
+Total number of code lines for %1 = 0
diff --git a/plugin/Raven.SQDev.Editors/META-INF/MANIFEST.MF b/plugin/Raven.SQDev.Editors/META-INF/MANIFEST.MF
index 97fa5961..a7860acf 100644
--- a/plugin/Raven.SQDev.Editors/META-INF/MANIFEST.MF
+++ b/plugin/Raven.SQDev.Editors/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Editors
Bundle-SymbolicName: raven.sqdev.editors;singleton:=true
-Bundle-Version: 0.4.0
+Bundle-Version: 0.5.0
Bundle-Activator: raven.sqdev.editors.activator.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
@@ -44,7 +44,8 @@ Export-Package: org.antlr.v4.runtime;
org.eclipse.swt.custom,
org.antlr.v4.runtime.tree,
raven.sqdev.interfaces,
- org.eclipse.jface.text.rules"
+ org.eclipse.jface.text.rules",
+ raven.sqdev.editors.parser.preprocessor
Bundle-Vendor: Raven
Import-Package: raven.sqdev.preferences.util
Bundle-ClassPath: ANTLR/antlr-runtime-4.5.3.jar,
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicErrorListener.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicErrorListener.class
index 0fbbd535..b40975ac 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicErrorListener.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicErrorListener.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicFoldingManager.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicFoldingManager.class
index 218c1ab5..ca6b2b74 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicFoldingManager.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicFoldingManager.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/IMacroSupport.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/IMacroSupport.class
new file mode 100644
index 00000000..83b8ef22
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/IMacroSupport.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/Macro.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/Macro.class
new file mode 100644
index 00000000..85b54c7e
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/Macro.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/Preprocessor.tokens b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/Preprocessor.tokens
new file mode 100644
index 00000000..e2c1288e
--- /dev/null
+++ b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/Preprocessor.tokens
@@ -0,0 +1,23 @@
+IF=1
+IFN=2
+ELSE=3
+ENDIF=4
+DEFINE=5
+UNDEFINE=6
+INCLUDE=7
+UNKNOWN=8
+NUMBER=9
+STRING=10
+ID=11
+ESC_LINEBREAK=12
+LINEBREAK=13
+WS=14
+COMMENT=15
+ANY=16
+'#ifdef'=1
+'#ifndef'=2
+'#else'=3
+'#endif'=4
+'#define'=5
+'#undef'=6
+'#include'=7
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorBaseListener.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorBaseListener.class
new file mode 100644
index 00000000..b2581a4f
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorBaseListener.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorBaseVisitor.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorBaseVisitor.class
new file mode 100644
index 00000000..cb9ab158
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorBaseVisitor.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorLexer.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorLexer.class
new file mode 100644
index 00000000..19c24f17
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorLexer.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorLexer.tokens b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorLexer.tokens
new file mode 100644
index 00000000..e2c1288e
--- /dev/null
+++ b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorLexer.tokens
@@ -0,0 +1,23 @@
+IF=1
+IFN=2
+ELSE=3
+ENDIF=4
+DEFINE=5
+UNDEFINE=6
+INCLUDE=7
+UNKNOWN=8
+NUMBER=9
+STRING=10
+ID=11
+ESC_LINEBREAK=12
+LINEBREAK=13
+WS=14
+COMMENT=15
+ANY=16
+'#ifdef'=1
+'#ifndef'=2
+'#else'=3
+'#endif'=4
+'#define'=5
+'#undef'=6
+'#include'=7
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorListener.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorListener.class
new file mode 100644
index 00000000..5771ee42
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorListener.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParseListener$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParseListener$1.class
new file mode 100644
index 00000000..bbd13625
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParseListener$1.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParseListener$2.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParseListener$2.class
new file mode 100644
index 00000000..3602d21c
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParseListener$2.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParseListener.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParseListener.class
new file mode 100644
index 00000000..726b4fe9
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParseListener.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$CommandContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$CommandContext.class
new file mode 100644
index 00000000..d2e6199b
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$CommandContext.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$DefineContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$DefineContext.class
new file mode 100644
index 00000000..5743db75
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$DefineContext.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$ErrorContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$ErrorContext.class
new file mode 100644
index 00000000..d3ee454b
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$ErrorContext.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$IfBlockContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$IfBlockContext.class
new file mode 100644
index 00000000..afd9011c
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$IfBlockContext.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$IncludeContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$IncludeContext.class
new file mode 100644
index 00000000..f910610b
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$IncludeContext.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$PreprocessingContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$PreprocessingContext.class
new file mode 100644
index 00000000..7a24c31d
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$PreprocessingContext.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$StartContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$StartContext.class
new file mode 100644
index 00000000..3076ae8f
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$StartContext.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$UndefineContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$UndefineContext.class
new file mode 100644
index 00000000..23429fe1
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser$UndefineContext.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser.class
new file mode 100644
index 00000000..97984297
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorParser.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorVisitor.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorVisitor.class
new file mode 100644
index 00000000..1d4de702
Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/parser/preprocessor/PreprocessorVisitor.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/sqdevEditor/SQDevFileEditor.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/sqdevEditor/SQDevFileEditor.class
index 9f6e5c07..3b6f1499 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/sqdevEditor/SQDevFileEditor.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/sqdevEditor/SQDevFileEditor.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/Language.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/Language.class
index 7fc7c1ca..f62dd6f7 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/Language.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/Language.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport$1.class
index 7c6eeb1c..f59e0cb2 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport$1.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport$1.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport$2.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport$2.class
index 42f2455e..338dc53a 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport$2.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport$2.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport.class
index 49ae09b9..0bf30314 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$1.class
index f458e05e..31ccab70 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$1.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$1.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$10.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$10.class
index fb0bce82..8a12c8d9 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$10.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$10.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$11.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$11.class
index 9b6f2c6b..cbe1b480 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$11.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$11.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$12$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$12$1.class
index 2cf34227..a7e7da26 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$12$1.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$12$1.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$12.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$12.class
index d1c51877..b4fd3c80 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$12.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$12.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$13.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$13.class
index 6914663c..7b7afc74 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$13.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$13.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$14.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$14.class
index 03b1147d..49577430 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$14.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$14.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$15.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$15.class
index 2e9084c3..469f235e 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$15.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$15.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$16.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$16.class
index cf64d8d6..4799c8ce 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$16.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$16.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$17.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$17.class
index 106a0af6..2677a9ff 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$17.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$17.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$18.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$18.class
index 5ed03b86..95473f75 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$18.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$18.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$2.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$2.class
index 818c1cde..d2191940 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$2.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$2.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3$1.class
index 2d3bbb7e..b908936c 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3$1.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3$1.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3$2.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3$2.class
index 99954aca..0238d76a 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3$2.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3$2.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3$3.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3$3.class
index a0de86a9..fe895977 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3$3.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3$3.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3.class
index 514f7e7a..0770da41 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$4.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$4.class
index 5aa3fbfe..4bb7a174 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$4.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$4.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$5.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$5.class
index 79ff4f7e..e8dbf08b 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$5.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$5.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$6.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$6.class
index a7b305de..3ef9a0fb 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$6.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$6.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$7.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$7.class
index b39209f5..ae3cc8cc 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$7.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$7.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$8.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$8.class
index 20e94c59..8f47e827 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$8.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$8.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$9.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$9.class
index e25f554c..c1d75016 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$9.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$9.class differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor.class
index a7a97f08..ef42caaf 100644
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor.class differ
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicErrorListener.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicErrorListener.java
index 43d75bbc..0a93b915 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicErrorListener.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicErrorListener.java
@@ -44,7 +44,20 @@ public void syntaxError(Recognizer, ?> recognizer, Object offendingSymbol, int
int length = (offendingToken.getType() == Token.EOF) ? 0
: offendingToken.getText().length();
- editor.createMarker(IMarker.PROBLEM, offendingToken.getStartIndex(), length, msg,
- IMarker.SEVERITY_ERROR);
+ reportError(offendingToken.getStartIndex(), length, msg);
+ }
+
+ /**
+ * Reports an error to the respective editor
+ *
+ * @param offset
+ * The offset of the error start
+ * @param length
+ * The length of the error
+ * @param msg
+ * The error message
+ */
+ public void reportError(int offset, int length, String msg) {
+ editor.createMarker(IMarker.PROBLEM, offset, length, msg, IMarker.SEVERITY_ERROR);
}
}
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicFoldingManager.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicFoldingManager.java
index f9b32444..250a9a4b 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicFoldingManager.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicFoldingManager.java
@@ -27,6 +27,10 @@ public class BasicFoldingManager implements IManager {
* The annotation model of the editor this manager should contribute to
*/
protected ProjectionAnnotationModel model;
+ /**
+ * Indicates that the annotation Queue has changed
+ */
+ protected boolean annotationQueueChanged;
/**
@@ -53,10 +57,15 @@ public BasicFoldingManager(ProjectionAnnotationModel model) {
*/
public void addFoldingArea(Entry entry) {
annotationQueue.put(entry.getKey(), entry.getValue());
+
+ // indicate change
+ annotationQueueChanged = true;
}
@Override
public void apply() {
+ annotationQueueChanged = false;
+
// clear
model.removeAllAnnotations();
@@ -64,6 +73,13 @@ public void apply() {
.iterator();
while (mapIterator.hasNext()) {
+ if (annotationQueueChanged) {
+ // the queue has been modified by another thread -> reapply to
+ // avoid concurrent exception
+ apply();
+ break;
+ }
+
// add the foladable areas TODO: implement some overlap logic
Entry entry = mapIterator.next();
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicSourceViewerConfiguration.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicSourceViewerConfiguration.java
index 6bd1e261..299de87b 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicSourceViewerConfiguration.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicSourceViewerConfiguration.java
@@ -143,7 +143,7 @@ public List getConfiguredKeywordsFor(char c) {
* The preference key for the color of the desired
* KeywordScanner
* @return The KeywordScanner
working for the given preference
- * key or null
if no such scanne could be found
+ * key or null
if no such scanner could be found
*/
public KeywordScanner getKeywordScanner(String colorPreferenceKey) {
if (!configuredKeywordScanners.containsKey(colorPreferenceKey)) {
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/IMacroSupport.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/IMacroSupport.java
new file mode 100644
index 00000000..f6880c1e
--- /dev/null
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/IMacroSupport.java
@@ -0,0 +1,26 @@
+package raven.sqdev.editors;
+
+/**
+ * An interface describing a class that provides macro-support
+ *
+ * @author Raven
+ *
+ */
+public interface IMacroSupport {
+
+ /**
+ * Adds a macro to this IMacroSupport
+ *
+ * @param macro
+ * The Macro
to add
+ */
+ public void addMacro(Macro macro);
+
+ /**
+ * Removes the given macro
+ *
+ * @param macro
+ * The Macro
to remove
+ */
+ public void removeMacro(Macro macro);
+}
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/Macro.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/Macro.java
new file mode 100644
index 00000000..683bc9c5
--- /dev/null
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/Macro.java
@@ -0,0 +1,54 @@
+package raven.sqdev.editors;
+
+import raven.sqdev.infoCollection.base.Keyword;
+
+/**
+ * A class representing a defined macro expression
+ *
+ * @author Raven
+ *
+ */
+public class Macro extends Keyword {
+
+ protected int arguments;
+
+ /**
+ * Creates a new macro that has no arguments
+ *
+ * @param name
+ * The name of the macro
+ */
+ public Macro(String name) {
+ super(name);
+ arguments = 0;
+ }
+
+ /**
+ * Creates a new macro
+ *
+ * @param name
+ * The name of the macro
+ * @param arguments
+ * The number of arguments this macro can take
+ */
+ public Macro(String name, int arguments) {
+ super(name);
+
+ this.arguments = arguments;
+ }
+
+ /**
+ * Gets the number of arguments this macro takes
+ */
+ public int getArgumentCount() {
+ return arguments;
+ }
+
+ /**
+ * Checks whether this macro uses any arguments
+ */
+ public boolean hasArguments() {
+ return getArgumentCount() != 0;
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/Preprocessor.tokens b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/Preprocessor.tokens
new file mode 100644
index 00000000..e2c1288e
--- /dev/null
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/Preprocessor.tokens
@@ -0,0 +1,23 @@
+IF=1
+IFN=2
+ELSE=3
+ENDIF=4
+DEFINE=5
+UNDEFINE=6
+INCLUDE=7
+UNKNOWN=8
+NUMBER=9
+STRING=10
+ID=11
+ESC_LINEBREAK=12
+LINEBREAK=13
+WS=14
+COMMENT=15
+ANY=16
+'#ifdef'=1
+'#ifndef'=2
+'#else'=3
+'#endif'=4
+'#define'=5
+'#undef'=6
+'#include'=7
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorBaseListener.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorBaseListener.java
new file mode 100644
index 00000000..d3b25922
--- /dev/null
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorBaseListener.java
@@ -0,0 +1,123 @@
+// Generated from Preprocessor.g4 by ANTLR 4.5.3
+package raven.sqdev.editors.parser.preprocessor;
+
+import org.antlr.v4.runtime.ParserRuleContext;
+import org.antlr.v4.runtime.tree.ErrorNode;
+import org.antlr.v4.runtime.tree.TerminalNode;
+
+/**
+ * This class provides an empty implementation of {@link PreprocessorListener},
+ * which can be extended to create a listener which only needs to handle a subset
+ * of the available methods.
+ */
+public class PreprocessorBaseListener implements PreprocessorListener {
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterStart(PreprocessorParser.StartContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitStart(PreprocessorParser.StartContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterPreprocessing(PreprocessorParser.PreprocessingContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitPreprocessing(PreprocessorParser.PreprocessingContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterIfBlock(PreprocessorParser.IfBlockContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitIfBlock(PreprocessorParser.IfBlockContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterDefine(PreprocessorParser.DefineContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitDefine(PreprocessorParser.DefineContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterUndefine(PreprocessorParser.UndefineContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitUndefine(PreprocessorParser.UndefineContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterInclude(PreprocessorParser.IncludeContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitInclude(PreprocessorParser.IncludeContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterError(PreprocessorParser.ErrorContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitError(PreprocessorParser.ErrorContext ctx) { }
+
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterEveryRule(ParserRuleContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitEveryRule(ParserRuleContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void visitTerminal(TerminalNode node) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void visitErrorNode(ErrorNode node) { }
+}
\ No newline at end of file
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorBaseVisitor.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorBaseVisitor.java
new file mode 100644
index 00000000..bac02e4a
--- /dev/null
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorBaseVisitor.java
@@ -0,0 +1,63 @@
+// Generated from Preprocessor.g4 by ANTLR 4.5.3
+package raven.sqdev.editors.parser.preprocessor;
+import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
+
+/**
+ * This class provides an empty implementation of {@link PreprocessorVisitor},
+ * which can be extended to create a visitor which only needs to handle a subset
+ * of the available methods.
+ *
+ * @param The return type of the visit operation. Use {@link Void} for
+ * operations with no return type.
+ */
+public class PreprocessorBaseVisitor extends AbstractParseTreeVisitor implements PreprocessorVisitor {
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitStart(PreprocessorParser.StartContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitPreprocessing(PreprocessorParser.PreprocessingContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitIfBlock(PreprocessorParser.IfBlockContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitDefine(PreprocessorParser.DefineContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitUndefine(PreprocessorParser.UndefineContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitInclude(PreprocessorParser.IncludeContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitError(PreprocessorParser.ErrorContext ctx) { return visitChildren(ctx); }
+}
\ No newline at end of file
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorLexer.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorLexer.java
new file mode 100644
index 00000000..653a1de3
--- /dev/null
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorLexer.java
@@ -0,0 +1,169 @@
+// Generated from Preprocessor.g4 by ANTLR 4.5.3
+package raven.sqdev.editors.parser.preprocessor;
+import org.antlr.v4.runtime.Lexer;
+import org.antlr.v4.runtime.CharStream;
+import org.antlr.v4.runtime.Token;
+import org.antlr.v4.runtime.TokenStream;
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.atn.*;
+import org.antlr.v4.runtime.dfa.DFA;
+import org.antlr.v4.runtime.misc.*;
+
+@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
+public class PreprocessorLexer extends Lexer {
+ static { RuntimeMetaData.checkVersion("4.5.3", RuntimeMetaData.VERSION); }
+
+ protected static final DFA[] _decisionToDFA;
+ protected static final PredictionContextCache _sharedContextCache =
+ new PredictionContextCache();
+ public static final int
+ IF=1, IFN=2, ELSE=3, ENDIF=4, DEFINE=5, UNDEFINE=6, INCLUDE=7, UNKNOWN=8,
+ NUMBER=9, STRING=10, ID=11, ESC_LINEBREAK=12, LINEBREAK=13, WS=14, COMMENT=15,
+ ANY=16;
+ public static String[] modeNames = {
+ "DEFAULT_MODE"
+ };
+
+ public static final String[] ruleNames = {
+ "IF", "IFN", "ELSE", "ENDIF", "DEFINE", "UNDEFINE", "INCLUDE", "UNKNOWN",
+ "NUMBER", "STRING", "ID", "ESC_LINEBREAK", "LINEBREAK", "WS", "COMMENT",
+ "INT", "FLOAT", "LETTER", "ANY"
+ };
+
+ private static final String[] _LITERAL_NAMES = {
+ null, "'#ifdef'", "'#ifndef'", "'#else'", "'#endif'", "'#define'", "'#undef'",
+ "'#include'"
+ };
+ private static final String[] _SYMBOLIC_NAMES = {
+ null, "IF", "IFN", "ELSE", "ENDIF", "DEFINE", "UNDEFINE", "INCLUDE", "UNKNOWN",
+ "NUMBER", "STRING", "ID", "ESC_LINEBREAK", "LINEBREAK", "WS", "COMMENT",
+ "ANY"
+ };
+ public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
+
+ /**
+ * @deprecated Use {@link #VOCABULARY} instead.
+ */
+ @Deprecated
+ public static final String[] tokenNames;
+ static {
+ tokenNames = new String[_SYMBOLIC_NAMES.length];
+ for (int i = 0; i < tokenNames.length; i++) {
+ tokenNames[i] = VOCABULARY.getLiteralName(i);
+ if (tokenNames[i] == null) {
+ tokenNames[i] = VOCABULARY.getSymbolicName(i);
+ }
+
+ if (tokenNames[i] == null) {
+ tokenNames[i] = "";
+ }
+ }
+ }
+
+ @Override
+ @Deprecated
+ public String[] getTokenNames() {
+ return tokenNames;
+ }
+
+ @Override
+
+ public Vocabulary getVocabulary() {
+ return VOCABULARY;
+ }
+
+
+ public PreprocessorLexer(CharStream input) {
+ super(input);
+ _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
+ }
+
+ @Override
+ public String getGrammarFileName() { return "Preprocessor.g4"; }
+
+ @Override
+ public String[] getRuleNames() { return ruleNames; }
+
+ @Override
+ public String getSerializedATN() { return _serializedATN; }
+
+ @Override
+ public String[] getModeNames() { return modeNames; }
+
+ @Override
+ public ATN getATN() { return _ATN; }
+
+ public static final String _serializedATN =
+ "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\22\u00ca\b\1\4\2"+
+ "\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4"+
+ "\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+
+ "\t\22\4\23\t\23\4\24\t\24\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3"+
+ "\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3"+
+ "\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\b\3\b\3\b"+
+ "\3\b\3\b\3\b\3\b\3\b\3\b\3\t\3\t\5\t`\n\t\3\t\3\t\3\n\3\n\5\nf\n\n\3\13"+
+ "\3\13\3\13\3\13\7\13l\n\13\f\13\16\13o\13\13\3\13\3\13\3\13\3\13\3\13"+
+ "\7\13v\n\13\f\13\16\13y\13\13\3\13\5\13|\n\13\3\f\3\f\3\f\6\f\u0081\n"+
+ "\f\r\f\16\f\u0082\3\r\3\r\3\r\3\r\3\r\3\r\3\r\5\r\u008c\n\r\3\16\3\16"+
+ "\3\16\6\16\u0091\n\16\r\16\16\16\u0092\3\17\6\17\u0096\n\17\r\17\16\17"+
+ "\u0097\3\17\3\17\3\20\3\20\3\20\3\20\7\20\u00a0\n\20\f\20\16\20\u00a3"+
+ "\13\20\3\20\3\20\3\20\3\20\3\20\7\20\u00aa\n\20\f\20\16\20\u00ad\13\20"+
+ "\3\20\3\20\5\20\u00b1\n\20\3\20\3\20\3\21\6\21\u00b6\n\21\r\21\16\21\u00b7"+
+ "\3\22\3\22\3\22\3\22\3\22\3\22\5\22\u00c0\n\22\3\23\6\23\u00c3\n\23\r"+
+ "\23\16\23\u00c4\3\24\3\24\3\24\3\24\4\u00a1\u00ab\2\25\3\3\5\4\7\5\t\6"+
+ "\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\2#\2%\2\'"+
+ "\22\3\2\7\3\2$$\3\2))\4\2\13\13\"\"\3\2\62;\4\2C\\c|\u00da\2\3\3\2\2\2"+
+ "\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2"+
+ "\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2"+
+ "\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2\'\3\2\2\2\3)\3\2\2\2\5\60\3"+
+ "\2\2\2\78\3\2\2\2\t>\3\2\2\2\13E\3\2\2\2\rM\3\2\2\2\17T\3\2\2\2\21]\3"+
+ "\2\2\2\23e\3\2\2\2\25{\3\2\2\2\27\u0080\3\2\2\2\31\u008b\3\2\2\2\33\u0090"+
+ "\3\2\2\2\35\u0095\3\2\2\2\37\u00b0\3\2\2\2!\u00b5\3\2\2\2#\u00bf\3\2\2"+
+ "\2%\u00c2\3\2\2\2\'\u00c6\3\2\2\2)*\7%\2\2*+\7k\2\2+,\7h\2\2,-\7f\2\2"+
+ "-.\7g\2\2./\7h\2\2/\4\3\2\2\2\60\61\7%\2\2\61\62\7k\2\2\62\63\7h\2\2\63"+
+ "\64\7p\2\2\64\65\7f\2\2\65\66\7g\2\2\66\67\7h\2\2\67\6\3\2\2\289\7%\2"+
+ "\29:\7g\2\2:;\7n\2\2;<\7u\2\2<=\7g\2\2=\b\3\2\2\2>?\7%\2\2?@\7g\2\2@A"+
+ "\7p\2\2AB\7f\2\2BC\7k\2\2CD\7h\2\2D\n\3\2\2\2EF\7%\2\2FG\7f\2\2GH\7g\2"+
+ "\2HI\7h\2\2IJ\7k\2\2JK\7p\2\2KL\7g\2\2L\f\3\2\2\2MN\7%\2\2NO\7w\2\2OP"+
+ "\7p\2\2PQ\7f\2\2QR\7g\2\2RS\7h\2\2S\16\3\2\2\2TU\7%\2\2UV\7k\2\2VW\7p"+
+ "\2\2WX\7e\2\2XY\7n\2\2YZ\7w\2\2Z[\7f\2\2[\\\7g\2\2\\\20\3\2\2\2]_\7%\2"+
+ "\2^`\5\35\17\2_^\3\2\2\2_`\3\2\2\2`a\3\2\2\2ab\5\27\f\2b\22\3\2\2\2cf"+
+ "\5!\21\2df\5#\22\2ec\3\2\2\2ed\3\2\2\2f\24\3\2\2\2gm\7$\2\2hi\7$\2\2i"+
+ "l\7$\2\2jl\n\2\2\2kh\3\2\2\2kj\3\2\2\2lo\3\2\2\2mk\3\2\2\2mn\3\2\2\2n"+
+ "p\3\2\2\2om\3\2\2\2p|\7$\2\2qw\7)\2\2rs\7)\2\2sv\7)\2\2tv\n\3\2\2ur\3"+
+ "\2\2\2ut\3\2\2\2vy\3\2\2\2wu\3\2\2\2wx\3\2\2\2xz\3\2\2\2yw\3\2\2\2z|\7"+
+ ")\2\2{g\3\2\2\2{q\3\2\2\2|\26\3\2\2\2}\u0081\5%\23\2~\u0081\5!\21\2\177"+
+ "\u0081\7a\2\2\u0080}\3\2\2\2\u0080~\3\2\2\2\u0080\177\3\2\2\2\u0081\u0082"+
+ "\3\2\2\2\u0082\u0080\3\2\2\2\u0082\u0083\3\2\2\2\u0083\30\3\2\2\2\u0084"+
+ "\u0085\7\"\2\2\u0085\u0086\7^\2\2\u0086\u008c\7\f\2\2\u0087\u0088\7\""+
+ "\2\2\u0088\u0089\7^\2\2\u0089\u008a\7\17\2\2\u008a\u008c\7\f\2\2\u008b"+
+ "\u0084\3\2\2\2\u008b\u0087\3\2\2\2\u008c\32\3\2\2\2\u008d\u0091\7\f\2"+
+ "\2\u008e\u008f\7\17\2\2\u008f\u0091\7\f\2\2\u0090\u008d\3\2\2\2\u0090"+
+ "\u008e\3\2\2\2\u0091\u0092\3\2\2\2\u0092\u0090\3\2\2\2\u0092\u0093\3\2"+
+ "\2\2\u0093\34\3\2\2\2\u0094\u0096\t\4\2\2\u0095\u0094\3\2\2\2\u0096\u0097"+
+ "\3\2\2\2\u0097\u0095\3\2\2\2\u0097\u0098\3\2\2\2\u0098\u0099\3\2\2\2\u0099"+
+ "\u009a\b\17\2\2\u009a\36\3\2\2\2\u009b\u009c\7\61\2\2\u009c\u009d\7\61"+
+ "\2\2\u009d\u00a1\3\2\2\2\u009e\u00a0\13\2\2\2\u009f\u009e\3\2\2\2\u00a0"+
+ "\u00a3\3\2\2\2\u00a1\u00a2\3\2\2\2\u00a1\u009f\3\2\2\2\u00a2\u00a4\3\2"+
+ "\2\2\u00a3\u00a1\3\2\2\2\u00a4\u00b1\5\33\16\2\u00a5\u00a6\7\61\2\2\u00a6"+
+ "\u00a7\7,\2\2\u00a7\u00ab\3\2\2\2\u00a8\u00aa\13\2\2\2\u00a9\u00a8\3\2"+
+ "\2\2\u00aa\u00ad\3\2\2\2\u00ab\u00ac\3\2\2\2\u00ab\u00a9\3\2\2\2\u00ac"+
+ "\u00ae\3\2\2\2\u00ad\u00ab\3\2\2\2\u00ae\u00af\7,\2\2\u00af\u00b1\7\61"+
+ "\2\2\u00b0\u009b\3\2\2\2\u00b0\u00a5\3\2\2\2\u00b1\u00b2\3\2\2\2\u00b2"+
+ "\u00b3\b\20\2\2\u00b3 \3\2\2\2\u00b4\u00b6\t\5\2\2\u00b5\u00b4\3\2\2\2"+
+ "\u00b6\u00b7\3\2\2\2\u00b7\u00b5\3\2\2\2\u00b7\u00b8\3\2\2\2\u00b8\"\3"+
+ "\2\2\2\u00b9\u00ba\5!\21\2\u00ba\u00bb\7\60\2\2\u00bb\u00bc\5!\21\2\u00bc"+
+ "\u00c0\3\2\2\2\u00bd\u00be\7\60\2\2\u00be\u00c0\5!\21\2\u00bf\u00b9\3"+
+ "\2\2\2\u00bf\u00bd\3\2\2\2\u00c0$\3\2\2\2\u00c1\u00c3\t\6\2\2\u00c2\u00c1"+
+ "\3\2\2\2\u00c3\u00c4\3\2\2\2\u00c4\u00c2\3\2\2\2\u00c4\u00c5\3\2\2\2\u00c5"+
+ "&\3\2\2\2\u00c6\u00c7\13\2\2\2\u00c7\u00c8\3\2\2\2\u00c8\u00c9\b\24\2"+
+ "\2\u00c9(\3\2\2\2\26\2_ekmuw{\u0080\u0082\u008b\u0090\u0092\u0097\u00a1"+
+ "\u00ab\u00b0\u00b7\u00bf\u00c4\3\b\2\2";
+ public static final ATN _ATN =
+ new ATNDeserializer().deserialize(_serializedATN.toCharArray());
+ static {
+ _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
+ for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
+ _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
+ }
+ }
+}
\ No newline at end of file
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorLexer.tokens b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorLexer.tokens
new file mode 100644
index 00000000..e2c1288e
--- /dev/null
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorLexer.tokens
@@ -0,0 +1,23 @@
+IF=1
+IFN=2
+ELSE=3
+ENDIF=4
+DEFINE=5
+UNDEFINE=6
+INCLUDE=7
+UNKNOWN=8
+NUMBER=9
+STRING=10
+ID=11
+ESC_LINEBREAK=12
+LINEBREAK=13
+WS=14
+COMMENT=15
+ANY=16
+'#ifdef'=1
+'#ifndef'=2
+'#else'=3
+'#endif'=4
+'#define'=5
+'#undef'=6
+'#include'=7
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorListener.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorListener.java
new file mode 100644
index 00000000..926aa72c
--- /dev/null
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorListener.java
@@ -0,0 +1,88 @@
+// Generated from Preprocessor.g4 by ANTLR 4.5.3
+package raven.sqdev.editors.parser.preprocessor;
+import org.antlr.v4.runtime.tree.ParseTreeListener;
+
+/**
+ * This interface defines a complete listener for a parse tree produced by
+ * {@link PreprocessorParser}.
+ */
+public interface PreprocessorListener extends ParseTreeListener {
+ /**
+ * Enter a parse tree produced by {@link PreprocessorParser#start}.
+ * @param ctx the parse tree
+ */
+ void enterStart(PreprocessorParser.StartContext ctx);
+ /**
+ * Exit a parse tree produced by {@link PreprocessorParser#start}.
+ * @param ctx the parse tree
+ */
+ void exitStart(PreprocessorParser.StartContext ctx);
+ /**
+ * Enter a parse tree produced by {@link PreprocessorParser#preprocessing}.
+ * @param ctx the parse tree
+ */
+ void enterPreprocessing(PreprocessorParser.PreprocessingContext ctx);
+ /**
+ * Exit a parse tree produced by {@link PreprocessorParser#preprocessing}.
+ * @param ctx the parse tree
+ */
+ void exitPreprocessing(PreprocessorParser.PreprocessingContext ctx);
+ /**
+ * Enter a parse tree produced by {@link PreprocessorParser#ifBlock}.
+ * @param ctx the parse tree
+ */
+ void enterIfBlock(PreprocessorParser.IfBlockContext ctx);
+ /**
+ * Exit a parse tree produced by {@link PreprocessorParser#ifBlock}.
+ * @param ctx the parse tree
+ */
+ void exitIfBlock(PreprocessorParser.IfBlockContext ctx);
+ /**
+ * Enter a parse tree produced by the {@code Define}
+ * labeled alternative in {@link PreprocessorParser#command}.
+ * @param ctx the parse tree
+ */
+ void enterDefine(PreprocessorParser.DefineContext ctx);
+ /**
+ * Exit a parse tree produced by the {@code Define}
+ * labeled alternative in {@link PreprocessorParser#command}.
+ * @param ctx the parse tree
+ */
+ void exitDefine(PreprocessorParser.DefineContext ctx);
+ /**
+ * Enter a parse tree produced by the {@code Undefine}
+ * labeled alternative in {@link PreprocessorParser#command}.
+ * @param ctx the parse tree
+ */
+ void enterUndefine(PreprocessorParser.UndefineContext ctx);
+ /**
+ * Exit a parse tree produced by the {@code Undefine}
+ * labeled alternative in {@link PreprocessorParser#command}.
+ * @param ctx the parse tree
+ */
+ void exitUndefine(PreprocessorParser.UndefineContext ctx);
+ /**
+ * Enter a parse tree produced by the {@code Include}
+ * labeled alternative in {@link PreprocessorParser#command}.
+ * @param ctx the parse tree
+ */
+ void enterInclude(PreprocessorParser.IncludeContext ctx);
+ /**
+ * Exit a parse tree produced by the {@code Include}
+ * labeled alternative in {@link PreprocessorParser#command}.
+ * @param ctx the parse tree
+ */
+ void exitInclude(PreprocessorParser.IncludeContext ctx);
+ /**
+ * Enter a parse tree produced by the {@code Error}
+ * labeled alternative in {@link PreprocessorParser#command}.
+ * @param ctx the parse tree
+ */
+ void enterError(PreprocessorParser.ErrorContext ctx);
+ /**
+ * Exit a parse tree produced by the {@code Error}
+ * labeled alternative in {@link PreprocessorParser#command}.
+ * @param ctx the parse tree
+ */
+ void exitError(PreprocessorParser.ErrorContext ctx);
+}
\ No newline at end of file
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorParseListener.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorParseListener.java
new file mode 100644
index 00000000..5128c5a2
--- /dev/null
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorParseListener.java
@@ -0,0 +1,280 @@
+package raven.sqdev.editors.parser.preprocessor;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Stack;
+
+import org.antlr.v4.runtime.ANTLRErrorListener;
+import org.antlr.v4.runtime.ANTLRInputStream;
+import org.antlr.v4.runtime.BaseErrorListener;
+import org.antlr.v4.runtime.CommonTokenStream;
+import org.antlr.v4.runtime.RecognitionException;
+import org.antlr.v4.runtime.Recognizer;
+import org.antlr.v4.runtime.Token;
+import org.antlr.v4.runtime.tree.ParseTreeWalker;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.ui.part.FileEditorInput;
+
+import raven.sqdev.editors.BasicCodeEditor;
+import raven.sqdev.editors.IMacroSupport;
+import raven.sqdev.editors.Macro;
+import raven.sqdev.editors.parser.preprocessor.PreprocessorParser.DefineContext;
+import raven.sqdev.editors.parser.preprocessor.PreprocessorParser.ErrorContext;
+import raven.sqdev.editors.parser.preprocessor.PreprocessorParser.IncludeContext;
+import raven.sqdev.util.SQDevPreferenceUtil;
+
+public class PreprocessorParseListener extends PreprocessorBaseListener {
+
+ /**
+ * The error message displayed when a cycle in hierarchy is detected
+ */
+ public static final String CYCLE_IN_HIERARCHY_MSG = "Cycle in hierarchy!";
+
+ /**
+ * The editor this listener should report to
+ */
+ private BasicCodeEditor editor;
+ /**
+ * A list of all previously visited files (via '#include')
+ */
+ private Stack includedFiles;
+ /**
+ * The start (offset) of the included file
+ */
+ private int includedFileStart;
+ /**
+ * The length of the included file
+ */
+ private int includedFileLength;
+
+
+ /**
+ * Creates a new instance of this listener
+ *
+ * @param editor
+ * The editor this listener should report to
+ */
+ public PreprocessorParseListener(BasicCodeEditor editor) {
+ Assert.isNotNull(editor);
+
+ this.editor = editor;
+
+ includedFiles = new Stack();
+
+ // indicate that the values have not yet been set
+ includedFileStart = -1;
+ includedFileLength = -1;
+ }
+
+ /**
+ * Creates a new instance of this listener
+ *
+ * @param editor
+ * The editor this listener should report to
+ * @param files
+ * The files that have already been visited (via the '#include'
+ * instruction)
+ */
+ private PreprocessorParseListener(BasicCodeEditor editor, Stack files, int start,
+ int length) {
+ Assert.isNotNull(editor);
+
+ this.editor = editor;
+
+ includedFiles = files;
+
+ includedFileStart = start;
+ includedFileLength = length;
+ }
+
+ @Override
+ public void exitDefine(DefineContext ctx) {
+ if (!(editor instanceof IMacroSupport)) {
+ return;
+ }
+
+ String name = ctx.name.getText();
+
+ // add defined macro
+ ((IMacroSupport) editor).addMacro(new Macro(name));
+ }
+
+ @Override
+ public void exitInclude(IncludeContext ctx) {
+ if (includedFileStart == -1 && includedFileLength == -1) {
+ // only use the values of the topmost file (The one the user is
+ // looking at)
+ includedFileStart = ctx.file.getStartIndex();
+ includedFileLength = ctx.file.getStopIndex() - ctx.file.getStartIndex() + 1;
+ }
+
+ if (!(editor.getEditorInput() instanceof FileEditorInput)) {
+ editor.createMarker(IMarker.PROBLEM, includedFileStart, includedFileLength,
+ "Can't evaluate include-instrution", IMarker.SEVERITY_WARNING);
+ // TODO: log
+ } else {
+ // Get latest origin file
+ IPath originFile;
+
+ if (includedFiles.size() == 0) {
+ originFile = ((FileEditorInput) editor.getEditorInput()).getPath();
+
+ // add the original file to the list of "included" files
+ includedFiles.push(originFile);
+
+ // use the new start + length values for new include instruction
+ includedFileStart = ctx.file.getStartIndex();
+ includedFileLength = ctx.file.getStopIndex() - ctx.file.getStartIndex() + 1;
+ } else {
+ originFile = includedFiles.peek();
+ }
+
+ String strFilePath = ctx.file.getText().substring(1, ctx.file.getText().length() - 1);
+ IPath root;
+
+ if (strFilePath.startsWith("\\")) {
+ root = new Path(SQDevPreferenceUtil.getArmaProgramDirectory());
+ } else {
+ root = originFile.removeLastSegments(1);
+
+ while (strFilePath.startsWith("..\\")) {
+ strFilePath = strFilePath.substring(3);
+
+ root = root.removeLastSegments(1);
+ }
+ }
+
+ IPath filePath = root.append(strFilePath);
+ File file = filePath.toFile();
+
+ // Check if path exists
+ if (file.exists()) {
+ if (!file.isFile()) {
+ // must be a file
+ reportError(includedFileStart, includedFileLength, "Reference is not a file");
+ } else {
+ if (includedFiles.contains(filePath)) {
+ // report cycle in hierarchy
+ reportError(includedFileStart, includedFileLength, CYCLE_IN_HIERARCHY_MSG);
+
+ includedFiles.clear();
+
+ return;
+ } else {
+ // add origin file
+ includedFiles.push(filePath);
+ }
+ try {
+ ANTLRErrorListener errorListener = new BaseErrorListener() {
+ @Override
+ public void syntaxError(Recognizer, ?> recognizer,
+ Object offendingSymbol, int line, int charPositionInline,
+ String msg, RecognitionException e) {
+ reportError(includedFileStart, includedFileLength,
+ "Errors while parsing \"" + file.getPath() + "\": " + msg);
+ }
+ };
+
+ ANTLRInputStream in = new ANTLRInputStream(new FileInputStream(file));
+
+ PreprocessorLexer lexer = new PreprocessorLexer(in);
+ lexer.removeErrorListeners();
+ lexer.addErrorListener(errorListener);
+
+ CommonTokenStream tokens = new CommonTokenStream(lexer);
+
+ PreprocessorParser parser = new PreprocessorParser(tokens);
+ parser.removeErrorListeners();
+ parser.addErrorListener(errorListener);
+
+ ParseTreeWalker walker = new ParseTreeWalker();
+ walker.walk(new PreprocessorParseListener(editor, includedFiles,
+ includedFileStart, includedFileLength) {
+ @Override
+ protected void reportError(int start, int length, String msg) {
+
+ if (msg.equals(CYCLE_IN_HIERARCHY_MSG)
+ && includedFiles.size() <= 2) {
+ // Don't blame sub-file for cycle in
+ // hierarchy
+ super.reportError(start, length, msg);
+ } else {
+ super.reportError(start, length, "Errors while parsing \""
+ + file.getPath() + "\": " + msg);
+ }
+ }
+ }, parser.start());
+
+ } catch (IOException e) {
+ reportError(includedFileStart, includedFileLength,
+ "Failed at parsing referenced file");
+
+ e.printStackTrace();
+ } finally {
+ // remove topmost element from stack as it has been
+ // fully processed by now
+ if (includedFiles.size() > 0) {
+ includedFiles.pop();
+ }
+ }
+ }
+ } else {
+ reportError(includedFileStart, includedFileLength,
+ "\"" + file.getPath() + "\" does not exist");
+ }
+ }
+ }
+
+ @Override
+ public void exitError(ErrorContext ctx) {
+ // error alt has matched -> report error
+ if (ctx.UNKNOWN().getText().contains(" ") || ctx.UNKNOWN().getText().contains("\t")) {
+ // illegal WS in instruction
+ int start = ctx.UNKNOWN().getSymbol().getStartIndex();
+ int length = 0;
+ boolean matchedWS = false;
+
+ for (char currentChar : ctx.UNKNOWN().getText().toCharArray()) {
+ if (Character.isWhitespace(currentChar)) {
+ matchedWS = true;
+
+ length++;
+ } else {
+ if (!matchedWS) {
+ start++;
+ } else {
+ break;
+ }
+ }
+ }
+
+ reportError(start, length, "Preprocessor instructions may not contain whitespace");
+ } else {
+ // unknown prepprocessor command
+ Token unknownToken = ctx.UNKNOWN().getSymbol();
+
+ reportError(unknownToken.getStartIndex(),
+ unknownToken.getStopIndex() - unknownToken.getStartIndex() + 1,
+ "Unknown preprocessor instruction \"" + unknownToken.getText() + "\"");
+ }
+ }
+
+ /**
+ * Reports an error to the editor
+ *
+ * @param offset
+ * The start offset of the error
+ * @param length
+ * The length of the error passage
+ * @param msg
+ * The error message
+ */
+ protected void reportError(int offset, int length, String msg) {
+ editor.createMarker(IMarker.PROBLEM, offset, length, msg, IMarker.SEVERITY_ERROR);
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorParser.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorParser.java
new file mode 100644
index 00000000..ecd15952
--- /dev/null
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorParser.java
@@ -0,0 +1,659 @@
+// Generated from Preprocessor.g4 by ANTLR 4.5.3
+package raven.sqdev.editors.parser.preprocessor;
+import org.antlr.v4.runtime.atn.*;
+import org.antlr.v4.runtime.dfa.DFA;
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.misc.*;
+import org.antlr.v4.runtime.tree.*;
+import java.util.List;
+import java.util.Iterator;
+import java.util.ArrayList;
+
+@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
+public class PreprocessorParser extends Parser {
+ static { RuntimeMetaData.checkVersion("4.5.3", RuntimeMetaData.VERSION); }
+
+ protected static final DFA[] _decisionToDFA;
+ protected static final PredictionContextCache _sharedContextCache =
+ new PredictionContextCache();
+ public static final int
+ IF=1, IFN=2, ELSE=3, ENDIF=4, DEFINE=5, UNDEFINE=6, INCLUDE=7, UNKNOWN=8,
+ NUMBER=9, STRING=10, ID=11, ESC_LINEBREAK=12, LINEBREAK=13, WS=14, COMMENT=15,
+ ANY=16;
+ public static final int
+ RULE_start = 0, RULE_preprocessing = 1, RULE_ifBlock = 2, RULE_command = 3;
+ public static final String[] ruleNames = {
+ "start", "preprocessing", "ifBlock", "command"
+ };
+
+ private static final String[] _LITERAL_NAMES = {
+ null, "'#ifdef'", "'#ifndef'", "'#else'", "'#endif'", "'#define'", "'#undef'",
+ "'#include'"
+ };
+ private static final String[] _SYMBOLIC_NAMES = {
+ null, "IF", "IFN", "ELSE", "ENDIF", "DEFINE", "UNDEFINE", "INCLUDE", "UNKNOWN",
+ "NUMBER", "STRING", "ID", "ESC_LINEBREAK", "LINEBREAK", "WS", "COMMENT",
+ "ANY"
+ };
+ public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
+
+ /**
+ * @deprecated Use {@link #VOCABULARY} instead.
+ */
+ @Deprecated
+ public static final String[] tokenNames;
+ static {
+ tokenNames = new String[_SYMBOLIC_NAMES.length];
+ for (int i = 0; i < tokenNames.length; i++) {
+ tokenNames[i] = VOCABULARY.getLiteralName(i);
+ if (tokenNames[i] == null) {
+ tokenNames[i] = VOCABULARY.getSymbolicName(i);
+ }
+
+ if (tokenNames[i] == null) {
+ tokenNames[i] = "";
+ }
+ }
+ }
+
+ @Override
+ @Deprecated
+ public String[] getTokenNames() {
+ return tokenNames;
+ }
+
+ @Override
+
+ public Vocabulary getVocabulary() {
+ return VOCABULARY;
+ }
+
+ @Override
+ public String getGrammarFileName() { return "Preprocessor.g4"; }
+
+ @Override
+ public String[] getRuleNames() { return ruleNames; }
+
+ @Override
+ public String getSerializedATN() { return _serializedATN; }
+
+ @Override
+ public ATN getATN() { return _ATN; }
+
+ public PreprocessorParser(TokenStream input) {
+ super(input);
+ _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
+ }
+ public static class StartContext extends ParserRuleContext {
+ public List preprocessing() {
+ return getRuleContexts(PreprocessingContext.class);
+ }
+ public PreprocessingContext preprocessing(int i) {
+ return getRuleContext(PreprocessingContext.class,i);
+ }
+ public List ID() { return getTokens(PreprocessorParser.ID); }
+ public TerminalNode ID(int i) {
+ return getToken(PreprocessorParser.ID, i);
+ }
+ public List STRING() { return getTokens(PreprocessorParser.STRING); }
+ public TerminalNode STRING(int i) {
+ return getToken(PreprocessorParser.STRING, i);
+ }
+ public List NUMBER() { return getTokens(PreprocessorParser.NUMBER); }
+ public TerminalNode NUMBER(int i) {
+ return getToken(PreprocessorParser.NUMBER, i);
+ }
+ public List LINEBREAK() { return getTokens(PreprocessorParser.LINEBREAK); }
+ public TerminalNode LINEBREAK(int i) {
+ return getToken(PreprocessorParser.LINEBREAK, i);
+ }
+ public List ESC_LINEBREAK() { return getTokens(PreprocessorParser.ESC_LINEBREAK); }
+ public TerminalNode ESC_LINEBREAK(int i) {
+ return getToken(PreprocessorParser.ESC_LINEBREAK, i);
+ }
+ public TerminalNode EOF() { return getToken(PreprocessorParser.EOF, 0); }
+ public StartContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_start; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof PreprocessorListener ) ((PreprocessorListener)listener).enterStart(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof PreprocessorListener ) ((PreprocessorListener)listener).exitStart(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof PreprocessorVisitor ) return ((PreprocessorVisitor extends T>)visitor).visitStart(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final StartContext start() throws RecognitionException {
+ StartContext _localctx = new StartContext(_ctx, getState());
+ enterRule(_localctx, 0, RULE_start);
+ int _la;
+ try {
+ setState(15);
+ switch (_input.LA(1)) {
+ case IF:
+ case IFN:
+ case DEFINE:
+ case UNDEFINE:
+ case INCLUDE:
+ case UNKNOWN:
+ case NUMBER:
+ case STRING:
+ case ID:
+ case ESC_LINEBREAK:
+ case LINEBREAK:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(10);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ do {
+ {
+ setState(10);
+ switch (_input.LA(1)) {
+ case IF:
+ case IFN:
+ case DEFINE:
+ case UNDEFINE:
+ case INCLUDE:
+ case UNKNOWN:
+ {
+ setState(8);
+ preprocessing();
+ }
+ break;
+ case NUMBER:
+ case STRING:
+ case ID:
+ case ESC_LINEBREAK:
+ case LINEBREAK:
+ {
+ setState(9);
+ _la = _input.LA(1);
+ if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NUMBER) | (1L << STRING) | (1L << ID) | (1L << ESC_LINEBREAK) | (1L << LINEBREAK))) != 0)) ) {
+ _errHandler.recoverInline(this);
+ } else {
+ consume();
+ }
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ setState(12);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << IF) | (1L << IFN) | (1L << DEFINE) | (1L << UNDEFINE) | (1L << INCLUDE) | (1L << UNKNOWN) | (1L << NUMBER) | (1L << STRING) | (1L << ID) | (1L << ESC_LINEBREAK) | (1L << LINEBREAK))) != 0) );
+ }
+ break;
+ case EOF:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(14);
+ match(EOF);
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ public static class PreprocessingContext extends ParserRuleContext {
+ public IfBlockContext ifBlock() {
+ return getRuleContext(IfBlockContext.class,0);
+ }
+ public CommandContext command() {
+ return getRuleContext(CommandContext.class,0);
+ }
+ public PreprocessingContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_preprocessing; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof PreprocessorListener ) ((PreprocessorListener)listener).enterPreprocessing(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof PreprocessorListener ) ((PreprocessorListener)listener).exitPreprocessing(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof PreprocessorVisitor ) return ((PreprocessorVisitor extends T>)visitor).visitPreprocessing(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final PreprocessingContext preprocessing() throws RecognitionException {
+ PreprocessingContext _localctx = new PreprocessingContext(_ctx, getState());
+ enterRule(_localctx, 2, RULE_preprocessing);
+ try {
+ setState(19);
+ switch (_input.LA(1)) {
+ case IF:
+ case IFN:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(17);
+ ifBlock();
+ }
+ break;
+ case DEFINE:
+ case UNDEFINE:
+ case INCLUDE:
+ case UNKNOWN:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(18);
+ command();
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ public static class IfBlockContext extends ParserRuleContext {
+ public TerminalNode ID() { return getToken(PreprocessorParser.ID, 0); }
+ public List LINEBREAK() { return getTokens(PreprocessorParser.LINEBREAK); }
+ public TerminalNode LINEBREAK(int i) {
+ return getToken(PreprocessorParser.LINEBREAK, i);
+ }
+ public TerminalNode ENDIF() { return getToken(PreprocessorParser.ENDIF, 0); }
+ public TerminalNode IF() { return getToken(PreprocessorParser.IF, 0); }
+ public TerminalNode IFN() { return getToken(PreprocessorParser.IFN, 0); }
+ public TerminalNode EOF() { return getToken(PreprocessorParser.EOF, 0); }
+ public List command() {
+ return getRuleContexts(CommandContext.class);
+ }
+ public CommandContext command(int i) {
+ return getRuleContext(CommandContext.class,i);
+ }
+ public TerminalNode ELSE() { return getToken(PreprocessorParser.ELSE, 0); }
+ public IfBlockContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_ifBlock; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof PreprocessorListener ) ((PreprocessorListener)listener).enterIfBlock(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof PreprocessorListener ) ((PreprocessorListener)listener).exitIfBlock(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof PreprocessorVisitor ) return ((PreprocessorVisitor extends T>)visitor).visitIfBlock(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final IfBlockContext ifBlock() throws RecognitionException {
+ IfBlockContext _localctx = new IfBlockContext(_ctx, getState());
+ enterRule(_localctx, 4, RULE_ifBlock);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(21);
+ _la = _input.LA(1);
+ if ( !(_la==IF || _la==IFN) ) {
+ _errHandler.recoverInline(this);
+ } else {
+ consume();
+ }
+ setState(22);
+ match(ID);
+ setState(23);
+ match(LINEBREAK);
+ setState(27);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << DEFINE) | (1L << UNDEFINE) | (1L << INCLUDE) | (1L << UNKNOWN))) != 0)) {
+ {
+ {
+ setState(24);
+ command();
+ }
+ }
+ setState(29);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ setState(38);
+ _la = _input.LA(1);
+ if (_la==ELSE) {
+ {
+ setState(30);
+ match(ELSE);
+ setState(31);
+ match(LINEBREAK);
+ setState(35);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << DEFINE) | (1L << UNDEFINE) | (1L << INCLUDE) | (1L << UNKNOWN))) != 0)) {
+ {
+ {
+ setState(32);
+ command();
+ }
+ }
+ setState(37);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ }
+ }
+
+ setState(40);
+ match(ENDIF);
+ setState(41);
+ _la = _input.LA(1);
+ if ( !(_la==EOF || _la==LINEBREAK) ) {
+ _errHandler.recoverInline(this);
+ } else {
+ consume();
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ public static class CommandContext extends ParserRuleContext {
+ public CommandContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_command; }
+
+ public CommandContext() { }
+ public void copyFrom(CommandContext ctx) {
+ super.copyFrom(ctx);
+ }
+ }
+ public static class UndefineContext extends CommandContext {
+ public Token name;
+ public TerminalNode UNDEFINE() { return getToken(PreprocessorParser.UNDEFINE, 0); }
+ public TerminalNode ID() { return getToken(PreprocessorParser.ID, 0); }
+ public TerminalNode LINEBREAK() { return getToken(PreprocessorParser.LINEBREAK, 0); }
+ public TerminalNode EOF() { return getToken(PreprocessorParser.EOF, 0); }
+ public UndefineContext(CommandContext ctx) { copyFrom(ctx); }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof PreprocessorListener ) ((PreprocessorListener)listener).enterUndefine(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof PreprocessorListener ) ((PreprocessorListener)listener).exitUndefine(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof PreprocessorVisitor ) return ((PreprocessorVisitor extends T>)visitor).visitUndefine(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+ public static class DefineContext extends CommandContext {
+ public Token name;
+ public TerminalNode DEFINE() { return getToken(PreprocessorParser.DEFINE, 0); }
+ public TerminalNode ID() { return getToken(PreprocessorParser.ID, 0); }
+ public List LINEBREAK() { return getTokens(PreprocessorParser.LINEBREAK); }
+ public TerminalNode LINEBREAK(int i) {
+ return getToken(PreprocessorParser.LINEBREAK, i);
+ }
+ public TerminalNode EOF() { return getToken(PreprocessorParser.EOF, 0); }
+ public DefineContext(CommandContext ctx) { copyFrom(ctx); }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof PreprocessorListener ) ((PreprocessorListener)listener).enterDefine(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof PreprocessorListener ) ((PreprocessorListener)listener).exitDefine(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof PreprocessorVisitor ) return ((PreprocessorVisitor extends T>)visitor).visitDefine(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+ public static class IncludeContext extends CommandContext {
+ public Token file;
+ public TerminalNode INCLUDE() { return getToken(PreprocessorParser.INCLUDE, 0); }
+ public TerminalNode STRING() { return getToken(PreprocessorParser.STRING, 0); }
+ public TerminalNode LINEBREAK() { return getToken(PreprocessorParser.LINEBREAK, 0); }
+ public TerminalNode EOF() { return getToken(PreprocessorParser.EOF, 0); }
+ public IncludeContext(CommandContext ctx) { copyFrom(ctx); }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof PreprocessorListener ) ((PreprocessorListener)listener).enterInclude(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof PreprocessorListener ) ((PreprocessorListener)listener).exitInclude(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof PreprocessorVisitor ) return ((PreprocessorVisitor extends T>)visitor).visitInclude(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+ public static class ErrorContext extends CommandContext {
+ public TerminalNode UNKNOWN() { return getToken(PreprocessorParser.UNKNOWN, 0); }
+ public List LINEBREAK() { return getTokens(PreprocessorParser.LINEBREAK); }
+ public TerminalNode LINEBREAK(int i) {
+ return getToken(PreprocessorParser.LINEBREAK, i);
+ }
+ public TerminalNode EOF() { return getToken(PreprocessorParser.EOF, 0); }
+ public ErrorContext(CommandContext ctx) { copyFrom(ctx); }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof PreprocessorListener ) ((PreprocessorListener)listener).enterError(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof PreprocessorListener ) ((PreprocessorListener)listener).exitError(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof PreprocessorVisitor ) return ((PreprocessorVisitor extends T>)visitor).visitError(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final CommandContext command() throws RecognitionException {
+ CommandContext _localctx = new CommandContext(_ctx, getState());
+ enterRule(_localctx, 6, RULE_command);
+ int _la;
+ try {
+ int _alt;
+ setState(66);
+ switch (_input.LA(1)) {
+ case DEFINE:
+ _localctx = new DefineContext(_localctx);
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(43);
+ match(DEFINE);
+ setState(44);
+ ((DefineContext)_localctx).name = match(ID);
+ setState(48);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,7,_ctx);
+ while ( _alt!=1 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1+1 ) {
+ {
+ {
+ setState(45);
+ _la = _input.LA(1);
+ if ( _la <= 0 || (_la==LINEBREAK) ) {
+ _errHandler.recoverInline(this);
+ } else {
+ consume();
+ }
+ }
+ }
+ }
+ setState(50);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,7,_ctx);
+ }
+ setState(51);
+ _la = _input.LA(1);
+ if ( !(_la==EOF || _la==LINEBREAK) ) {
+ _errHandler.recoverInline(this);
+ } else {
+ consume();
+ }
+ }
+ break;
+ case UNDEFINE:
+ _localctx = new UndefineContext(_localctx);
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(52);
+ match(UNDEFINE);
+ setState(53);
+ ((UndefineContext)_localctx).name = match(ID);
+ setState(54);
+ _la = _input.LA(1);
+ if ( !(_la==EOF || _la==LINEBREAK) ) {
+ _errHandler.recoverInline(this);
+ } else {
+ consume();
+ }
+ }
+ break;
+ case INCLUDE:
+ _localctx = new IncludeContext(_localctx);
+ enterOuterAlt(_localctx, 3);
+ {
+ setState(55);
+ match(INCLUDE);
+ setState(56);
+ ((IncludeContext)_localctx).file = match(STRING);
+ setState(57);
+ _la = _input.LA(1);
+ if ( !(_la==EOF || _la==LINEBREAK) ) {
+ _errHandler.recoverInline(this);
+ } else {
+ consume();
+ }
+ }
+ break;
+ case UNKNOWN:
+ _localctx = new ErrorContext(_localctx);
+ enterOuterAlt(_localctx, 4);
+ {
+ setState(58);
+ match(UNKNOWN);
+ setState(62);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,8,_ctx);
+ while ( _alt!=1 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1+1 ) {
+ {
+ {
+ setState(59);
+ _la = _input.LA(1);
+ if ( _la <= 0 || (_la==LINEBREAK) ) {
+ _errHandler.recoverInline(this);
+ } else {
+ consume();
+ }
+ }
+ }
+ }
+ setState(64);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,8,_ctx);
+ }
+ setState(65);
+ _la = _input.LA(1);
+ if ( !(_la==EOF || _la==LINEBREAK) ) {
+ _errHandler.recoverInline(this);
+ } else {
+ consume();
+ }
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ public static final String _serializedATN =
+ "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\22G\4\2\t\2\4\3\t"+
+ "\3\4\4\t\4\4\5\t\5\3\2\3\2\6\2\r\n\2\r\2\16\2\16\3\2\5\2\22\n\2\3\3\3"+
+ "\3\5\3\26\n\3\3\4\3\4\3\4\3\4\7\4\34\n\4\f\4\16\4\37\13\4\3\4\3\4\3\4"+
+ "\7\4$\n\4\f\4\16\4\'\13\4\5\4)\n\4\3\4\3\4\3\4\3\5\3\5\3\5\7\5\61\n\5"+
+ "\f\5\16\5\64\13\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\7\5?\n\5\f\5\16"+
+ "\5B\13\5\3\5\5\5E\n\5\3\5\4\62@\2\6\2\4\6\b\2\6\3\2\13\17\3\2\3\4\3\3"+
+ "\17\17\3\2\17\17N\2\21\3\2\2\2\4\25\3\2\2\2\6\27\3\2\2\2\bD\3\2\2\2\n"+
+ "\r\5\4\3\2\13\r\t\2\2\2\f\n\3\2\2\2\f\13\3\2\2\2\r\16\3\2\2\2\16\f\3\2"+
+ "\2\2\16\17\3\2\2\2\17\22\3\2\2\2\20\22\7\2\2\3\21\f\3\2\2\2\21\20\3\2"+
+ "\2\2\22\3\3\2\2\2\23\26\5\6\4\2\24\26\5\b\5\2\25\23\3\2\2\2\25\24\3\2"+
+ "\2\2\26\5\3\2\2\2\27\30\t\3\2\2\30\31\7\r\2\2\31\35\7\17\2\2\32\34\5\b"+
+ "\5\2\33\32\3\2\2\2\34\37\3\2\2\2\35\33\3\2\2\2\35\36\3\2\2\2\36(\3\2\2"+
+ "\2\37\35\3\2\2\2 !\7\5\2\2!%\7\17\2\2\"$\5\b\5\2#\"\3\2\2\2$\'\3\2\2\2"+
+ "%#\3\2\2\2%&\3\2\2\2&)\3\2\2\2\'%\3\2\2\2( \3\2\2\2()\3\2\2\2)*\3\2\2"+
+ "\2*+\7\6\2\2+,\t\4\2\2,\7\3\2\2\2-.\7\7\2\2.\62\7\r\2\2/\61\n\5\2\2\60"+
+ "/\3\2\2\2\61\64\3\2\2\2\62\63\3\2\2\2\62\60\3\2\2\2\63\65\3\2\2\2\64\62"+
+ "\3\2\2\2\65E\t\4\2\2\66\67\7\b\2\2\678\7\r\2\28E\t\4\2\29:\7\t\2\2:;\7"+
+ "\f\2\2;E\t\4\2\2<@\7\n\2\2=?\n\5\2\2>=\3\2\2\2?B\3\2\2\2@A\3\2\2\2@>\3"+
+ "\2\2\2AC\3\2\2\2B@\3\2\2\2CE\t\4\2\2D-\3\2\2\2D\66\3\2\2\2D9\3\2\2\2D"+
+ "<\3\2\2\2E\t\3\2\2\2\f\f\16\21\25\35%(\62@D";
+ public static final ATN _ATN =
+ new ATNDeserializer().deserialize(_serializedATN.toCharArray());
+ static {
+ _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
+ for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
+ _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
+ }
+ }
+}
\ No newline at end of file
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorVisitor.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorVisitor.java
new file mode 100644
index 00000000..76aa0924
--- /dev/null
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/parser/preprocessor/PreprocessorVisitor.java
@@ -0,0 +1,59 @@
+// Generated from Preprocessor.g4 by ANTLR 4.5.3
+package raven.sqdev.editors.parser.preprocessor;
+import org.antlr.v4.runtime.tree.ParseTreeVisitor;
+
+/**
+ * This interface defines a complete generic visitor for a parse tree produced
+ * by {@link PreprocessorParser}.
+ *
+ * @param The return type of the visit operation. Use {@link Void} for
+ * operations with no return type.
+ */
+public interface PreprocessorVisitor extends ParseTreeVisitor {
+ /**
+ * Visit a parse tree produced by {@link PreprocessorParser#start}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitStart(PreprocessorParser.StartContext ctx);
+ /**
+ * Visit a parse tree produced by {@link PreprocessorParser#preprocessing}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitPreprocessing(PreprocessorParser.PreprocessingContext ctx);
+ /**
+ * Visit a parse tree produced by {@link PreprocessorParser#ifBlock}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitIfBlock(PreprocessorParser.IfBlockContext ctx);
+ /**
+ * Visit a parse tree produced by the {@code Define}
+ * labeled alternative in {@link PreprocessorParser#command}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitDefine(PreprocessorParser.DefineContext ctx);
+ /**
+ * Visit a parse tree produced by the {@code Undefine}
+ * labeled alternative in {@link PreprocessorParser#command}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitUndefine(PreprocessorParser.UndefineContext ctx);
+ /**
+ * Visit a parse tree produced by the {@code Include}
+ * labeled alternative in {@link PreprocessorParser#command}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitInclude(PreprocessorParser.IncludeContext ctx);
+ /**
+ * Visit a parse tree produced by the {@code Error}
+ * labeled alternative in {@link PreprocessorParser#command}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitError(PreprocessorParser.ErrorContext ctx);
+}
\ No newline at end of file
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/sqdevEditor/SQDevFileEditor.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/sqdevEditor/SQDevFileEditor.java
index 67fb2352..4bca55ed 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/sqdevEditor/SQDevFileEditor.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/sqdevEditor/SQDevFileEditor.java
@@ -25,10 +25,10 @@ public SQDevFileEditor() {
getBasicProvider().getPartitionScanner()
.removeRule(BasicPartitionScanner.MULTILINE_COMMENT_RULE);
- getBasicConfiguration()
- .getKeywordScanner(
- SQDevPreferenceConstants.SQDEV_EDITOR_KEYWORDHIGHLIGHTING_COLOR_KEY)
- .makeCaseSensitive(false);
+ // getBasicConfiguration()
+ // .getKeywordScanner(
+ // SQDevPreferenceConstants.SQDEV_EDITOR_KEYWORDHIGHLIGHTING_COLOR_KEY)
+ // .makeCaseSensitive(false);
}
/**
@@ -53,6 +53,13 @@ protected void setKeywords() {
currentAnnotation.getDescription()));
}
+ if (!getBasicConfiguration().scannerExists(
+ SQDevPreferenceConstants.SQDEV_EDITOR_KEYWORDHIGHLIGHTING_COLOR_KEY)) {
+ // create keyword scanner
+ getBasicConfiguration().createKeywordScanner(
+ SQDevPreferenceConstants.SQDEV_EDITOR_KEYWORDHIGHLIGHTING_COLOR_KEY, false);
+ }
+
// set the keywords
getBasicConfiguration()
.getKeywordScanner(
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/Language.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/Language.java
index 37d900ad..9138cd69 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/Language.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/Language.java
@@ -16,17 +16,17 @@ public String getTooltip() {
return "The default value";
}
},
- ENGLISH,
CZECH,
+ ENGLISH,
FRENCH,
- SPANISH,
+ GERMAN,
ITALIAN,
+ JAPANESE,
+ KOREAN,
POLISH,
PORTUGUESE,
RUSSIAN,
- GERMAN,
- KOREAN,
- JAPANESE;
+ SPANISH;
@Override
public String toString() {
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport.java
index 81e25562..f7ee8152 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport.java
@@ -41,6 +41,10 @@ protected CellEditor getCellEditor(Object element) {
ViewerCell cell = getViewer().getCell(relMousePos);
+ if(cell == null) {
+ return null;
+ }
+
if (cell.getColumnIndex() == 0) {
// add validator to key cell
editor.setValidator(new ICellEditorValidator() {
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableEditor.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableEditor.java
index faad1c70..1edc20be 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableEditor.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableEditor.java
@@ -2,9 +2,11 @@
import java.io.InputStream;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.EventObject;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -60,6 +62,7 @@
import raven.sqdev.editors.BasicCodeEditor;
import raven.sqdev.exceptions.SQDevCoreException;
import raven.sqdev.interfaces.IUpdateListener;
+import raven.sqdev.misc.TreeUtils;
import raven.sqdev.pluginManagement.ResourceManager;
import raven.sqdev.util.SQDevInfobox;
@@ -117,6 +120,14 @@ public class StringTableEditor extends MultiPageEditorPart {
* The tree showing the available packages and container
*/
private Tree packageTree;
+ /**
+ * A list of all packages that were expanded in the UI-packageTree
+ */
+ private List expandedPackages;
+ /**
+ * The object that was selected last in the UI-packageTree
+ */
+ private Object lastSelectedObjectData;
/**
* The plus icon image
*/
@@ -173,6 +184,8 @@ public void pageChanged(PageChangedEvent event) {
// The XML editor was selected
// refresh parse
editor.parseInput();
+
+ saveTreeState();
} else {
if (event.getSelectedPage() instanceof SashForm) {
// the GUI/table was selected
@@ -195,7 +208,10 @@ public void pageChanged(PageChangedEvent event) {
if (packages.isEmpty()) {
setPackages(null);
} else {
+ setTableInput(null);
setPackages(packages);
+
+ restoreTreeState();
}
}
}
@@ -239,6 +255,7 @@ private void createUIPage() {
*/
private void createPackageTree(Composite parent) {
packageTree = new Tree(parent, SWT.SINGLE);
+ expandedPackages = new ArrayList();
TreeEditor editor = new TreeEditor(packageTree);
editor.horizontalAlignment = SWT.LEFT;
@@ -383,6 +400,55 @@ public void focusLost(FocusEvent e) {
updateTree();
}
+ /**
+ * Saves the current state (selection and expanded items) of the packageTree
+ */
+ private void saveTreeState() {
+ // save the expanded tree nodes
+ expandedPackages.clear();
+ for (TreeItem currentItem : packageTree.getItems()) {
+ if (currentItem.getExpanded()) {
+ expandedPackages.add((StringTablePackage) currentItem.getData());
+ }
+ }
+
+ // save selected TreeItem
+ if (packageTree.getSelection().length > 0) {
+ lastSelectedObjectData = packageTree.getSelection()[0].getData();
+ } else {
+ lastSelectedObjectData = null;
+ }
+ }
+
+ /**
+ * Restores the state of the packageTree (selection + expanded items)
+ */
+ private void restoreTreeState() {
+ // restore expanded state of packages
+ for (TreeItem currentItem : packageTree.getItems()) {
+ if (expandedPackages.contains(currentItem.getData())) {
+ currentItem.setExpanded(true);
+ }
+ }
+
+ // restore selection
+ if (lastSelectedObjectData != null) {
+ TreeItem lastSelectedItem = TreeUtils.findTreeItemWithData(packageTree,
+ lastSelectedObjectData);
+
+ if (lastSelectedItem != null) {
+ packageTree.setSelection(lastSelectedItem);
+ }
+
+ if (lastSelectedItem != null
+ && lastSelectedItem.getData() instanceof StringTableContainer) {
+ setTableInput((StringTableContainer) lastSelectedItem.getData());
+ } else {
+ setTableInput(null);
+ }
+ }
+ }
+
/**
* Adds the MenuItems for the package context menu
*
@@ -405,9 +471,12 @@ public void widgetSelected(SelectionEvent event) {
newKey.setString(Language.ORIGINAL, "");
newContainer.addKey(newKey);
+ configureContainerListener(newContainer);
+
pkg.addContainer(newContainer);
updateTree();
+ changed();
}
});
@@ -492,17 +561,17 @@ private void updateTableInput() {
currentColumn.dispose();
}
- createBasicColumns();
-
-
- List languages = new ArrayList();
-
if (tableInputList.isEmpty()) {
+ viewer.getTable().clearAll();
viewer.getTable().setEnabled(false);
viewer.getTable().setRedraw(true);
return;
}
+ createBasicColumns();
+
+ List languages = new ArrayList();
+
// find out the configured languages
for (Object current : tableInputList) {
if (current instanceof StringTableKey) {
@@ -571,6 +640,11 @@ public void widgetSelected(SelectionEvent e) {
openAddRowMenu();
}
} else {
+ if (cell == null
+ || viewer.getTable().getColumn(cell.getColumnIndex()) == null) {
+ return;
+ }
+
if (data instanceof StringTableKey && viewer.getTable()
.getColumn(cell.getColumnIndex()).getData().equals(REMOVE_COLUMN)) {
// open when clicked on a key row
@@ -617,7 +691,7 @@ private void createBasicColumns() {
// key column
TableViewerColumn keyColumn = new TableViewerColumn(viewer, SWT.NONE);
keyColumn.getColumn().setText("Key");
- keyColumn.getColumn().setToolTipText("They for usage in scripts or config");
+ keyColumn.getColumn().setToolTipText("The key for usage in scripts or config");
keyColumn.getColumn().setWidth(100);
keyColumn.getColumn().setResizable(true);
keyColumn.getColumn().setData(KEY_COLUMN);
@@ -711,6 +785,20 @@ private void addLanguageColumn(Language language) {
// TODO: sort alphabetically
int index = viewer.getTable().getColumnCount() - 2;
+ Language[] langs = displayedLanguages.keySet()
+ .toArray(new Language[displayedLanguages.keySet().size()]);
+
+ Arrays.sort(langs);
+
+ for (int i = 0; i < langs.length; i++) {
+ Language currentLanguage = langs[i];
+
+ if (currentLanguage.compareTo(language) > 0) {
+ index = index - ((langs.length) - i);
+ break; // Place has been found
+ }
+ }
+
// store index for this language
displayedLanguages.put(language, index);
@@ -773,6 +861,18 @@ public void widgetSelected(SelectionEvent e) {
contextMenu.setVisible(true);
}
});
+
+ // add the respective language to the keys if they don't contain it
+ // already
+ for (Object current : tableInputList) {
+ if (current instanceof StringTableKey) {
+ StringTableKey currentKey = ((StringTableKey) current);
+
+ if (!currentKey.containsString(language)) {
+ currentKey.setString(language, "");
+ }
+ }
+ }
}
/**
@@ -866,7 +966,16 @@ public void widgetSelected(SelectionEvent e) {
tableInputList.add(tableInputList.size() - 1, newKey);
currentTableContainer.addKey(newKey);
+ // configure the new key with all displayed languages
+ Iterator it = displayedLanguages.keySet().iterator();
+ while (it.hasNext()) {
+ newKey.setString(it.next(), "");
+ }
+
+ configureKeyListener(newKey);
+
updateTableInput();
+ changed();
}
});
}
@@ -939,6 +1048,8 @@ private int getColumnIndex(Language language) {
*/
private void updateTree() {
if (packageTree != null) {
+ saveTreeState();
+
packageTree.removeAll();
for (StringTablePackage currentPackage : packageList) {
@@ -964,6 +1075,8 @@ private void updateTree() {
}
packageTree.update();
+
+ restoreTreeState();
}
}
@@ -1167,7 +1280,7 @@ protected void syncXMLPresentation() {
if (project != null) {
projectName = project.getName();
- ;
+
}
}
diff --git a/plugin/Raven.SQDev.Misc/META-INF/MANIFEST.MF b/plugin/Raven.SQDev.Misc/META-INF/MANIFEST.MF
index 0954d94d..26d2d052 100644
--- a/plugin/Raven.SQDev.Misc/META-INF/MANIFEST.MF
+++ b/plugin/Raven.SQDev.Misc/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Misc
Bundle-SymbolicName: raven.sqdev.misc;singleton:=true
-Bundle-Version: 0.3.0
+Bundle-Version: 0.3.1
Bundle-Activator: raven.sqdev.activator.Activator
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.swt,
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevCollectionException.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevCollectionException.class
index 6f3f2413..a0a6920d 100644
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevCollectionException.class and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevCollectionException.class differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/SQFCommandCollector.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/SQFCommandCollector.class
index 2d0b93fe..493d969b 100644
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/SQFCommandCollector.class and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/SQFCommandCollector.class differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/SQFCommand.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/SQFCommand.class
index b9071be2..df58392b 100644
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/SQFCommand.class and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/SQFCommand.class differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/TreeUtils.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/TreeUtils.class
new file mode 100644
index 00000000..b5516f66
Binary files /dev/null and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/TreeUtils.class differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/UpdateReporter.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/UpdateReporter.class
index f92ab2b1..a016c92e 100644
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/UpdateReporter.class and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/UpdateReporter.class differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/syntax/Syntax.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/syntax/Syntax.class
index fdaefdba..f205ea00 100644
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/syntax/Syntax.class and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/syntax/Syntax.class differ
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/exceptions/SQDevCollectionException.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/exceptions/SQDevCollectionException.java
index 5b837a96..2813ce7c 100644
--- a/plugin/Raven.SQDev.Misc/src/raven/sqdev/exceptions/SQDevCollectionException.java
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/exceptions/SQDevCollectionException.java
@@ -1,30 +1,55 @@
package raven.sqdev.exceptions;
+import raven.sqdev.infoCollection.base.Keyword;
+import raven.sqdev.infoCollection.base.KeywordList;
+
/**
* An exception indicating that something went wrong during a collection process
*
* @author Raven
- *
+ *
*/
public class SQDevCollectionException extends SQDevException {
private static final long serialVersionUID = 5076943149344521751L;
- public SQDevCollectionException(String message) {
+ private Keyword failedKeyword;
+
+ private KeywordList prevKeywords;
+
+ public SQDevCollectionException(String message, Keyword failedKeyword, KeywordList list) {
super(message);
+ this.failedKeyword = failedKeyword;
+ this.prevKeywords = list;
}
- public SQDevCollectionException(Throwable cause) {
+ public SQDevCollectionException(Throwable cause, Keyword failedKeyword, KeywordList list) {
super(cause);
+ this.failedKeyword = failedKeyword;
+ this.prevKeywords = list;
}
- public SQDevCollectionException(String message, Throwable cause) {
+ public SQDevCollectionException(String message, Throwable cause, Keyword failedKeyword,
+ KeywordList list) {
super(message, cause);
+ this.failedKeyword = failedKeyword;
+ this.prevKeywords = list;
+ }
+
+ /**
+ * Gets the Keword
that has been processed when this exception
+ * has been thrown. (May be null
)
+ */
+ public Keyword getFailedKeyword() {
+ return failedKeyword;
}
- public SQDevCollectionException(String message, Throwable cause, boolean enableSuppression,
- boolean writableStackTrace) {
- super(message, cause, enableSuppression, writableStackTrace);
+ /**
+ * Gets the list of keyowrds that were processed before this exception has
+ * occured
+ */
+ public KeywordList getPreviouslyProcessedKeywords() {
+ return (prevKeywords == null) ? new KeywordList() : prevKeywords;
}
}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/SQFCommandCollector.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/SQFCommandCollector.java
index 05210317..ea441dec 100644
--- a/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/SQFCommandCollector.java
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/SQFCommandCollector.java
@@ -21,6 +21,7 @@
import raven.sqdev.infoCollection.base.ELocality;
import raven.sqdev.infoCollection.base.KeywordList;
import raven.sqdev.infoCollection.base.SQFCommand;
+import raven.sqdev.infoCollection.base.SQFElement;
import raven.sqdev.misc.SQDev;
import raven.sqdev.misc.TextUtils;
import raven.sqdev.syntax.Syntax;
@@ -90,6 +91,14 @@ public class SQFCommandCollector {
* The name of the last command in the list on the base site
*/
private String lastCommandName;
+ /**
+ * The list of processed Keywords
+ */
+ private KeywordList list;
+ /**
+ * A flag indicating whether the next command should be skipped
+ */
+ private boolean skipNext = false;
/**
* Creates an instance of this collector
@@ -122,10 +131,16 @@ public SQFCommandCollector(URL baseSite, String firstCommandName, String lastCom
* @throws SQDevCollectionException
*/
public KeywordList collect(IProgressMonitor monitor) throws SQDevCollectionException {
- String siteContent = getSite(baseSite);
-
- // get relevant content only
- siteContent = trimToRelevantListOnly(siteContent);
+ String siteContent;
+ try {
+ siteContent = getSite(baseSite);
+
+ // get relevant content only
+ siteContent = trimToRelevantListOnly(siteContent);
+ } catch (IOException e) {
+ // rethrow
+ throw new SQDevCollectionException(e, null, null);
+ }
// compose the line where the collecting should start at
String relevanStarttLine = "" + lastCommandName + "";
if (!siteContent.contains(relevanStarttLine) || !siteContent.contains(relevantEndLine)) {
- throw new SQDevCollectionException("The specified base site \"" + baseSite.toString()
- + "\" does not contain a line corresponding to the specified first command \""
- + firstCommandName + "\" or last command \"" + lastCommandName + "\"");
+ throw new SQDevCollectionException(
+ "The specified base site \"" + baseSite.toString()
+ + "\" does not contain a line corresponding to the specified first command \""
+ + firstCommandName + "\" or last command \"" + lastCommandName + "\"",
+ null, list);
}
// start the list at the first command
@@ -146,7 +163,7 @@ public KeywordList collect(IProgressMonitor monitor) throws SQDevCollectionExcep
// create keywordList
- KeywordList list = new KeywordList();
+ list = new KeywordList();
monitor.beginTask("Gathering SQF commands", siteContent.split("\n").length);
@@ -157,6 +174,11 @@ public KeywordList collect(IProgressMonitor monitor) throws SQDevCollectionExcep
return list;
}
+ if (skipNext) {
+ skipNext = false;
+ continue;
+ }
+
// get the postfix for the wiki page of the current command
String postfix = currentLine.substring(currentLine.indexOf("\"") + 1);
postfix = postfix.substring(0, postfix.indexOf("\""));
@@ -181,7 +203,7 @@ public KeywordList collect(IProgressMonitor monitor) throws SQDevCollectionExcep
e.printStackTrace();
// rethrow
- throw new SQDevCollectionException(e);
+ throw new SQDevCollectionException(e, null, list);
}
if (!CONTROL_STRUCTURE_KEYWORDS.contains(name)) {
@@ -237,7 +259,13 @@ private SQFCommand processControlStructure(SQFCommand control, URL commandPage)
// set wiki URL
control.setWikiPage(commandPage);
- String content = formatCommandPageContent(getSite(commandPage));
+ String content;
+ try {
+ content = formatCommandPageContent(getSite(commandPage));
+ } catch (IOException e) {
+ // rethrow
+ throw new SQDevCollectionException(e, null, list);
+ }
String[] categories = categorizeContent(content);
@@ -259,56 +287,49 @@ private SQFCommand processControlStructure(SQFCommand control, URL commandPage)
* @return
* @throws SQDevCollectionException
*/
- private String getSite(URL url) throws SQDevCollectionException {
- try {
- // read the site's content
- InputStream in = url.openStream();
- ByteArrayOutputStream out = new ByteArrayOutputStream();
-
- byte[] bArray = new byte[in.available()];
-
- in.read(bArray);
-
- out.write(bArray);
-
- int next;
- while ((next = in.read()) > 0) {
- out.write((char) next);
- }
-
- String content = out.toString();
+ private String getSite(URL url) throws IOException {
+ // read the site's content
+ InputStream in = url.openStream();
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+ byte[] bArray = new byte[in.available()];
+
+ in.read(bArray);
+
+ out.write(bArray);
+
+ int next;
+ while ((next = in.read()) > 0) {
+ out.write((char) next);
+ }
+
+ String content = out.toString();
+
+ // replace html escape characters
+ Pattern escapePattern = Pattern.compile("[0-9]+;");
+ Matcher matcher = escapePattern.matcher(content);
+
+ while (matcher.find()) {
+ int pos1 = matcher.start();
+ int pos2 = matcher.end();
- // replace html escape characters
- Pattern escapePattern = Pattern.compile("[0-9]+;");
- Matcher matcher = escapePattern.matcher(content);
+ String prefix = content.substring(0, pos1);
+ String fragment = content.substring(pos1, pos2);
+ char escapeCharacter = (char) Integer
+ .parseInt(fragment.substring(2, fragment.length() - 1));
+ String postfix = content.substring(pos2);
- while (matcher.find()) {
- int pos1 = matcher.start();
- int pos2 = matcher.end();
-
- String prefix = content.substring(0, pos1);
- String fragment = content.substring(pos1, pos2);
- char escapeCharacter = (char) Integer
- .parseInt(fragment.substring(2, fragment.length() - 1));
- String postfix = content.substring(pos2);
-
- if (escapeCharacter == (char) 160) {
- // replace non-breaking spaces with normal ones
- escapeCharacter = ' ';
- }
-
- content = prefix + escapeCharacter + postfix;
-
- matcher = escapePattern.matcher(content);
+ if (escapeCharacter == (char) 160) {
+ // replace non-breaking spaces with normal ones
+ escapeCharacter = ' ';
}
- return content;
- } catch (IOException e) {
- e.printStackTrace();
+ content = prefix + escapeCharacter + postfix;
- // rethrow
- throw new SQDevCollectionException(e);
+ matcher = escapePattern.matcher(content);
}
+
+ return content;
}
/**
@@ -319,29 +340,22 @@ private String getSite(URL url) throws SQDevCollectionException {
* The content to trim
* @throws SQDevCollectionException
*/
- private String trimToRelevantListOnly(String htmlContent) throws SQDevCollectionException {
+ private String trimToRelevantListOnly(String htmlContent) throws IOException {
BufferedReader reader = new BufferedReader(new StringReader(htmlContent));
String content = "";
String currentLine = "";
- try {
- while ((currentLine = reader.readLine()) != null) {
- // only consider lines containing a link to the wiki
- if (currentLine.contains("SQFElement this syntax applies to
* @return The processed syntax with data types instead of placeholders
* @throws SQDevCollectionException
*/
- private String processSyntax(String syntax, String parameter) throws SQDevCollectionException {
+ private String processSyntax(String syntax, String parameter, SQFElement element)
+ throws SQDevCollectionException {
for (String currentParameter : parameter.split("param:\n")) {
// process each listed parameter
currentParameter = currentParameter.trim();
@@ -921,14 +947,16 @@ private String processSyntax(String syntax, String parameter) throws SQDevCollec
// make sure parameter are in proper format
if (!elements[0].contains(":") || elements.length == 1) {
- if (elements.length > 2 && elements[1].equals(":")) {
+ if (elements.length > 2
+ && (elements[1].equals(":") || elements[1].equals("-"))) {
// add needed colon
elements[0] = elements[0] + ":";
// Move parameter data type
elements[1] = elements[2];
} else {
throw new SQDevCollectionException(
- "Unexpected parameter format - missing\":\" at " + elements[0]);
+ "Unexpected parameter format - missing\":\" at " + elements[0],
+ element, list);
}
}
@@ -958,7 +986,7 @@ private String processSyntax(String syntax, String parameter) throws SQDevCollec
syntax = builder.toString().trim();
} catch (BadSyntaxException e) {
- throw new SQDevCollectionException("Failed at processing syntax", e);
+ throw new SQDevCollectionException("Failed at processing syntax", e, element, list);
}
}
@@ -1029,6 +1057,8 @@ private String formatSyntaxContent(String syntaxContent) {
*
* @param syntaxContent
* The syntaxes with the respective information
+ * @param The
+ * SQFElement
the syntaxes belong to
* @return A two-dimensional array where the first dimension stands for
* different syntaxes (alternatives syntaxes) and the second
* dimension is as following:
@@ -1038,7 +1068,8 @@ private String formatSyntaxContent(String syntaxContent) {
* index 2: The return value
* @throws SQDevCollectionException
*/
- private String[][] splitSyntaxes(String syntaxContent) throws SQDevCollectionException {
+ private String[][] splitSyntaxes(String syntaxContent, SQFElement element)
+ throws SQDevCollectionException {
// split the syntaxes and their components
ArrayList> syntaxes = new ArrayList>(1);
@@ -1071,7 +1102,8 @@ private String[][] splitSyntaxes(String syntaxContent) throws SQDevCollectionExc
// store the gathered values
currentSyntaxComponents.add(SYNTAXPART_SYNTAX, formatRawSyntax(currentSyntax));
- currentSyntaxComponents.add(SYNTAXPART_PARAMETERS, formatParameters(currentParameter));
+ currentSyntaxComponents.add(SYNTAXPART_PARAMETERS,
+ formatParameters(currentParameter, element));
currentSyntaxComponents.add(SYNTAXPART_RETURN_VALUE,
formatReturnValue(currentReturnValue));
@@ -1113,10 +1145,13 @@ private String formatRawSyntax(String syntax) {
*
* @param parameters
* The parameters to format
+ * @param element
+ * The SQFElement
the given parameters belong to
* @return The formatted parameters
* @throws SQDevCollectionException
*/
- private String formatParameters(String parameters) throws SQDevCollectionException {
+ private String formatParameters(String parameters, SQFElement element)
+ throws SQDevCollectionException {
String[] paramArray = parameters.split("param:\n");
parameters = "";
@@ -1132,7 +1167,7 @@ private String formatParameters(String parameters) throws SQDevCollectionExcepti
try {
areas = TextUtils.getTextAreas(parameters);
} catch (BadSyntaxException e) {
- throw new SQDevCollectionException("Can't format parameter", e);
+ throw new SQDevCollectionException("Can't format parameter", e, element, list);
}
StringBuilder builder = new StringBuilder();
@@ -1254,4 +1289,11 @@ private String formatReturnValue(String returnValue) {
// TODO
return returnValue;
}
+
+ /**
+ * Sets the respective flag so that the next command will be skipped
+ */
+ public void skipFNext() {
+ skipNext = true;
+ }
}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/base/SQFCommand.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/base/SQFCommand.java
index a1082ad3..0f19f096 100644
--- a/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/base/SQFCommand.java
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/base/SQFCommand.java
@@ -574,7 +574,7 @@ public String toString() {
representation += "hasRawSyntax: " + hasRawSyntax() + "\n";
representation += "hasExamples: " + hasExample() + "\n";
representation += "hasNotes: " + hasNote() + "\n";
- representation += "hasReturnValue" + hasReturnValue() + "\n";
+ representation += "hasReturnValue: " + hasReturnValue() + "\n";
return representation;
}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/TreeUtils.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/TreeUtils.java
new file mode 100644
index 00000000..d34535d4
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/TreeUtils.java
@@ -0,0 +1,77 @@
+package raven.sqdev.misc;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+
+/**
+ * A class containing utility methods for deling with trees
+ *
+ * @author Raven
+ *
+ */
+public class TreeUtils {
+
+ /**
+ * Searches for the first TreeItem
contained in the given
+ * Tree
whose data is equal to the given one
+ *
+ * @param tree
+ * The Tree
to search
+ * @param data
+ * The data to search for
+ * @return The respective TreeItem
or null
if none
+ * could be found
+ */
+ public static TreeItem findTreeItemWithData(Tree tree, Object data) {
+ for (TreeItem currentItem : getAllTreeItems(tree)) {
+ if (currentItem.getData() != null && currentItem.getData().equals(data)) {
+ return currentItem;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Gets all TreeItems
contained in the given Tree
+ *
+ * @param tree
+ * The Tree
whose items should get retrieved
+ * @return The list of all contained TreeItems
+ */
+ public static List getAllTreeItems(Tree tree) {
+ List itemList = new ArrayList();
+
+ for (TreeItem currentItem : tree.getItems()) {
+ itemList.add(currentItem);
+
+ itemList.addAll(getAllSubItems(currentItem));
+ }
+
+ return itemList;
+ }
+
+ /**
+ * Gets all TreeItems
that are direct or indirect children of
+ * the given item
+ *
+ * @param item
+ * The TreeItem
to use as a root
+ * @return The list of all sub-items
+ */
+ public static List getAllSubItems(TreeItem item) {
+ List itemList = new ArrayList();
+
+ for (TreeItem currentItem : item.getItems()) {
+ itemList.add(currentItem);
+
+ itemList.addAll(getAllSubItems(currentItem));
+ }
+
+ return itemList;
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/UpdateReporter.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/UpdateReporter.java
index 433e56dc..abe862ef 100644
--- a/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/UpdateReporter.java
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/UpdateReporter.java
@@ -67,7 +67,7 @@ public void removeAllUpdateListener() {
/**
* Notifies all registered IUpdateListener
*/
- protected void notifyUpdateListener() {
+ public void notifyUpdateListener() {
for (IUpdateListener listener : updateListenerList) {
listener.updated();
}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/syntax/Syntax.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/syntax/Syntax.java
index e9fb3cf6..4ed1011f 100644
--- a/plugin/Raven.SQDev.Misc/src/raven/sqdev/syntax/Syntax.java
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/syntax/Syntax.java
@@ -92,9 +92,7 @@ public void setElements(ArrayList elements) {
* The element to add
*/
public void addElement(SyntaxElement element) {
- if (!getElements().contains(element)) {
- getElements().add(element);
- }
+ getElements().add(element);
}
/**
diff --git a/plugin/Raven.SQDev.SQFEditor/META-INF/MANIFEST.MF b/plugin/Raven.SQDev.SQFEditor/META-INF/MANIFEST.MF
index 31c83941..4d4de381 100644
--- a/plugin/Raven.SQDev.SQFEditor/META-INF/MANIFEST.MF
+++ b/plugin/Raven.SQDev.SQFEditor/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: SQFEditor
Bundle-SymbolicName: raven.sqdev.editors.sqfeditor;singleton:=true
-Bundle-Version: 0.4.0
+Bundle-Version: 0.5.0
Bundle-Activator: raven.sqdev.activator.Activator
Bundle-Vendor: Raven
Require-Bundle: org.eclipse.ui,
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQF_Editor$1.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQF_Editor$1.class
index d0c31908..0a914270 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQF_Editor$1.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQF_Editor$1.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQF_Editor.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQF_Editor.class
index 6ff4553c..ef10665d 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQF_Editor.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQF_Editor.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/PreprocessorErrorListener.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/PreprocessorErrorListener.class
new file mode 100644
index 00000000..39f4bebb
Binary files /dev/null and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/PreprocessorErrorListener.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQF.tokens b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQF.tokens
index 775d9169..5558138e 100644
--- a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQF.tokens
+++ b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQF.tokens
@@ -21,11 +21,18 @@ CLOSING_CURLY_BRACKET=20
NUMBER=21
STRING=22
ID=23
-PREPROCESSOR=24
-DOC=25
-COMMENT=26
-WS=27
-BINARY_OPERATOR=28
+PREPRO=24
+IFDEF=25
+IFNDEF=26
+PRE_ELSE=27
+ENDIF=28
+DOC=29
+COMMENT=30
+LINEBREAK=31
+WS=32
+ANY=33
+BINARY_OPERATOR=34
+MACRO_EXPRESSION=35
','=1
';'=2
'='=3
@@ -37,3 +44,7 @@ BINARY_OPERATOR=28
']'=18
'{'=19
'}'=20
+'#ifdef'=25
+'#ifndef'=26
+'#else'=27
+'#endif'=28
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFBaseListener.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFBaseListener.class
index 93f8858a..f1949740 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFBaseListener.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFBaseListener.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFBaseVisitor.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFBaseVisitor.class
index 512876ea..d7c31eb3 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFBaseVisitor.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFBaseVisitor.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.class
index 48523541..c4a1a44c 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.tokens b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.tokens
index 951293e0..fff43c73 100644
--- a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.tokens
+++ b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.tokens
@@ -21,10 +21,16 @@ CLOSING_CURLY_BRACKET=20
NUMBER=21
STRING=22
ID=23
-PREPROCESSOR=24
-DOC=25
-COMMENT=26
-WS=27
+PREPRO=24
+IFDEF=25
+IFNDEF=26
+PRE_ELSE=27
+ENDIF=28
+DOC=29
+COMMENT=30
+LINEBREAK=31
+WS=32
+ANY=33
','=1
';'=2
'='=3
@@ -36,3 +42,7 @@ WS=27
']'=18
'{'=19
'}'=20
+'#ifdef'=25
+'#ifndef'=26
+'#else'=27
+'#endif'=28
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFListener.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFListener.class
index 7ae7f4a3..8e95ecd6 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFListener.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFListener.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParseListener.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParseListener.class
index ef405f85..84d2d0fb 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParseListener.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParseListener.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ArithmeticExpressionContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ArithmeticExpressionContext.class
index a8883fd1..379979cb 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ArithmeticExpressionContext.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ArithmeticExpressionContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ArrayContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ArrayContext.class
index 96ee56b9..029e2d8f 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ArrayContext.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ArrayContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$AssignmentContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$AssignmentContext.class
index 42578b74..aa3b05f1 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$AssignmentContext.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$AssignmentContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$BinaryExpressionContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$BinaryExpressionContext.class
index 0b694d95..d9b31249 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$BinaryExpressionContext.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$BinaryExpressionContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$BooleanExpressionContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$BooleanExpressionContext.class
index 9a2c97ad..1ce77bd1 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$BooleanExpressionContext.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$BooleanExpressionContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$CodeContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$CodeContext.class
index 572ce78f..3a61a293 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$CodeContext.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$CodeContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ElseExpressionContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ElseExpressionContext.class
index 6b99f701..d4337d1b 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ElseExpressionContext.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ElseExpressionContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ExpressionContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ExpressionContext.class
index 9d1d925e..e65113ef 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ExpressionContext.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ExpressionContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$InlineCodeContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$InlineCodeContext.class
index a0490aac..2006fe3d 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$InlineCodeContext.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$InlineCodeContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$MacroContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$MacroContext.class
index b945b8aa..9d8ea9bf 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$MacroContext.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$MacroContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$MacroExpressionContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$MacroExpressionContext.class
index 27614b0a..2d41d803 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$MacroExpressionContext.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$MacroExpressionContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ModifyExpressionContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ModifyExpressionContext.class
index f8da0a92..892ebdd0 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ModifyExpressionContext.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ModifyExpressionContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$NularContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$NularContext.class
new file mode 100644
index 00000000..9b9ef9ab
Binary files /dev/null and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$NularContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$NularExpressionContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$NularExpressionContext.class
index 1d08c7f3..1643f55f 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$NularExpressionContext.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$NularExpressionContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ParentheseContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ParentheseContext.class
index 5757ef4f..79437f44 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ParentheseContext.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$ParentheseContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$PreprocessorContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$PreprocessorContext.class
new file mode 100644
index 00000000..a4b0ebe8
Binary files /dev/null and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$PreprocessorContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$StatementContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$StatementContext.class
index 66cac1b2..6653d4c4 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$StatementContext.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$StatementContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$UnaryContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$UnaryContext.class
index a0c9cf93..9d795bb1 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$UnaryContext.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$UnaryContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$UnaryExpressionContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$UnaryExpressionContext.class
index 8a548b85..fb395cdf 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$UnaryExpressionContext.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$UnaryExpressionContext.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser.class
index 9f17c059..3ba6d036 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFVisitor.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFVisitor.class
index 8bca5b4c..43fe1ced 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFVisitor.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFVisitor.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/SQF_Editor.java b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/SQF_Editor.java
index 2dbe2fff..b16b577b 100644
--- a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/SQF_Editor.java
+++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/SQF_Editor.java
@@ -23,7 +23,13 @@
import raven.sqdev.editors.BasicErrorListener;
import raven.sqdev.editors.BasicPartitionScanner;
import raven.sqdev.editors.BasicSourceViewerConfiguration;
+import raven.sqdev.editors.IMacroSupport;
import raven.sqdev.editors.KeywordScanner;
+import raven.sqdev.editors.Macro;
+import raven.sqdev.editors.parser.preprocessor.PreprocessorLexer;
+import raven.sqdev.editors.parser.preprocessor.PreprocessorParseListener;
+import raven.sqdev.editors.parser.preprocessor.PreprocessorParser;
+import raven.sqdev.editors.sqfeditor.parsing.PreprocessorErrorListener;
import raven.sqdev.editors.sqfeditor.parsing.SQFLexer;
import raven.sqdev.editors.sqfeditor.parsing.SQFParseListener;
import raven.sqdev.editors.sqfeditor.parsing.SQFParser;
@@ -50,7 +56,8 @@
* @author Raven
*
*/
-public class SQF_Editor extends BasicCodeEditor implements IKeywordListChangeListener {
+public class SQF_Editor extends BasicCodeEditor
+ implements IKeywordListChangeListener, IMacroSupport {
/**
* The KeywordProvider for the SQF keywords
@@ -77,6 +84,14 @@ public class SQF_Editor extends BasicCodeEditor implements IKeywordListChangeLis
* A list of global variables in this editor
*/
private List globalVariables;
+ /**
+ * A list of defined macros for this editor
+ */
+ private List macros;
+ /**
+ * A list of the macro-names defined for this editor
+ */
+ private List macroNames;
/**
* The CommonTokenStream
that is associated with the current
* parse tree
@@ -127,6 +142,9 @@ public SQF_Editor() {
localVariables = new ArrayList();
globalVariables = new ArrayList();
+ macros = new ArrayList();
+ macroNames = new ArrayList();
+
categorizeCommands();
}
@@ -202,11 +220,32 @@ protected IStatus run(IProgressMonitor monitor) {
@Override
protected ParseTree doParse(String input) {
+ macros.clear();
+ macroNames.clear();
+
+ // preprocess
+ ANTLRInputStream prepIn = new ANTLRInputStream(input.toString());
+
+ PreprocessorLexer prepLexer = new PreprocessorLexer(prepIn);
+
+ CommonTokenStream prepTokens = new CommonTokenStream(prepLexer);
+
+ PreprocessorParser prepParser = new PreprocessorParser(prepTokens);
+
+ prepParser.removeErrorListeners();
+ prepParser.addErrorListener(new PreprocessorErrorListener(this, 0));
+
+ ParseTreeWalker prepWalker = new ParseTreeWalker();
+
+ prepWalker.walk(new PreprocessorParseListener(this), prepParser.start());
+
+
+ // SQF parsing
BasicErrorListener listener = new BasicErrorListener(this);
ANTLRInputStream in = new ANTLRInputStream(input);
- SQFLexer lexer = new SQFLexer(in, ListUtils.toLowerCase(getBinaryKeywords()));
+ SQFLexer lexer = new SQFLexer(in, ListUtils.toLowerCase(getBinaryKeywords()), macroNames);
lexer.removeErrorListeners();
lexer.addErrorListener(listener);
@@ -410,7 +449,14 @@ public void setVariables(List localVariables, List globalVar
}
@Override
- public void createMarker(String type, int offset, int length, String message, int severity) {
- // do nothing TODO: remove + fix macros
+ public void addMacro(Macro macro) {
+ macros.add(macro);
+ macroNames.add(macro.getKeyword());
+ }
+
+ @Override
+ public void removeMacro(Macro macro) {
+ macros.remove(macro);
+ macroNames.remove(macro.getKeyword());
}
}
diff --git a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/PreprocessorErrorListener.java b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/PreprocessorErrorListener.java
new file mode 100644
index 00000000..401c4cbb
--- /dev/null
+++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/PreprocessorErrorListener.java
@@ -0,0 +1,35 @@
+package raven.sqdev.editors.sqfeditor.parsing;
+
+import org.antlr.v4.runtime.RecognitionException;
+import org.antlr.v4.runtime.Recognizer;
+import org.antlr.v4.runtime.Token;
+
+import raven.sqdev.editors.BasicCodeEditor;
+import raven.sqdev.editors.BasicErrorListener;
+
+public class PreprocessorErrorListener extends BasicErrorListener {
+
+ private int initialOffset;
+
+ public PreprocessorErrorListener(BasicCodeEditor editor, int initialOffset) {
+ super(editor);
+
+ this.initialOffset = initialOffset;
+ }
+
+ @Override
+ public void syntaxError(Recognizer, ?> recognizer, Object offendingSymbol, int line,
+ int charPositionInline, String msg, RecognitionException e) {
+ if (line < 1 || !(offendingSymbol instanceof Token)) {
+ return;
+ }
+
+ Token offendingToken = (Token) offendingSymbol;
+
+ int length = (offendingToken.getType() == Token.EOF) ? 0
+ : offendingToken.getText().length();
+
+ super.reportError(offendingToken.getStartIndex() + initialOffset, length, msg);
+ }
+
+}
diff --git a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQF.tokens b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQF.tokens
index 775d9169..5558138e 100644
--- a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQF.tokens
+++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQF.tokens
@@ -21,11 +21,18 @@ CLOSING_CURLY_BRACKET=20
NUMBER=21
STRING=22
ID=23
-PREPROCESSOR=24
-DOC=25
-COMMENT=26
-WS=27
-BINARY_OPERATOR=28
+PREPRO=24
+IFDEF=25
+IFNDEF=26
+PRE_ELSE=27
+ENDIF=28
+DOC=29
+COMMENT=30
+LINEBREAK=31
+WS=32
+ANY=33
+BINARY_OPERATOR=34
+MACRO_EXPRESSION=35
','=1
';'=2
'='=3
@@ -37,3 +44,7 @@ BINARY_OPERATOR=28
']'=18
'{'=19
'}'=20
+'#ifdef'=25
+'#ifndef'=26
+'#else'=27
+'#endif'=28
diff --git a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFBaseListener.java b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFBaseListener.java
index 915a0105..f50bc75b 100644
--- a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFBaseListener.java
+++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFBaseListener.java
@@ -23,6 +23,18 @@ public class SQFBaseListener implements SQFListener {
* The default implementation does nothing.
*/
@Override public void exitCode(SQFParser.CodeContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterPreprocessor(SQFParser.PreprocessorContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitPreprocessor(SQFParser.PreprocessorContext ctx) { }
/**
* {@inheritDoc}
*
@@ -124,13 +136,13 @@ public class SQFBaseListener implements SQFListener {
*
* The default implementation does nothing.
*/
- @Override public void enterBinary(SQFParser.BinaryContext ctx) { }
+ @Override public void enterNular(SQFParser.NularContext ctx) { }
/**
* {@inheritDoc}
*
* The default implementation does nothing.
*/
- @Override public void exitBinary(SQFParser.BinaryContext ctx) { }
+ @Override public void exitNular(SQFParser.NularContext ctx) { }
/**
* {@inheritDoc}
*
diff --git a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFBaseVisitor.java b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFBaseVisitor.java
index 929b0363..0cb0224f 100644
--- a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFBaseVisitor.java
+++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFBaseVisitor.java
@@ -18,6 +18,13 @@ public class SQFBaseVisitor extends AbstractParseTreeVisitor implements SQ
* {@link #visitChildren} on {@code ctx}.
*/
@Override public T visitCode(SQFParser.CodeContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitPreprocessor(SQFParser.PreprocessorContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
@@ -80,7 +87,7 @@ public class SQFBaseVisitor extends AbstractParseTreeVisitor implements SQ
* The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.
*/
- @Override public T visitBinary(SQFParser.BinaryContext ctx) { return visitChildren(ctx); }
+ @Override public T visitNular(SQFParser.NularContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
diff --git a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.java b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.java
index 8a3e1b73..d22511d7 100644
--- a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.java
+++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.java
@@ -6,9 +6,12 @@
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.CharStream;
+import org.antlr.v4.runtime.Token;
+import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
+import org.antlr.v4.runtime.misc.*;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class SQFLexer extends Lexer {
@@ -22,8 +25,9 @@ public class SQFLexer extends Lexer {
CONFIG_OPERATOR=10, ADDITION_OPERATOR=11, MIN_MAX_OPERATOR=12, MULTIPLICATION_OPERATOR=13,
MODULO_OPERATOR=14, OPENING_ROUND_BRACKET=15, CLOSING_ROUND_BRACKET=16,
OPENING_SQUARE_BRACKET=17, CLOSING_SQUARE_BRACKET=18, OPENING_CURLY_BRACKET=19,
- CLOSING_CURLY_BRACKET=20, NUMBER=21, STRING=22, ID=23, PREPROCESSOR=24,
- DOC=25, COMMENT=26, WS=27;
+ CLOSING_CURLY_BRACKET=20, NUMBER=21, STRING=22, ID=23, PREPRO=24, IFDEF=25,
+ IFNDEF=26, PRE_ELSE=27, ENDIF=28, DOC=29, COMMENT=30, LINEBREAK=31, WS=32,
+ ANY=33;
public static String[] modeNames = {
"DEFAULT_MODE"
};
@@ -33,14 +37,15 @@ public class SQFLexer extends Lexer {
"CONFIG_OPERATOR", "ADDITION_OPERATOR", "MIN_MAX_OPERATOR", "MULTIPLICATION_OPERATOR",
"MODULO_OPERATOR", "OPENING_ROUND_BRACKET", "CLOSING_ROUND_BRACKET", "OPENING_SQUARE_BRACKET",
"CLOSING_SQUARE_BRACKET", "OPENING_CURLY_BRACKET", "CLOSING_CURLY_BRACKET",
- "NUMBER", "STRING", "ID", "PREPROCESSOR", "DOC", "COMMENT", "WS", "INT",
- "FLOAT", "LETTER", "A", "D", "E", "F", "I", "L", "M", "N", "O", "R", "S",
- "T", "X"
+ "NUMBER", "STRING", "ID", "PREPRO", "IFDEF", "IFNDEF", "PRE_ELSE", "ENDIF",
+ "DOC", "COMMENT", "LINEBREAK", "WS", "INT", "FLOAT", "LETTER", "A", "D",
+ "E", "F", "I", "L", "M", "N", "O", "R", "S", "T", "X", "ANY"
};
private static final String[] _LITERAL_NAMES = {
null, "','", "';'", "'='", null, null, null, null, "'^'", null, "'>>'",
- null, null, null, null, "'('", "')'", "'['", "']'", "'{'", "'}'"
+ null, null, null, null, "'('", "')'", "'['", "']'", "'{'", "'}'", null,
+ null, null, null, "'#ifdef'", "'#ifndef'", "'#else'", "'#endif'"
};
private static final String[] _SYMBOLIC_NAMES = {
null, "COMMA", "SEMICOLON", "EQUALS", "ELSE", "OR", "AND", "NOT", "EXP",
@@ -48,7 +53,8 @@ public class SQFLexer extends Lexer {
"MULTIPLICATION_OPERATOR", "MODULO_OPERATOR", "OPENING_ROUND_BRACKET",
"CLOSING_ROUND_BRACKET", "OPENING_SQUARE_BRACKET", "CLOSING_SQUARE_BRACKET",
"OPENING_CURLY_BRACKET", "CLOSING_CURLY_BRACKET", "NUMBER", "STRING",
- "ID", "PREPROCESSOR", "DOC", "COMMENT", "WS"
+ "ID", "PREPRO", "IFDEF", "IFNDEF", "PRE_ELSE", "ENDIF", "DOC", "COMMENT",
+ "LINEBREAK", "WS", "ANY"
};
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
@@ -96,23 +102,27 @@ public Vocabulary getVocabulary() {
* The id for the hidden documentation token channel
*/
public static final int DOCUMENTATION_CHANNEL = 3;
- /**
- * The id for the hidden preprocessor token channel
- */
- public static final int PREPROCESSOR_CHANNEL = 4;
-
- private List binaryOperators = new ArrayList();
+ /**
+ * The list of binary operators (has to be in lowercase!)
+ */
+ private List binaryOperators;
+ /**
+ * The list of defined macros (case-sensitive)
+ */
+ private List macroExpressions = new ArrayList();
/**
- * Creates an instance of this lexer
+ * Creates an instance of this lexer. Afterwards setParser
has to be called
* @param in The inputStream to work on
* @param binaryOperators A list of binary operators the lexer should match. These operators have
* to be all lowercase in order to get matched!
+ * @param macros A list of defined macro-names (all lowercase!)
*/
- public SQFLexer(CharStream in, List binaryOperators) {
+ public SQFLexer(CharStream in, List binaryOperators, List macros) {
this(in);
this.binaryOperators = binaryOperators;
+ this.macroExpressions = macros;
}
@@ -140,19 +150,19 @@ public SQFLexer(CharStream input) {
public void action(RuleContext _localctx, int ruleIndex, int actionIndex) {
switch (ruleIndex) {
case 22:
- ID_action(_localctx, actionIndex);
+ ID_action((RuleContext)_localctx, actionIndex);
break;
- case 23:
- PREPROCESSOR_action(_localctx, actionIndex);
+ case 28:
+ DOC_action((RuleContext)_localctx, actionIndex);
break;
- case 24:
- DOC_action(_localctx, actionIndex);
+ case 29:
+ COMMENT_action((RuleContext)_localctx, actionIndex);
break;
- case 25:
- COMMENT_action(_localctx, actionIndex);
+ case 30:
+ LINEBREAK_action((RuleContext)_localctx, actionIndex);
break;
- case 26:
- WS_action(_localctx, actionIndex);
+ case 31:
+ WS_action((RuleContext)_localctx, actionIndex);
break;
}
}
@@ -162,29 +172,33 @@ private void ID_action(RuleContext _localctx, int actionIndex) {
if(binaryOperators.contains(getText().toLowerCase())) {
setType(SQFParser.BINARY_OPERATOR);
- }
+ } else {
+ if(macroExpressions.contains(getText())) {
+ setType(SQFParser.MACRO_EXPRESSION);
+ }
+ }
break;
}
}
- private void PREPROCESSOR_action(RuleContext _localctx, int actionIndex) {
+ private void DOC_action(RuleContext _localctx, int actionIndex) {
switch (actionIndex) {
case 1:
- _channel = PREPROCESSOR_CHANNEL;
+ _channel = DOCUMENTATION_CHANNEL;
break;
}
}
- private void DOC_action(RuleContext _localctx, int actionIndex) {
+ private void COMMENT_action(RuleContext _localctx, int actionIndex) {
switch (actionIndex) {
case 2:
- _channel = DOCUMENTATION_CHANNEL;
+ _channel = COMMENT_CHANNEL;
break;
}
}
- private void COMMENT_action(RuleContext _localctx, int actionIndex) {
+ private void LINEBREAK_action(RuleContext _localctx, int actionIndex) {
switch (actionIndex) {
case 3:
- _channel = COMMENT_CHANNEL;
+ _channel = WHITESPACE_CHANNEL;
break;
}
}
@@ -197,136 +211,147 @@ private void WS_action(RuleContext _localctx, int actionIndex) {
}
public static final String _serializedATN =
- "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\35\u016d\b\1\4\2"+
- "\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4"+
- "\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+
- "\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31"+
- "\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t"+
- " \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t"+
- "+\4,\t,\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3"+
- "\6\5\6j\n\6\3\7\3\7\3\7\3\7\3\7\3\7\5\7r\n\7\3\b\3\b\3\b\3\b\3\b\5\by"+
- "\n\b\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\5\n\u0086\n\n\3\13\3"+
- "\13\3\13\3\f\3\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\5\r\u0095\n\r\3\16\3"+
- "\16\3\17\3\17\3\17\3\17\3\17\5\17\u009e\n\17\3\20\3\20\3\21\3\21\3\22"+
- "\3\22\3\23\3\23\3\24\3\24\3\25\3\25\3\26\3\26\5\26\u00ae\n\26\3\27\3\27"+
- "\3\27\3\27\7\27\u00b4\n\27\f\27\16\27\u00b7\13\27\3\27\3\27\3\27\3\27"+
- "\3\27\7\27\u00be\n\27\f\27\16\27\u00c1\13\27\3\27\5\27\u00c4\n\27\3\30"+
- "\3\30\3\30\6\30\u00c9\n\30\r\30\16\30\u00ca\3\30\3\30\3\31\3\31\3\31\3"+
- "\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\5\31\u00dd\n\31"+
- "\3\31\7\31\u00e0\n\31\f\31\16\31\u00e3\13\31\3\31\3\31\3\31\3\31\3\31"+
- "\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\7\31\u00f3\n\31\f\31\16"+
- "\31\u00f6\13\31\5\31\u00f8\n\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31"+
- "\7\31\u0102\n\31\f\31\16\31\u0105\13\31\3\31\3\31\3\31\5\31\u010a\n\31"+
- "\5\31\u010c\n\31\3\31\3\31\3\32\3\32\3\32\3\32\3\32\7\32\u0115\n\32\f"+
- "\32\16\32\u0118\13\32\3\32\3\32\3\32\3\32\3\32\3\33\3\33\3\33\3\33\7\33"+
- "\u0123\n\33\f\33\16\33\u0126\13\33\3\33\5\33\u0129\n\33\3\33\3\33\3\33"+
- "\3\33\3\33\7\33\u0130\n\33\f\33\16\33\u0133\13\33\3\33\3\33\5\33\u0137"+
- "\n\33\3\33\3\33\3\34\6\34\u013c\n\34\r\34\16\34\u013d\3\34\3\34\3\35\6"+
- "\35\u0143\n\35\r\35\16\35\u0144\3\36\3\36\3\36\3\36\3\36\3\36\5\36\u014d"+
- "\n\36\3\37\6\37\u0150\n\37\r\37\16\37\u0151\3 \3 \3!\3!\3\"\3\"\3#\3#"+
- "\3$\3$\3%\3%\3&\3&\3\'\3\'\3(\3(\3)\3)\3*\3*\3+\3+\3,\3,\6\u00e1\u0116"+
- "\u0124\u0131\2-\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31"+
- "\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63\33\65"+
- "\34\67\359\2;\2=\2?\2A\2C\2E\2G\2I\2K\2M\2O\2Q\2S\2U\2W\2\3\2\30\4\2>"+
- ">@@\4\2--//\4\2,,\61\61\3\2$$\3\2))\4\2\f\f\17\17\5\2\13\f\17\17\"\"\3"+
- "\2\62;\4\2C\\c|\4\2CCcc\4\2FFff\4\2GGgg\4\2HHhh\4\2KKkk\4\2NNnn\4\2OO"+
- "oo\4\2PPpp\4\2QQqq\4\2TTtt\4\2UUuu\4\2VVvv\4\2ZZzz\u0180\2\3\3\2\2\2\2"+
- "\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2"+
- "\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2"+
- "\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2"+
- "\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2"+
- "\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\3Y\3\2\2\2\5[\3\2\2\2\7]\3\2\2"+
- "\2\t_\3\2\2\2\13i\3\2\2\2\rq\3\2\2\2\17x\3\2\2\2\21z\3\2\2\2\23\u0085"+
- "\3\2\2\2\25\u0087\3\2\2\2\27\u008a\3\2\2\2\31\u0094\3\2\2\2\33\u0096\3"+
- "\2\2\2\35\u009d\3\2\2\2\37\u009f\3\2\2\2!\u00a1\3\2\2\2#\u00a3\3\2\2\2"+
- "%\u00a5\3\2\2\2\'\u00a7\3\2\2\2)\u00a9\3\2\2\2+\u00ad\3\2\2\2-\u00c3\3"+
- "\2\2\2/\u00c8\3\2\2\2\61\u010b\3\2\2\2\63\u010f\3\2\2\2\65\u0136\3\2\2"+
- "\2\67\u013b\3\2\2\29\u0142\3\2\2\2;\u014c\3\2\2\2=\u014f\3\2\2\2?\u0153"+
- "\3\2\2\2A\u0155\3\2\2\2C\u0157\3\2\2\2E\u0159\3\2\2\2G\u015b\3\2\2\2I"+
- "\u015d\3\2\2\2K\u015f\3\2\2\2M\u0161\3\2\2\2O\u0163\3\2\2\2Q\u0165\3\2"+
- "\2\2S\u0167\3\2\2\2U\u0169\3\2\2\2W\u016b\3\2\2\2YZ\7.\2\2Z\4\3\2\2\2"+
- "[\\\7=\2\2\\\6\3\2\2\2]^\7?\2\2^\b\3\2\2\2_`\5C\"\2`a\5I%\2ab\5S*\2bc"+
- "\5C\"\2c\n\3\2\2\2de\7~\2\2ej\7~\2\2fg\5O(\2gh\5Q)\2hj\3\2\2\2id\3\2\2"+
- "\2if\3\2\2\2j\f\3\2\2\2kl\7(\2\2lr\7(\2\2mn\5? \2no\5M\'\2op\5A!\2pr\3"+
- "\2\2\2qk\3\2\2\2qm\3\2\2\2r\16\3\2\2\2sy\7#\2\2tu\5M\'\2uv\5O(\2vw\5U"+
- "+\2wy\3\2\2\2xs\3\2\2\2xt\3\2\2\2y\20\3\2\2\2z{\7`\2\2{\22\3\2\2\2|\u0086"+
- "\t\2\2\2}~\7>\2\2~\u0086\7?\2\2\177\u0080\7@\2\2\u0080\u0086\7?\2\2\u0081"+
- "\u0082\7?\2\2\u0082\u0086\7?\2\2\u0083\u0084\7#\2\2\u0084\u0086\7?\2\2"+
- "\u0085|\3\2\2\2\u0085}\3\2\2\2\u0085\177\3\2\2\2\u0085\u0081\3\2\2\2\u0085"+
- "\u0083\3\2\2\2\u0086\24\3\2\2\2\u0087\u0088\7@\2\2\u0088\u0089\7@\2\2"+
- "\u0089\26\3\2\2\2\u008a\u008b\t\3\2\2\u008b\30\3\2\2\2\u008c\u008d\5K"+
- "&\2\u008d\u008e\5G$\2\u008e\u008f\5M\'\2\u008f\u0095\3\2\2\2\u0090\u0091"+
- "\5K&\2\u0091\u0092\5? \2\u0092\u0093\5W,\2\u0093\u0095\3\2\2\2\u0094\u008c"+
- "\3\2\2\2\u0094\u0090\3\2\2\2\u0095\32\3\2\2\2\u0096\u0097\t\4\2\2\u0097"+
- "\34\3\2\2\2\u0098\u009e\7\'\2\2\u0099\u009a\5K&\2\u009a\u009b\5O(\2\u009b"+
- "\u009c\5A!\2\u009c\u009e\3\2\2\2\u009d\u0098\3\2\2\2\u009d\u0099\3\2\2"+
- "\2\u009e\36\3\2\2\2\u009f\u00a0\7*\2\2\u00a0 \3\2\2\2\u00a1\u00a2\7+\2"+
- "\2\u00a2\"\3\2\2\2\u00a3\u00a4\7]\2\2\u00a4$\3\2\2\2\u00a5\u00a6\7_\2"+
- "\2\u00a6&\3\2\2\2\u00a7\u00a8\7}\2\2\u00a8(\3\2\2\2\u00a9\u00aa\7\177"+
- "\2\2\u00aa*\3\2\2\2\u00ab\u00ae\59\35\2\u00ac\u00ae\5;\36\2\u00ad\u00ab"+
- "\3\2\2\2\u00ad\u00ac\3\2\2\2\u00ae,\3\2\2\2\u00af\u00b5\7$\2\2\u00b0\u00b1"+
- "\7$\2\2\u00b1\u00b4\7$\2\2\u00b2\u00b4\n\5\2\2\u00b3\u00b0\3\2\2\2\u00b3"+
- "\u00b2\3\2\2\2\u00b4\u00b7\3\2\2\2\u00b5\u00b3\3\2\2\2\u00b5\u00b6\3\2"+
- "\2\2\u00b6\u00b8\3\2\2\2\u00b7\u00b5\3\2\2\2\u00b8\u00c4\7$\2\2\u00b9"+
- "\u00bf\7)\2\2\u00ba\u00bb\7)\2\2\u00bb\u00be\7)\2\2\u00bc\u00be\n\6\2"+
- "\2\u00bd\u00ba\3\2\2\2\u00bd\u00bc\3\2\2\2\u00be\u00c1\3\2\2\2\u00bf\u00bd"+
- "\3\2\2\2\u00bf\u00c0\3\2\2\2\u00c0\u00c2\3\2\2\2\u00c1\u00bf\3\2\2\2\u00c2"+
- "\u00c4\7)\2\2\u00c3\u00af\3\2\2\2\u00c3\u00b9\3\2\2\2\u00c4.\3\2\2\2\u00c5"+
- "\u00c9\5=\37\2\u00c6\u00c9\59\35\2\u00c7\u00c9\7a\2\2\u00c8\u00c5\3\2"+
- "\2\2\u00c8\u00c6\3\2\2\2\u00c8\u00c7\3\2\2\2\u00c9\u00ca\3\2\2\2\u00ca"+
- "\u00c8\3\2\2\2\u00ca\u00cb\3\2\2\2\u00cb\u00cc\3\2\2\2\u00cc\u00cd\b\30"+
- "\2\2\u00cd\60\3\2\2\2\u00ce\u00dc\7%\2\2\u00cf\u00d0\5G$\2\u00d0\u00d1"+
- "\5E#\2\u00d1\u00d2\5A!\2\u00d2\u00d3\5C\"\2\u00d3\u00d4\5E#\2\u00d4\u00dd"+
- "\3\2\2\2\u00d5\u00d6\5G$\2\u00d6\u00d7\5E#\2\u00d7\u00d8\5M\'\2\u00d8"+
- "\u00d9\5A!\2\u00d9\u00da\5C\"\2\u00da\u00db\5E#\2\u00db\u00dd\3\2\2\2"+
- "\u00dc\u00cf\3\2\2\2\u00dc\u00d5\3\2\2\2\u00dd\u00e1\3\2\2\2\u00de\u00e0"+
- "\13\2\2\2\u00df\u00de\3\2\2\2\u00e0\u00e3\3\2\2\2\u00e1\u00e2\3\2\2\2"+
- "\u00e1\u00df\3\2\2\2\u00e2\u00e4\3\2\2\2\u00e3\u00e1\3\2\2\2\u00e4\u00e5"+
- "\7%\2\2\u00e5\u00e6\5C\"\2\u00e6\u00e7\5M\'\2\u00e7\u00e8\5A!\2\u00e8"+
- "\u00e9\5G$\2\u00e9\u00ea\5E#\2\u00ea\u010c\3\2\2\2\u00eb\u00ec\7%\2\2"+
- "\u00ec\u00ed\5=\37\2\u00ed\u00f7\5/\30\2\u00ee\u00ef\7*\2\2\u00ef\u00f4"+
- "\5/\30\2\u00f0\u00f1\7.\2\2\u00f1\u00f3\5/\30\2\u00f2\u00f0\3\2\2\2\u00f3"+
- "\u00f6\3\2\2\2\u00f4\u00f2\3\2\2\2\u00f4\u00f5\3\2\2\2\u00f5\u00f8\3\2"+
- "\2\2\u00f6\u00f4\3\2\2\2\u00f7\u00ee\3\2\2\2\u00f7\u00f8\3\2\2\2\u00f8"+
- "\u0103\3\2\2\2\u00f9\u00fa\7\"\2\2\u00fa\u00fb\7^\2\2\u00fb\u0102\7\f"+
- "\2\2\u00fc\u00fd\7\"\2\2\u00fd\u00fe\7^\2\2\u00fe\u00ff\7\17\2\2\u00ff"+
- "\u0102\7\f\2\2\u0100\u0102\n\7\2\2\u0101\u00f9\3\2\2\2\u0101\u00fc\3\2"+
- "\2\2\u0101\u0100\3\2\2\2\u0102\u0105\3\2\2\2\u0103\u0101\3\2\2\2\u0103"+
- "\u0104\3\2\2\2\u0104\u0109\3\2\2\2\u0105\u0103\3\2\2\2\u0106\u010a\7\f"+
- "\2\2\u0107\u0108\7\17\2\2\u0108\u010a\7\f\2\2\u0109\u0106\3\2\2\2\u0109"+
- "\u0107\3\2\2\2\u010a\u010c\3\2\2\2\u010b\u00ce\3\2\2\2\u010b\u00eb\3\2"+
- "\2\2\u010c\u010d\3\2\2\2\u010d\u010e\b\31\3\2\u010e\62\3\2\2\2\u010f\u0110"+
- "\7\61\2\2\u0110\u0111\7,\2\2\u0111\u0112\7,\2\2\u0112\u0116\3\2\2\2\u0113"+
- "\u0115\13\2\2\2\u0114\u0113\3\2\2\2\u0115\u0118\3\2\2\2\u0116\u0117\3"+
- "\2\2\2\u0116\u0114\3\2\2\2\u0117\u0119\3\2\2\2\u0118\u0116\3\2\2\2\u0119"+
- "\u011a\7,\2\2\u011a\u011b\7\61\2\2\u011b\u011c\3\2\2\2\u011c\u011d\b\32"+
- "\4\2\u011d\64\3\2\2\2\u011e\u011f\7\61\2\2\u011f\u0120\7\61\2\2\u0120"+
- "\u0124\3\2\2\2\u0121\u0123\13\2\2\2\u0122\u0121\3\2\2\2\u0123\u0126\3"+
- "\2\2\2\u0124\u0125\3\2\2\2\u0124\u0122\3\2\2\2\u0125\u0128\3\2\2\2\u0126"+
- "\u0124\3\2\2\2\u0127\u0129\7\17\2\2\u0128\u0127\3\2\2\2\u0128\u0129\3"+
- "\2\2\2\u0129\u012a\3\2\2\2\u012a\u0137\7\f\2\2\u012b\u012c\7\61\2\2\u012c"+
- "\u012d\7,\2\2\u012d\u0131\3\2\2\2\u012e\u0130\13\2\2\2\u012f\u012e\3\2"+
- "\2\2\u0130\u0133\3\2\2\2\u0131\u0132\3\2\2\2\u0131\u012f\3\2\2\2\u0132"+
- "\u0134\3\2\2\2\u0133\u0131\3\2\2\2\u0134\u0135\7,\2\2\u0135\u0137\7\61"+
- "\2\2\u0136\u011e\3\2\2\2\u0136\u012b\3\2\2\2\u0137\u0138\3\2\2\2\u0138"+
- "\u0139\b\33\5\2\u0139\66\3\2\2\2\u013a\u013c\t\b\2\2\u013b\u013a\3\2\2"+
- "\2\u013c\u013d\3\2\2\2\u013d\u013b\3\2\2\2\u013d\u013e\3\2\2\2\u013e\u013f"+
- "\3\2\2\2\u013f\u0140\b\34\6\2\u01408\3\2\2\2\u0141\u0143\t\t\2\2\u0142"+
- "\u0141\3\2\2\2\u0143\u0144\3\2\2\2\u0144\u0142\3\2\2\2\u0144\u0145\3\2"+
- "\2\2\u0145:\3\2\2\2\u0146\u0147\59\35\2\u0147\u0148\7\60\2\2\u0148\u0149"+
- "\59\35\2\u0149\u014d\3\2\2\2\u014a\u014b\7\60\2\2\u014b\u014d\59\35\2"+
- "\u014c\u0146\3\2\2\2\u014c\u014a\3\2\2\2\u014d<\3\2\2\2\u014e\u0150\t"+
- "\n\2\2\u014f\u014e\3\2\2\2\u0150\u0151\3\2\2\2\u0151\u014f\3\2\2\2\u0151"+
- "\u0152\3\2\2\2\u0152>\3\2\2\2\u0153\u0154\t\13\2\2\u0154@\3\2\2\2\u0155"+
- "\u0156\t\f\2\2\u0156B\3\2\2\2\u0157\u0158\t\r\2\2\u0158D\3\2\2\2\u0159"+
- "\u015a\t\16\2\2\u015aF\3\2\2\2\u015b\u015c\t\17\2\2\u015cH\3\2\2\2\u015d"+
- "\u015e\t\20\2\2\u015eJ\3\2\2\2\u015f\u0160\t\21\2\2\u0160L\3\2\2\2\u0161"+
- "\u0162\t\22\2\2\u0162N\3\2\2\2\u0163\u0164\t\23\2\2\u0164P\3\2\2\2\u0165"+
- "\u0166\t\24\2\2\u0166R\3\2\2\2\u0167\u0168\t\25\2\2\u0168T\3\2\2\2\u0169"+
- "\u016a\t\26\2\2\u016aV\3\2\2\2\u016b\u016c\t\27\2\2\u016cX\3\2\2\2\"\2"+
- "iqx\u0085\u0094\u009d\u00ad\u00b3\u00b5\u00bd\u00bf\u00c3\u00c8\u00ca"+
- "\u00dc\u00e1\u00f4\u00f7\u0101\u0103\u0109\u010b\u0116\u0124\u0128\u0131"+
- "\u0136\u013d\u0144\u014c\u0151\7\3\30\2\3\31\3\3\32\4\3\33\5\3\34\6";
+ "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2#\u018a\b\1\4\2\t"+
+ "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+
+ "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
+ "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+
+ "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+
+ "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+
+ ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\3\2\3\2\3\3\3\3\3"+
+ "\4\3\4\3\5\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\6\5\6v\n\6\3\7\3\7\3\7\3"+
+ "\7\3\7\3\7\5\7~\n\7\3\b\3\b\3\b\3\b\3\b\5\b\u0085\n\b\3\t\3\t\3\n\3\n"+
+ "\3\n\3\n\3\n\3\n\3\n\3\n\3\n\5\n\u0092\n\n\3\13\3\13\3\13\3\f\3\f\3\r"+
+ "\3\r\3\r\3\r\3\r\3\r\3\r\3\r\5\r\u00a1\n\r\3\16\3\16\3\17\3\17\3\17\3"+
+ "\17\3\17\5\17\u00aa\n\17\3\20\3\20\3\21\3\21\3\22\3\22\3\23\3\23\3\24"+
+ "\3\24\3\25\3\25\3\26\3\26\5\26\u00ba\n\26\3\27\3\27\3\27\3\27\7\27\u00c0"+
+ "\n\27\f\27\16\27\u00c3\13\27\3\27\3\27\3\27\3\27\3\27\7\27\u00ca\n\27"+
+ "\f\27\16\27\u00cd\13\27\3\27\5\27\u00d0\n\27\3\30\3\30\3\30\6\30\u00d5"+
+ "\n\30\r\30\16\30\u00d6\3\30\3\30\3\31\3\31\5\31\u00dd\n\31\3\31\7\31\u00e0"+
+ "\n\31\f\31\16\31\u00e3\13\31\3\31\5\31\u00e6\n\31\3\31\3\31\3\31\3\31"+
+ "\3\31\3\31\3\31\3\31\3\31\7\31\u00f1\n\31\f\31\16\31\u00f4\13\31\5\31"+
+ "\u00f6\n\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\7\31\u0100\n\31\f"+
+ "\31\16\31\u0103\13\31\5\31\u0105\n\31\5\31\u0107\n\31\3\32\3\32\3\32\3"+
+ "\32\3\32\3\32\3\32\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\34\3\34\3"+
+ "\34\3\34\3\34\3\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\36\3\36\3\36\3"+
+ "\36\3\36\7\36\u012a\n\36\f\36\16\36\u012d\13\36\3\36\3\36\3\36\3\36\3"+
+ "\36\3\37\3\37\3\37\3\37\7\37\u0138\n\37\f\37\16\37\u013b\13\37\3\37\3"+
+ "\37\3\37\3\37\3\37\7\37\u0142\n\37\f\37\16\37\u0145\13\37\3\37\3\37\5"+
+ "\37\u0149\n\37\3\37\3\37\3 \3 \3 \6 \u0150\n \r \16 \u0151\3 \3 \3!\6"+
+ "!\u0157\n!\r!\16!\u0158\3!\3!\3\"\6\"\u015e\n\"\r\"\16\"\u015f\3#\3#\3"+
+ "#\3#\3#\3#\5#\u0168\n#\3$\6$\u016b\n$\r$\16$\u016c\3%\3%\3&\3&\3\'\3\'"+
+ "\3(\3(\3)\3)\3*\3*\3+\3+\3,\3,\3-\3-\3.\3.\3/\3/\3\60\3\60\3\61\3\61\3"+
+ "\62\3\62\6\u00e1\u012b\u0139\u0143\2\63\3\3\5\4\7\5\t\6\13\7\r\b\17\t"+
+ "\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+\27"+
+ "-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C\2E\2G\2I\2K\2M\2O\2Q"+
+ "\2S\2U\2W\2Y\2[\2]\2_\2a\2c#\3\2\30\4\2>>@@\4\2--//\4\2,,\61\61\3\2$$"+
+ "\3\2))\4\2\f\f\17\17\4\2\13\13\"\"\3\2\62;\4\2C\\c|\4\2CCcc\4\2FFff\4"+
+ "\2GGgg\4\2HHhh\4\2KKkk\4\2NNnn\4\2OOoo\4\2PPpp\4\2QQqq\4\2TTtt\4\2UUu"+
+ "u\4\2VVvv\4\2ZZzz\u019f\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2"+
+ "\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25"+
+ "\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2"+
+ "\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2"+
+ "\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3"+
+ "\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2c\3\2\2"+
+ "\2\3e\3\2\2\2\5g\3\2\2\2\7i\3\2\2\2\tk\3\2\2\2\13u\3\2\2\2\r}\3\2\2\2"+
+ "\17\u0084\3\2\2\2\21\u0086\3\2\2\2\23\u0091\3\2\2\2\25\u0093\3\2\2\2\27"+
+ "\u0096\3\2\2\2\31\u00a0\3\2\2\2\33\u00a2\3\2\2\2\35\u00a9\3\2\2\2\37\u00ab"+
+ "\3\2\2\2!\u00ad\3\2\2\2#\u00af\3\2\2\2%\u00b1\3\2\2\2\'\u00b3\3\2\2\2"+
+ ")\u00b5\3\2\2\2+\u00b9\3\2\2\2-\u00cf\3\2\2\2/\u00d4\3\2\2\2\61\u0106"+
+ "\3\2\2\2\63\u0108\3\2\2\2\65\u010f\3\2\2\2\67\u0117\3\2\2\29\u011d\3\2"+
+ "\2\2;\u0124\3\2\2\2=\u0148\3\2\2\2?\u014f\3\2\2\2A\u0156\3\2\2\2C\u015d"+
+ "\3\2\2\2E\u0167\3\2\2\2G\u016a\3\2\2\2I\u016e\3\2\2\2K\u0170\3\2\2\2M"+
+ "\u0172\3\2\2\2O\u0174\3\2\2\2Q\u0176\3\2\2\2S\u0178\3\2\2\2U\u017a\3\2"+
+ "\2\2W\u017c\3\2\2\2Y\u017e\3\2\2\2[\u0180\3\2\2\2]\u0182\3\2\2\2_\u0184"+
+ "\3\2\2\2a\u0186\3\2\2\2c\u0188\3\2\2\2ef\7.\2\2f\4\3\2\2\2gh\7=\2\2h\6"+
+ "\3\2\2\2ij\7?\2\2j\b\3\2\2\2kl\5M\'\2lm\5S*\2mn\5]/\2no\5M\'\2o\n\3\2"+
+ "\2\2pq\7~\2\2qv\7~\2\2rs\5Y-\2st\5[.\2tv\3\2\2\2up\3\2\2\2ur\3\2\2\2v"+
+ "\f\3\2\2\2wx\7(\2\2x~\7(\2\2yz\5I%\2z{\5W,\2{|\5K&\2|~\3\2\2\2}w\3\2\2"+
+ "\2}y\3\2\2\2~\16\3\2\2\2\177\u0085\7#\2\2\u0080\u0081\5W,\2\u0081\u0082"+
+ "\5Y-\2\u0082\u0083\5_\60\2\u0083\u0085\3\2\2\2\u0084\177\3\2\2\2\u0084"+
+ "\u0080\3\2\2\2\u0085\20\3\2\2\2\u0086\u0087\7`\2\2\u0087\22\3\2\2\2\u0088"+
+ "\u0092\t\2\2\2\u0089\u008a\7>\2\2\u008a\u0092\7?\2\2\u008b\u008c\7@\2"+
+ "\2\u008c\u0092\7?\2\2\u008d\u008e\7?\2\2\u008e\u0092\7?\2\2\u008f\u0090"+
+ "\7#\2\2\u0090\u0092\7?\2\2\u0091\u0088\3\2\2\2\u0091\u0089\3\2\2\2\u0091"+
+ "\u008b\3\2\2\2\u0091\u008d\3\2\2\2\u0091\u008f\3\2\2\2\u0092\24\3\2\2"+
+ "\2\u0093\u0094\7@\2\2\u0094\u0095\7@\2\2\u0095\26\3\2\2\2\u0096\u0097"+
+ "\t\3\2\2\u0097\30\3\2\2\2\u0098\u0099\5U+\2\u0099\u009a\5Q)\2\u009a\u009b"+
+ "\5W,\2\u009b\u00a1\3\2\2\2\u009c\u009d\5U+\2\u009d\u009e\5I%\2\u009e\u009f"+
+ "\5a\61\2\u009f\u00a1\3\2\2\2\u00a0\u0098\3\2\2\2\u00a0\u009c\3\2\2\2\u00a1"+
+ "\32\3\2\2\2\u00a2\u00a3\t\4\2\2\u00a3\34\3\2\2\2\u00a4\u00aa\7\'\2\2\u00a5"+
+ "\u00a6\5U+\2\u00a6\u00a7\5Y-\2\u00a7\u00a8\5K&\2\u00a8\u00aa\3\2\2\2\u00a9"+
+ "\u00a4\3\2\2\2\u00a9\u00a5\3\2\2\2\u00aa\36\3\2\2\2\u00ab\u00ac\7*\2\2"+
+ "\u00ac \3\2\2\2\u00ad\u00ae\7+\2\2\u00ae\"\3\2\2\2\u00af\u00b0\7]\2\2"+
+ "\u00b0$\3\2\2\2\u00b1\u00b2\7_\2\2\u00b2&\3\2\2\2\u00b3\u00b4\7}\2\2\u00b4"+
+ "(\3\2\2\2\u00b5\u00b6\7\177\2\2\u00b6*\3\2\2\2\u00b7\u00ba\5C\"\2\u00b8"+
+ "\u00ba\5E#\2\u00b9\u00b7\3\2\2\2\u00b9\u00b8\3\2\2\2\u00ba,\3\2\2\2\u00bb"+
+ "\u00c1\7$\2\2\u00bc\u00bd\7$\2\2\u00bd\u00c0\7$\2\2\u00be\u00c0\n\5\2"+
+ "\2\u00bf\u00bc\3\2\2\2\u00bf\u00be\3\2\2\2\u00c0\u00c3\3\2\2\2\u00c1\u00bf"+
+ "\3\2\2\2\u00c1\u00c2\3\2\2\2\u00c2\u00c4\3\2\2\2\u00c3\u00c1\3\2\2\2\u00c4"+
+ "\u00d0\7$\2\2\u00c5\u00cb\7)\2\2\u00c6\u00c7\7)\2\2\u00c7\u00ca\7)\2\2"+
+ "\u00c8\u00ca\n\6\2\2\u00c9\u00c6\3\2\2\2\u00c9\u00c8\3\2\2\2\u00ca\u00cd"+
+ "\3\2\2\2\u00cb\u00c9\3\2\2\2\u00cb\u00cc\3\2\2\2\u00cc\u00ce\3\2\2\2\u00cd"+
+ "\u00cb\3\2\2\2\u00ce\u00d0\7)\2\2\u00cf\u00bb\3\2\2\2\u00cf\u00c5\3\2"+
+ "\2\2\u00d0.\3\2\2\2\u00d1\u00d5\5G$\2\u00d2\u00d5\5C\"\2\u00d3\u00d5\7"+
+ "a\2\2\u00d4\u00d1\3\2\2\2\u00d4\u00d2\3\2\2\2\u00d4\u00d3\3\2\2\2\u00d5"+
+ "\u00d6\3\2\2\2\u00d6\u00d4\3\2\2\2\u00d6\u00d7\3\2\2\2\u00d7\u00d8\3\2"+
+ "\2\2\u00d8\u00d9\b\30\2\2\u00d9\60\3\2\2\2\u00da\u00dd\5\63\32\2\u00db"+
+ "\u00dd\5\65\33\2\u00dc\u00da\3\2\2\2\u00dc\u00db\3\2\2\2\u00dd\u00e1\3"+
+ "\2\2\2\u00de\u00e0\13\2\2\2\u00df\u00de\3\2\2\2\u00e0\u00e3\3\2\2\2\u00e1"+
+ "\u00e2\3\2\2\2\u00e1\u00df\3\2\2\2\u00e2\u00e5\3\2\2\2\u00e3\u00e1\3\2"+
+ "\2\2\u00e4\u00e6\5\67\34\2\u00e5\u00e4\3\2\2\2\u00e5\u00e6\3\2\2\2\u00e6"+
+ "\u00e7\3\2\2\2\u00e7\u00e8\59\35\2\u00e8\u0107\3\2\2\2\u00e9\u00ea\7%"+
+ "\2\2\u00ea\u0104\5/\30\2\u00eb\u00f5\5/\30\2\u00ec\u00ed\7*\2\2\u00ed"+
+ "\u00f2\5/\30\2\u00ee\u00ef\7.\2\2\u00ef\u00f1\5/\30\2\u00f0\u00ee\3\2"+
+ "\2\2\u00f1\u00f4\3\2\2\2\u00f2\u00f0\3\2\2\2\u00f2\u00f3\3\2\2\2\u00f3"+
+ "\u00f6\3\2\2\2\u00f4\u00f2\3\2\2\2\u00f5\u00ec\3\2\2\2\u00f5\u00f6\3\2"+
+ "\2\2\u00f6\u0101\3\2\2\2\u00f7\u00f8\7\"\2\2\u00f8\u00f9\7^\2\2\u00f9"+
+ "\u0100\7\f\2\2\u00fa\u00fb\7\"\2\2\u00fb\u00fc\7^\2\2\u00fc\u00fd\7\17"+
+ "\2\2\u00fd\u0100\7\f\2\2\u00fe\u0100\n\7\2\2\u00ff\u00f7\3\2\2\2\u00ff"+
+ "\u00fa\3\2\2\2\u00ff\u00fe\3\2\2\2\u0100\u0103\3\2\2\2\u0101\u00ff\3\2"+
+ "\2\2\u0101\u0102\3\2\2\2\u0102\u0105\3\2\2\2\u0103\u0101\3\2\2\2\u0104"+
+ "\u00eb\3\2\2\2\u0104\u0105\3\2\2\2\u0105\u0107\3\2\2\2\u0106\u00dc\3\2"+
+ "\2\2\u0106\u00e9\3\2\2\2\u0107\62\3\2\2\2\u0108\u0109\7%\2\2\u0109\u010a"+
+ "\7k\2\2\u010a\u010b\7h\2\2\u010b\u010c\7f\2\2\u010c\u010d\7g\2\2\u010d"+
+ "\u010e\7h\2\2\u010e\64\3\2\2\2\u010f\u0110\7%\2\2\u0110\u0111\7k\2\2\u0111"+
+ "\u0112\7h\2\2\u0112\u0113\7p\2\2\u0113\u0114\7f\2\2\u0114\u0115\7g\2\2"+
+ "\u0115\u0116\7h\2\2\u0116\66\3\2\2\2\u0117\u0118\7%\2\2\u0118\u0119\7"+
+ "g\2\2\u0119\u011a\7n\2\2\u011a\u011b\7u\2\2\u011b\u011c\7g\2\2\u011c8"+
+ "\3\2\2\2\u011d\u011e\7%\2\2\u011e\u011f\7g\2\2\u011f\u0120\7p\2\2\u0120"+
+ "\u0121\7f\2\2\u0121\u0122\7k\2\2\u0122\u0123\7h\2\2\u0123:\3\2\2\2\u0124"+
+ "\u0125\7\61\2\2\u0125\u0126\7,\2\2\u0126\u0127\7,\2\2\u0127\u012b\3\2"+
+ "\2\2\u0128\u012a\13\2\2\2\u0129\u0128\3\2\2\2\u012a\u012d\3\2\2\2\u012b"+
+ "\u012c\3\2\2\2\u012b\u0129\3\2\2\2\u012c\u012e\3\2\2\2\u012d\u012b\3\2"+
+ "\2\2\u012e\u012f\7,\2\2\u012f\u0130\7\61\2\2\u0130\u0131\3\2\2\2\u0131"+
+ "\u0132\b\36\3\2\u0132<\3\2\2\2\u0133\u0134\7\61\2\2\u0134\u0135\7\61\2"+
+ "\2\u0135\u0139\3\2\2\2\u0136\u0138\13\2\2\2\u0137\u0136\3\2\2\2\u0138"+
+ "\u013b\3\2\2\2\u0139\u013a\3\2\2\2\u0139\u0137\3\2\2\2\u013a\u013c\3\2"+
+ "\2\2\u013b\u0139\3\2\2\2\u013c\u0149\5? \2\u013d\u013e\7\61\2\2\u013e"+
+ "\u013f\7,\2\2\u013f\u0143\3\2\2\2\u0140\u0142\13\2\2\2\u0141\u0140\3\2"+
+ "\2\2\u0142\u0145\3\2\2\2\u0143\u0144\3\2\2\2\u0143\u0141\3\2\2\2\u0144"+
+ "\u0146\3\2\2\2\u0145\u0143\3\2\2\2\u0146\u0147\7,\2\2\u0147\u0149\7\61"+
+ "\2\2\u0148\u0133\3\2\2\2\u0148\u013d\3\2\2\2\u0149\u014a\3\2\2\2\u014a"+
+ "\u014b\b\37\4\2\u014b>\3\2\2\2\u014c\u0150\7\f\2\2\u014d\u014e\7\17\2"+
+ "\2\u014e\u0150\7\f\2\2\u014f\u014c\3\2\2\2\u014f\u014d\3\2\2\2\u0150\u0151"+
+ "\3\2\2\2\u0151\u014f\3\2\2\2\u0151\u0152\3\2\2\2\u0152\u0153\3\2\2\2\u0153"+
+ "\u0154\b \5\2\u0154@\3\2\2\2\u0155\u0157\t\b\2\2\u0156\u0155\3\2\2\2\u0157"+
+ "\u0158\3\2\2\2\u0158\u0156\3\2\2\2\u0158\u0159\3\2\2\2\u0159\u015a\3\2"+
+ "\2\2\u015a\u015b\b!\6\2\u015bB\3\2\2\2\u015c\u015e\t\t\2\2\u015d\u015c"+
+ "\3\2\2\2\u015e\u015f\3\2\2\2\u015f\u015d\3\2\2\2\u015f\u0160\3\2\2\2\u0160"+
+ "D\3\2\2\2\u0161\u0162\5C\"\2\u0162\u0163\7\60\2\2\u0163\u0164\5C\"\2\u0164"+
+ "\u0168\3\2\2\2\u0165\u0166\7\60\2\2\u0166\u0168\5C\"\2\u0167\u0161\3\2"+
+ "\2\2\u0167\u0165\3\2\2\2\u0168F\3\2\2\2\u0169\u016b\t\n\2\2\u016a\u0169"+
+ "\3\2\2\2\u016b\u016c\3\2\2\2\u016c\u016a\3\2\2\2\u016c\u016d\3\2\2\2\u016d"+
+ "H\3\2\2\2\u016e\u016f\t\13\2\2\u016fJ\3\2\2\2\u0170\u0171\t\f\2\2\u0171"+
+ "L\3\2\2\2\u0172\u0173\t\r\2\2\u0173N\3\2\2\2\u0174\u0175\t\16\2\2\u0175"+
+ "P\3\2\2\2\u0176\u0177\t\17\2\2\u0177R\3\2\2\2\u0178\u0179\t\20\2\2\u0179"+
+ "T\3\2\2\2\u017a\u017b\t\21\2\2\u017bV\3\2\2\2\u017c\u017d\t\22\2\2\u017d"+
+ "X\3\2\2\2\u017e\u017f\t\23\2\2\u017fZ\3\2\2\2\u0180\u0181\t\24\2\2\u0181"+
+ "\\\3\2\2\2\u0182\u0183\t\25\2\2\u0183^\3\2\2\2\u0184\u0185\t\26\2\2\u0185"+
+ "`\3\2\2\2\u0186\u0187\t\27\2\2\u0187b\3\2\2\2\u0188\u0189\13\2\2\2\u0189"+
+ "d\3\2\2\2$\2u}\u0084\u0091\u00a0\u00a9\u00b9\u00bf\u00c1\u00c9\u00cb\u00cf"+
+ "\u00d4\u00d6\u00dc\u00e1\u00e5\u00f2\u00f5\u00ff\u0101\u0104\u0106\u012b"+
+ "\u0139\u0143\u0148\u014f\u0151\u0158\u015f\u0167\u016c\7\3\30\2\3\36\3"+
+ "\3\37\4\3 \5\3!\6";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {
diff --git a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.tokens b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.tokens
index 951293e0..fff43c73 100644
--- a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.tokens
+++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.tokens
@@ -21,10 +21,16 @@ CLOSING_CURLY_BRACKET=20
NUMBER=21
STRING=22
ID=23
-PREPROCESSOR=24
-DOC=25
-COMMENT=26
-WS=27
+PREPRO=24
+IFDEF=25
+IFNDEF=26
+PRE_ELSE=27
+ENDIF=28
+DOC=29
+COMMENT=30
+LINEBREAK=31
+WS=32
+ANY=33
','=1
';'=2
'='=3
@@ -36,3 +42,7 @@ WS=27
']'=18
'{'=19
'}'=20
+'#ifdef'=25
+'#ifndef'=26
+'#else'=27
+'#endif'=28
diff --git a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFListener.java b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFListener.java
index 65e34acd..7a26220b 100644
--- a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFListener.java
+++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFListener.java
@@ -17,6 +17,16 @@ public interface SQFListener extends ParseTreeListener {
* @param ctx the parse tree
*/
void exitCode(SQFParser.CodeContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SQFParser#preprocessor}.
+ * @param ctx the parse tree
+ */
+ void enterPreprocessor(SQFParser.PreprocessorContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SQFParser#preprocessor}.
+ * @param ctx the parse tree
+ */
+ void exitPreprocessor(SQFParser.PreprocessorContext ctx);
/**
* Enter a parse tree produced by {@link SQFParser#statement}.
* @param ctx the parse tree
@@ -108,17 +118,17 @@ public interface SQFListener extends ParseTreeListener {
*/
void exitModifyExpression(SQFParser.ModifyExpressionContext ctx);
/**
- * Enter a parse tree produced by the {@code Binary}
+ * Enter a parse tree produced by the {@code Nular}
* labeled alternative in {@link SQFParser#expression}.
* @param ctx the parse tree
*/
- void enterBinary(SQFParser.BinaryContext ctx);
+ void enterNular(SQFParser.NularContext ctx);
/**
- * Exit a parse tree produced by the {@code Binary}
+ * Exit a parse tree produced by the {@code Nular}
* labeled alternative in {@link SQFParser#expression}.
* @param ctx the parse tree
*/
- void exitBinary(SQFParser.BinaryContext ctx);
+ void exitNular(SQFParser.NularContext ctx);
/**
* Enter a parse tree produced by the {@code Parenthese}
* labeled alternative in {@link SQFParser#expression}.
diff --git a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFParseListener.java b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFParseListener.java
index a535c9c6..0dc72f1e 100644
--- a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFParseListener.java
+++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFParseListener.java
@@ -6,7 +6,10 @@
import org.antlr.v4.runtime.CommonTokenStream;
import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.Token;
+import org.antlr.v4.runtime.tree.ParseTree;
import org.antlr.v4.runtime.tree.TerminalNode;
+import org.antlr.v4.runtime.tree.TerminalNodeImpl;
+import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.text.Position;
@@ -15,6 +18,8 @@
import raven.sqdev.editors.sqfeditor.parsing.SQFParser.AssignmentContext;
import raven.sqdev.editors.sqfeditor.parsing.SQFParser.CodeContext;
import raven.sqdev.editors.sqfeditor.parsing.SQFParser.InlineCodeContext;
+import raven.sqdev.editors.sqfeditor.parsing.SQFParser.PreprocessorContext;
+import raven.sqdev.editors.sqfeditor.parsing.SQFParser.StatementContext;
import raven.sqdev.exceptions.SQDevEditorException;
public class SQFParseListener extends SQFBaseListener {
@@ -32,7 +37,7 @@ public class SQFParseListener extends SQFBaseListener {
*/
private List globalVariables;
/**
- * The respective CommonTokenStream
associated with the pasre
+ * The respective CommonTokenStream
associated with the parse
* tree this listener corresponds to
*/
private CommonTokenStream stream;
@@ -107,6 +112,38 @@ public void exitCode(CodeContext ctx) {
// set editors variables
editor.setVariables(localVariables, globalVariables);
}
+
+
+ // Make sure semicolon is used when necessary
+ StatementContext openStatement = null;
+
+ for (int i = 0; i < ctx.getChildCount(); i++) {
+ ParseTree currentChild = ctx.getChild(i);
+
+ if (openStatement != null) {
+ if (currentChild instanceof TerminalNodeImpl
+ && currentChild.getText().equals(";")) {
+ // reset -> semicolon terminates statement
+ openStatement = null;
+ } else {
+ if (currentChild instanceof StatementContext) {
+ // a statement before the previous statement has been
+ // closed -> create error
+ editor.createMarker(IMarker.PROBLEM, openStatement.getStop().getStopIndex(),
+ 1, "Missing ';' at \"" + openStatement.getStop().getText() + "\"",
+ IMarker.SEVERITY_ERROR);
+
+ // update the currently open statement
+ openStatement = (StatementContext) currentChild;
+ }
+ }
+ } else {
+ if (currentChild instanceof StatementContext) {
+ // found the context that was handed over to this method
+ openStatement = (StatementContext) currentChild;
+ }
+ }
+ }
}
@Override
@@ -145,4 +182,50 @@ public void exitInlineCode(InlineCodeContext ctx) {
editor.addFoldingArea(
new Position(start, stop - start + ctx.getStop().getText().length() + offset));
}
+
+ @Override
+ public void exitPreprocessor(PreprocessorContext ctx) {
+ // StringBuilder input = new StringBuilder();
+ //
+ // for (int i = 0; i < ctx.getChildCount(); i++) {
+ // ParseTree current = ctx.getChild(i);
+ //
+ // input.append(current.getText());
+ //
+ // List hiddenTokens = null;
+ //
+ // if (current instanceof TerminalNodeImpl) {
+ // hiddenTokens = stream.getHiddenTokensToRight(
+ // ((TerminalNodeImpl) current).getSymbol().getTokenIndex());
+ // } else {
+ // if (current instanceof ParserRuleContext) {
+ // hiddenTokens = stream.getHiddenTokensToRight(
+ // ((ParserRuleContext) current).getStop().getTokenIndex());
+ // }
+ // }
+ //
+ // if (hiddenTokens != null) {
+ // for (Token currentToken : hiddenTokens) {
+ // input.append(currentToken.getText());
+ // }
+ // }
+ // }
+ //
+ // ANTLRInputStream in = new ANTLRInputStream(input.toString());
+ //
+ // PreprocessorLexer lexer = new PreprocessorLexer(in);
+ //
+ // CommonTokenStream tokens = new CommonTokenStream(lexer);
+ //
+ // PreprocessorParser parser = new PreprocessorParser(tokens);
+ //
+ // parser.removeErrorListeners();
+ // parser.addErrorListener(
+ // new PreprocessorErrorListener(editor,
+ // ctx.getStart().getStartIndex()));
+ //
+ // ParseTreeWalker walker = new ParseTreeWalker();
+ //
+ // walker.walk(new PreprocessorParseListener(editor), parser.start());
+ }
}
diff --git a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFParser.java b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFParser.java
index f292f26e..d7e36422 100644
--- a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFParser.java
+++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFParser.java
@@ -3,8 +3,11 @@
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.misc.*;
import org.antlr.v4.runtime.tree.*;
import java.util.List;
+import java.util.Iterator;
+import java.util.ArrayList;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class SQFParser extends Parser {
@@ -18,20 +21,22 @@ public class SQFParser extends Parser {
CONFIG_OPERATOR=10, ADDITION_OPERATOR=11, MIN_MAX_OPERATOR=12, MULTIPLICATION_OPERATOR=13,
MODULO_OPERATOR=14, OPENING_ROUND_BRACKET=15, CLOSING_ROUND_BRACKET=16,
OPENING_SQUARE_BRACKET=17, CLOSING_SQUARE_BRACKET=18, OPENING_CURLY_BRACKET=19,
- CLOSING_CURLY_BRACKET=20, NUMBER=21, STRING=22, ID=23, PREPROCESSOR=24,
- DOC=25, COMMENT=26, WS=27, BINARY_OPERATOR=28;
+ CLOSING_CURLY_BRACKET=20, NUMBER=21, STRING=22, ID=23, PREPRO=24, IFDEF=25,
+ IFNDEF=26, PRE_ELSE=27, ENDIF=28, DOC=29, COMMENT=30, LINEBREAK=31, WS=32,
+ ANY=33, BINARY_OPERATOR=34, MACRO_EXPRESSION=35;
public static final int
- RULE_code = 0, RULE_statement = 1, RULE_assignment = 2, RULE_binaryExpression = 3,
- RULE_expression = 4, RULE_unaryExpression = 5, RULE_nularExpression = 6,
- RULE_macro = 7;
+ RULE_code = 0, RULE_preprocessor = 1, RULE_statement = 2, RULE_assignment = 3,
+ RULE_binaryExpression = 4, RULE_expression = 5, RULE_unaryExpression = 6,
+ RULE_nularExpression = 7, RULE_macro = 8;
public static final String[] ruleNames = {
- "code", "statement", "assignment", "binaryExpression", "expression", "unaryExpression",
- "nularExpression", "macro"
+ "code", "preprocessor", "statement", "assignment", "binaryExpression",
+ "expression", "unaryExpression", "nularExpression", "macro"
};
private static final String[] _LITERAL_NAMES = {
null, "','", "';'", "'='", null, null, null, null, "'^'", null, "'>>'",
- null, null, null, null, "'('", "')'", "'['", "']'", "'{'", "'}'"
+ null, null, null, null, "'('", "')'", "'['", "']'", "'{'", "'}'", null,
+ null, null, null, "'#ifdef'", "'#ifndef'", "'#else'", "'#endif'"
};
private static final String[] _SYMBOLIC_NAMES = {
null, "COMMA", "SEMICOLON", "EQUALS", "ELSE", "OR", "AND", "NOT", "EXP",
@@ -39,7 +44,8 @@ public class SQFParser extends Parser {
"MULTIPLICATION_OPERATOR", "MODULO_OPERATOR", "OPENING_ROUND_BRACKET",
"CLOSING_ROUND_BRACKET", "OPENING_SQUARE_BRACKET", "CLOSING_SQUARE_BRACKET",
"OPENING_CURLY_BRACKET", "CLOSING_CURLY_BRACKET", "NUMBER", "STRING",
- "ID", "PREPROCESSOR", "DOC", "COMMENT", "WS", "BINARY_OPERATOR"
+ "ID", "PREPRO", "IFDEF", "IFNDEF", "PRE_ELSE", "ENDIF", "DOC", "COMMENT",
+ "LINEBREAK", "WS", "ANY", "BINARY_OPERATOR", "MACRO_EXPRESSION"
};
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
@@ -91,17 +97,29 @@ public SQFParser(TokenStream input) {
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
public static class CodeContext extends ParserRuleContext {
+ public List macro() {
+ return getRuleContexts(MacroContext.class);
+ }
+ public MacroContext macro(int i) {
+ return getRuleContext(MacroContext.class,i);
+ }
public List statement() {
return getRuleContexts(StatementContext.class);
}
public StatementContext statement(int i) {
return getRuleContext(StatementContext.class,i);
}
+ public List preprocessor() {
+ return getRuleContexts(PreprocessorContext.class);
+ }
+ public PreprocessorContext preprocessor(int i) {
+ return getRuleContext(PreprocessorContext.class,i);
+ }
public List SEMICOLON() { return getTokens(SQFParser.SEMICOLON); }
public TerminalNode SEMICOLON(int i) {
return getToken(SQFParser.SEMICOLON, i);
}
- public TerminalNode EOF() { return getToken(Recognizer.EOF, 0); }
+ public TerminalNode EOF() { return getToken(SQFParser.EOF, 0); }
public CodeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@@ -126,8 +144,7 @@ public final CodeContext code() throws RecognitionException {
enterRule(_localctx, 0, RULE_code);
int _la;
try {
- int _alt;
- setState(28);
+ setState(32);
switch (_input.LA(1)) {
case NOT:
case ADDITION_OPERATOR:
@@ -137,44 +154,67 @@ public final CodeContext code() throws RecognitionException {
case NUMBER:
case STRING:
case ID:
+ case PREPRO:
case BINARY_OPERATOR:
+ case MACRO_EXPRESSION:
enterOuterAlt(_localctx, 1);
{
- setState(16);
- statement();
- setState(21);
+ setState(27);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,0,_ctx);
- while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
- if ( _alt==1 ) {
- {
+ _la = _input.LA(1);
+ do {
+ {
+ setState(27);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,2,_ctx) ) {
+ case 1:
{
- setState(17);
- match(SEMICOLON);
setState(18);
+ macro();
+ setState(20);
+ _la = _input.LA(1);
+ if (_la==SEMICOLON) {
+ {
+ setState(19);
+ match(SEMICOLON);
+ }
+ }
+
+ }
+ break;
+ case 2:
+ {
+ setState(22);
statement();
+ setState(24);
+ _la = _input.LA(1);
+ if (_la==SEMICOLON) {
+ {
+ setState(23);
+ match(SEMICOLON);
+ }
+ }
+
}
- }
+ break;
+ case 3:
+ {
+ setState(26);
+ preprocessor();
+ }
+ break;
}
- setState(23);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,0,_ctx);
- }
- setState(25);
- _la = _input.LA(1);
- if (_la==SEMICOLON) {
- {
- setState(24);
- match(SEMICOLON);
}
- }
-
+ setState(29);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NOT) | (1L << ADDITION_OPERATOR) | (1L << OPENING_ROUND_BRACKET) | (1L << OPENING_SQUARE_BRACKET) | (1L << OPENING_CURLY_BRACKET) | (1L << NUMBER) | (1L << STRING) | (1L << ID) | (1L << PREPRO) | (1L << BINARY_OPERATOR) | (1L << MACRO_EXPRESSION))) != 0) );
}
break;
case EOF:
enterOuterAlt(_localctx, 2);
{
- setState(27);
+ setState(31);
match(EOF);
}
break;
@@ -193,6 +233,70 @@ public final CodeContext code() throws RecognitionException {
return _localctx;
}
+ public static class PreprocessorContext extends ParserRuleContext {
+ public List PREPRO() { return getTokens(SQFParser.PREPRO); }
+ public TerminalNode PREPRO(int i) {
+ return getToken(SQFParser.PREPRO, i);
+ }
+ public PreprocessorContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_preprocessor; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SQFListener ) ((SQFListener)listener).enterPreprocessor(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SQFListener ) ((SQFListener)listener).exitPreprocessor(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SQFVisitor ) return ((SQFVisitor extends T>)visitor).visitPreprocessor(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final PreprocessorContext preprocessor() throws RecognitionException {
+ PreprocessorContext _localctx = new PreprocessorContext(_ctx, getState());
+ enterRule(_localctx, 2, RULE_preprocessor);
+ try {
+ int _alt;
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(35);
+ _errHandler.sync(this);
+ _alt = 1;
+ do {
+ switch (_alt) {
+ case 1:
+ {
+ {
+ setState(34);
+ match(PREPRO);
+ }
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ setState(37);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,5,_ctx);
+ } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
public static class StatementContext extends ParserRuleContext {
public AssignmentContext assignment() {
return getRuleContext(AssignmentContext.class,0);
@@ -221,22 +325,22 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final StatementContext statement() throws RecognitionException {
StatementContext _localctx = new StatementContext(_ctx, getState());
- enterRule(_localctx, 2, RULE_statement);
+ enterRule(_localctx, 4, RULE_statement);
try {
- setState(32);
+ setState(41);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,3,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(30);
+ setState(39);
assignment();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(31);
+ setState(40);
binaryExpression();
}
break;
@@ -255,15 +359,18 @@ public final StatementContext statement() throws RecognitionException {
public static class AssignmentContext extends ParserRuleContext {
public TerminalNode EQUALS() { return getToken(SQFParser.EQUALS, 0); }
- public BinaryExpressionContext binaryExpression() {
- return getRuleContext(BinaryExpressionContext.class,0);
- }
public List ID() { return getTokens(SQFParser.ID); }
public TerminalNode ID(int i) {
return getToken(SQFParser.ID, i);
}
- public MacroContext macro() {
- return getRuleContext(MacroContext.class,0);
+ public List macro() {
+ return getRuleContexts(MacroContext.class);
+ }
+ public MacroContext macro(int i) {
+ return getRuleContext(MacroContext.class,i);
+ }
+ public BinaryExpressionContext binaryExpression() {
+ return getRuleContext(BinaryExpressionContext.class,0);
}
public AssignmentContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
@@ -286,40 +393,55 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final AssignmentContext assignment() throws RecognitionException {
AssignmentContext _localctx = new AssignmentContext(_ctx, getState());
- enterRule(_localctx, 4, RULE_assignment);
+ enterRule(_localctx, 6, RULE_assignment);
try {
enterOuterAlt(_localctx, 1);
{
- setState(35);
+ setState(44);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,7,_ctx) ) {
case 1:
{
- setState(34);
+ setState(43);
match(ID);
}
break;
}
- setState(39);
+ setState(48);
+ switch (_input.LA(1)) {
+ case ID:
+ {
+ setState(46);
+ match(ID);
+ }
+ break;
+ case MACRO_EXPRESSION:
+ {
+ setState(47);
+ macro();
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ setState(50);
+ match(EQUALS);
+ setState(53);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,9,_ctx) ) {
case 1:
{
- setState(37);
- match(ID);
+ setState(51);
+ binaryExpression();
}
break;
case 2:
{
- setState(38);
+ setState(52);
macro();
}
break;
}
- setState(41);
- match(EQUALS);
- setState(42);
- binaryExpression();
}
}
catch (RecognitionException re) {
@@ -362,26 +484,26 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final BinaryExpressionContext binaryExpression() throws RecognitionException {
BinaryExpressionContext _localctx = new BinaryExpressionContext(_ctx, getState());
- enterRule(_localctx, 6, RULE_binaryExpression);
+ enterRule(_localctx, 8, RULE_binaryExpression);
try {
- setState(49);
+ setState(60);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(44);
+ setState(55);
expression(0);
- setState(45);
+ setState(56);
match(BINARY_OPERATOR);
- setState(46);
+ setState(57);
binaryExpression();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(48);
+ setState(59);
expression(0);
}
break;
@@ -526,22 +648,22 @@ public T accept(ParseTreeVisitor extends T> visitor) {
else return visitor.visitChildren(this);
}
}
- public static class BinaryContext extends ExpressionContext {
+ public static class NularContext extends ExpressionContext {
public NularExpressionContext nularExpression() {
return getRuleContext(NularExpressionContext.class,0);
}
- public BinaryContext(ExpressionContext ctx) { copyFrom(ctx); }
+ public NularContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SQFListener ) ((SQFListener)listener).enterBinary(this);
+ if ( listener instanceof SQFListener ) ((SQFListener)listener).enterNular(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SQFListener ) ((SQFListener)listener).exitBinary(this);
+ if ( listener instanceof SQFListener ) ((SQFListener)listener).exitNular(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SQFVisitor ) return ((SQFVisitor extends T>)visitor).visitBinary(this);
+ if ( visitor instanceof SQFVisitor ) return ((SQFVisitor extends T>)visitor).visitNular(this);
else return visitor.visitChildren(this);
}
}
@@ -643,32 +765,32 @@ private ExpressionContext expression(int _p) throws RecognitionException {
int _parentState = getState();
ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState);
ExpressionContext _prevctx = _localctx;
- int _startState = 8;
- enterRecursionRule(_localctx, 8, RULE_expression, _p);
+ int _startState = 10;
+ enterRecursionRule(_localctx, 10, RULE_expression, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
- setState(80);
+ setState(91);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) {
case 1:
{
_localctx = new UnaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(52);
+ setState(63);
unaryExpression();
}
break;
case 2:
{
- _localctx = new BinaryContext(_localctx);
+ _localctx = new NularContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(53);
+ setState(64);
nularExpression();
}
break;
@@ -677,11 +799,11 @@ private ExpressionContext expression(int _p) throws RecognitionException {
_localctx = new ParentheseContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(54);
+ setState(65);
match(OPENING_ROUND_BRACKET);
- setState(55);
+ setState(66);
binaryExpression();
- setState(56);
+ setState(67);
match(CLOSING_ROUND_BRACKET);
}
break;
@@ -690,18 +812,18 @@ private ExpressionContext expression(int _p) throws RecognitionException {
_localctx = new InlineCodeContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(58);
+ setState(69);
match(OPENING_CURLY_BRACKET);
- setState(60);
+ setState(71);
_la = _input.LA(1);
- if (((((_la - -1)) & ~0x3f) == 0 && ((1L << (_la - -1)) & ((1L << (EOF - -1)) | (1L << (NOT - -1)) | (1L << (ADDITION_OPERATOR - -1)) | (1L << (OPENING_ROUND_BRACKET - -1)) | (1L << (OPENING_SQUARE_BRACKET - -1)) | (1L << (OPENING_CURLY_BRACKET - -1)) | (1L << (NUMBER - -1)) | (1L << (STRING - -1)) | (1L << (ID - -1)) | (1L << (BINARY_OPERATOR - -1)))) != 0)) {
+ if (((((_la - -1)) & ~0x3f) == 0 && ((1L << (_la - -1)) & ((1L << (EOF - -1)) | (1L << (NOT - -1)) | (1L << (ADDITION_OPERATOR - -1)) | (1L << (OPENING_ROUND_BRACKET - -1)) | (1L << (OPENING_SQUARE_BRACKET - -1)) | (1L << (OPENING_CURLY_BRACKET - -1)) | (1L << (NUMBER - -1)) | (1L << (STRING - -1)) | (1L << (ID - -1)) | (1L << (PREPRO - -1)) | (1L << (BINARY_OPERATOR - -1)) | (1L << (MACRO_EXPRESSION - -1)))) != 0)) {
{
- setState(59);
+ setState(70);
code();
}
}
- setState(62);
+ setState(73);
match(CLOSING_CURLY_BRACKET);
}
break;
@@ -710,34 +832,34 @@ private ExpressionContext expression(int _p) throws RecognitionException {
_localctx = new ArrayContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(63);
+ setState(74);
match(OPENING_SQUARE_BRACKET);
- setState(72);
+ setState(83);
_la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NOT) | (1L << ADDITION_OPERATOR) | (1L << OPENING_ROUND_BRACKET) | (1L << OPENING_SQUARE_BRACKET) | (1L << OPENING_CURLY_BRACKET) | (1L << NUMBER) | (1L << STRING) | (1L << ID) | (1L << BINARY_OPERATOR))) != 0)) {
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NOT) | (1L << ADDITION_OPERATOR) | (1L << OPENING_ROUND_BRACKET) | (1L << OPENING_SQUARE_BRACKET) | (1L << OPENING_CURLY_BRACKET) | (1L << NUMBER) | (1L << STRING) | (1L << ID) | (1L << BINARY_OPERATOR) | (1L << MACRO_EXPRESSION))) != 0)) {
{
- setState(64);
+ setState(75);
binaryExpression();
- setState(69);
+ setState(80);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
- setState(65);
+ setState(76);
match(COMMA);
- setState(66);
+ setState(77);
binaryExpression();
}
}
- setState(71);
+ setState(82);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
- setState(74);
+ setState(85);
match(CLOSING_SQUARE_BRACKET);
}
break;
@@ -746,9 +868,9 @@ private ExpressionContext expression(int _p) throws RecognitionException {
_localctx = new BooleanExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(75);
+ setState(86);
match(NOT);
- setState(76);
+ setState(87);
binaryExpression();
}
break;
@@ -757,9 +879,9 @@ private ExpressionContext expression(int _p) throws RecognitionException {
_localctx = new ModifyExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(77);
+ setState(88);
match(ADDITION_OPERATOR);
- setState(78);
+ setState(89);
binaryExpression();
}
break;
@@ -768,32 +890,32 @@ private ExpressionContext expression(int _p) throws RecognitionException {
_localctx = new MacroExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(79);
+ setState(90);
macro();
}
break;
}
_ctx.stop = _input.LT(-1);
- setState(105);
+ setState(116);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,12,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,16,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
- setState(103);
+ setState(114);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,11,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) {
case 1:
{
_localctx = new ArithmeticExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
- setState(82);
+ setState(93);
if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)");
- setState(83);
+ setState(94);
match(EXP);
- setState(84);
+ setState(95);
binaryExpression();
}
break;
@@ -801,16 +923,16 @@ private ExpressionContext expression(int _p) throws RecognitionException {
{
_localctx = new ArithmeticExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
- setState(85);
+ setState(96);
if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)");
- setState(86);
+ setState(97);
_la = _input.LA(1);
if ( !(_la==MULTIPLICATION_OPERATOR || _la==MODULO_OPERATOR) ) {
_errHandler.recoverInline(this);
} else {
consume();
}
- setState(87);
+ setState(98);
binaryExpression();
}
break;
@@ -818,16 +940,16 @@ private ExpressionContext expression(int _p) throws RecognitionException {
{
_localctx = new ArithmeticExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
- setState(88);
+ setState(99);
if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)");
- setState(89);
+ setState(100);
_la = _input.LA(1);
if ( !(_la==ADDITION_OPERATOR || _la==MIN_MAX_OPERATOR) ) {
_errHandler.recoverInline(this);
} else {
consume();
}
- setState(90);
+ setState(101);
binaryExpression();
}
break;
@@ -835,11 +957,11 @@ private ExpressionContext expression(int _p) throws RecognitionException {
{
_localctx = new ElseExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
- setState(91);
+ setState(102);
if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)");
- setState(92);
+ setState(103);
match(ELSE);
- setState(93);
+ setState(104);
binaryExpression();
}
break;
@@ -847,16 +969,16 @@ private ExpressionContext expression(int _p) throws RecognitionException {
{
_localctx = new BooleanExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
- setState(94);
+ setState(105);
if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)");
- setState(95);
+ setState(106);
_la = _input.LA(1);
if ( !(_la==COMPARATOR || _la==CONFIG_OPERATOR) ) {
_errHandler.recoverInline(this);
} else {
consume();
}
- setState(96);
+ setState(107);
binaryExpression();
}
break;
@@ -864,11 +986,11 @@ private ExpressionContext expression(int _p) throws RecognitionException {
{
_localctx = new BooleanExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
- setState(97);
+ setState(108);
if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)");
- setState(98);
+ setState(109);
match(AND);
- setState(99);
+ setState(110);
binaryExpression();
}
break;
@@ -876,20 +998,20 @@ private ExpressionContext expression(int _p) throws RecognitionException {
{
_localctx = new BooleanExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
- setState(100);
+ setState(111);
if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)");
- setState(101);
+ setState(112);
match(OR);
- setState(102);
+ setState(113);
binaryExpression();
}
break;
}
}
}
- setState(107);
+ setState(118);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,12,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,16,_ctx);
}
}
}
@@ -931,25 +1053,25 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final UnaryExpressionContext unaryExpression() throws RecognitionException {
UnaryExpressionContext _localctx = new UnaryExpressionContext(_ctx, getState());
- enterRule(_localctx, 10, RULE_unaryExpression);
+ enterRule(_localctx, 12, RULE_unaryExpression);
try {
- setState(112);
+ setState(123);
switch (_input.LA(1)) {
case ID:
enterOuterAlt(_localctx, 1);
{
- setState(108);
+ setState(119);
match(ID);
- setState(109);
+ setState(120);
binaryExpression();
}
break;
case BINARY_OPERATOR:
enterOuterAlt(_localctx, 2);
{
- setState(110);
+ setState(121);
match(BINARY_OPERATOR);
- setState(111);
+ setState(122);
binaryExpression();
}
break;
@@ -993,12 +1115,12 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final NularExpressionContext nularExpression() throws RecognitionException {
NularExpressionContext _localctx = new NularExpressionContext(_ctx, getState());
- enterRule(_localctx, 12, RULE_nularExpression);
+ enterRule(_localctx, 14, RULE_nularExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
- setState(114);
+ setState(125);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NUMBER) | (1L << STRING) | (1L << ID))) != 0)) ) {
_errHandler.recoverInline(this);
@@ -1019,23 +1141,14 @@ public final NularExpressionContext nularExpression() throws RecognitionExceptio
}
public static class MacroContext extends ParserRuleContext {
- public List ID() { return getTokens(SQFParser.ID); }
- public TerminalNode ID(int i) {
- return getToken(SQFParser.ID, i);
- }
- public TerminalNode OPENING_ROUND_BRACKET() { return getToken(SQFParser.OPENING_ROUND_BRACKET, 0); }
- public TerminalNode CLOSING_ROUND_BRACKET() { return getToken(SQFParser.CLOSING_ROUND_BRACKET, 0); }
- public List STRING() { return getTokens(SQFParser.STRING); }
- public TerminalNode STRING(int i) {
- return getToken(SQFParser.STRING, i);
+ public TerminalNode MACRO_EXPRESSION() { return getToken(SQFParser.MACRO_EXPRESSION, 0); }
+ public List OPENING_ROUND_BRACKET() { return getTokens(SQFParser.OPENING_ROUND_BRACKET); }
+ public TerminalNode OPENING_ROUND_BRACKET(int i) {
+ return getToken(SQFParser.OPENING_ROUND_BRACKET, i);
}
- public List NUMBER() { return getTokens(SQFParser.NUMBER); }
- public TerminalNode NUMBER(int i) {
- return getToken(SQFParser.NUMBER, i);
- }
- public List COMMA() { return getTokens(SQFParser.COMMA); }
- public TerminalNode COMMA(int i) {
- return getToken(SQFParser.COMMA, i);
+ public List CLOSING_ROUND_BRACKET() { return getTokens(SQFParser.CLOSING_ROUND_BRACKET); }
+ public TerminalNode CLOSING_ROUND_BRACKET(int i) {
+ return getToken(SQFParser.CLOSING_ROUND_BRACKET, i);
}
public MacroContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
@@ -1058,45 +1171,44 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final MacroContext macro() throws RecognitionException {
MacroContext _localctx = new MacroContext(_ctx, getState());
- enterRule(_localctx, 14, RULE_macro);
+ enterRule(_localctx, 16, RULE_macro);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
- setState(116);
- match(ID);
- setState(117);
- match(OPENING_ROUND_BRACKET);
- setState(118);
- _la = _input.LA(1);
- if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NUMBER) | (1L << STRING) | (1L << ID))) != 0)) ) {
- _errHandler.recoverInline(this);
- } else {
- consume();
- }
- setState(123);
+ setState(127);
+ match(MACRO_EXPRESSION);
+ setState(136);
_errHandler.sync(this);
- _la = _input.LA(1);
- while (_la==COMMA) {
- {
+ switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) {
+ case 1:
{
- setState(119);
- match(COMMA);
- setState(120);
+ setState(128);
+ match(OPENING_ROUND_BRACKET);
+ setState(132);
+ _errHandler.sync(this);
_la = _input.LA(1);
- if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NUMBER) | (1L << STRING) | (1L << ID))) != 0)) ) {
- _errHandler.recoverInline(this);
- } else {
- consume();
- }
+ while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << COMMA) | (1L << SEMICOLON) | (1L << EQUALS) | (1L << ELSE) | (1L << OR) | (1L << AND) | (1L << NOT) | (1L << EXP) | (1L << COMPARATOR) | (1L << CONFIG_OPERATOR) | (1L << ADDITION_OPERATOR) | (1L << MIN_MAX_OPERATOR) | (1L << MULTIPLICATION_OPERATOR) | (1L << MODULO_OPERATOR) | (1L << OPENING_SQUARE_BRACKET) | (1L << CLOSING_SQUARE_BRACKET) | (1L << OPENING_CURLY_BRACKET) | (1L << CLOSING_CURLY_BRACKET) | (1L << NUMBER) | (1L << STRING) | (1L << ID) | (1L << PREPRO) | (1L << IFDEF) | (1L << IFNDEF) | (1L << PRE_ELSE) | (1L << ENDIF) | (1L << DOC) | (1L << COMMENT) | (1L << LINEBREAK) | (1L << WS) | (1L << ANY) | (1L << BINARY_OPERATOR) | (1L << MACRO_EXPRESSION))) != 0)) {
+ {
+ {
+ setState(129);
+ _la = _input.LA(1);
+ if ( _la <= 0 || (_la==OPENING_ROUND_BRACKET || _la==CLOSING_ROUND_BRACKET) ) {
+ _errHandler.recoverInline(this);
+ } else {
+ consume();
+ }
+ }
+ }
+ setState(134);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
}
+ setState(135);
+ match(CLOSING_ROUND_BRACKET);
}
- setState(125);
- _errHandler.sync(this);
- _la = _input.LA(1);
+ break;
}
- setState(126);
- match(CLOSING_ROUND_BRACKET);
}
}
catch (RecognitionException re) {
@@ -1110,10 +1222,9 @@ public final MacroContext macro() throws RecognitionException {
return _localctx;
}
- @Override
public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
switch (ruleIndex) {
- case 4:
+ case 5:
return expression_sempred((ExpressionContext)_localctx, predIndex);
}
return true;
@@ -1139,40 +1250,45 @@ private boolean expression_sempred(ExpressionContext _localctx, int predIndex) {
}
public static final String _serializedATN =
- "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\36\u0083\4\2\t\2"+
- "\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\3\2\3\2\3\2\7"+
- "\2\26\n\2\f\2\16\2\31\13\2\3\2\5\2\34\n\2\3\2\5\2\37\n\2\3\3\3\3\5\3#"+
- "\n\3\3\4\5\4&\n\4\3\4\3\4\5\4*\n\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\5\5"+
- "\64\n\5\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\5\6?\n\6\3\6\3\6\3\6\3\6\3"+
- "\6\7\6F\n\6\f\6\16\6I\13\6\5\6K\n\6\3\6\3\6\3\6\3\6\3\6\3\6\5\6S\n\6\3"+
- "\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6"+
- "\3\6\3\6\3\6\7\6j\n\6\f\6\16\6m\13\6\3\7\3\7\3\7\3\7\5\7s\n\7\3\b\3\b"+
- "\3\t\3\t\3\t\3\t\3\t\7\t|\n\t\f\t\16\t\177\13\t\3\t\3\t\3\t\2\3\n\n\2"+
- "\4\6\b\n\f\16\20\2\6\3\2\17\20\3\2\r\16\3\2\13\f\3\2\27\31\u0094\2\36"+
- "\3\2\2\2\4\"\3\2\2\2\6%\3\2\2\2\b\63\3\2\2\2\nR\3\2\2\2\fr\3\2\2\2\16"+
- "t\3\2\2\2\20v\3\2\2\2\22\27\5\4\3\2\23\24\7\4\2\2\24\26\5\4\3\2\25\23"+
- "\3\2\2\2\26\31\3\2\2\2\27\25\3\2\2\2\27\30\3\2\2\2\30\33\3\2\2\2\31\27"+
- "\3\2\2\2\32\34\7\4\2\2\33\32\3\2\2\2\33\34\3\2\2\2\34\37\3\2\2\2\35\37"+
- "\7\2\2\3\36\22\3\2\2\2\36\35\3\2\2\2\37\3\3\2\2\2 #\5\6\4\2!#\5\b\5\2"+
- "\" \3\2\2\2\"!\3\2\2\2#\5\3\2\2\2$&\7\31\2\2%$\3\2\2\2%&\3\2\2\2&)\3\2"+
- "\2\2\'*\7\31\2\2(*\5\20\t\2)\'\3\2\2\2)(\3\2\2\2*+\3\2\2\2+,\7\5\2\2,"+
- "-\5\b\5\2-\7\3\2\2\2./\5\n\6\2/\60\7\36\2\2\60\61\5\b\5\2\61\64\3\2\2"+
- "\2\62\64\5\n\6\2\63.\3\2\2\2\63\62\3\2\2\2\64\t\3\2\2\2\65\66\b\6\1\2"+
- "\66S\5\f\7\2\67S\5\16\b\289\7\21\2\29:\5\b\5\2:;\7\22\2\2;S\3\2\2\2<>"+
- "\7\25\2\2=?\5\2\2\2>=\3\2\2\2>?\3\2\2\2?@\3\2\2\2@S\7\26\2\2AJ\7\23\2"+
- "\2BG\5\b\5\2CD\7\3\2\2DF\5\b\5\2EC\3\2\2\2FI\3\2\2\2GE\3\2\2\2GH\3\2\2"+
- "\2HK\3\2\2\2IG\3\2\2\2JB\3\2\2\2JK\3\2\2\2KL\3\2\2\2LS\7\24\2\2MN\7\t"+
- "\2\2NS\5\b\5\2OP\7\r\2\2PS\5\b\5\2QS\5\20\t\2R\65\3\2\2\2R\67\3\2\2\2"+
- "R8\3\2\2\2R<\3\2\2\2RA\3\2\2\2RM\3\2\2\2RO\3\2\2\2RQ\3\2\2\2Sk\3\2\2\2"+
- "TU\f\21\2\2UV\7\n\2\2Vj\5\b\5\2WX\f\20\2\2XY\t\2\2\2Yj\5\b\5\2Z[\f\17"+
- "\2\2[\\\t\3\2\2\\j\5\b\5\2]^\f\16\2\2^_\7\6\2\2_j\5\b\5\2`a\f\r\2\2ab"+
- "\t\4\2\2bj\5\b\5\2cd\f\f\2\2de\7\b\2\2ej\5\b\5\2fg\f\13\2\2gh\7\7\2\2"+
- "hj\5\b\5\2iT\3\2\2\2iW\3\2\2\2iZ\3\2\2\2i]\3\2\2\2i`\3\2\2\2ic\3\2\2\2"+
- "if\3\2\2\2jm\3\2\2\2ki\3\2\2\2kl\3\2\2\2l\13\3\2\2\2mk\3\2\2\2no\7\31"+
- "\2\2os\5\b\5\2pq\7\36\2\2qs\5\b\5\2rn\3\2\2\2rp\3\2\2\2s\r\3\2\2\2tu\t"+
- "\5\2\2u\17\3\2\2\2vw\7\31\2\2wx\7\21\2\2x}\t\5\2\2yz\7\3\2\2z|\t\5\2\2"+
- "{y\3\2\2\2|\177\3\2\2\2}{\3\2\2\2}~\3\2\2\2~\u0080\3\2\2\2\177}\3\2\2"+
- "\2\u0080\u0081\7\22\2\2\u0081\21\3\2\2\2\21\27\33\36\"%)\63>GJRikr}";
+ "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3%\u008d\4\2\t\2\4"+
+ "\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\3\2\3\2"+
+ "\5\2\27\n\2\3\2\3\2\5\2\33\n\2\3\2\6\2\36\n\2\r\2\16\2\37\3\2\5\2#\n\2"+
+ "\3\3\6\3&\n\3\r\3\16\3\'\3\4\3\4\5\4,\n\4\3\5\5\5/\n\5\3\5\3\5\5\5\63"+
+ "\n\5\3\5\3\5\3\5\5\58\n\5\3\6\3\6\3\6\3\6\3\6\5\6?\n\6\3\7\3\7\3\7\3\7"+
+ "\3\7\3\7\3\7\3\7\3\7\5\7J\n\7\3\7\3\7\3\7\3\7\3\7\7\7Q\n\7\f\7\16\7T\13"+
+ "\7\5\7V\n\7\3\7\3\7\3\7\3\7\3\7\3\7\5\7^\n\7\3\7\3\7\3\7\3\7\3\7\3\7\3"+
+ "\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\7\7u\n\7\f"+
+ "\7\16\7x\13\7\3\b\3\b\3\b\3\b\5\b~\n\b\3\t\3\t\3\n\3\n\3\n\7\n\u0085\n"+
+ "\n\f\n\16\n\u0088\13\n\3\n\5\n\u008b\n\n\3\n\2\3\f\13\2\4\6\b\n\f\16\20"+
+ "\22\2\7\3\2\17\20\3\2\r\16\3\2\13\f\3\2\27\31\3\2\21\22\u00a3\2\"\3\2"+
+ "\2\2\4%\3\2\2\2\6+\3\2\2\2\b.\3\2\2\2\n>\3\2\2\2\f]\3\2\2\2\16}\3\2\2"+
+ "\2\20\177\3\2\2\2\22\u0081\3\2\2\2\24\26\5\22\n\2\25\27\7\4\2\2\26\25"+
+ "\3\2\2\2\26\27\3\2\2\2\27\36\3\2\2\2\30\32\5\6\4\2\31\33\7\4\2\2\32\31"+
+ "\3\2\2\2\32\33\3\2\2\2\33\36\3\2\2\2\34\36\5\4\3\2\35\24\3\2\2\2\35\30"+
+ "\3\2\2\2\35\34\3\2\2\2\36\37\3\2\2\2\37\35\3\2\2\2\37 \3\2\2\2 #\3\2\2"+
+ "\2!#\7\2\2\3\"\35\3\2\2\2\"!\3\2\2\2#\3\3\2\2\2$&\7\32\2\2%$\3\2\2\2&"+
+ "\'\3\2\2\2\'%\3\2\2\2\'(\3\2\2\2(\5\3\2\2\2),\5\b\5\2*,\5\n\6\2+)\3\2"+
+ "\2\2+*\3\2\2\2,\7\3\2\2\2-/\7\31\2\2.-\3\2\2\2./\3\2\2\2/\62\3\2\2\2\60"+
+ "\63\7\31\2\2\61\63\5\22\n\2\62\60\3\2\2\2\62\61\3\2\2\2\63\64\3\2\2\2"+
+ "\64\67\7\5\2\2\658\5\n\6\2\668\5\22\n\2\67\65\3\2\2\2\67\66\3\2\2\28\t"+
+ "\3\2\2\29:\5\f\7\2:;\7$\2\2;<\5\n\6\2\3\2\2\2=?\5\f\7\2>9\3\2\2\2>="+
+ "\3\2\2\2?\13\3\2\2\2@A\b\7\1\2A^\5\16\b\2B^\5\20\t\2CD\7\21\2\2DE\5\n"+
+ "\6\2EF\7\22\2\2F^\3\2\2\2GI\7\25\2\2HJ\5\2\2\2IH\3\2\2\2IJ\3\2\2\2JK\3"+
+ "\2\2\2K^\7\26\2\2LU\7\23\2\2MR\5\n\6\2NO\7\3\2\2OQ\5\n\6\2PN\3\2\2\2Q"+
+ "T\3\2\2\2RP\3\2\2\2RS\3\2\2\2SV\3\2\2\2TR\3\2\2\2UM\3\2\2\2UV\3\2\2\2"+
+ "VW\3\2\2\2W^\7\24\2\2XY\7\t\2\2Y^\5\n\6\2Z[\7\r\2\2[^\5\n\6\2\\^\5\22"+
+ "\n\2]@\3\2\2\2]B\3\2\2\2]C\3\2\2\2]G\3\2\2\2]L\3\2\2\2]X\3\2\2\2]Z\3\2"+
+ "\2\2]\\\3\2\2\2^v\3\2\2\2_`\f\21\2\2`a\7\n\2\2au\5\n\6\2bc\f\20\2\2cd"+
+ "\t\2\2\2du\5\n\6\2ef\f\17\2\2fg\t\3\2\2gu\5\n\6\2hi\f\16\2\2ij\7\6\2\2"+
+ "ju\5\n\6\2kl\f\r\2\2lm\t\4\2\2mu\5\n\6\2no\f\f\2\2op\7\b\2\2pu\5\n\6\2"+
+ "qr\f\13\2\2rs\7\7\2\2su\5\n\6\2t_\3\2\2\2tb\3\2\2\2te\3\2\2\2th\3\2\2"+
+ "\2tk\3\2\2\2tn\3\2\2\2tq\3\2\2\2ux\3\2\2\2vt\3\2\2\2vw\3\2\2\2w\r\3\2"+
+ "\2\2xv\3\2\2\2yz\7\31\2\2z~\5\n\6\2{|\7$\2\2|~\5\n\6\2}y\3\2\2\2}{\3\2"+
+ "\2\2~\17\3\2\2\2\177\u0080\t\5\2\2\u0080\21\3\2\2\2\u0081\u008a\7%\2\2"+
+ "\u0082\u0086\7\21\2\2\u0083\u0085\n\6\2\2\u0084\u0083\3\2\2\2\u0085\u0088"+
+ "\3\2\2\2\u0086\u0084\3\2\2\2\u0086\u0087\3\2\2\2\u0087\u0089\3\2\2\2\u0088"+
+ "\u0086\3\2\2\2\u0089\u008b\7\22\2\2\u008a\u0082\3\2\2\2\u008a\u008b\3"+
+ "\2\2\2\u008b\23\3\2\2\2\26\26\32\35\37\"\'+.\62\67>IRU]tv}\u0086\u008a";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {
diff --git a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFVisitor.java b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFVisitor.java
index e42f58eb..e99870ce 100644
--- a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFVisitor.java
+++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFVisitor.java
@@ -16,6 +16,12 @@ public interface SQFVisitor extends ParseTreeVisitor {
* @return the visitor result
*/
T visitCode(SQFParser.CodeContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SQFParser#preprocessor}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitPreprocessor(SQFParser.PreprocessorContext ctx);
/**
* Visit a parse tree produced by {@link SQFParser#statement}.
* @param ctx the parse tree
@@ -70,12 +76,12 @@ public interface SQFVisitor extends ParseTreeVisitor {
*/
T visitModifyExpression(SQFParser.ModifyExpressionContext ctx);
/**
- * Visit a parse tree produced by the {@code Binary}
+ * Visit a parse tree produced by the {@code Nular}
* labeled alternative in {@link SQFParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
- T visitBinary(SQFParser.BinaryContext ctx);
+ T visitNular(SQFParser.NularContext ctx);
/**
* Visit a parse tree produced by the {@code Parenthese}
* labeled alternative in {@link SQFParser#expression}.
diff --git a/plugin/Raven.SQDev.UI/.classpath b/plugin/Raven.SQDev.UI/.classpath
index c690b9e7..b1a5da7f 100644
--- a/plugin/Raven.SQDev.UI/.classpath
+++ b/plugin/Raven.SQDev.UI/.classpath
@@ -2,7 +2,7 @@
+
-
diff --git a/plugin/Raven.SQDev.UI/Abego/org.abego.treelayout.core-1.0.3.jar b/plugin/Raven.SQDev.UI/Abego/org.abego.treelayout.core-1.0.3.jar
new file mode 100644
index 00000000..dfc19966
Binary files /dev/null and b/plugin/Raven.SQDev.UI/Abego/org.abego.treelayout.core-1.0.3.jar differ
diff --git a/plugin/Raven.SQDev.UI/META-INF/MANIFEST.MF b/plugin/Raven.SQDev.UI/META-INF/MANIFEST.MF
index 37a7414d..67255849 100644
--- a/plugin/Raven.SQDev.UI/META-INF/MANIFEST.MF
+++ b/plugin/Raven.SQDev.UI/META-INF/MANIFEST.MF
@@ -12,5 +12,5 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.ui.editors;bundle-version="3.8.200"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: Abedo/org.abego.treelayout.core-1.0.3.jar,
- .
+Bundle-ClassPath: .,
+ Abego/org.abego.treelayout.core-1.0.3.jar
diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$1.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$1.class
index 7ebdaf62..8c5a2b69 100644
Binary files a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$1.class and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$1.class differ
diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$2.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$2.class
index 0cd03e95..62425f29 100644
Binary files a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$2.class and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$2.class differ
diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$3.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$3.class
index 5c9530e4..eddfff03 100644
Binary files a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$3.class and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$3.class differ
diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$4.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$4.class
index 951b3bc2..d83db46a 100644
Binary files a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$4.class and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$4.class differ
diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$5.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$5.class
index 3317372a..57f414ee 100644
Binary files a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$5.class and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$5.class differ
diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$6.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$6.class
index f2b12f66..d614ba90 100644
Binary files a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$6.class and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$6.class differ
diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$DefaultTreeTextProvider.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$DefaultTreeTextProvider.class
index a95e5db0..6bd3674e 100644
Binary files a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$DefaultTreeTextProvider.class and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$DefaultTreeTextProvider.class differ
diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$EmptyIcon.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$EmptyIcon.class
index 50250432..2562812f 100644
Binary files a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$EmptyIcon.class and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$EmptyIcon.class differ
diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$TreeNodeWrapper.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$TreeNodeWrapper.class
index d9831616..a8273e15 100644
Binary files a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$TreeNodeWrapper.class and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$TreeNodeWrapper.class differ
diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$VariableExtentProvide.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$VariableExtentProvide.class
index 84971a25..fd51bc53 100644
Binary files a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$VariableExtentProvide.class and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer$VariableExtentProvide.class differ
diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer.class
index 5214357c..6e35905c 100644
Binary files a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer.class and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeViewer.class differ
diff --git a/plugin/Raven.SQDev.UI/build.properties b/plugin/Raven.SQDev.UI/build.properties
index a7029010..075fb6a3 100644
--- a/plugin/Raven.SQDev.UI/build.properties
+++ b/plugin/Raven.SQDev.UI/build.properties
@@ -3,6 +3,6 @@ output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
- Abedo/,\
- Abedo/org.abego.treelayout.core-1.0.3.jar
-src.includes = Abedo/
+ Abego/,\
+ Abego/org.abego.treelayout.core-1.0.3.jar
+src.includes = Abego/
diff --git a/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/util/TreeViewer.java b/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/util/TreeViewer.java
index 736ba8fb..d09c6ca6 100644
--- a/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/util/TreeViewer.java
+++ b/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/util/TreeViewer.java
@@ -65,10 +65,6 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
import java.util.prefs.Preferences;
public class TreeViewer extends JComponent {
diff --git a/plugin/Raven.SQDev.Util/META-INF/MANIFEST.MF b/plugin/Raven.SQDev.Util/META-INF/MANIFEST.MF
index 0b23db82..b3626075 100644
--- a/plugin/Raven.SQDev.Util/META-INF/MANIFEST.MF
+++ b/plugin/Raven.SQDev.Util/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Util
Bundle-SymbolicName: raven.sqdev.util;singleton:=true
-Bundle-Version: 0.6.0
+Bundle-Version: 0.6.1
Bundle-Activator: raven.sqdev.activator.Activator
Bundle-Vendor: Raven
Require-Bundle: org.eclipse.core.runtime,
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/startup/SQDevStarter.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/startup/SQDevStarter.class
index 493a9489..d890f6fc 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/startup/SQDevStarter.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/startup/SQDevStarter.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox$1.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox$1.class
index d4b89e44..a0cc6734 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox$1.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox$1.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox$2.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox$2.class
index d7d3f17d..2d9dfd14 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox$2.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox$2.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox.class
index 2ce22170..1c817e4b 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/Util.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/Util.class
index b1eeda43..892657bf 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/Util.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/Util.class differ
diff --git a/plugin/Raven.SQDev.Util/resources/sqf/SQFKeywords.txt b/plugin/Raven.SQDev.Util/resources/sqf/SQFKeywords.txt
index c6ee6ecf..0be0bb80 100644
--- a/plugin/Raven.SQDev.Util/resources/sqf/SQFKeywords.txt
+++ b/plugin/Raven.SQDev.Util/resources/sqf/SQFKeywords.txt
@@ -174,6 +174,14 @@ MMB: MouseButton 2 = actionKeys 65538 (65536 + 2)
4MB: MouseButton 3 = actionKeys 65539 (65536 + 3)
5MB: MouseButton 4 = actionKeys 65540 (65536 + 4)
The values above are valid for a right-handed mouse configuration, and may or may not differ for a left-handed config.
+%NextNote%
+(August 6, 2016)
+The method described by @AgentRev does not work.
+All numbers in SQF are floats and those are only precise up to 6...7 digits.
+$Code$486539264 + 19 == 486539264 + 20
+- true
+$/Code$
+The DIK codes for 'LCtrl + R' and 'LCtrl + T' are indistinguishable.
//NoteEnd//
ReturnValueStart:
Array of Numbers
@@ -517,9 +525,10 @@ KeywordStart:
addAction
//KeywordEnd//
DescriptionStart:
-Adds an entry to the action menu of an object (scroll wheel menu). The action can only be activated when in proximity to the object (eg: building). Adding an action to the player obviously makes that action available to the player at all times.
-This command has local effect. Created action is only available on the computer where command was executed. To make action available to all players, command must be executed on all connected clients.
-Note: addAction will be ignored on dedicated server, probably because no UI.
+This command syntax is for Arma 3 only. For TKOH and older versions see addAction TKOH
+Adds an entry to the action menu of an object (scroll wheel menu). The action can only be activated when in proximity to the object (eg: building). Adding an action to the player obviously makes that action available to the player at all times. The appearance of onscreen text could be further tweaked with setUserActionText. For event handling of user interaction see inGameUISetEventHandler
+This command has local effect. Created action is only available on the computer where command was executed. To make action available to all players, command must be executed on all connected clients (see remoteExec ). addAction is also ignored on dedicated server, because of no user interface. In Arma 3 addAction does not work on animals. This is intended behavior.
+Since Arma 3 v1.63.136787, two new params are available: radius and unconscious.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/addAction
@@ -528,36 +537,20 @@ SyntaxStart:
Object addAction Array
//SyntaxEnd//
RawSyntaxStart:
-unit addAction [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, positionInModel, radius, radiusView, showIn3D, available, textDefault, textToolTip]
+unit addAction [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, radius, unconscious]
//RawSyntaxEnd//
ExampleStart:
$Code$// Short and sweet:
-player addAction ["A Useless Action", ""];
-player addAction [" t color='#FF0000' This Useless Action Is RED /t ", ""];
-player addAction ["Hint Hello!", { hint format ["Hello %1!", _this select 3] }, name player ];
-player addAction ["string exec", "hint 'this is also compiled'"];$/Code$
+player addAction ["A Useless Action That Does Nothing", {}];
+player addAction [" t color='#FF0000' This Useless Action Is RED /t ", { hint "RED"}];
+player addAction ["Hint Hello!", { hint format ["Hello %1!", _this select 3]}, name player ];
+player addAction ["String Exec", " hint 'this is also compiled'"];$/Code$
%NextExample%
-$Code$// Actionception:
-actions = [];
-actions set [0, player addAction ["Actionception", {
-if ( count actions == 1) then {
-actions set [1, player addAction [" Actionception ", {
-if ( count actions == 2) then {
-actions set [2, player addAction [" Actionception ", {
-if ( count actions == 3) then {
-actions set [3, player addAction [" Actionception ", {
-{
-player removeAction _x ;
-} forEach actions;
-}, [], 10, false, true ]];
-};
-}, [], 10, false, false ]];
-};
-}, [], 10, false, false ]];
-};
-}, [], 10, false, false ]];$/Code$
+$Code$// SQF file example:
+_act = player addAction ["Exec the file", "somescript.sqf"]
+// somescript.sqf: hint str _this;$/Code$
%NextExample%
-$Code$// SQS example:
+$Code$// SQS file example:
_genAct = generator addAction ["Switch on generator", "activate_generator.sqs"]
// activate_generator.sqs:_gen = _this select 0
_caller = _this select 1
@@ -566,24 +559,12 @@ _id = _this select 2
_gen removeAction _id
// This example shows an action called "Switch on generator" added to an object with the name 'generator'. As soon as the player gets close to this object, he can execute the given action via the action menu. Then the script 'activate_generator.sqs' is executed, which in our example only removes the action from the generator.$/Code$
%NextExample%
-$Code$// TKOH example:
-_heli addAction [
-"Test",
-"myTest.sqf",
-"",
-1,
-true,
-true,
-"",
-"true",
-"display1",
-2,
-0.25,
-9,
-0,
-" img image='\HSim\UI_H\data\ui_action_autohover_ca.paa' size='1.8' shadow=0 / ",
-" br / My test tooltip"
-]$/Code$
+$Code$// Create object on dedicated server and add action to the object on every client:
+if ( isDedicated ) then
+{
+_obj = "some_obj_class" createVehicle [1234, 1234, 0];
+[_obj, ["Greetings!", { hint "Hello!"}]] remoteExec ["addAction", -2, _obj];
+};$/Code$
//ExampleEnd//
LocalityStart:
global / local
@@ -597,9 +578,6 @@ This stores the action's ID in the local variable "_myaction" and assists in kee
To remove the above action, you would use the following line:
$Code$ player removeAction _myaction;$/Code$
%NextNote%
-(17:35, 24 August 2013 (CEST))
-In Arma 3 addAction does not work on animals. This is intended behavior.
-%NextNote%
(June 19, 2014)
If executing actual script code like this:
$Code$_unit addAction [ "yourAction", { hint "A line of code" } ];$/Code$
@@ -611,10 +589,25 @@ $Code$_variable = false ; _unit addAction [ "action", { _variable = true } ];$/C
Succeed
$Code$variable = false ; _unit addAction [ "action", { variable = true } ];$/Code$
%NextNote%
-(August 15, 2014)
-Be aware that function names are essentially just global variables for code, so you can use function names as the script parameter.
-%NextNote%
(March 10, 2015)
+Actionception: $Code$actions = [];
+actions set [0, player addAction ["Actionception", {
+if ( count actions == 1) then {
+actions set [1, player addAction [" Actionception ", {
+if ( count actions == 2) then {
+actions set [2, player addAction [" Actionception ", {
+if ( count actions == 3) then {
+actions set [3, player addAction [" Actionception ", {
+{
+player removeAction _x ;
+} forEach actions;
+}, [], 10, false, true ]];
+};
+}, [], 10, false, false ]];
+};
+}, [], 10, false, false ]];
+};
+}, [], 10, false, false ]];$/Code$
Function to remove user actions with unknown ids:
$Code$KK_fnc_removeUnknownUserActions = {
for "_i" from 0 to ( player addAction ["",""]) do {
@@ -631,6 +624,9 @@ player addAction ["Action #" + str _i, {
};
$/Code$
Removes all user actions but 0, 5 and 6.
+%NextNote%
+(July 18, 2016)
+A3 v1.62.137494 : Condition is not evaluated when map is opened (and probably also true for other displays or opened dialog)
//NoteEnd//
ReturnValueStart:
Number
@@ -986,8 +982,7 @@ KeywordStart:
addEventHandler
//KeywordEnd//
DescriptionStart:
-Adds an event handler to a given unit. For more information about event handlers and their types check the scripting topic Event handlers in this reference. You may add as many event handlers of any type as you like to every unit. For instance, if you add an event handler of type "killed" and one already exists, the old one doesn't get overwritten. Use removeEventHandler to delete event handlers.
-Every event will create an array named _this, which contains specific information about the particular event. (e.g. the "killed" EH will return an array with 2 elements: the killed unit, and the killer.)
+Adds event handler (EH) to the given object and returns EH handle. If EH has some data to return upon event (e.g. the "killed" EH will return an array with 2 elements: the killed unit, and the killer), it is passed in _this variable. Since Arma 3 v.1.63.137807 the EH handle is also stored in _thisEventHandler variable and is available during EH code execution. For more information about event handlers and their types check the scripting topic Event handlers in this reference. You may add as many event handlers of any type as you like to every unit. For instance, if you add an event handler of type "killed" and one already exists, the old one doesn't get overwritten. Use removeEventHandler to delete event handlers.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/addEventHandler
@@ -1705,13 +1700,7 @@ KeywordStart:
addMissionEventHandler
//KeywordEnd//
DescriptionStart:
-Adds mission event handler. Every event will create an array named _this, which contains specific information about the particular event. Available mission event handlers:
-"Loaded"
-"EntityRespawned"
-"EntityKilled"
-"Ended" - Triggered when the mission is successfully ended. The variable _this, stores the type of the ending ("END1","END2", "LOSER", etc.).
-"Draw3D" - It seems "Draw3D" mission EH is connected to your primary display. It will stop firing as soon as you Alt+Tab from the game and resume when you come back (unless Arma 3 client is launched with -window -nopause params). "Draw3D" does not fire at all on a dedicated server.
-"HandleDisconnect" - Triggered when player disconnects from the game. Similar to onPlayerDisconnected event but can be stacked and contains the unit occupied by player before disconnect. Must be added on the server and triggers only on the server. For more info: HandleDisconnect
+Adds event handler (EH) attached to the current mission and returns EH handle. If EH has some data to return upon event, it is passed in _this variable. Since Arma 3 v.1.63.137807 the EH handle is also stored in _thisEventHandler variable and is available during EH code execution. For the list of available mission event handlers see: Arma_3:_Event_Handlers/addMissionEventHandler
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/addMissionEventHandler
@@ -1741,7 +1730,7 @@ KeywordStart:
addMPEventHandler
//KeywordEnd//
DescriptionStart:
-The format of handler is [type,command]. Check scripting topic Event handlers for more information. The index of the current handler is returned.
+Adds MP event handler (EH) to the given object and returns EH handle. MP event handlers are added globally to every client on network in multiplayer and will fire on every client too upon event. If EH has some data to return upon event (e.g. the "MPKilled" EH will return an array with 2 elements: the killed unit, and the killer), it is passed in _this variable. Since Arma 3 v.1.63.137807 the EH handle is also stored in _thisEventHandler variable and is available during EH code execution. For more information see: Arma_3:_Event_Handlers#addMPEventHandler
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/addMPEventHandler
@@ -1750,7 +1739,7 @@ SyntaxStart:
Object addMPEventHandler Array
//SyntaxEnd//
RawSyntaxStart:
-unitName addMPEventHandler [type, command]
+object addMPEventHandler [type, expression]
//RawSyntaxEnd//
ExampleStart:
$Code$_index = player addMPEventHandler ["mpkilled", {Null = _this execVM "playerkilled.sqf";}];$/Code$
@@ -1803,6 +1792,65 @@ Number - event handler id
%NextListItem%
+KeywordStart:
+addOwnedMine
+//KeywordEnd//
+DescriptionStart:
+Sets ownership over a remotely detonatable mine to the unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addOwnedMine
+//WikiPageEnd//
+SyntaxStart:
+unti addOwnedMine Object
+//SyntaxEnd//
+RawSyntaxStart:
+unti addOwnedMine mine
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addOwnedMine SuperMine;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addPlayerScores
+//KeywordEnd//
+DescriptionStart:
+MP server only: Adds player score.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addPlayerScores
+//WikiPageEnd//
+SyntaxStart:
+Object addPlayerScores Array
+//SyntaxEnd//
+RawSyntaxStart:
+unit addPlayerScores values
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addPlayerScores [0, 1, 0, 0, 1];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
addPrimaryWeaponItem
//KeywordEnd//
@@ -2116,7 +2164,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/addTeamMember
//WikiPageEnd//
SyntaxStart:
-TeamMember addTeamMember
+TeamMember addTeamMember TeamMember
//SyntaxEnd//
RawSyntaxStart:
team addTeamMember member
@@ -3717,13 +3765,13 @@ allVariables
//KeywordEnd//
DescriptionStart:
Returns a list of all variables from desired namespace. Namespaces supported:
-CONTROL
-TEAM_MEMBER
-NAMESPACE
-OBJECT
-GROUP
-TASK
-LOCATION
+Control
+Team_Member
+Namespace
+Object
+Group
+Task
+Location
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/allVariables
@@ -3735,15 +3783,19 @@ RawSyntaxStart:
allVariables namespace
//RawSyntaxEnd//
ExampleStart:
-$Code$_allVars = allVariables uiNamespace ;$/Code$
+$Code$_allVarsUINamespace = allVariables uiNamespace ;$/Code$
+%NextExample%
+$Code$_allVarsTrigger = allVariables trigger1;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
//LocalityEnd//
NoteStart:
+(June 11, 2016)
+Using profileNamespace and uiNamespace with this command has been disabled in multiplayer. [1]
//NoteEnd//
ReturnValueStart:
-Array of Strings - array of variable names
+Array of Strings - array of variable names. All names are in lower case (see toLower )
//ReturnValueEnd//
%NextListItem%
@@ -3793,7 +3845,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/and
//WikiPageEnd//
SyntaxStart:
-Boolean and
+Boolean and Boolean
%NextSyntax%
Boolean and Code
//SyntaxEnd//
@@ -4194,7 +4246,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/append
//WikiPageEnd//
SyntaxStart:
-Array append
+Array append Array
//SyntaxEnd//
RawSyntaxStart:
array1 append array2
@@ -4336,7 +4388,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/arrayIntersect
//WikiPageEnd//
SyntaxStart:
-Array arrayIntersect
+Array arrayIntersect Array
//SyntaxEnd//
RawSyntaxStart:
array1 arrayIntersect array2
@@ -4511,7 +4563,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/assignAsCargo
//WikiPageEnd//
SyntaxStart:
-Object assignAsCargo
+Object assignAsCargo Object
//SyntaxEnd//
RawSyntaxStart:
unitName assignAsCargo vehicleName
@@ -4570,7 +4622,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/assignAsCommander
//WikiPageEnd//
SyntaxStart:
-Object assignAsCommander
+Object assignAsCommander Object
//SyntaxEnd//
RawSyntaxStart:
unitName assignAsCommander vehicleName
@@ -4600,7 +4652,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/assignAsDriver
//WikiPageEnd//
SyntaxStart:
-Object assignAsDriver
+Object assignAsDriver Object
//SyntaxEnd//
RawSyntaxStart:
unitName assignAsDriver vehicleName
@@ -4630,7 +4682,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/assignAsGunner
//WikiPageEnd//
SyntaxStart:
-Object assignAsGunner
+Object assignAsGunner Object
//SyntaxEnd//
RawSyntaxStart:
unitName assignAsGunner vehicleName
@@ -4688,7 +4740,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/assignCurator
//WikiPageEnd//
SyntaxStart:
-Object assignCurator
+Object assignCurator Object
//SyntaxEnd//
RawSyntaxStart:
player assignCurator curatorObj
@@ -5078,6 +5130,8 @@ LocalityStart:
global / local
//LocalityEnd//
NoteStart:
+(July 12, 2016)
+Since Arma 3 v1.62 this command has global effects and is persistent even on machines that join in progress.
//NoteEnd//
ReturnValueStart:
Nothing
@@ -5154,7 +5208,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/atan2
//WikiPageEnd//
SyntaxStart:
-Number atan2
+Number atan2 Number
//SyntaxEnd//
RawSyntaxStart:
x atan2 y
@@ -5695,7 +5749,7 @@ KeywordStart:
behaviour
//KeywordEnd//
DescriptionStart:
-Return the behaviour of a unit.
+Return the behaviour of a unit. For Arma 3 behaviour explanation see Arma_3_AI_Behavior
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/behaviour
@@ -5707,9 +5761,8 @@ RawSyntaxStart:
behaviour unitName
//RawSyntaxEnd//
ExampleStart:
-$Code$_soldier setBehaviour CARELESS
-_b = behaviour _soldier
-returns "CARELESS"$/Code$
+$Code$_soldier setBehaviour "CARELESS";
+_b = behaviour _soldier; //returns "CARELESS"$/Code$
//ExampleEnd//
LocalityStart:
global / undefined
@@ -6209,6 +6262,13 @@ buttonSetAction [100, hint format[ %1 bar, _foo]; ];
%NextNote%
(February 15, 2016)
This command does not overwride the buttonaction which was set via "action" in the hpp of the dialog
+%NextNote%
+(June 11, 2016)
+To use variables local to the defining script, a syntax like the one below needs to be used:
+$Code$_foo = "foo";
+buttonSetAction [100, format["hint '%1 bar'", _foo]];
+$/Code$
+works! thanks to Kronzky for commenting this workaround in the VBS wiki
//NoteEnd//
ReturnValueStart:
Nothing
@@ -6358,7 +6418,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/callExtension
//WikiPageEnd//
SyntaxStart:
-String callExtension
+String callExtension String
//SyntaxEnd//
RawSyntaxStart:
extension callExtension functionWithArguments
@@ -7133,7 +7193,7 @@ https://community.bistudio.com/wiki/camPrepareTarget
SyntaxStart:
Object camPrepareTarget Array
%NextSyntax%
-Object camPrepareTarget
+Object camPrepareTarget Object
//SyntaxEnd//
RawSyntaxStart:
camera camPrepareTarget position
@@ -7424,7 +7484,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/camSetTarget
//WikiPageEnd//
SyntaxStart:
-Object camSetTarget
+Object camSetTarget Object
%NextSyntax%
Object camSetTarget Array
//SyntaxEnd//
@@ -7792,6 +7852,8 @@ LocalityStart:
global / undefined
//LocalityEnd//
NoteStart:
+(08:17, 22 Juil 2016 (UTC))
+This command will return true for a car or a tank out of fuel, but false for an helicopter or a plane for the same condition.
//NoteEnd//
ReturnValueStart:
Boolean -
@@ -7809,7 +7871,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/canSlingLoad
//WikiPageEnd//
SyntaxStart:
-Object canSlingLoad
+Object canSlingLoad Object
//SyntaxEnd//
RawSyntaxStart:
vehicle canSlingLoad cargo
@@ -7939,6 +8001,46 @@ Boolean
%NextListItem%
+KeywordStart:
+canVehicleCargo
+//KeywordEnd//
+DescriptionStart:
+Returns bool array if it is possible to load cargo inside vehicle and if possible to load cargo into empty vehicle
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/canVehicleCargo
+//WikiPageEnd//
+SyntaxStart:
+Object canVehicleCargo Object
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle canVehicleCargo cargo
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// Blackfish with no vehicle cargo loaded
+_result = blackfish canVehicleCargo offroad; //[true, true]$/Code$
+%NextExample%
+$Code$// Blackfish with one vehicle cargo called offroad already loaded
+_result = blackfish canVehicleCargo offroad; //[false, false]
+
+// Even if the Blackfish was empty offroad can't be loaded because it's already in a cargo space$/Code$
+%NextExample%
+$Code$// Blackfish with one vehicle cargo called offroad already loaded
+_result = blackfish canVehicleCargo offroad2; //[false, true]
+
+// offroad2 can't be loaded because there isn't enough space in the Blackfish, but if there was space offroad2 could be loaded into the Blackfish$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - [Possible to load cargo inside vehicle, possible to load cargo into empty vehicle]
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
captive
//KeywordEnd//
@@ -8258,10 +8360,10 @@ WikiPageStart:
https://community.bistudio.com/wiki/checkVisibility
//WikiPageEnd//
SyntaxStart:
-Array checkVisibility
+Array checkVisibility Array
//SyntaxEnd//
RawSyntaxStart:
-[ignore, LOD] checkVisibility [beg, end]
+[ignore, LOD, ignore2] checkVisibility [beg, end]
//RawSyntaxEnd//
ExampleStart:
$Code$_cansee = [ objNull, "VIEW"] checkVisibility [ eyePos player, eyePos unit1];$/Code$
@@ -9035,25 +9137,25 @@ KeywordStart:
commandChat
//KeywordEnd//
DescriptionStart:
-Types text to the command radio channel. Note: This function only types text to the list, it does not broadcast the message. If you want the message to show on all computers, you have to execute it on all of them.
+Types text to the command radio channel. Must have assigned "ItemRadio" to see or transmit the messages. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec )
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/commandChat
//WikiPageEnd//
SyntaxStart:
-Object/Array commandChat String
+Object commandChat String
%NextSyntax%
Array commandChat String
//SyntaxEnd//
RawSyntaxStart:
-unit commandChat chatText
+unitName commandChat chatText
%NextRawSyntax%
-[side, string] commandChat chatText
+[side, identity] commandChat chatText
//RawSyntaxEnd//
ExampleStart:
$Code$_soldierOne commandChat "Show this text";$/Code$
%NextExample%
-$Code$[ playerSide,"HQ"] commandChat "Do this! That's an order!";$/Code$
+$Code$[ playerSide, "HQ"] commandChat "Do this! That's an order!";$/Code$
%NextExample%
$Code$driver vehicle player sideChat "sideChat";
driver vehicle player globalChat "globalChat";
@@ -9316,22 +9418,31 @@ KeywordStart:
commandRadio
//KeywordEnd//
DescriptionStart:
-Sends the message to the command radio channel. The message is defined in the description.ext file or radio protocol.
+Sends the audio message to the command radio channel. Must have assigned "ItemRadio" to send or receive the transmission. The message is defined in CfgRadio in the description.ext file or config radio protocol. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec ).
+Note: When transmitting unit gets killed, transmission will be interrupted, however when receiving unit gets killed, the transmission continues to play.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/commandRadio
//WikiPageEnd//
SyntaxStart:
-Object/Array commandRadio String
+Object commandRadio String
+%NextSyntax%
+Array commandRadio String
//SyntaxEnd//
RawSyntaxStart:
unit commandRadio radioName
+%NextRawSyntax%
+[side, identity] commandRadio radioName
//RawSyntaxEnd//
ExampleStart:
-$Code$player commandRadio "messageOne";$/Code$
+$Code$_soldierOne commandRadio "messageOne";$/Code$
+%NextExample%
+$Code$player commandRadio configName selectRandom ("true" configClasses ( configFile "CfgRadio"));$/Code$
+%NextExample%
+$Code$[ west, "Base"] commandRadio configName selectRandom ("true" configClasses ( configFile "CfgRadio"));$/Code$
//ExampleEnd//
LocalityStart:
-undefined / undefined
+global / local
//LocalityEnd//
NoteStart:
(June 24, 2010)
@@ -9378,6 +9489,37 @@ Nothing
%NextListItem%
+KeywordStart:
+commandSuppressiveFire
+//KeywordEnd//
+DescriptionStart:
+Order the given unit to suppress a given position or target (via the radio).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/commandSuppressiveFire
+//WikiPageEnd//
+SyntaxStart:
+Object/Array commandSuppressiveFire Object/Array
+//SyntaxEnd//
+RawSyntaxStart:
+unitName commandSuppressiveFire target
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier commandSuppressiveFire [1869.508,5760.962,0.000]$/Code$
+%NextExample%
+$Code$_soldier commandSuppressiveFire cursorTarget$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
commandTarget
//KeywordEnd//
@@ -9388,7 +9530,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/commandTarget
//WikiPageEnd//
SyntaxStart:
-Object commandTarget
+Object commandTarget Object
//SyntaxEnd//
RawSyntaxStart:
unitName commandTarget target
@@ -9675,30 +9817,6 @@ LocalityStart:
undefined / undefined
//LocalityEnd//
NoteStart:
-(Jul 19, 2014)
-(ArmA3 1.24) It is recommended to use configClasses instead of BIS_fnc_getCfgSubClasses and BIS_fnc_uniqueClasses on subclasses collection or conditional selection.
-$Code$
-_faces = " true " configClasses ( configFile "Cfgfaces");
-//same as: _faces = (configfile "CfgFaces") call BIS_fnc_getCfgSubClasses ;
-$/Code$
-$Code$
-//Extract all animals:
-animals = "(( configName _x) isKindOf 'animal')" configClasses ( configFile "CfgVehicles");
-/*same as:
-aniamls = [];
-[( configFile "CfgVehicles"),{
-if (( configName _this) isKindOf “animal�) then {
-animals set [ count animals, _this]
-}
-}
-] call BIS_fnc_uniqueClasses ;*/
-$/Code$
-Return nested subclasses, currently still BIS_fnc_returnChildren
-$Code$
-//Return all nested config classes.
-[( configFile "CfgFaces"),1, true, true ] call BIS_fnc_returnChildren ;
-$/Code$
-%NextNote%
(oct 19, 2014)
A fantastic way to filter stuff. eg; Create an array of west vehicles and spawn then in front of the player in rows of 5
$Code$
@@ -9721,6 +9839,10 @@ _xPos = _xPos + 20;
};
} forEach _cfgArray;
$/Code$
+%NextNote%
+(May 28, 2016)
+configClasses does not account for inherited subclasses, use configProperties with isClass filter instead
+$Code$ configProperties [_config, " isClass _x", true ];$/Code$
//NoteEnd//
ReturnValueStart:
Array - Array of Configs
@@ -9916,6 +10038,36 @@ Array - Array of Configs
%NextListItem%
+KeywordStart:
+configSourceAddonList
+//KeywordEnd//
+DescriptionStart:
+Returns an array of addons ( CfgPatches ) in which the given config class is defined.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/configSourceAddonList
+//WikiPageEnd//
+SyntaxStart:
+configSourceAddonList Config
+//SyntaxEnd//
+RawSyntaxStart:
+configSourceAddonList config
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_addons = configSourceAddonList ( configFile "CfgVehicles" "Man");
+hint str _addons; // ["A3_Data_F","A3_Characters_F","A3_Data_F_Curator","A3_Air_F_Heli"]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Strings
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
configSourceMod
//KeywordEnd//
@@ -9951,7 +10103,7 @@ KeywordStart:
configSourceModList
//KeywordEnd//
DescriptionStart:
-Returns an array of mods which modified the given config class.
+Returns an array of mods (CfgMods) in which the given config class is defined.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/configSourceModList
@@ -9964,7 +10116,7 @@ configSourceModList config
//RawSyntaxEnd//
ExampleStart:
$Code$_mods = configSourceModList (configFile "CfgVehicles" "Man");
-hint str _mods; //["curator","heli"]$/Code$
+hint str _mods; // ["A3","curator","heli"]$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -9972,7 +10124,7 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Array Array of mods
+Array of Strings
//ReturnValueEnd//
%NextListItem%
@@ -9987,7 +10139,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/connectTerminalToUAV
//WikiPageEnd//
SyntaxStart:
-Object connectTerminalToUAV
+Object connectTerminalToUAV Object
//SyntaxEnd//
RawSyntaxStart:
person connectTerminalToUAV uav
@@ -10150,7 +10302,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/copyWaypoints
//WikiPageEnd//
SyntaxStart:
-Group copyWaypoints
+Group copyWaypoints Group
//SyntaxEnd//
RawSyntaxStart:
groupTo copyWaypoints groupFrom
@@ -10532,6 +10684,9 @@ undefined / undefined
NoteStart:
(March 29, 2016)
The classnames for triggers can be found in the config class CfgNonAIVehicles
+%NextNote%
+(June 14, 2016)
+Mode can also be "Logic". Not sure if it's a replacement for "System" or a it's a completely separate mode.
//NoteEnd//
ReturnValueStart:
Eden Entity
@@ -10844,6 +10999,38 @@ Nothing or ( Since Arma 3 v1.49.131653 ) Display
%NextListItem%
+KeywordStart:
+createGearDialog
+//KeywordEnd//
+DescriptionStart:
+Opens gear dialog for given unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createGearDialog
+//WikiPageEnd//
+SyntaxStart:
+createGearDialog Array
+//SyntaxEnd//
+RawSyntaxStart:
+CreateGearDialog [unit,resource]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$createGearDialog [player, "RscDisplayGear"];
+createGearDialog [player, "RscMyDisplayGear"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(April 12, 2015)
+Arma 3 v. 1.42 crashes when executing examples above in debug panel.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
createGroup
//KeywordEnd//
@@ -11113,6 +11300,60 @@ Display
%NextListItem%
+KeywordStart:
+createSimpleObject
+//KeywordEnd//
+DescriptionStart:
+Create object with given shape defined as path to.p3d model. Supported LODs include Geometry, Fire Geometry, Roadway, View Geometry and ShadowVolume. Supported features include collision, texturing, animation, penetration, AI spotting occlusion, and surface specific sounds (like footsteps). Unsupported features include PhysX, damage, AI pathfinding (causes walking through walls), and built in lights.
+Given the simulation limitations, global decorative objects can be created with very little network traffic. Objects that could be exclusively created with this command are: trees, bushes, rocks, bridges, roads, vehicle wrecks, custom models in mission, and other objects without a class in config. The height of the placement position might need to be adjusted experimentally. Some of the model examples could be found here: createSimpleObject/objects
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createSimpleObject
+//WikiPageEnd//
+SyntaxStart:
+createSimpleObject Array;
+//SyntaxEnd//
+RawSyntaxStart:
+createSimpleObject [shapeName, position];
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_pos = player getRelPos [10, 0];
+_tank = createSimpleObject ["a3\armor_f_beta\apc_tracked_01\apc_tracked_01_rcws_f.p3d", _pos];
+_tank setPos (_pos vectorAdd ( getPosWorld _tank vectorDiff (_tank modelToWorld [0,0,0])));
+_tank hideSelection ["zasleh", true ];
+_tank hideSelection ["zasleh2", true ];
+_tank hideSelection ["clan", true ];
+_tank animate ["Wheel_podkoloL3", 1, true ];
+_tank animate ["Wheel_podkoloL6", 1, true ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+(April 18, 2016)
+The easiest way to correctly place simple object is to create normal object of the same shape from class (if possible), then copy getPosWorld, vectorDir and vectorUp from it. Then create the simple object and apply copied values to it, this will position simple object exactly as normal object was positioned:
+$Code$_heli = "B_Heli_Light_01_F" createVehicleLocal ( player getRelPos [10, 0]);
+_position = getPosWorld _heli;
+_vectorDirUp = [ vectorDir _heli, vectorUp _heli];
+_model = getModelInfo _heli select 1;
+deleteVehicle _heli;
+_simpleHeli = createSimpleObject [_model, _position];
+_simpleHeli setVectorDirAndUp _vectorDirUp;$/Code$
+%NextNote%
+(April 28, 2016)
+Models from within the mission file/folder can be created, but full system path is needed. Use:
+$Code$(str missionConfigFile select [0, count str missionConfigFile - 15]) + "myModel.p3d"
+//mission folder path code from: http://killzonekid.com/arma-scripting-tutorials-mission-root/ $/Code$
+%NextNote%
+(May 11, 2016)
+simulationEnabled returns false.
+//NoteEnd//
+ReturnValueStart:
+Object - Created simple object
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
createSimpleTask
//KeywordEnd//
@@ -11726,7 +11967,7 @@ KeywordStart:
ctrlAngle
//KeywordEnd//
DescriptionStart:
-WIP
+Gets array of rotation info of the control
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/ctrlAngle
@@ -11738,6 +11979,7 @@ RawSyntaxStart:
ctrlAngle control
//RawSyntaxEnd//
ExampleStart:
+$Code$ctrlAngle _control;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -11745,7 +11987,7 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Nothing
+Array - format [angle, xCenter, yCenter]
//ReturnValueEnd//
%NextListItem%
@@ -12438,7 +12680,7 @@ KeywordStart:
ctrlMapMouseOver
//KeywordEnd//
DescriptionStart:
-Returns description of map sign mouse cursor is over.
+Returns description of map sign mouse cursor is over. Works with in-game map as well as 2D editor map in edit mode.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/ctrlMapMouseOver
@@ -12450,25 +12692,27 @@ RawSyntaxStart:
ctrlMapMouseOver control
//RawSyntaxEnd//
ExampleStart:
-$Code$(uiNamespace getVariable _map ) ctrlMapCursor [ Track, HC_overFriendly ];
-_mouseover = if (count (ctrlMapMouseOver (uiNamespace getVariable _map )) 0) then
+$Code$( uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_overFriendly"];
+_mouseover = if ( count ( ctrlMapMouseOver (uiNamespace getVariable "_map")) 0) then
{
-ctrlMapMouseOver (uiNamespace getVariable _map )
+ctrlMapMouseOver ( uiNamespace getVariable "_map")
}
else
{
-[ ]
+[""]
};
-if (_mouseover select 0 == task str(_logic getVariable onTaskAssigned ) != str{}) then
+if (_mouseover select 0 == "task" str (_logic getVariable "onTaskAssigned") != str {}) then
{
//--- Task
-(uiNamespace getVariable _map ) ctrlMapCursor [ Track, HC_overMission ];
+( uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_overMission"];
}
else
{
//--- Waypoint
-(uiNamespace getVariable _map ) ctrlMapCursor [ Track, HC_move ];
+( uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_move"];
};$/Code$
+%NextExample%
+$Code$onEachFrame { hintSilent str ctrlMapMouseOver ( findDisplay 12 displayCtrl 51)};$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -12476,7 +12720,7 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Array
+Array - Possible values:
//ReturnValueEnd//
%NextListItem%
@@ -12705,6 +12949,36 @@ Display
%NextListItem%
+KeywordStart:
+ctrlParentControlsGroup
+//KeywordEnd//
+DescriptionStart:
+Returns the parent control of a given child control
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlParentControlsGroup
+//WikiPageEnd//
+SyntaxStart:
+ctrlParentControlsGroup Child
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlParentControlsGroup Control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ctrlCombo = _ctrl controlsGroupCtrl 100;//Control
+ctrlParentControlsGroup _ctrlCombo;//Parent control group (_ctrl)$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Control
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
ctrlPosition
//KeywordEnd//
@@ -12849,6 +13123,35 @@ Nothing
%NextListItem%
+KeywordStart:
+ctrlSetAngle
+//KeywordEnd//
+DescriptionStart:
+Sets the rotation of the control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetAngle
+//WikiPageEnd//
+SyntaxStart:
+Control ctrlSetAngle Array
+//SyntaxEnd//
+RawSyntaxStart:
+ctrl ctrlSetAngle angle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetAngle [25, 0.5, 0.5];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
ctrlSetAutoScrollDelay
//KeywordEnd//
@@ -13675,6 +13978,35 @@ Nothing
%NextListItem%
+KeywordStart:
+ctrlSetFontHeightSecondary
+//KeywordEnd//
+DescriptionStart:
+Sets the font size of the secondary text of given control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontHeightSecondary
+//WikiPageEnd//
+SyntaxStart:
+Control ctrlSetFontHeightSecondary Number
+//SyntaxEnd//
+RawSyntaxStart:
+ctrl ctrlSetFontHeightSecondary value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontHeightSecondary 0.05;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
ctrlSetFontP
//KeywordEnd//
@@ -13735,6 +14067,35 @@ Nothing
%NextListItem%
+KeywordStart:
+ctrlSetFontSecondary
+//KeywordEnd//
+DescriptionStart:
+Sets the font size of the secondary text of given control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontSecondary
+//WikiPageEnd//
+SyntaxStart:
+Control ctrlSetFontSecondary String
+//SyntaxEnd//
+RawSyntaxStart:
+ctrl ctrlSetFontSecondary fontClass
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontSecondary "TahomaB";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
ctrlSetForegroundColor
//KeywordEnd//
@@ -13838,7 +14199,7 @@ RawSyntaxStart:
control ctrlSetModelScale scale
//RawSyntaxEnd//
ExampleStart:
-$Code$_ctrl3D ctrlModelScale 1.5;$/Code$
+$Code$_ctrl3D ctrlSetModelScale 1.5;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -15444,7 +15805,7 @@ ExampleStart:
$Code$_soldierOne customRadio [1, "WordEnemy"];$/Code$
//ExampleEnd//
LocalityStart:
-undefined / undefined
+global / local
//LocalityEnd//
NoteStart:
//NoteEnd//
@@ -15465,7 +15826,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/cutFadeOut
//WikiPageEnd//
SyntaxStart:
-Number cutFadeOut
+Number cutFadeOut Number
%NextSyntax%
String cutFadeOut Number
//SyntaxEnd//
@@ -15483,6 +15844,11 @@ LocalityStart:
undefined / undefined
//LocalityEnd//
NoteStart:
+(July 9, 2016)
+(ArmA v1.60)
+The actual fadeout-duration can be dependent on the duration for the fadein (e.g. specified by cutText ). If the fadein-duration is set to a value less than 1 the fadeout-duration will be the given number divided by the fadein-duration.
+test cutText [, BLACK, 0.5, true]; // fadein is 0
+test cutFadeout 2; // The actual fadeout-time is 2 / 0.5 = 1
//NoteEnd//
ReturnValueStart:
Nothing
@@ -15642,6 +16008,10 @@ undefined / local
NoteStart:
(September 20, 2013)
In Arma 3 "PLAIN" param will display your text where the crosshair is, "PLAIN DOWN" will push the text further down, closer to the bottom of the screen.
+%NextNote%
+(July 6, 2016)
+The value for speed has to be greater 0. If 0 is used as speed the default value (1) will be used.
+If you want to create an "instant" effect you can use a really small value (e.g. 0.001)
//NoteEnd//
ReturnValueStart:
Nothing
@@ -16325,7 +16695,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/deleteRange
//WikiPageEnd//
SyntaxStart:
-Array deleteRange
+Array deleteRange Array
//SyntaxEnd//
RawSyntaxStart:
array deleteRange [from, count]
@@ -16533,7 +16903,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/deleteVehicleCrew
//WikiPageEnd//
SyntaxStart:
-Object deleteVehicleCrew
+Object deleteVehicleCrew Object
//SyntaxEnd//
RawSyntaxStart:
vehicle deleteVehicleCrew unit
@@ -17421,6 +17791,7 @@ vonID
mapContent
autoReport
multipleSaves
+squadRadar
//NoteEnd//
ReturnValueStart:
Number
@@ -17462,7 +17833,8 @@ KeywordStart:
directSay
//KeywordEnd//
DescriptionStart:
-Sends the message to the direct channel. The message is defined in the description.ext file, radio protocol, or a kbAddTopic.
+Sends given audio message to the direct channel. Command operates just like xxxxRadio commands, but the sound is played over direct channel and is independent of fadeRadio. The message is defined in CfgRadio in the description.ext file or config radio protocol or a kbAddTopic. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec ).
+Note: When transmitting unit gets killed, transmission will be interrupted, however when receiving unit gets killed, the transmission continues to play.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/directSay
@@ -17474,9 +17846,10 @@ RawSyntaxStart:
unit directSay radioName
//RawSyntaxEnd//
ExampleStart:
+$Code$player directSay configName selectRandom ("true" configClasses ( configFile "CfgRadio"));$/Code$
//ExampleEnd//
LocalityStart:
-undefined / undefined
+global / local
//LocalityEnd//
NoteStart:
//NoteEnd//
@@ -17504,7 +17877,6 @@ Possible values are:
"COVER" - disables usage of cover positions by the AI Available only since Arma 3 v1.56.
"AUTOCOMBAT" - disables autonomous switching to COMBAT when in danger Available only since Arma 3 v1.56.
"PATH" - stops the AI’s movement but not the target alignment Available only since Arma 3 v1.61.
-Note: All effects of disableAI command are cancelled after mission save or load.
Note: In OFP is no way to undo this command.
//DescriptionEnd//
WikiPageStart:
@@ -17563,7 +17935,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/disableCollisionWith
//WikiPageEnd//
SyntaxStart:
-Object disableCollisionWith
+Object disableCollisionWith Object
//SyntaxEnd//
RawSyntaxStart:
vehicle disableCollisionWith vehicle
@@ -18160,9 +18532,9 @@ WikiPageStart:
https://community.bistudio.com/wiki/distance
//WikiPageEnd//
SyntaxStart:
-Object/Array distance
+Object/Array distance Object/Array
%NextSyntax%
-Location/Array distance
+Location/Array distance Location/Array
//SyntaxEnd//
RawSyntaxStart:
param1 distance param2
@@ -18215,7 +18587,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/distance2D
//WikiPageEnd//
SyntaxStart:
-Object/Array distance2D
+Object/Array distance2D Object/Array
//SyntaxEnd//
RawSyntaxStart:
param1 distance2D param2
@@ -18244,7 +18616,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/distanceSqr
//WikiPageEnd//
SyntaxStart:
-Object/Position distanceSqr
+Object/Position distanceSqr Object/Position
//SyntaxEnd//
RawSyntaxStart:
var1 distanceSqr var2
@@ -18641,6 +19013,37 @@ Nothing
%NextListItem%
+KeywordStart:
+doSuppressiveFire
+//KeywordEnd//
+DescriptionStart:
+Order the given unit to suppress a given position or target (without radio messages).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/doSuppressiveFire
+//WikiPageEnd//
+SyntaxStart:
+Object/Array doSuppressiveFire Object/Array
+//SyntaxEnd//
+RawSyntaxStart:
+unitName doSuppressiveFire target
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier doSuppressiveFire [1869.508,5760.962,0.000]$/Code$
+%NextExample%
+$Code$_soldier doSuppressiveFire cursorTarget$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
doTarget
//KeywordEnd//
@@ -19552,6 +19955,35 @@ Nothing
%NextListItem%
+KeywordStart:
+enableAimPrecision
+//KeywordEnd//
+DescriptionStart:
+Set whether animation's aim precision affects weapon sway.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableAimPrecision
+//WikiPageEnd//
+SyntaxStart:
+Object enableAimPrecision Boolean
+//SyntaxEnd//
+RawSyntaxStart:
+unit enableAimPrecision enable
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player enableAimPrecision false$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
enableAttack
//KeywordEnd//
@@ -19581,6 +20013,35 @@ Nothing
%NextListItem%
+KeywordStart:
+enableAudioFeature
+//KeywordEnd//
+DescriptionStart:
+Enable/disable an audio feature, features are: "lowpass", "building_interior". Return previous state
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableAudioFeature
+//WikiPageEnd//
+SyntaxStart:
+enableAudioFeature Array
+//SyntaxEnd//
+RawSyntaxStart:
+enableAudioFeature [feature, enable]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$prevState = enableAudioFeature ["lowpass", true ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Bool - Previous state
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
enableCamShake
//KeywordEnd//
@@ -19680,6 +20141,11 @@ LocalityStart:
undefined / local
//LocalityEnd//
NoteStart:
+(June 17, 2016)
+If the user is admin, global channel is fully enabled, regardless of this command.
+%NextNote%
+(July 30, 2016)
+Alternative Syntax supports Custom Radio Channels
//NoteEnd//
ReturnValueStart:
Nothing
@@ -19697,7 +20163,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/enableCollisionWith
//WikiPageEnd//
SyntaxStart:
-Object enableCollisionWith
+Object enableCollisionWith Object
//SyntaxEnd//
RawSyntaxStart:
vehicle enableCollisionWith vehicle
@@ -20473,6 +20939,37 @@ Nothing
%NextListItem%
+KeywordStart:
+enableVehicleCargo
+//KeywordEnd//
+DescriptionStart:
+Enable/disable option to transport other vehicles (if configured) or be transported.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableVehicleCargo
+//WikiPageEnd//
+SyntaxStart:
+Object enableVehicleCargo Boolean
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle enableVehicleCargo enable
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicle enableVehicleCargo true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(June 20, 2016)
+Setting enableVehicleCargo to true does not mean a vehicle can now load vehicles as cargo. They are still required to be correctly setup as shown on the Vehicle in Vehicle Transport page.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
endLoadingScreen
//KeywordEnd//
@@ -20688,7 +21185,7 @@ KeywordStart:
entities
//KeywordEnd//
DescriptionStart:
-Returns a list of all dead or alive entities with given type.
+Returns a list of all dead or alive entities with given type. Units in vehicles are ignored.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/entities
@@ -20708,6 +21205,9 @@ undefined / undefined
NoteStart:
(Mar 27, 2014)
In ArmA3 ver 1.14 type (string) can be any children class under configfile "CfgVehicles". e.g. $Code$ entities "All"; //or entities "CAManBase"; etc.$/Code$
+%NextNote%
+(July 12, 2016)
+In A3 1.62 $Code$entities "CAManBase"$/Code$ does not include entities inside vehicles (crew).
//NoteEnd//
ReturnValueStart:
Array
@@ -20972,9 +21472,7 @@ KeywordStart:
execFSM
//KeywordEnd//
DescriptionStart:
-Execute the scripted FSM. The FSM file is first searched in the mission folder, then in the campaign scripts folder and finally in the global scripts folder.
-Argument(s) (if any) is/are passed as _this to the FSM.
-Returns the FSM handle or 0 when failed.
+Executes scripted FSM and returns the FSM handle or 0 when failed. The FSM file is first searched in the mission folder, then in the campaign scripts folder and finally in the global scripts folder. Argument (if any) are available in _this variable inside FSM. In Arma 3 FSM handle is also available in _thisFSM variable.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/execFSM
@@ -20985,7 +21483,7 @@ Anything execFSM String
execFSM String
//SyntaxEnd//
RawSyntaxStart:
-argument execFSM filename
+arguments execFSM filename
%NextRawSyntax%
execFSM filename
//RawSyntaxEnd//
@@ -21012,6 +21510,11 @@ execVM
//KeywordEnd//
DescriptionStart:
Compiles and adds SQF Script to the scheduler queue and returns script handle. The script is first searched for in the mission folder, then in the campaign scripts folder and finally in the global scripts folder. The script does not execute immediately upon running execVM command, but with some delay. How much delay is unknown as it largely depends on how many other scripts there are in the queue and how busy is VM. The optional argument is passed to the script in private variable _this. In Arma 3 the script handle is also passed to the script in _thisScript variable.
+In order to understand execVM consider the following comparison:
+$Code$ private _handle = _args execVM "someFile.sqf";
+// is practically identical to
+private _handle = _args spawn compile preprocessFileLineNumbers "someFile.sqf";$/Code$
+So if you need multiple execution of the same file, you might want to store it in a function ( Functions Library ), otherwise, for a single execution, execVM is a good choice.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/execVM
@@ -21022,7 +21525,7 @@ Anything execVM String
execVM String
//SyntaxEnd//
RawSyntaxStart:
-argument execVM filename
+arguments execVM filename
%NextRawSyntax%
execVM filename
//RawSyntaxEnd//
@@ -21054,7 +21557,7 @@ _myunit = _this select 0;
_myvar = _this select 1;
//NoteEnd//
ReturnValueStart:
-Script Handle - can be used to determine (via scriptDone (also via isNull in Arma 3)) when the execVMed script has finished. In Arma 3, the handle is also available inside the execVMed script in _thisScript variable.
+Script - script handle, can be used to determine (via scriptDone (also via isNull in Arma 3)) when the execVMed script has finished. In Arma 3, the handle is also available inside the execVMed script in _thisScript variable.
//ReturnValueEnd//
%NextListItem%
@@ -21093,7 +21596,7 @@ KeywordStart:
exitWith
//KeywordEnd//
DescriptionStart:
-Exits current scope {...} it is executed from, creates new scope {...code...} and executes the given code in it. Often used for exiting do, for, count or forEach. Simply exiting waitUntil or onEachFrame scopes with exitWith will have no effect as these scopes are called repeatedly by the engine and require different handling to terminate (see Example 3).
+Exits current scope {...} it is executed from if condition evaluates true, creates new scope {...code...} and executes the given code in it. Often used for exiting do, for, count or forEach. Simply exiting waitUntil or onEachFrame scopes with exitWith will have no effect as these scopes are called repeatedly by the engine and require different handling to terminate (see Example 3).
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/exitWith
@@ -21296,7 +21799,7 @@ global / undefined
//LocalityEnd//
NoteStart:
(May 26, 2014)
-This command should have really been named headDirection instead of eyeDirection as one could mistakenly think that eyes direction of your avatar correspond to the direction of the centre of your screen. In fact the direction returned by eyeDirection is avatar's head direction relative to the torso (minus ambient head animation factor). Play with the script in example 1 to find out limitations. If you need centre of screen direction, use positionCameraToWorld instead.
+This command should have really been named headDirection instead of eyeDirection as one could mistakenly think that eyes direction of your avatar correspond to the direction of the centre of your screen. Play with the script in example 1 to find out limitations. If you need centre of screen direction, use positionCameraToWorld instead.
//NoteEnd//
ReturnValueStart:
Array - 3D Vector
@@ -21422,7 +21925,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/fadeMusic
//WikiPageEnd//
SyntaxStart:
-Number fadeMusic
+Number fadeMusic Number
//SyntaxEnd//
RawSyntaxStart:
time fadeMusic volume
@@ -21451,7 +21954,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/fadeRadio
//WikiPageEnd//
SyntaxStart:
-Number fadeRadio
+Number fadeRadio Number
//SyntaxEnd//
RawSyntaxStart:
time fadeRadio volume
@@ -21482,7 +21985,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/fadeSound
//WikiPageEnd//
SyntaxStart:
-Number fadeSound
+Number fadeSound Number
//SyntaxEnd//
RawSyntaxStart:
time fadeSound volume
@@ -21513,7 +22016,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/fadeSpeech
//WikiPageEnd//
SyntaxStart:
-Number fadeSpeech
+Number fadeSpeech Number
//SyntaxEnd//
RawSyntaxStart:
time fadeSpeech volume
@@ -21644,7 +22147,7 @@ https://community.bistudio.com/wiki/find
SyntaxStart:
Array find Anything
%NextSyntax%
-String find
+String find String
//SyntaxEnd//
RawSyntaxStart:
array find x
@@ -21682,6 +22185,9 @@ $Code$"abcßdef" find "c"
- 3
"abcßdef" find "d"
- 5$/Code$
+%NextNote%
+(July 7, 2016 10:56 (UTC))
+Not quite unreliable, just unexpected! Strings are tracked in terms of bytes rather than in actual character positions; all strings are stored in UTF-8 format. In other words, the eszett character is in Unicode, which takes up two bytes rather than one as it is within the 128-255 range of Unicode. (Similar results would be expected for the division symbol, the umlaut, accented e's, etc.) Symbols that are particularly high in the Unicode range may take up three bytes, or even four for the truly exceptional characters, although Arma 3's default fonts are unlikely to render them. This definitely complicates any script which assumes any printable character is a single byte, however, and unfortunately I'm not skilled enough with internationalisation to recommend any robust fix.
//NoteEnd//
ReturnValueStart:
Number - 0 based position of the first array element that matches x, -1 if not found
@@ -21821,7 +22327,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/findEmptyPosition
//WikiPageEnd//
SyntaxStart:
-Array findEmptyPosition
+Array findEmptyPosition Array
//SyntaxEnd//
RawSyntaxStart:
center findEmptyPosition [minDistance, maxDistance, vehicleType]
@@ -21871,7 +22377,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/findEmptyPositionReady
//WikiPageEnd//
SyntaxStart:
-Array findEmptyPositionReady
+Array findEmptyPositionReady Array
//SyntaxEnd//
RawSyntaxStart:
center findEmptyPositionReady [radius,maxDistance]
@@ -22426,6 +22932,35 @@ Nothing
%NextListItem%
+KeywordStart:
+flyInHeightASL
+//KeywordEnd//
+DescriptionStart:
+Sets the minimal ASL height. Final height is max(flyInHeight, flyInHeightASL).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/flyInHeightASL
+//WikiPageEnd//
+SyntaxStart:
+Object flyInHeightASL Array
+//SyntaxEnd//
+RawSyntaxStart:
+aircraft flyInHeightASL params
+//RawSyntaxEnd//
+ExampleStart:
+$Code$cobraOne flyInHeightASL [200, 100, 400];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
fog
//KeywordEnd//
@@ -22570,6 +23105,36 @@ Nothing
%NextListItem%
+KeywordStart:
+forcedMap
+//KeywordEnd//
+DescriptionStart:
+Returns if map was forced by using forceMap command or openMap command with force option
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/forcedMap
+//WikiPageEnd//
+SyntaxStart:
+forcedMap
+//SyntaxEnd//
+RawSyntaxStart:
+forcedMap
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_forceMapForced = forcedMap select 0;
+_openMapForced = forcedMap select 1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - in format [forceMapForced, openMapForced] where:
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
forceEnd
//KeywordEnd//
@@ -22604,7 +23169,7 @@ KeywordStart:
forceMap
//KeywordEnd//
DescriptionStart:
-Displays the map on the screen during a mission.
+Opens non-interactive main map in background that overrides user screen. The user is able to fire but cannot see the world just the map. To force open interactive map use openMap command.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/forceMap
@@ -22899,6 +23464,23 @@ $Code$_result = {
if(_x isEqualTo 3) exitWith {"Hello"}
} forEach [1,2,3,4,5];
//_result = "Hello"$/Code$
+%NextNote%
+(June 17, 2016)
+To be more precise, _forEachIndex represents NOT the index of the current array element, but the number of the loop iteration. If array is modified by reference while it is iterated through with forEach loop, _forEachIndex will NOT change to reflect that. For example:
+$Code$_array = ["1","2","3","4","5","6","7","8","9"];
+{
+systemChat str [_x, _forEachIndex, _array];
+_array deleteAt _forEachIndex;
+}
+forEach _array;
+/*result:
+[_x, _forEachIndex, _array]
+["1",0,["1","2","3","4","5","6","7","8","9"]]
+["3",1,["2","3","4","5","6","7","8","9"]]
+["5",2,["2","4","5","6","7","8","9"]]
+["7",3,["2","4","6","7","8","9"]]
+["9",4,["2","4","6","8","9"]]*/
+$/Code$
//NoteEnd//
ReturnValueStart:
Anything - will return the value of last executed statement
@@ -23844,7 +24426,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/get3DENMissionAttribute
//WikiPageEnd//
SyntaxStart:
-String get3DENMissionAttribute
+String get3DENMissionAttribute String
//SyntaxEnd//
RawSyntaxStart:
section get3DENMissionAttribute class
@@ -23942,6 +24524,35 @@ Array of Eden Entities
%NextListItem%
+KeywordStart:
+getAimingCoef
+//KeywordEnd//
+DescriptionStart:
+Get current aiming coefficient (higher ~ less precise, default is 1)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getAimingCoef
+//WikiPageEnd//
+SyntaxStart:
+getAimingCoef Object
+//SyntaxEnd//
+RawSyntaxStart:
+getAimingCoef unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_coef = getAimingCoef player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
getAllHitPointsDamage
//KeywordEnd//
@@ -23978,6 +24589,35 @@ Array - [] if entity is null or has no shape, otherwise [hitpointsNamesArray, se
%NextListItem%
+KeywordStart:
+getAllOwnedMines
+//KeywordEnd//
+DescriptionStart:
+Gets all mine objects this unit has ownership over.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getAllOwnedMines
+//WikiPageEnd//
+SyntaxStart:
+getAllOwnedMines Object
+//SyntaxEnd//
+RawSyntaxStart:
+getAllOwnedMines unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_mines = getAllOwnedMines player;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of mine object
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
getAmmoCargo
//KeywordEnd//
@@ -24418,7 +25058,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/getCargoIndex
//WikiPageEnd//
SyntaxStart:
-Object getCargoIndex
+Object getCargoIndex Object
//SyntaxEnd//
RawSyntaxStart:
vehicle getCargoIndex unit
@@ -24639,6 +25279,35 @@ Object
%NextListItem%
+KeywordStart:
+getCustomAimingCoef
+//KeywordEnd//
+DescriptionStart:
+Returns custom aiming coefficient for weapon sway
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getCustomAimingCoef
+//WikiPageEnd//
+SyntaxStart:
+getCustomAimingCoef Object
+//SyntaxEnd//
+RawSyntaxStart:
+getCustomAimingCoef unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_coef = getCustomAimingCoef player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
getDammage
//KeywordEnd//
@@ -24721,7 +25390,7 @@ https://community.bistudio.com/wiki/getDir
SyntaxStart:
getDir Object
%NextSyntax%
-Object/Position2D/Position3D getDir
+Object/Position2D/Position3D getDir Object/Position2D/Position3D
//SyntaxEnd//
RawSyntaxStart:
getDir object
@@ -24821,6 +25490,11 @@ To add to the note above, app ID can be found in CfgMods. Here is an example pat
$Code$configfile "CfgMods" "Curator" "appId"$/Code$
This method can be used to find app IDs without having to find a list like the one above.
I am also pretty sure you are able to define your own app ID for your own mods using this method.
+%NextNote%
+(July 1, 2016)
+The required DLC-IDs equal to the Steam App-IDs of each obtainable DLC.
+To extend Sniperwolfs list:
+395180 - Arma 3 Apex
//NoteEnd//
ReturnValueStart:
Array - array of numbers
@@ -24984,7 +25658,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/getFriend
//WikiPageEnd//
SyntaxStart:
-Side getFriend
+Side getFriend Side
//SyntaxEnd//
RawSyntaxStart:
side1 getFriend side2
@@ -25169,7 +25843,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/getHideFrom
//WikiPageEnd//
SyntaxStart:
-Object getHideFrom
+Object getHideFrom Object
//SyntaxEnd//
RawSyntaxStart:
object getHideFrom enemy
@@ -25380,7 +26054,7 @@ KeywordStart:
getMarkerColor
//KeywordEnd//
DescriptionStart:
-Returns the color of a given map marker.
+Returns marker color for given marker. See setMarkerColor. Note: This function is identical to markerColor.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/getMarkerColor
@@ -25392,9 +26066,8 @@ RawSyntaxStart:
getMarkerColor markerName
//RawSyntaxEnd//
ExampleStart:
-$Code$MarkerOne setMarkerColor ColorBlack
-_color = getMarkerColor MarkerOne
-returns "ColorBlack"$/Code$
+$Code$"MarkerOne" setMarkerColor "ColorBlack";
+_color = getMarkerColor "MarkerOne"; //returns "ColorBlack"$/Code$
//ExampleEnd//
LocalityStart:
global / undefined
@@ -25402,7 +26075,7 @@ global / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-String -
+String
//ReturnValueEnd//
%NextListItem%
@@ -25538,7 +26211,7 @@ KeywordStart:
getMissionConfig
//KeywordEnd//
DescriptionStart:
-Returns Config class of a scenario attribute from the 1st tier. The attribute can be defined on multiple places, the commands checks them in the following order:
+Returns Config entry for the given scenario attribute from the 1st tier. The attribute can be config class or config property. If it is defined in multiple places, the command checks them in the following order:
External Description.ext file
Eden Editor scenario attribute
So if attribute exists in both places, attribute from description.ext is used. Previously, scenario attributes were extracted from Description.ext using missionConfigFile. That still works, but it ignores attributes set directly in the editor and it should not be used anymore.
@@ -25547,10 +26220,10 @@ WikiPageStart:
https://community.bistudio.com/wiki/getMissionConfig
//WikiPageEnd//
SyntaxStart:
-getMissionConfig class
+getMissionConfig String
//SyntaxEnd//
RawSyntaxStart:
-getMissionConfig class
+getMissionConfig attribute
//RawSyntaxEnd//
ExampleStart:
$Code$_header = getMissionConfig "Header"
@@ -25571,7 +26244,7 @@ KeywordStart:
getMissionConfigValue
//KeywordEnd//
DescriptionStart:
-Returns value of given scenario attribute from the 1st tier. The attribute can be defined on multiple places, the commands checks them in the following order:
+Returns value of the given scenario attribute from the 1st tier. Since only config properties have values, the attribute should be config property. If it is not found or config class is given, the return is nil. If the attribute defined in multiple places, the command checks them in the following order:
External Description.ext file
Eden Editor scenario attribute
So if attribute exists in both places, attribute from description.ext is used. Previously, scenario attributes were extracted from Description.ext using missionConfigFile. That still works, but it ignores attributes set directly in the editor and it should not be used anymore.
@@ -25604,6 +26277,35 @@ Number, String or Array, depending on the attribute value type. Nil when the att
%NextListItem%
+KeywordStart:
+getMissionDLCs
+//KeywordEnd//
+DescriptionStart:
+Returns list of DLCs that are used in the mission. List is created only from units listed in mission.sqm and doesn't detect units created by scripts!
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getMissionDLCs
+//WikiPageEnd//
+SyntaxStart:
+getMissionDLCs
+//SyntaxEnd//
+RawSyntaxStart:
+getMissionDLCs
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_list = getMissionDLCs$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - list of DLCs detected for the mission
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
getModelInfo
//KeywordEnd//
@@ -26641,6 +27343,35 @@ Number
%NextListItem%
+KeywordStart:
+getShotParents
+//KeywordEnd//
+DescriptionStart:
+Get the shot's parent and a unit which caused the shot to happen.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getShotParents
+//WikiPageEnd//
+SyntaxStart:
+getShotParents Object
+//SyntaxEnd//
+RawSyntaxStart:
+getShotParents projectile
+//RawSyntaxEnd//
+ExampleStart:
+$Code$shotParents = getShotParents myProjectile;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - [owner, instigator]
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
getSlingLoad
//KeywordEnd//
@@ -26739,7 +27470,7 @@ KeywordStart:
getSuppression
//KeywordEnd//
DescriptionStart:
-Gets the suppression value of given unit.
+Gets the suppression value of given unit. Returns SCALAR between 0 and 1.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/getSuppression
@@ -26849,6 +27580,74 @@ String
%NextListItem%
+KeywordStart:
+getUnitLoadout
+//KeywordEnd//
+DescriptionStart:
+Returns an array with all assigned items, weapons, containers and their stored items.
+Detailed explanation of the returned array: Talk:getUnitLoadout
+This command is not final and might be changed in a near future.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getUnitLoadout
+//WikiPageEnd//
+SyntaxStart:
+getUnitLoadout Object
+//SyntaxEnd//
+RawSyntaxStart:
+getUnitLoadout unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$getUnitLoadout player;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - Array containing all inventory items
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getUnitTrait
+//KeywordEnd//
+DescriptionStart:
+Gets the current value of a trait of the given unit.
+Default traits are:
+audibleCoef (scalar)
+camouflageCoef (scalar)
+engineer (bool)
+explosiveSpecialist (bool)
+loadCoef (scalar)
+medic (bool)
+UAVHacker (bool)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getUnitTrait
+//WikiPageEnd//
+SyntaxStart:
+Object getUnitTrait String
+//SyntaxEnd//
+RawSyntaxStart:
+unit getUnitTrait skill_name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player getUnitTrait "Medic";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Bool or Scalar - Value of the trait
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
getVariable
//KeywordEnd//
@@ -26921,6 +27720,39 @@ Anything or Nothing if the variable doesn't exist
%NextListItem%
+KeywordStart:
+getVehicleCargo
+//KeywordEnd//
+DescriptionStart:
+Gets a list of vehicles loaded as cargo inside this vehicle. The returned array is in the order the cargo vehicles were added to containing vehicle.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getVehicleCargo
+//WikiPageEnd//
+SyntaxStart:
+getVehicleCargo Object
+//SyntaxEnd//
+RawSyntaxStart:
+getVehicleCargo vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// Blackfish with no cargo vehicles
+_vehicleCargo = getVehicleCargo blackfish; //returns []$/Code$
+%NextExample%
+$Code$// Blackfish with cargo vehicles loaded in the order quad_3, quad_1, quad_2
+_vehicleCargo = getVehicleCargo blackfish; //returns [quad_3, quad_1, quad_2]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - if there are no vehicles loaded as cargo an empty array ([]) will be returned, otherwise an array of objects will be returned representing the cargo vehicles
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
getWeaponCargo
//KeywordEnd//
@@ -26954,6 +27786,35 @@ Array - format [all_types_array, all_counts_array]. Eg: [["a", "b"], [3, 2]]
%NextListItem%
+KeywordStart:
+getWeaponSway
+//KeywordEnd//
+DescriptionStart:
+Returns current size of weapon sway of a given unit, in radians
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getWeaponSway
+//WikiPageEnd//
+SyntaxStart:
+getWeaponSway Object
+//SyntaxEnd//
+RawSyntaxStart:
+getWeaponSway unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_sway = getWeaponSway player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number : weapon sway
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
getWPPos
//KeywordEnd//
@@ -26995,7 +27856,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/glanceAt
//WikiPageEnd//
SyntaxStart:
-Object/Array glanceAt
+Object/Array glanceAt Object/Array
//SyntaxEnd//
RawSyntaxStart:
unit glanceAt position
@@ -27020,7 +27881,7 @@ KeywordStart:
globalChat
//KeywordEnd//
DescriptionStart:
-Make a unit send a text message over the global radio channel. Does not need to have assigned "itemRadio" to see or transmit the messages.
+Types text to the global radio channel. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec )
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/globalChat
@@ -27029,7 +27890,7 @@ SyntaxStart:
Object globalChat String
//SyntaxEnd//
RawSyntaxStart:
-unit globalChat chatText
+unitName globalChat chatText
//RawSyntaxEnd//
ExampleStart:
$Code$_soldierOne globalChat "Show this text";$/Code$
@@ -27058,7 +27919,8 @@ KeywordStart:
globalRadio
//KeywordEnd//
DescriptionStart:
-Make a unit send a message over the global radio channel. The message is defined in the description.ext of the mission and may contain text and sound.
+Sends the audio message to the global radio channel. The message is defined in CfgRadio in the description.ext file or config radio protocol. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec ).
+Note: When transmitting unit gets killed, transmission will be interrupted, however when receiving unit gets killed, the transmission continues to play.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/globalRadio
@@ -27070,7 +27932,9 @@ RawSyntaxStart:
unit globalRadio radioName
//RawSyntaxEnd//
ExampleStart:
-$Code$_soldierOne globalRadio messageOne$/Code$
+$Code$_soldierOne globalRadio "messageOne";$/Code$
+%NextExample%
+$Code$player globalRadio configName selectRandom ("true" configClasses ( configFile "CfgRadio"));$/Code$
//ExampleEnd//
LocalityStart:
global / local
@@ -27087,7 +27951,7 @@ KeywordStart:
goggles
//KeywordEnd//
DescriptionStart:
-Returns name of currently used goggles (not NVGoggles).
+Returns name of currently used goggles (for NVGoggles use hmd ).
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/goggles
@@ -27200,7 +28064,7 @@ KeywordStart:
groupChat
//KeywordEnd//
DescriptionStart:
-Make a unit send a text message over the group radio channel. Must have assigned "itemRadio" to see or transmit the messages.
+Types text to the group radio channel. Must have assigned "ItemRadio" to see or transmit the messages. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec )
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/groupChat
@@ -27209,7 +28073,7 @@ SyntaxStart:
Object groupChat String
//SyntaxEnd//
RawSyntaxStart:
-unit groupChat chatText
+unitName groupChat chatText
//RawSyntaxEnd//
ExampleStart:
$Code$_soldierOne groupChat "Show this text";$/Code$
@@ -27384,7 +28248,8 @@ KeywordStart:
groupRadio
//KeywordEnd//
DescriptionStart:
-Make a unit send a message over the group radio channel. The message is defined in the description.ext of the mission and may contain text and sound.
+Sends the audio message to the group radio channel. Must have assigned "ItemRadio" to send or receive the transmission. The message is defined in CfgRadio in the description.ext file or config radio protocol. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec ).
+Note: When transmitting unit gets killed, transmission will be interrupted, however when receiving unit gets killed, the transmission continues to play.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/groupRadio
@@ -27396,7 +28261,9 @@ RawSyntaxStart:
unit groupRadio radioName
//RawSyntaxEnd//
ExampleStart:
-$Code$_soldierOne groupRadio messageOne$/Code$
+$Code$_soldierOne groupRadio "messageOne";$/Code$
+%NextExample%
+$Code$player groupRadio configName selectRandom ("true" configClasses ( configFile "CfgRadio"));$/Code$
//ExampleEnd//
LocalityStart:
global / local
@@ -28150,7 +29017,7 @@ KeywordStart:
hideBody
//KeywordEnd//
DescriptionStart:
-Hides the body of the given person.
+Hides dead body of the given unit. After a short delay, the body slowly sinks into the ground. After awhile, when group of the unit becomes grpNull, the body gets deleted and becomes objNull.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/hideBody
@@ -28159,10 +29026,10 @@ SyntaxStart:
hideBody Object
//SyntaxEnd//
RawSyntaxStart:
-hideBody person
+hideBody unit
//RawSyntaxEnd//
ExampleStart:
-$Code$hideBody player$/Code$
+$Code$hideBody player1;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -28277,6 +29144,36 @@ Nothing
%NextListItem%
+KeywordStart:
+hideSelection
+//KeywordEnd//
+DescriptionStart:
+Hides or enables the given selection for the object
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hideSelection
+//WikiPageEnd//
+SyntaxStart:
+object hideSelection Array;
+//SyntaxEnd//
+RawSyntaxStart:
+object hideSelection [selection, hidden];
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(April 28, 2016)
+Only seems to work for objects created with createSimpleObject, and will only work for certain selections.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
hint
//KeywordEnd//
@@ -28352,7 +29249,7 @@ KeywordStart:
hintC
//KeywordEnd//
DescriptionStart:
-Displays attractive hint in the center of the screen. Player control is taken away until user presses "Continue". After user confirmation, the content of the hintC is repeated again in a normal hint. This type of hint can also have a title.
+Displays attractive hint in the center of the screen. Player control is taken away until user presses "Continue". After user confirmation, the content of the hintC is repeated again in a normal hint. This type of hint can also have a title. It is also possible to drag this type of hint around the screen.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/hintC
@@ -28364,7 +29261,7 @@ String hintC Array
%NextSyntax%
String hintC StructuredText
%NextSyntax%
-String hintC
+String hintC String
//SyntaxEnd//
RawSyntaxStart:
hintC content
@@ -28825,7 +29722,7 @@ https://community.bistudio.com/wiki/in
SyntaxStart:
Anyth in g in Array
%NextSyntax%
-Object in
+Object in Object
%NextSyntax%
Array in Location
//SyntaxEnd//
@@ -28993,7 +29890,7 @@ RawSyntaxStart:
fireplace inflame burn
//RawSyntaxEnd//
ExampleStart:
-$Code$_fireplaceOne inflame true$/Code$
+$Code$_fireplaceOne inflame true ;$/Code$
//ExampleEnd//
LocalityStart:
global / global
@@ -29010,7 +29907,7 @@ KeywordStart:
inflamed
//KeywordEnd//
DescriptionStart:
-Check if fireplace is inflamed (burning) or not.
+Checks if fireplace is inflamed (burning) or not. To check if a unit is receiving damage from fire, use isBurning command.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/inflamed
@@ -29022,7 +29919,7 @@ RawSyntaxStart:
inflamed fireplace
//RawSyntaxEnd//
ExampleStart:
-$Code$_IsAlight = inflamed _fireplaceOne$/Code$
+$Code$_inflamed = inflamed _fireplaceOne;$/Code$
//ExampleEnd//
LocalityStart:
global / undefined
@@ -29108,7 +30005,7 @@ undefined / local
//LocalityEnd//
NoteStart:
(May 12, 2016)
-In case of the "Action" event, param 9 (action menu visibility) also denotes if the action is performed or not. For example, if the action menu is closed or fading off, pressing Spacebar will bring it up and trigger an "Action" event; in that case, param 9 is false. But if the action menu is open, and Spacebar is pressed to perform the selected action, then param 9 will be true.
+In case of the "Action" event, (param 6 || param 9) also denotes if the action is performed or not. For example, if the action menu is closed or fading off, pressing Spacebar will bring it up and trigger an "Action" event; in that case, param 9 (action menu visibility) is false. But if the action menu is open, and Spacebar is pressed to perform the selected action, then param 9 will be true. If param 6 (showWindow) is true, then it means the action was performed, regardless of param 9.
//NoteEnd//
ReturnValueStart:
Nothing
@@ -29195,7 +30092,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/inPolygon
//WikiPageEnd//
SyntaxStart:
-Array inPolygon
+Array inPolygon Array
//SyntaxEnd//
RawSyntaxStart:
position inPolygon polygon
@@ -29336,7 +30233,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/intersect
//WikiPageEnd//
SyntaxStart:
-Array intersect
+Array intersect Array
//SyntaxEnd//
RawSyntaxStart:
[object, lodName] intersect [begPos, endPos]
@@ -29657,6 +30554,7 @@ isBurning
//KeywordEnd//
DescriptionStart:
Returns whether the unit is burning.
+This returns true only if unit is damaged by nearby fire, it does not check whether a fireplace is burning, use inflamed command for that.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/isBurning
@@ -29934,7 +30832,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/isEqualTo
//WikiPageEnd//
SyntaxStart:
-Anything isEqualTo
+Anything isEqualTo Anything
//SyntaxEnd//
RawSyntaxStart:
var1 isEqualTo var2
@@ -29995,7 +30893,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/isEqualType
//WikiPageEnd//
SyntaxStart:
-Anything isEqualType
+Anything isEqualType Anything
//SyntaxEnd//
RawSyntaxStart:
val1 isEqualType val2
@@ -30093,7 +30991,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/isEqualTypeArray
//WikiPageEnd//
SyntaxStart:
-Array isEqualTypeArray
+Array isEqualTypeArray Array
//SyntaxEnd//
RawSyntaxStart:
arr1 isEqualTypeArray arr2
@@ -30228,7 +31126,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/isFlatEmpty
//WikiPageEnd//
SyntaxStart:
-Array isFlatEmpty
+Array isFlatEmpty Array
//SyntaxEnd//
RawSyntaxStart:
position isFlatEmpty [minDistance, mode, maxGradient, maxGradientRadius, overLandOrWater, shoreLine, ignoreObject]
@@ -30505,7 +31403,7 @@ https://community.bistudio.com/wiki/isKindOf
SyntaxStart:
Object isKindOf String
%NextSyntax%
-String isKindOf
+String isKindOf String
%NextSyntax%
String isKindOf Array
//SyntaxEnd//
@@ -31003,6 +31901,9 @@ global / undefined
NoteStart:
(1 August, 2006)
This is not the same as testing object == player, because in MP it tests for any player, not only for the local one. If object is a vehicle, the test is done for the vehicle commander.
+%NextNote%
+(June 3, 2016)
+This command reports true for headless client objects.
//NoteEnd//
ReturnValueStart:
Boolean
@@ -31448,6 +32349,39 @@ Boolean
%NextListItem%
+KeywordStart:
+isVehicleCargo
+//KeywordEnd//
+DescriptionStart:
+Return transporting vehicle if vehicle is loaded in one.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isVehicleCargo
+//WikiPageEnd//
+SyntaxStart:
+isVehicleCargo Object
+//SyntaxEnd//
+RawSyntaxStart:
+isVehicleCargo vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// Blackfish with given variable name blackfish, with a vehicle inside called quad
+_transportingVehicle = isVehicleCargo quad; //returns blackfish$/Code$
+%NextExample%
+$Code$// Vehicle called quad that is not being transported as cargo
+_transportingVehicle = getVehicleCargo quad; //returns objNull$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object - returns the transporting vehicle of a vehicle in cargo, if the vehicle is not being transported it will return objNull
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
isWalking
//KeywordEnd//
@@ -32386,7 +33320,8 @@ Altis :
3 = Selakeno Airfield
4 = Molos Airfield
5 = Almyra Salt Lake Airstrip
-tom_48_97 17:56, 21 September 2010 (CEST)
+Posted 17:56, 21 September 2010 (CEST)
+%NextNote%
ARMA 2 OA:
Takistan :
0 = Airport NorthWest
@@ -32410,6 +33345,16 @@ Sahrani :
%NextNote%
(November 8, 2014)
In Arma 3 (1.34) landAt only works for fixed-wing aircraft. Rotary-wing craft ignore this command.
+%NextNote%
+(June 19, 2016)
+ARMA 3 : Tanoa
+0 = Aeroport de Tanoa
+1 = Tuvanaka Airbase
+2 = Saint-George Airstrip
+3 = Bala Airstrip
+4 = La Rochelle Aerodome
+ARMA 3 : Stratis
+0 = Stratis Airbase
//NoteEnd//
ReturnValueStart:
Nothing
@@ -36707,7 +37652,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/lookAt
//WikiPageEnd//
SyntaxStart:
-Object/Array lookAt
+Object/Array lookAt Object/Array
//SyntaxEnd//
RawSyntaxStart:
unit lookAt position
@@ -37490,7 +38435,7 @@ KeywordStart:
markerColor
//KeywordEnd//
DescriptionStart:
-Get marker colour. See setMarkerColor. Note: This function is identical to getMarkerColor.
+Returns marker color for given marker. See setMarkerColor. Note: This function is identical to getMarkerColor.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/markerColor
@@ -37599,6 +38544,8 @@ LocalityStart:
global / undefined
//LocalityEnd//
NoteStart:
+(May 30, 2016)
+Free hand drawn markers return "POLYLINE"
//NoteEnd//
ReturnValueStart:
String
@@ -37705,7 +38652,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/max
//WikiPageEnd//
SyntaxStart:
-Number max
+Number max Number
//SyntaxEnd//
RawSyntaxStart:
a max b
@@ -37764,7 +38711,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/min
//WikiPageEnd//
SyntaxStart:
-Number min
+Number min Number
//SyntaxEnd//
RawSyntaxStart:
a min b
@@ -37906,6 +38853,34 @@ Config
%NextListItem%
+KeywordStart:
+missionDifficulty
+//KeywordEnd//
+DescriptionStart:
+Return difficulty that has been forced for this mission, returns -1 if difficulty is not forced and it's used one from player's options.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/missionDifficulty
+//WikiPageEnd//
+SyntaxStart:
+missionDifficulty
+//SyntaxEnd//
+RawSyntaxStart:
+missionDifficulty
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
missionName
//KeywordEnd//
@@ -38056,7 +39031,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/mod
//WikiPageEnd//
SyntaxStart:
-Number mod
+Number mod Number
//SyntaxEnd//
RawSyntaxStart:
a mod b
@@ -38088,16 +39063,16 @@ KeywordStart:
modelToWorld
//KeywordEnd//
DescriptionStart:
-Converts position from object model space to world space. This command will take into account vectorUp of the object when calculating relative coordinates.
+Translates relative position from object model space into world position. This command will take into account vectorUp of the object when calculating relative coordinates.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/modelToWorld
//WikiPageEnd//
SyntaxStart:
-Object modelToWorld PositionRelative
+Object modelToWorld Array
//SyntaxEnd//
RawSyntaxStart:
-object modelToWorld modelPos
+model modelToWorld position
//RawSyntaxEnd//
ExampleStart:
$Code$_aboveAndBehindPlayer = player modelToWorld [0,-1,3];$/Code$
@@ -38129,7 +39104,7 @@ but it does not give the same result, therefore
(_obj modelToWorld [0.0, 0.0, 0.0]) is not the same as (getPos _obj).
//NoteEnd//
ReturnValueStart:
-Array - world position in format PositionAGL
+Array - translated world position, format PositionAGL
//ReturnValueEnd//
%NextListItem%
@@ -38163,6 +39138,35 @@ Array - world position in format PositionAGL
%NextListItem%
+KeywordStart:
+modParams
+//KeywordEnd//
+DescriptionStart:
+Returns list of mod paramters according to given options, values are in same order as the given options. Available options: name, picture, logo, logoOver, logoSmall, tooltip, tooltipowned, action, actionName, overview, hidePicture, hideName, defaultMod, serverOnly, active
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/modParams
+//WikiPageEnd//
+SyntaxStart:
+modParams Array
+//SyntaxEnd//
+RawSyntaxStart:
+modParams [modClass, options]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_data = modParams ["Kart", ["name", "logo", "picture"]];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - Retrieved data if any
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
moonIntensity
//KeywordEnd//
@@ -38354,7 +39358,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/moveInAny
//WikiPageEnd//
SyntaxStart:
-Object moveInAny
+Object moveInAny Object
//SyntaxEnd//
RawSyntaxStart:
unit moveInAny vehicle
@@ -38383,7 +39387,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/moveInCargo
//WikiPageEnd//
SyntaxStart:
-Object moveInCargo
+Object moveInCargo Object
%NextSyntax%
Object moveInCargo Array
//SyntaxEnd//
@@ -38432,7 +39436,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/moveInCommander
//WikiPageEnd//
SyntaxStart:
-Object moveInCommander
+Object moveInCommander Object
//SyntaxEnd//
RawSyntaxStart:
unitName moveInCommander vehicle
@@ -38466,7 +39470,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/moveInDriver
//WikiPageEnd//
SyntaxStart:
-Object moveInDriver
+Object moveInDriver Object
//SyntaxEnd//
RawSyntaxStart:
unitName moveInDriver vehicle
@@ -38500,7 +39504,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/moveInGunner
//WikiPageEnd//
SyntaxStart:
-Object moveInGunner
+Object moveInGunner Object
//SyntaxEnd//
RawSyntaxStart:
unitName moveInGunner vehicle
@@ -39932,7 +40936,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/objStatus
//WikiPageEnd//
SyntaxStart:
-String objStatus
+String objStatus String
//SyntaxEnd//
RawSyntaxStart:
objectivenumber objStatus status
@@ -40704,6 +41708,35 @@ Nothing
%NextListItem%
+KeywordStart:
+openDLCPage
+//KeywordEnd//
+DescriptionStart:
+Opens a Steam page of the app with given appId. Only works for known appId (game + linked DLCs)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/openDLCPage
+//WikiPageEnd//
+SyntaxStart:
+openDLCPage Number
+//SyntaxEnd//
+RawSyntaxStart:
+openDLCPage dlcID
+//RawSyntaxEnd//
+ExampleStart:
+$Code$openDLCPage 288520$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Bool - result
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
openMap
//KeywordEnd//
@@ -40734,7 +41767,7 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Boolean
+Boolean - equivalent of visibleMap
//ReturnValueEnd//
%NextListItem%
@@ -40812,7 +41845,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/or
//WikiPageEnd//
SyntaxStart:
-Boolean or
+Boolean or Boolean
%NextSyntax%
Boolean or Code
//SyntaxEnd//
@@ -41450,6 +42483,152 @@ Number
%NextListItem%
+KeywordStart:
+pixelGrid
+//KeywordEnd//
+DescriptionStart:
+Returns grid size based on screen resolution, UI size and configs: uiScaleFactor, uiScaleMaxGrids.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/pixelGrid
+//WikiPageEnd//
+SyntaxStart:
+pixelGrid
+//SyntaxEnd//
+RawSyntaxStart:
+pixelGrid
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_gridHeight = pixelH * pixelGrid ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Scalar -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+pixelGridBase
+//KeywordEnd//
+DescriptionStart:
+Returns grid size based on screen resolution.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/pixelGridBase
+//WikiPageEnd//
+SyntaxStart:
+pixelGridBase
+//SyntaxEnd//
+RawSyntaxStart:
+pixelGridBase
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_gridBaseHeight = pixelH * pixelGridBase ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Scalar -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+pixelGridNoUIScale
+//KeywordEnd//
+DescriptionStart:
+Returns grid size based on screen resolution and configs: uiScaleFactor, uiScaleMaxGrids
+As mentioned in the name of this command, the user interface scale is ignored.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/pixelGridNoUIScale
+//WikiPageEnd//
+SyntaxStart:
+pixelGridNoUIScale
+//SyntaxEnd//
+RawSyntaxStart:
+pixelGridNoUIScale
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_gridHeightNoUIScale = pixelH * pixelGridNoUIScale ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Scalar -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+pixelH
+//KeywordEnd//
+DescriptionStart:
+Returns the height of one pixel for current resolution.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/pixelH
+//WikiPageEnd//
+SyntaxStart:
+pixelH
+//SyntaxEnd//
+RawSyntaxStart:
+pixelH
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_pixelHeight = pixelH ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Scalar -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+pixelW
+//KeywordEnd//
+DescriptionStart:
+Returns width of one pixel for current resolution.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/pixelW
+//WikiPageEnd//
+SyntaxStart:
+pixelW
+//SyntaxEnd//
+RawSyntaxStart:
+pixelW
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_pixelWidth = pixelW ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Scalar -
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
playableSlotsNumber
//KeywordEnd//
@@ -41908,8 +43087,8 @@ KeywordStart:
playMusic
//KeywordEnd//
DescriptionStart:
-Plays music defined in CfgMusic. To stop the music execute playMusic "" or give the start time which is beyond the music duration playMusic ["SomeMusic", 1000];
-For Arma 3 music, see Arma 3 CfgMusic
+Plays music defined in Description.ext#CfgMusic or config.cpp. To stop the music execute playMusic "" or give the start time which is beyond the music duration playMusic ["SomeMusic", 1000];
+For Arma 3 music, see Arma 3 CfgMusic.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/playMusic
@@ -42019,7 +43198,7 @@ KeywordStart:
playSound
//KeywordEnd//
DescriptionStart:
-selects Sound from CfgSounds declared in the Description.ext file.
+Selects sound from Description.ext#CfgSounds or config.cpp. For Arma 3 sounds see CfgSounds.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/playSound
@@ -42319,7 +43498,7 @@ https://community.bistudio.com/wiki/ppEffectCommit
SyntaxStart:
String ppEffectCommit Number
%NextSyntax%
-Number ppEffectCommit
+Number ppEffectCommit Number
%NextSyntax%
Array ppEffectCommit Number
//SyntaxEnd//
@@ -42996,15 +44175,11 @@ SyntaxStart:
private String
%NextSyntax%
private Array
-%NextSyntax%
-private Assignment
//SyntaxEnd//
RawSyntaxStart:
private variableName
%NextRawSyntax%
private variableNameList
-%NextRawSyntax%
-private assignment
//RawSyntaxEnd//
ExampleStart:
$Code$private "_varname";$/Code$
@@ -43716,23 +44891,21 @@ Number
%NextListItem%
KeywordStart:
-rad
+registerTask
//KeywordEnd//
DescriptionStart:
-Convert x from Degrees to Radians. 360 degrees is equal to 2 multiplied with pi.
+Register a new task type. Parameters are defined in the given config class (subclass of CfgTasks).
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/rad
+https://community.bistudio.com/wiki/registerTask
//WikiPageEnd//
SyntaxStart:
-rad Number
+TeamMember registerTask String
//SyntaxEnd//
RawSyntaxStart:
-rad x
+teamMember registerTask entryName
//RawSyntaxEnd//
ExampleStart:
-$Code$_radians = rad 180
-// Result is 3.1415 (eg pi$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -43740,28 +44913,28 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Number
+Boolean
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-radioChannelAdd
+reload
//KeywordEnd//
DescriptionStart:
-Add the units to the custom radio channel.
+Reload all weapons
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/radioChannelAdd
+https://community.bistudio.com/wiki/reload
//WikiPageEnd//
SyntaxStart:
-Number radioChannelAdd Array
+reload Object
//SyntaxEnd//
RawSyntaxStart:
-index radioChannelAdd units
+reload unitName
//RawSyntaxEnd//
ExampleStart:
-$Code$2 radioChannelAdd [player, unit1];$/Code$
+$Code$if ( needReload player == 1) then { reload player };$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -43775,65 +44948,83 @@ Nothing
%NextListItem%
KeywordStart:
-radioChannelCreate
+reloadEnabled
//KeywordEnd//
DescriptionStart:
-Create a custom radio channel with the given color, label, call sign and registered characters. The index returned can be used to manipulate the created channel later. There are 10 slots for custom radio channels which would correspond to channels 6-15 (see getPlayerChannel ). The command will find an unused index in this range and create it when found.
+Check whether magazine is reloaded whenever emptied.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/radioChannelCreate
+https://community.bistudio.com/wiki/reloadEnabled
//WikiPageEnd//
SyntaxStart:
-radioChannelCreate Array
+Boolean reloadEnabled Object
//SyntaxEnd//
RawSyntaxStart:
-radioChannelCreate [color, label, callSign, units]
-%NextRawSyntax%
-radioChannelCreate [color, label, callSign, characters, sentenceType]
+Boolean reloadEnabled unitName
//RawSyntaxEnd//
ExampleStart:
-$Code$_index = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], "Q-dance Radio", "%UNIT_NAME", [player]];$/Code$
-%NextExample%
-$Code$_index = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], Q-dance Radio, %UNIT_NAME, [ player ], false ];
-// disable automatic quotes for chat in channel (ArmA 3)$/Code$
//ExampleEnd//
LocalityStart:
-global / global
+undefined / undefined
//LocalityEnd//
NoteStart:
-This scripting command must be executed on the server to work properly in multiplayer
-%NextNote%
-(January 21, 2016)
-Make sure you add all units you intend to speak or receive messages on created custom channel to the channel.
//NoteEnd//
ReturnValueStart:
-Number - created channel id (used in customChat command)
+Boolean
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-radioChannelRemove
+remoteControl
//KeywordEnd//
DescriptionStart:
-Remove the characters from the custom radio channel.
+Switches on remote control of the unit. Command needs to be executed locally to the player. If driver is remote it will get transferred to players PC.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/radioChannelRemove
+https://community.bistudio.com/wiki/remoteControl
//WikiPageEnd//
SyntaxStart:
-Number radioChannelRemove Array
+Object remoteControl Object
//SyntaxEnd//
RawSyntaxStart:
-index radioChannelRemove characters
+who remoteControl whom
//RawSyntaxEnd//
ExampleStart:
-$Code$3 radioChannelRemove [myCharacter1, myCharacter2];$/Code$
+$Code$// Set player remote control of driver:
+player remoteControl driver UAV;
+driver UAV switchCamera "Internal"; //switchCamera required
+//sometimes switchCamera is not needed
+player remoteControl driver UAV;$/Code$
+%NextExample%
+$Code$// Return control to player:
+objNull remoteControl driver UAV;$/Code$
//ExampleEnd//
LocalityStart:
-undefined / undefined
+local / global
//LocalityEnd//
NoteStart:
+You must use switchCamera in order to remote control the unit and.
+You can only remoteControl characters, e.g. if yo want to remote control a car, you have
+to add a driver and use
+"player remoteControl driver someVehicle".
+%NextNote%
+(Jan 25, 2010)
+Arma 1.05 :
+You can remoteControl multiple units at the same time.
+It is not needed to switchCamera to the unit to be able to control it - it is needed to be able to fire with.
+The switchCamera is fixed : the player can't change internal/external/optics view.
+Do not think about it like a selectPlayer : it is used to give the control to the vehicle role the unit is in.
+SwitchCamera to the vehicle the unit is in ; the camera will go depending the role you are remoteControlling.
+The AI driver won't follow your vehicle move orders.
+If the player dies, the death screen will appear, not automatically turning back to the player.
+If you want to stop the remote control, use objNull as remote controller.
+Example :
+player remoteControl driver jeep1; // will remoteControl it, you still will have full control of the player
+jeep1 switchCamera internal ; // fix the camera to the ''vehicle'' and not to (driver jeep1) !
+waitUntil { !(alive jeep1) || !(alive player) };
+objNull remoteControl driver jeep1; // removes the remoteControlling
+player switchCamera internal ; // returns to the player
//NoteEnd//
ReturnValueStart:
Nothing
@@ -43842,92 +45033,199 @@ Nothing
%NextListItem%
KeywordStart:
-radioChannelSetCallSign
+remoteExec
//KeywordEnd//
DescriptionStart:
-Set the custom radio channel's call sign.
-Available special parameters:
-$KEY (reference to a localized text)
-%CHANNEL_LABEL
-%UNIT_SIDE
-%UNIT_NAME
-%UNIT_RANK
-%UNIT_ID
-%UNIT_REF
-%UNIT_GRP_NAME
-%UNIT_GRP_LEADER
-%UNIT_VEH_NAME
-%UNIT_VEH_POSITION
+Asks server to execute given scripted function or script command. The environment chosen for the execution is as follows:
+Scripted function - scheduled environment ( suspension is allowed, i.e. spawn, execVM ).
+Script command - unscheduled environment ( suspension is NOT allowed).
+remoteExec can also be used in SP (the same restrictions apply both to SP and MP). For more information about the usage, security features and advanced jip techniques check the remote execution dedicated section.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/radioChannelSetCallSign
+https://community.bistudio.com/wiki/remoteExec
//WikiPageEnd//
SyntaxStart:
-Number radioChannelSetCallSign String
+Anything remoteExec Array;
//SyntaxEnd//
RawSyntaxStart:
-index radioChannelSetCallSign callSign
+params remoteExec [functionName, targets, JIP];
//RawSyntaxEnd//
ExampleStart:
-$Code$4 radioChannelSetCallSign "%UNIT_NAME";$/Code$
+$Code$// runs hint "hello" on each connected client
+"hello" remoteExec [" hint "];$/Code$
+%NextExample%
+$Code$// runs hint "hello" on first connected client
+"hello" remoteExec [" hint ", 3];$/Code$
+%NextExample%
+$Code$// runs hint "hello" everywhere but server
+"hello" remoteExec [" hint ", -2];$/Code$
+%NextExample%
+$Code$// runs hint "hello" everywhere but server, JIPs the message
+// and returns e.g. "3_1" as a unique JIP id
+myJipID = "hello" remoteExec [" hint ", -2, true ];$/Code$
+%NextExample%
+$Code$// runs hint "hello" everywhere but server, JIPs the message under ID "some_JIP_ID"
+// replacing any previous message with this ID in the JIP queue.
+"hello" remoteExec [" hint ", -2, "some_JIP_ID"];$/Code$
+%NextExample%
+$Code$// runs "someFuncWithNoArgs" on each connected client
+remoteExec ["someFuncWithNoArgs"];$/Code$
+%NextExample%
+$Code$// removes a message identified by "IamUnique" from the JIP queue
+remoteExec ["", "IamUnique"];$/Code$
+%NextExample%
+$Code$// all clients will have their ammo set to 1 for their current weapon
+{ player setAmmo [ primaryWeapon player, 1];} remoteExec [" bis_fnc_call ", 0];$/Code$
+%NextExample%
+$Code$// Object obj will have its ammo set to 1 where it is local
+[obj,[ primaryWeapon obj, 1]] remoteExec [" setAmmo ", obj];$/Code$
+%NextExample%
+$Code$myJipID = "hello" remoteExec ["", 0];
+if ( isNil "myJipID") then { hint "empty function name is not allowed"; };$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
//LocalityEnd//
NoteStart:
+(June 30, 2015)
+While it is true that this function executes the desired scripted command/function by calling it, it does not mean remoteExecCall itself will be executed right away. Therefore, calling remoteExecCall is by no means a replacement for calling scripted commands/functions directly.
+Example:
+remoteExecCall ["func1"]; call func2; // func2 can be executed sooner than func1
+call func1; call func2; // func2 will always execute after func1.
+%NextNote%
+(December 29, 2015)
+remoteExec and remoteExecCall are currently filtered by BattlEye's remoteexec.txt, the string analyzed by BE is formatted the same way as the following example's output:
+$Code$ format ["%1 %2", functionName, str params]$/Code$
+If CfgRemoteExec class Functions is in mode 1 (whitelist), the following BE filter exclusion can be used to safely allow all whitelisted *_fnc_* functions taking an array as parameter to go through:
+$Code$!="\w+?_fnc_\w+? \[.*\]"$/Code$
+Any attempt to exploit this exclusion using other RE methods like createUnit will run into "Error Missing ;" without any malicious code being executed.
+%NextNote%
+(January 15, 2016)
+Executing commands/functions via remoteExec is more faster than using BIS_fnc_MP. Tested with BIS_fnc_codePerformance in ArmA 3 1.52.
+$Code$['"string" remoteExec ["hint",player];',[],100] call BIS_fnc_codePerformance; //Result ~0.1ms$/Code$
+$Code$['["string","hint",player] call BIS_fnc_MP;',[],100] call BIS_fnc_codePerformance; //Result ~0.6ms$/Code$
+%NextNote%
+(March 24, 2016)
+The INCORRECT way to call reveal command on a certain object for every player:
+$Code$[ player, _desired_object] remoteExec ["reveal", 0];$/Code$
+In this case player object will be the object obtained on the computer where remoteExec is initiated. If it is dedicated server, player will be objNull, if it is client, player would be player object on this client. In any case this will not reveal _desired_object for all connected players.
+The CORRECT way:
+$Code$[_desired_object, { player reveal _this}] remoteExec ["call", 0];$/Code$
+The _desired_object will be identical on every client, this is what we want, but player will refer to individual player on each client, so _desired_object will be revealed to all connected players.
+%NextNote%
+(May 25, 2016)
+When adapting mission from dedicated server for SP, if target used in remoteExec is -2 (execute on every client but not server), in SP this will not execute since client is server in SP. To work around, the target could be set using isMultiplayer condition like this:
+$Code$"123" remoteExec ["hint", [0, -2] select isMultiplayer ];$/Code$
+This will execute hint on every client in MP on dedicated server (target -2) and will also execute it in SP (target 0).
+%NextNote%
+(May 28, 2016)
+While KK's solution works fine in sp missions and on dedicated servers, it will not work properly for hosted missions.
+Solution:
+$Code$[0,0.5] remoteExec [' fadeRadio ',[0,-2] select isDedicated, true ];$/Code$
+Singleplayer: isDedicated returns false - code is executed everywhere (0)
+Hosted: isDedicated returns false - code is executed everywhere including host (0)
+Dedicated: isDedicated returns true - code is executed everywhere excluding server (-2)
//NoteEnd//
ReturnValueStart:
-Nothing
+Anything - Nil in case of error. String otherwise. If JIP is not requested this is an empty string, if JIP is requested, it is the JIP ID. See the topic Function for more information.
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-radioChannelSetLabel
+remoteExecCall
//KeywordEnd//
DescriptionStart:
-Set the custom radio channel's label.
+Asks server to execute given scripted function or script command. The environment chosen for the execution is as follows:
+Scripted function - unscheduled environment ( suspension is NOT allowed).
+Script command - unscheduled environment ( suspension is NOT allowed).
+remoteExecCall can also be used in SP (the same restrictions apply both to SP and MP). For more information about the usage, security features and advanced jip techniques check the remote execution dedicated section.
+While it is true that this function executes the desired scripted command/function by calling it, it does not mean remoteExecCall itself will be executed right away. Therefore, calling remoteExecCall is by no means a replacement for calling scripted commands/functions directly.
+Example:
+remoteExecCall ["func1"]; call func2; // func2 can be executed sooner than func1
+call func1; call func2; // func2 will always execute after func1.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/radioChannelSetLabel
+https://community.bistudio.com/wiki/remoteExecCall
//WikiPageEnd//
SyntaxStart:
-Number radioChannelSetLabel String
+Anything remoteExecCall Array
//SyntaxEnd//
RawSyntaxStart:
-index radioChannelSetLabel label
+params remoteExecCall [functionName, targets, JIP]
//RawSyntaxEnd//
ExampleStart:
-$Code$5 radioChannelSetLabel "Q-dance Radio";$/Code$
+$Code$// runs hint "hello" on each connected client
+"hello" remoteExecCall [" hint "];$/Code$
+%NextExample%
+$Code$// runs hint "hello" on first connected client
+"hello" remoteExecCall [" hint ", 3];$/Code$
+%NextExample%
+$Code$// runs hint "hello" everywhere but server
+"hello" remoteExecCall [" hint ", -2];$/Code$
+%NextExample%
+$Code$// runs hint "hello" everywhere but server, JIPs the message
+// and returns e.g. "3_1" as a unique JIP id
+myJipID = "hello" remoteExecCall [" hint ", -2, true ];$/Code$
+%NextExample%
+$Code$// runs hint "hello" everywhere but server, JIPs the message under ID "some_JIP_ID"
+// replacing any previous message with this ID in the JIP queue.
+"hello" remoteExecCall [" hint ", -2, "some_JIP_ID"];$/Code$
+%NextExample%
+$Code$// runs "someFuncWithNoArgs" on each connected client
+remoteExecCall ["someFuncWithNoArgs"];$/Code$
+%NextExample%
+$Code$// removes a message identified by "IamUnique" from the JIP queue
+remoteExecCall ["", "IamUnique"];$/Code$
+%NextExample%
+$Code$// all clients will have their ammo set to 1 for their current weapon
+{ player setAmmo [ primaryWeapon player, 1];} remoteExecCall [" bis_fnc_call ", 0];$/Code$
+%NextExample%
+$Code$// Object obj will have its ammo set to 1 where it is local
+[obj,[ primaryWeapon obj, 1]] remoteExecCall [" setAmmo ", obj];$/Code$
+%NextExample%
+$Code$myJipID = "hello" remoteExecCall ["", 0];
+if ( isNil "myJipID") then { hint "empty function name is not allowed"; };$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
//LocalityEnd//
NoteStart:
+(July 16, 2015)
+Removal of persistent call must be in the following format no argument remoteExecCall [ empty string, JIP id ]. For example:
+$Code$ remoteExecCall ["", "5:8"];$/Code$
+%NextNote%
+(December 29, 2015)
+remoteExec and remoteExecCall are currently filtered by BattlEye's remoteexec.txt, the string analyzed by BE is formatted the same way as the following example's output:
+$Code$ format ["%1 %2", functionName, str params]$/Code$
+If CfgRemoteExec class Functions is in mode 1 (whitelist), the following BE filter exclusion can be used to safely allow all whitelisted *_fnc_* functions taking an array as parameter to go through:
+$Code$!="\w+?_fnc_\w+? \[.*\]"$/Code$
+Any attempt to exploit this exclusion using other RE methods like createUnit will run into "Error Missing ;" without any malicious code being executed.
//NoteEnd//
ReturnValueStart:
-Nothing
+Anything - Nil in case of error. String otherwise. If JIP is not requested this is an empty string, if JIP is requested, it is the JIP ID. See the topic Function for more information.
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-radioVolume
+remove3DENConnection
//KeywordEnd//
DescriptionStart:
-Checks the current radio volume (set by fadeRadio ).
+Remove connection between entities.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/radioVolume
+https://community.bistudio.com/wiki/remove3DENConnection
//WikiPageEnd//
SyntaxStart:
-radioVolume
+remove3DENConnection Array
//SyntaxEnd//
RawSyntaxStart:
-radioVolume
+remove3DENConnection [type, from, to]
//RawSyntaxEnd//
ExampleStart:
-$Code$_volume = radioVolume;$/Code$
+$Code$remove3DENConnection ["RandomStart", get3DENSelected "Object","marker_0"]
+// Remove random start on marker "marker_0" from all selected objects.$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -43935,28 +45233,30 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Number
+Bool - true if the connection was removed
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-rain
+remove3DENEventHandler
//KeywordEnd//
DescriptionStart:
-Returns the current value of rain density in range 1...0
+Removes Eden Editor event handler of given type and ID.
+See the list of all Eden Editor Event Handlers.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/rain
+https://community.bistudio.com/wiki/remove3DENEventHandler
//WikiPageEnd//
SyntaxStart:
-rain
+remove3DENEventHandler Array
//SyntaxEnd//
RawSyntaxStart:
-rain
+remove3DENEventHandler [type,id]
//RawSyntaxEnd//
ExampleStart:
-$Code$_rainLevel = rain ;$/Code$
+$Code$eh = add3DENEventHandler ["onUndo",{ systemChat "Zip..."}];
+remove3DENEventHandler ["onUndo",eh];$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -43964,27 +45264,29 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Number
+Nothing
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-rainbow
+remove3DENLayer
//KeywordEnd//
DescriptionStart:
-Returns the current rainbow intensity.
+Remove Eden Editor editing layer.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/rainbow
+https://community.bistudio.com/wiki/remove3DENLayer
//WikiPageEnd//
SyntaxStart:
-rainbow
+remove3DENLayer Number
//SyntaxEnd//
RawSyntaxStart:
-rainbow
+remove3DENLayer layerID
//RawSyntaxEnd//
ExampleStart:
+$Code$_myLayer = -1 add3DENLayer "Enemy Base";
+remove3DENLayer _myLayer ;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -43992,290 +45294,209 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Number
+Bool - true if the layer was removed successfully (i.e., correct layer ID was used)
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-random
+removeAction
//KeywordEnd//
DescriptionStart:
-Random real (floating point) value from 0 (inclusive) to x (not inclusive).
-Since Arma 3 v1.55.133393 alternative syntax is added, allowing to define Gaussian Distribution params. Uses the same method as setTriggerTimeout command. Quite useful for spawning loot for example, making more valuable items more rare.
+Removes user added action with given id index. This only removes actions added with the addAction command. You cannot remove default game actions, such as reload.
+This command has local effect. The action will only be removed on the computer that executes the command.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/random
+https://community.bistudio.com/wiki/removeAction
//WikiPageEnd//
SyntaxStart:
-random Number
-%NextSyntax%
-random Array
+Object removeAction Number
//SyntaxEnd//
RawSyntaxStart:
-random x
-%NextRawSyntax%
-random [min, mid, max]
+unit removeAction index
//RawSyntaxEnd//
ExampleStart:
-$Code$_rNumber = random 1;$/Code$
-%NextExample%
-$Code$_rNumber = random -10;$/Code$
-%NextExample%
-$Code$// To select random value from an array:
-_array = ["apples", "pears", "bananas", "M16"];
-_random = _array select floor random count _array;
-// or since Arma 3 v1.55.133393
-_random = selectRandom _array;$/Code$
-%NextExample%
-$Code$// Compare (each command was executed 100000 times to gather statistics):
-floor random 10;
-// 0 - 10099 (10%)
-// 1 - 10040 (10%)
-// 2 - 10154 (10%)
-// 3 - 9910 (10%)
-// 4 - 10023 (10%)
-// 5 - 9937 (10%)
-// 6 - 10118 (10%)
-// 7 - 9716 (10%)
-// 8 - 9986 (10%)
-// 9 - 10017 (10%)
-floor random [0,5,10];
-// 0 - 109 (0%)
-// 1 - 1604 (2%)
-// 2 - 6839 (7%)
-// 3 - 16671 (17%)
-// 4 - 24706 (25%)
-// 5 - 24702 (25%)
-// 6 - 16626 (17%)
-// 7 - 6925 (7%)
-// 8 - 1702 (2%)
-// 9 - 116 (0%)
-floor random [0,10,0];
-// 0 - 19 (0%)
-// 1 - 209 (0%)
-// 2 - 817 (1%)
-// 3 - 2384 (2%)
-// 4 - 4841 (5%)
-// 5 - 8976 (9%)
-// 6 - 14067 (14%)
-// 7 - 18955 (19%)
-// 8 - 23605 (24%)
-// 9 - 26127 (26%)
-floor random [0,10,5];
-// 0 - 11 (0%)
-// 1 - 98 (0%)
-// 2 - 430 (0%)
-// 3 - 1149 (1%)
-// 4 - 2384 (2%)
-// 5 - 4546 (5%)
-// 6 - 8612 (9%)
-// 7 - 16283 (16%)
-// 8 - 28393 (28%)
-// 9 - 38094 (38%)$/Code$
+$Code$player removeAction 0;$/Code$
//ExampleEnd//
LocalityStart:
-undefined / undefined
+global / local
//LocalityEnd//
NoteStart:
-(July 12, 2015)
-Random selections including negative numbers can be obtained via:
-$Code$_Xrnd = round(random 200) -100;$/Code$
-This will yield numbers between -100 and 100.
-Be careful using random numbers in multiplayer, each client will come up with a different result. See multiplayer tutorials for more general information about locality.
-The number returned is unlikely to be a whole number. To return a whole number use either round, ceil or floor together with random :
-x=round(random 5) will return 0,1,2,3,4 or 5. (non-uniform distribution, 0 and 5 are half as likely to be selected than any of the other numbers)
-x=floor(random 5) will return 0,1,2,3 or 4. (uniform distribution, all numbers have the same probability of being selected)
-x=ceil(random 5) will return 0,1,2,3,4 or 5. (0 is very unlikely, but possible, as ceil 0 is 0)
//NoteEnd//
ReturnValueStart:
-Number
+Nothing
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-rank
+removeAll3DENEventHandlers
//KeywordEnd//
DescriptionStart:
-Returns the rank of the given unit. Rank can be one of the following:
-"PRIVATE"
-"CORPORAL"
-"SERGEANT"
-"LIEUTENANT"
-"CAPTAIN"
-"MAJOR"
-"COLONEL"
+Removes all Eden Editor event handlers of given type.
+See the list of all Eden Editor Event Handlers.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/rank
+https://community.bistudio.com/wiki/removeAll3DENEventHandlers
//WikiPageEnd//
SyntaxStart:
-rank Object
+removeAll3DENEventHandlers String
//SyntaxEnd//
RawSyntaxStart:
-rank unitName
+removeAll3DENEventHandlers type
//RawSyntaxEnd//
ExampleStart:
-$Code$_rank = rank player;$/Code$
+$Code$removeAll3DENEventHandlers "onUndo";$/Code$
//ExampleEnd//
LocalityStart:
-global / undefined
+undefined / undefined
//LocalityEnd//
NoteStart:
//NoteEnd//
ReturnValueStart:
-String
+Nothing
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-rankId
+removeAllActions
//KeywordEnd//
DescriptionStart:
-Return the rank of the given unit for comparison.
-Value may be :
-0 - Private
-1 - Corporal
-2 - Sergeant
-3 - Lieutenant
-4 - Captain
-5 - Major
-6 - Colonel
+Removes all unit's user added actions.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/rankId
+https://community.bistudio.com/wiki/removeAllActions
//WikiPageEnd//
SyntaxStart:
-rankId Object
+removeAllActions Object
//SyntaxEnd//
RawSyntaxStart:
-rankId unit
+removeAllActions unit
//RawSyntaxEnd//
ExampleStart:
-$Code$_myIdRank = rankId player;$/Code$
+$Code$removeAllActions player ;$/Code$
//ExampleEnd//
LocalityStart:
-undefined / undefined
+global / local
//LocalityEnd//
NoteStart:
+(30 October, 2013)
+Syntax of this command was until Arma 3 ver. 1.06: unit removeAllActions number
//NoteEnd//
ReturnValueStart:
-Number
+Nothing
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-rating
+removeAllAssignedItems
//KeywordEnd//
DescriptionStart:
-Check unit rating. Rating is increased for killing enemies, decreased for killing friendlies (see Rating Values ). Can be changed via addRating by the mission designer.
-The rating of the player is displayed as the "score" at the end of the mission. Via Description.ext one can define how many points it takes to get a perfect score, as well as the number of stars.
+Unassigns and deletes all linked items from inventory. The commands operates on assignedItems array, which doesnt include goggles or headgear. Use removeGoggles and removeHeadgear for those.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/rating
+https://community.bistudio.com/wiki/removeAllAssignedItems
//WikiPageEnd//
SyntaxStart:
-rating Object
+removeAllAssignedItems Object
//SyntaxEnd//
RawSyntaxStart:
-rating unitName
+removeAllAssignedItems unit
//RawSyntaxEnd//
ExampleStart:
-$Code$_score = rating player$/Code$
+$Code$removeAllAssignedItems player ;$/Code$
//ExampleEnd//
LocalityStart:
-global / undefined
+local / global
//LocalityEnd//
NoteStart:
-In ArmA 1.18 rating does only return rating levels for units that are local.
//NoteEnd//
ReturnValueStart:
-Number
+Nothing
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-rectangular
+removeAllContainers
//KeywordEnd//
DescriptionStart:
-Checks if a location is rectangular (returns true) or elliptical (returns false).
+Removes all containers from the unit.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/rectangular
+https://community.bistudio.com/wiki/removeAllContainers
//WikiPageEnd//
SyntaxStart:
-rectangular Location
+removeAllContainers Object
//SyntaxEnd//
RawSyntaxStart:
-rectangular location
+removeAllContainers unit
//RawSyntaxEnd//
ExampleStart:
-$Code$_isRect = rectangular myLocation;$/Code$
+$Code$removeAllContainers player;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
//LocalityEnd//
NoteStart:
+(2013)
+This will remove the Uniform, Vest and Backpack from a unit leaving them unable to hold or pickup inventory items.
//NoteEnd//
ReturnValueStart:
-Boolean
+Nothing
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-registeredTasks
+removeAllCuratorAddons
//KeywordEnd//
DescriptionStart:
-List all registered task types.
+Restrict access to all addons for given curator.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/registeredTasks
+https://community.bistudio.com/wiki/removeAllCuratorAddons
//WikiPageEnd//
SyntaxStart:
-registeredTasks TeamMember
+removeAllCuratorAddons Object
//SyntaxEnd//
RawSyntaxStart:
-registeredTasks member
+removeAllCuratorAddons curatorObj
//RawSyntaxEnd//
ExampleStart:
-$Code$tasklist = registeredTasks teamMember player ;$/Code$
-%NextExample%
-$Code$_rabbit = createAgent ["Rabbit_F", position player,[], 0, "None"];
-hint str registeredTasks teamMember _rabbit;
-// Hint shows ["Animal Main Task"] in Arma 3.$/Code$
+$Code$removeAllCuratorAddons myCurator;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
//LocalityEnd//
NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
//NoteEnd//
ReturnValueStart:
-Array of Strings
+Nothing
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-registerTask
+removeAllCuratorCameraAreas
//KeywordEnd//
DescriptionStart:
-Register a new task type. Parameters are defined in the given config class (subclass of CfgTasks).
+Delete all curator camera areas.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/registerTask
+https://community.bistudio.com/wiki/removeAllCuratorCameraAreas
//WikiPageEnd//
SyntaxStart:
-TeamMember registerTask String
+removeAllCuratorCameraAreas Object
//SyntaxEnd//
RawSyntaxStart:
-teamMember registerTask entryName
+removeAllCuratorCameraAreas curatorObj
//RawSyntaxEnd//
ExampleStart:
+$Code$removeAllCuratorCameraAreas myCurator;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -44283,28 +45504,28 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Boolean
+Nothing
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-reload
+removeAllCuratorEditingAreas
//KeywordEnd//
DescriptionStart:
-Reload all weapons
+Delete all curator edit areas.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/reload
+https://community.bistudio.com/wiki/removeAllCuratorEditingAreas
//WikiPageEnd//
SyntaxStart:
-reload Object
+removeAllCuratorEditingAreas Object
//SyntaxEnd//
RawSyntaxStart:
-reload unitName
+removeAllCuratorEditingAreas curatorObj
//RawSyntaxEnd//
ExampleStart:
-$Code$if ( needReload player == 1) then { reload player };$/Code$
+$Code$removeAllCuratorEditingAreas myCurator;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -44318,21 +45539,22 @@ Nothing
%NextListItem%
KeywordStart:
-reloadEnabled
+removeAllEventHandlers
//KeywordEnd//
DescriptionStart:
-Check whether magazine is reloaded whenever emptied.
+Removes all event handlers of given type that were added by addEventHandler. Since VBS2 v1.24 can be applied on individual weapon rounds.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/reloadEnabled
+https://community.bistudio.com/wiki/removeAllEventHandlers
//WikiPageEnd//
SyntaxStart:
-Boolean reloadEnabled Object
+Object removeAllEventHandlers String
//SyntaxEnd//
RawSyntaxStart:
-Boolean reloadEnabled unitName
+objectName removeAllEventHandlers handlerType
//RawSyntaxEnd//
ExampleStart:
+$Code$player removeAllEventHandlers "killed";$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -44340,61 +45562,32 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Boolean
+Nothing
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-remoteControl
+removeAllHandgunItems
//KeywordEnd//
DescriptionStart:
-Switches on remote control of the unit. Command needs to be executed locally to the player. If driver is remote it will get transferred to players PC.
+Removes all items from weapon except magazine.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/remoteControl
+https://community.bistudio.com/wiki/removeAllHandgunItems
//WikiPageEnd//
SyntaxStart:
-Object remoteControl
+removeAllHandgunItems Object
//SyntaxEnd//
RawSyntaxStart:
-who remoteControl whom
+removeAllHandgunItems unit
//RawSyntaxEnd//
ExampleStart:
-$Code$// Set player remote control of driver:
-player remoteControl driver UAV;
-driver UAV switchCamera "Internal"; //switchCamera required
-//sometimes switchCamera is not needed
-player remoteControl driver UAV;$/Code$
-%NextExample%
-$Code$// Return control to player:
-objNull remoteControl driver UAV;$/Code$
//ExampleEnd//
LocalityStart:
local / global
//LocalityEnd//
NoteStart:
-You must use switchCamera in order to remote control the unit and.
-You can only remoteControl characters, e.g. if yo want to remote control a car, you have
-to add a driver and use
-"player remoteControl driver someVehicle".
-%NextNote%
-(Jan 25, 2010)
-Arma 1.05 :
-You can remoteControl multiple units at the same time.
-It is not needed to switchCamera to the unit to be able to control it - it is needed to be able to fire with.
-The switchCamera is fixed : the player can't change internal/external/optics view.
-Do not think about it like a selectPlayer : it is used to give the control to the vehicle role the unit is in.
-SwitchCamera to the vehicle the unit is in ; the camera will go depending the role you are remoteControlling.
-The AI driver won't follow your vehicle move orders.
-If the player dies, the death screen will appear, not automatically turning back to the player.
-If you want to stop the remote control, use objNull as remote controller.
-Example :
-player remoteControl driver jeep1; // will remoteControl it, you still will have full control of the player
-jeep1 switchCamera internal ; // fix the camera to the ''vehicle'' and not to (driver jeep1) !
-waitUntil { !(alive jeep1) || !(alive player) };
-objNull remoteControl driver jeep1; // removes the remoteControlling
-player switchCamera internal ; // returns to the player
//NoteEnd//
ReturnValueStart:
Nothing
@@ -44403,180 +45596,82 @@ Nothing
%NextListItem%
KeywordStart:
-remoteExec
+removeAllItems
//KeywordEnd//
DescriptionStart:
-Asks server to execute given scripted function or script command. The environment chosen for the execution is as follows:
-Scripted function - scheduled environment ( suspension is allowed, i.e. spawn, execVM ).
-Script command - unscheduled environment ( suspension is NOT allowed).
-remoteExec can also be used in SP (the same restrictions apply both to SP and MP). For more information about the usage, security features and advanced jip techniques check the remote execution dedicated section.
+Removes all special items from the unit.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/remoteExec
+https://community.bistudio.com/wiki/removeAllItems
//WikiPageEnd//
SyntaxStart:
-Anything remoteExec Array;
+removeAllItems Object
//SyntaxEnd//
RawSyntaxStart:
-params remoteExec [functionName, targets, JIP];
+removeAllItems unit
//RawSyntaxEnd//
ExampleStart:
-$Code$// runs hint "hello" on each connected client
-"hello" remoteExec [" hint "];$/Code$
-%NextExample%
-$Code$// runs hint "hello" on first connected client
-"hello" remoteExec [" hint ", 3];$/Code$
-%NextExample%
-$Code$// runs hint "hello" everywhere but server
-"hello" remoteExec [" hint ", -2];$/Code$
-%NextExample%
-$Code$// runs hint "hello" everywhere but server, JIPs the message
-// and returns e.g. "3_1" as a unique JIP id
-myJipID = "hello" remoteExec [" hint ", -2, true ];$/Code$
-%NextExample%
-$Code$// runs hint "hello" everywhere but server, JIPs the message under ID "some_JIP_ID"
-// replacing any previous message with this ID in the JIP queue.
-"hello" remoteExec [" hint ", -2, "some_JIP_ID"];$/Code$
-%NextExample%
-$Code$// runs "someFuncWithNoArgs" on each connected client
-remoteExec ["someFuncWithNoArgs"];$/Code$
-%NextExample%
-$Code$// removes a message identified by "IamUnique" from the JIP queue
-remoteExec ["", "IamUnique"];$/Code$
-%NextExample%
-$Code$// all clients will have their ammo set to 1 for their current weapon
-{ player setAmmo [ primaryWeapon player, 1];} remoteExec [" bis_fnc_call ", 0];$/Code$
-%NextExample%
-$Code$// Object obj will have its ammo set to 1 where it is local
-[obj,[ primaryWeapon obj, 1]] remoteExec [" setAmmo ", obj];$/Code$
-%NextExample%
-$Code$myJipID = "hello" remoteExec ["", 0];
-if ( isNil "myJipID") then { hint "empty function name is not allowed"; };$/Code$
+$Code$removeAllItems unitName;$/Code$
//ExampleEnd//
LocalityStart:
-undefined / undefined
+local / global
//LocalityEnd//
NoteStart:
-(June 30, 2015)
-While it is true that this function executes the desired scripted command/function by calling it, it does not mean remoteExecCall itself will be executed right away. Therefore, calling remoteExecCall is by no means a replacement for calling scripted commands/functions directly.
-Example:
-remoteExecCall ["func1"]; call func2; // func2 can be executed sooner than func1
-call func1; call func2; // func2 will always execute after func1.
-%NextNote%
-(December 29, 2015)
-remoteExec and remoteExecCall are currently filtered by BattlEye's remoteexec.txt, the string passed to BattlEye is formatted the same way as the following example's output:
-$Code$ format ["%1 %2", functionName, str params]$/Code$
-%NextNote%
-(January 15, 2016)
-Executing commands/functions via remoteExec is more faster than using BIS_fnc_MP. Tested with BIS_fnc_codePerformance in ArmA 3 1.52.
-$Code$['"string" remoteExec ["hint",player];',[],100] call BIS_fnc_codePerformance; //Result ~0.1ms$/Code$
-$Code$['["string","hint",player] call BIS_fnc_MP;',[],100] call BIS_fnc_codePerformance; //Result ~0.6ms$/Code$
-%NextNote%
-(March 24, 2016)
-The INCORRECT way to call reveal command on a certain object for every player:
-$Code$[ player, _desired_object] remoteExec ["reveal", 0];$/Code$
-In this case player object will be the object obtained on the computer where remoteExec is initiated. If it is dedicated server, player will be objNull, if it is client, player would be player object on this client. In any case this will not reveal _desired_object for all connected players.
-The CORRECT way:
-$Code$[_desired_object, { player reveal _this}] remoteExec ["call", 0];$/Code$
-The _desired_object will be identical on every client, this is what we want, but player will refer to individual player on each client, so _desired_object will be revealed to all connected players.
+(June 18, 2013)
+Arma 3, version 0.70 - removes only items listed by command items.
//NoteEnd//
ReturnValueStart:
-Anything - Nil in case of error. String otherwise. If JIP is not requested this is an empty string, if JIP is requested, it is the JIP ID. See the topic Function for more information.
+Nothing
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-remoteExecCall
+removeAllItemsWithMagazines
//KeywordEnd//
DescriptionStart:
-Asks server to execute given scripted function or script command. The environment chosen for the execution is as follows:
-Scripted function - unscheduled environment ( suspension is NOT allowed).
-Script command - unscheduled environment ( suspension is NOT allowed).
-remoteExecCall can also be used in SP (the same restrictions apply both to SP and MP). For more information about the usage, security features and advanced jip techniques check the remote execution dedicated section.
-While it is true that this function executes the desired scripted command/function by calling it, it does not mean remoteExecCall itself will be executed right away. Therefore, calling remoteExecCall is by no means a replacement for calling scripted commands/functions directly.
-Example:
-remoteExecCall ["func1"]; call func2; // func2 can be executed sooner than func1
-call func1; call func2; // func2 will always execute after func1.
+Removes all itemsWithMagazines from the uniform, vest and backpack.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/remoteExecCall
+https://community.bistudio.com/wiki/removeAllItemsWithMagazines
//WikiPageEnd//
SyntaxStart:
-Anything remoteExecCall Array
+removeAllItemsWithMagazines Object
//SyntaxEnd//
RawSyntaxStart:
-params remoteExecCall [functionName, targets, JIP]
+removeAllItemsWithMagazines unit
//RawSyntaxEnd//
ExampleStart:
-$Code$// runs hint "hello" on each connected client
-"hello" remoteExecCall [" hint "];$/Code$
-%NextExample%
-$Code$// runs hint "hello" on first connected client
-"hello" remoteExecCall [" hint ", 3];$/Code$
-%NextExample%
-$Code$// runs hint "hello" everywhere but server
-"hello" remoteExecCall [" hint ", -2];$/Code$
-%NextExample%
-$Code$// runs hint "hello" everywhere but server, JIPs the message
-// and returns e.g. "3_1" as a unique JIP id
-myJipID = "hello" remoteExecCall [" hint ", -2, true ];$/Code$
-%NextExample%
-$Code$// runs hint "hello" everywhere but server, JIPs the message under ID "some_JIP_ID"
-// replacing any previous message with this ID in the JIP queue.
-"hello" remoteExecCall [" hint ", -2, "some_JIP_ID"];$/Code$
-%NextExample%
-$Code$// runs "someFuncWithNoArgs" on each connected client
-remoteExecCall ["someFuncWithNoArgs"];$/Code$
-%NextExample%
-$Code$// removes a message identified by "IamUnique" from the JIP queue
-remoteExecCall ["", "IamUnique"];$/Code$
-%NextExample%
-$Code$// all clients will have their ammo set to 1 for their current weapon
-{ player setAmmo [ primaryWeapon player, 1];} remoteExecCall [" bis_fnc_call ", 0];$/Code$
-%NextExample%
-$Code$// Object obj will have its ammo set to 1 where it is local
-[obj,[ primaryWeapon obj, 1]] remoteExecCall [" setAmmo ", obj];$/Code$
-%NextExample%
-$Code$myJipID = "hello" remoteExecCall ["", 0];
-if ( isNil "myJipID") then { hint "empty function name is not allowed"; };$/Code$
+$Code$removeAllItemsWithMagazines player ;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
//LocalityEnd//
NoteStart:
-(July 16, 2015)
-Removal of persistent call must be in the following format no argument remoteExecCall [ empty string, JIP id ]. For example:
-$Code$ remoteExecCall ["", "5:8"];$/Code$
-%NextNote%
-(December 29, 2015)
-remoteExec and remoteExecCall are currently filtered by BattlEye's remoteexec.txt, the string passed to BattlEye is formatted the same way as the following example's output:
-$Code$ format ["%1 %2", functionName, str params]$/Code$
//NoteEnd//
ReturnValueStart:
-Anything - Nil in case of error. String otherwise. If JIP is not requested this is an empty string, if JIP is requested, it is the JIP ID. See the topic Function for more information.
+Nothing
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-remove3DENConnection
+removeAllMissionEventHandlers
//KeywordEnd//
DescriptionStart:
-Remove connection between entities.
+Removes all mission event handlers of the given type which were added by addMissionEventHandler.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/remove3DENConnection
+https://community.bistudio.com/wiki/removeAllMissionEventHandlers
//WikiPageEnd//
SyntaxStart:
-remove3DENConnection Array
+removeAllMissionEventHandlers String
//SyntaxEnd//
RawSyntaxStart:
-remove3DENConnection [type, from, to]
+removeAllMissionEventHandlers type
//RawSyntaxEnd//
ExampleStart:
-$Code$remove3DENConnection ["RandomStart", get3DENSelected "Object","marker_0"]
-// Remove random start on marker "marker_0" from all selected objects.$/Code$
+$Code$removeAllMissionEventHandlers "Loaded";$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -44584,33 +45679,31 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Bool - true if the connection was removed
+Nothing
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-remove3DENEventHandler
+removeAllMPEventHandlers
//KeywordEnd//
DescriptionStart:
-Removes Eden Editor event handler of given type and ID.
-See the list of all Eden Editor Event Handlers.
+Removes all MP event handlers of the given type which were added by addMPEventHandler. Command needs to be executed only on one PC for MP event handler to be removed globally.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/remove3DENEventHandler
+https://community.bistudio.com/wiki/removeAllMPEventHandlers
//WikiPageEnd//
SyntaxStart:
-remove3DENEventHandler Array
+Object removeAllMPEventHandlers String
//SyntaxEnd//
RawSyntaxStart:
-remove3DENEventHandler [type,id]
+objectName removeAllMPEventHandlers event
//RawSyntaxEnd//
ExampleStart:
-$Code$eh = add3DENEventHandler ["onUndo",{ systemChat "Zip..."}];
-remove3DENEventHandler ["onUndo",eh];$/Code$
+$Code$player removeAllMPEventHandlers "mpkilled";$/Code$
//ExampleEnd//
LocalityStart:
-undefined / undefined
+global / global
//LocalityEnd//
NoteStart:
//NoteEnd//
@@ -44621,23 +45714,24 @@ Nothing
%NextListItem%
KeywordStart:
-remove3DENLayer
+removeAllMusicEventHandlers
//KeywordEnd//
DescriptionStart:
-Remove Eden Editor editing layer.
+Removes all music track event handlers of given type.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/remove3DENLayer
+https://community.bistudio.com/wiki/removeAllMusicEventHandlers
//WikiPageEnd//
SyntaxStart:
-remove3DENLayer Number
+removeAllMusicEventHandlers String
//SyntaxEnd//
RawSyntaxStart:
-remove3DENLayer layerID
+removeAllMusicEventHandlers type
//RawSyntaxEnd//
ExampleStart:
-$Code$_myLayer = -1 add3DENLayer "Enemy Base";
-remove3DENLayer _myLayer ;$/Code$
+$Code$removeAllMusicEventHandlers "MusicStart"$/Code$
+%NextExample%
+$Code$removeAllMusicEventHandlers "MusicStop"$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -44645,32 +45739,31 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Bool - true if the layer was removed successfully (i.e., correct layer ID was used)
+Nothing
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-removeAction
+removeAllOwnedMines
//KeywordEnd//
DescriptionStart:
-Removes user added action with given id index. This only removes actions added with the addAction command. You cannot remove default game actions, such as reload.
-This command has local effect. The action will only be removed on the computer that executes the command.
+Removes all owned mines/explosive devices of the given unit
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/removeAction
+https://community.bistudio.com/wiki/removeAllOwnedMines
//WikiPageEnd//
SyntaxStart:
-Object removeAction Number
+removeAllOwnedMines Object
//SyntaxEnd//
RawSyntaxStart:
-unit removeAction index
+removeAllOwnedMines unit
//RawSyntaxEnd//
ExampleStart:
-$Code$player removeAction 0;$/Code$
+$Code$removeAllOwnedMines player;$/Code$
//ExampleEnd//
LocalityStart:
-global / local
+undefined / undefined
//LocalityEnd//
NoteStart:
//NoteEnd//
@@ -44681,26 +45774,24 @@ Nothing
%NextListItem%
KeywordStart:
-removeAll3DENEventHandlers
+removeAllPrimaryWeaponItems
//KeywordEnd//
DescriptionStart:
-Removes all Eden Editor event handlers of given type.
-See the list of all Eden Editor Event Handlers.
+Removes all items from weapon except magazine.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/removeAll3DENEventHandlers
+https://community.bistudio.com/wiki/removeAllPrimaryWeaponItems
//WikiPageEnd//
SyntaxStart:
-removeAll3DENEventHandlers String
+removeAllPrimaryWeaponItems Object
//SyntaxEnd//
RawSyntaxStart:
-removeAll3DENEventHandlers type
+removeAllPrimaryWeaponItems unit
//RawSyntaxEnd//
ExampleStart:
-$Code$removeAll3DENEventHandlers "onUndo";$/Code$
//ExampleEnd//
LocalityStart:
-undefined / undefined
+local / global
//LocalityEnd//
NoteStart:
//NoteEnd//
@@ -44711,29 +45802,34 @@ Nothing
%NextListItem%
KeywordStart:
-removeAllActions
+removeAllWeapons
//KeywordEnd//
DescriptionStart:
-Removes all unit's user added actions.
+Remove all weapons and magazines of the unit.
+On vehicles only ammo is removed
+Does not remove map, compass, radio. Use
+unitname removeweapon "itemmap"
+for that purpose.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/removeAllActions
+https://community.bistudio.com/wiki/removeAllWeapons
//WikiPageEnd//
SyntaxStart:
-removeAllActions Object
+removeAllWeapons Object
//SyntaxEnd//
RawSyntaxStart:
-removeAllActions unit
+removeAllWeapons unitName
//RawSyntaxEnd//
ExampleStart:
-$Code$removeAllActions player ;$/Code$
+$Code$removeAllWeapons player ;$/Code$
//ExampleEnd//
LocalityStart:
-global / local
+local / global
//LocalityEnd//
NoteStart:
-(30 October, 2013)
-Syntax of this command was until Arma 3 ver. 1.06: unit removeAllActions number
+(October 14, 2014)
+removeAllWeapons doesn't quite work with vehicles. If you need to remove all weapons from a vehicle, remove each weapon individually:
+$Code${tank removeWeapon _x} forEach weapons tank;$/Code$
//NoteEnd//
ReturnValueStart:
Nothing
@@ -44742,22 +45838,24 @@ Nothing
%NextListItem%
KeywordStart:
-removeAllAssignedItems
+removeBackpack
//KeywordEnd//
DescriptionStart:
-Unassigns and deletes all linked items from inventory. The commands operates on assignedItems array, which doesnt include goggles or headgear. Use removeGoggles and removeHeadgear for those.
+Removes unit's backpack
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/removeAllAssignedItems
+https://community.bistudio.com/wiki/removeBackpack
//WikiPageEnd//
SyntaxStart:
-removeAllAssignedItems Object
+removeBackpack Object
//SyntaxEnd//
RawSyntaxStart:
-removeAllAssignedItems unit
+removeBackpack unit
//RawSyntaxEnd//
ExampleStart:
-$Code$removeAllAssignedItems player ;$/Code$
+$Code$removeBackpack this ;$/Code$
+%NextExample%
+$Code$removeBackpack mySoldierDude;$/Code$
//ExampleEnd//
LocalityStart:
local / global
@@ -44771,29 +45869,30 @@ Nothing
%NextListItem%
KeywordStart:
-removeAllContainers
+removeBackpackGlobal
//KeywordEnd//
DescriptionStart:
-Removes all containers from the unit.
+Removes backpack from a unit.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/removeAllContainers
+https://community.bistudio.com/wiki/removeBackpackGlobal
//WikiPageEnd//
SyntaxStart:
-removeAllContainers Object
+removeBackpackGlobal Object
//SyntaxEnd//
RawSyntaxStart:
-removeAllContainers unit
+removeBackpackGlobal unit
//RawSyntaxEnd//
ExampleStart:
-$Code$removeAllContainers player;$/Code$
+$Code$removeBackpackGlobal player ;$/Code$
//ExampleEnd//
LocalityStart:
-undefined / undefined
+global / global
//LocalityEnd//
NoteStart:
-(2013)
-This will remove the Uniform, Vest and Backpack from a unit leaving them unable to hold or pickup inventory items.
+(May 8, 2016)
+Because of AG (Arguments Global), you can use this command to remove the backpack from UNITS that are local as well as REMOTE.
+$Code$removeBackpackGlobal UNIT;$/Code$ where UNIT can be a local and/or REMOTE player and/or AI
//NoteEnd//
ReturnValueStart:
Nothing
@@ -44802,22 +45901,22 @@ Nothing
%NextListItem%
KeywordStart:
-removeAllCuratorAddons
+removeCuratorAddons
//KeywordEnd//
DescriptionStart:
-Restrict access to all addons for given curator.
+Restrict curator use of given addons.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/removeAllCuratorAddons
+https://community.bistudio.com/wiki/removeCuratorAddons
//WikiPageEnd//
SyntaxStart:
-removeAllCuratorAddons Object
+Object removeCuratorAddons Array
//SyntaxEnd//
RawSyntaxStart:
-removeAllCuratorAddons curatorObj
+curatorObj removeCuratorAddons addons
//RawSyntaxEnd//
ExampleStart:
-$Code$removeAllCuratorAddons myCurator;$/Code$
+$Code$curatorModule removeCuratorAddons [addon1,addon2]$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -44832,22 +45931,22 @@ Nothing
%NextListItem%
KeywordStart:
-removeAllCuratorCameraAreas
+removeCuratorCameraArea
//KeywordEnd//
DescriptionStart:
-Delete all curator camera areas.
+Removes curator camera area.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/removeAllCuratorCameraAreas
+https://community.bistudio.com/wiki/removeCuratorCameraArea
//WikiPageEnd//
SyntaxStart:
-removeAllCuratorCameraAreas Object
+Object removeCuratorCameraArea Number
//SyntaxEnd//
RawSyntaxStart:
-removeAllCuratorCameraAreas curatorObj
+curatorObj removeCuratorCameraArea cameraAreaID
//RawSyntaxEnd//
ExampleStart:
-$Code$removeAllCuratorCameraAreas myCurator;$/Code$
+$Code$myCurator removeCuratorCameraArea 3;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -44861,27 +45960,28 @@ Nothing
%NextListItem%
KeywordStart:
-removeAllCuratorEditingAreas
+removeCuratorEditableObjects
//KeywordEnd//
DescriptionStart:
-Delete all curator edit areas.
+Unregister objects which can be edited by a curator.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/removeAllCuratorEditingAreas
+https://community.bistudio.com/wiki/removeCuratorEditableObjects
//WikiPageEnd//
SyntaxStart:
-removeAllCuratorEditingAreas Object
+Object removeCuratorEditableObjects Array
//SyntaxEnd//
RawSyntaxStart:
-removeAllCuratorEditingAreas curatorObj
+curatorObj removeCuratorEditableObjects [[objects],removeCrew]
//RawSyntaxEnd//
ExampleStart:
-$Code$removeAllCuratorEditingAreas myCurator;$/Code$
+$Code$curatorModule removeCuratorEditableObjects [[ cursorTarget ],true]$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
//LocalityEnd//
NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
//NoteEnd//
ReturnValueStart:
Nothing
@@ -44890,22 +45990,22 @@ Nothing
%NextListItem%
KeywordStart:
-removeAllEventHandlers
+removeCuratorEditingArea
//KeywordEnd//
DescriptionStart:
-Removes all event handlers of given type that were added by addEventHandler. Since VBS2 v1.24 can be applied on individual weapon rounds.
+Removes editing area for given curator.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/removeAllEventHandlers
+https://community.bistudio.com/wiki/removeCuratorEditingArea
//WikiPageEnd//
SyntaxStart:
-Object removeAllEventHandlers String
+Object removeCuratorEditingArea Number
//SyntaxEnd//
RawSyntaxStart:
-objectName removeAllEventHandlers handlerType
+curatorObj removeCuratorEditingArea editAreaID
//RawSyntaxEnd//
ExampleStart:
-$Code$player removeAllEventHandlers "killed";$/Code$
+$Code$myCurator removeCuratorEditingArea 3;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -44919,24 +46019,24 @@ Nothing
%NextListItem%
KeywordStart:
-removeAllHandgunItems
+removeDrawIcon
//KeywordEnd//
DescriptionStart:
-Removes all items from weapon except magazine.
+Removes an icon for an editor object.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/removeAllHandgunItems
+https://community.bistudio.com/wiki/removeDrawIcon
//WikiPageEnd//
SyntaxStart:
-removeAllHandgunItems Object
+Control removeDrawIcon Array
//SyntaxEnd//
RawSyntaxStart:
-removeAllHandgunItems unit
+map removeDrawIcon [object,string identifier]
//RawSyntaxEnd//
ExampleStart:
//ExampleEnd//
LocalityStart:
-local / global
+undefined / undefined
//LocalityEnd//
NoteStart:
//NoteEnd//
@@ -44947,29 +46047,26 @@ Nothing
%NextListItem%
KeywordStart:
-removeAllItems
+removeDrawLinks
//KeywordEnd//
DescriptionStart:
-Removes all special items from the unit.
+Remove all drawn links for the given editor object for the given editor,object type. Pass an empty string as param type to remove all draw,links for an object.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/removeAllItems
+https://community.bistudio.com/wiki/removeDrawLinks
//WikiPageEnd//
SyntaxStart:
-removeAllItems Object
+Control removeDrawLinks Array
//SyntaxEnd//
RawSyntaxStart:
-removeAllItems unit
+map removeDrawLinks [from,param type]
//RawSyntaxEnd//
ExampleStart:
-$Code$removeAllItems unitName;$/Code$
//ExampleEnd//
LocalityStart:
-local / global
+undefined / undefined
//LocalityEnd//
NoteStart:
-(June 18, 2013)
-Arma 3, version 0.70 - removes only items listed by command items.
//NoteEnd//
ReturnValueStart:
Nothing
@@ -44978,22 +46075,23 @@ Nothing
%NextListItem%
KeywordStart:
-removeAllItemsWithMagazines
+removeEventHandler
//KeywordEnd//
DescriptionStart:
-Removes all itemsWithMagazines from the uniform, vest and backpack.
+Removes event handler added by addEventHandler.
+When any handler is removed, all handler indices higher than the deleted one should be decremented.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/removeAllItemsWithMagazines
+https://community.bistudio.com/wiki/removeEventHandler
//WikiPageEnd//
SyntaxStart:
-removeAllItemsWithMagazines Object
+Object removeEventHandler Array
//SyntaxEnd//
RawSyntaxStart:
-removeAllItemsWithMagazines unit
+objectName removeEventHandler [type, index]
//RawSyntaxEnd//
ExampleStart:
-$Code$removeAllItemsWithMagazines player ;$/Code$
+$Code$player removeEventHandler ["killed", 0]$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -45007,439 +46105,19 @@ Nothing
%NextListItem%
KeywordStart:
-removeAllMissionEventHandlers
+removeFromRemainsCollector
//KeywordEnd//
DescriptionStart:
-Removes all mission event handlers of the given type which were added by addMissionEventHandler.
+Removes vehicles/units from disposal manager, added earlier with addToRemainsCollector
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/removeAllMissionEventHandlers
+https://community.bistudio.com/wiki/removeFromRemainsCollector
//WikiPageEnd//
SyntaxStart:
-removeAllMissionEventHandlers String
+removeFromRemainsCollector Array
//SyntaxEnd//
RawSyntaxStart:
-removeAllMissionEventHandlers type
-//RawSyntaxEnd//
-ExampleStart:
-$Code$removeAllMissionEventHandlers "Loaded";$/Code$
-//ExampleEnd//
-LocalityStart:
-undefined / undefined
-//LocalityEnd//
-NoteStart:
-//NoteEnd//
-ReturnValueStart:
-Nothing
-//ReturnValueEnd//
-
-%NextListItem%
-
-KeywordStart:
-removeAllMPEventHandlers
-//KeywordEnd//
-DescriptionStart:
-Removes all MP event handlers of the given type which were added by addMPEventHandler. Command needs to be executed only on one PC for MP event handler to be removed globally.
-//DescriptionEnd//
-WikiPageStart:
-https://community.bistudio.com/wiki/removeAllMPEventHandlers
-//WikiPageEnd//
-SyntaxStart:
-Object removeAllMPEventHandlers String
-//SyntaxEnd//
-RawSyntaxStart:
-objectName removeAllMPEventHandlers event
-//RawSyntaxEnd//
-ExampleStart:
-$Code$player removeAllMPEventHandlers "mpkilled";$/Code$
-//ExampleEnd//
-LocalityStart:
-global / global
-//LocalityEnd//
-NoteStart:
-//NoteEnd//
-ReturnValueStart:
-Nothing
-//ReturnValueEnd//
-
-%NextListItem%
-
-KeywordStart:
-removeAllMusicEventHandlers
-//KeywordEnd//
-DescriptionStart:
-Removes all music track event handlers of given type.
-//DescriptionEnd//
-WikiPageStart:
-https://community.bistudio.com/wiki/removeAllMusicEventHandlers
-//WikiPageEnd//
-SyntaxStart:
-removeAllMusicEventHandlers String
-//SyntaxEnd//
-RawSyntaxStart:
-removeAllMusicEventHandlers type
-//RawSyntaxEnd//
-ExampleStart:
-$Code$removeAllMusicEventHandlers "MusicStart"$/Code$
-%NextExample%
-$Code$removeAllMusicEventHandlers "MusicStop"$/Code$
-//ExampleEnd//
-LocalityStart:
-undefined / undefined
-//LocalityEnd//
-NoteStart:
-//NoteEnd//
-ReturnValueStart:
-Nothing
-//ReturnValueEnd//
-
-%NextListItem%
-
-KeywordStart:
-removeAllPrimaryWeaponItems
-//KeywordEnd//
-DescriptionStart:
-Removes all items from weapon except magazine.
-//DescriptionEnd//
-WikiPageStart:
-https://community.bistudio.com/wiki/removeAllPrimaryWeaponItems
-//WikiPageEnd//
-SyntaxStart:
-removeAllPrimaryWeaponItems Object
-//SyntaxEnd//
-RawSyntaxStart:
-removeAllPrimaryWeaponItems unit
-//RawSyntaxEnd//
-ExampleStart:
-//ExampleEnd//
-LocalityStart:
-local / global
-//LocalityEnd//
-NoteStart:
-//NoteEnd//
-ReturnValueStart:
-Nothing
-//ReturnValueEnd//
-
-%NextListItem%
-
-KeywordStart:
-removeAllWeapons
-//KeywordEnd//
-DescriptionStart:
-Remove all weapons and magazines of the unit.
-On vehicles only ammo is removed
-Does not remove map, compass, radio. Use
-unitname removeweapon "itemmap"
-for that purpose.
-//DescriptionEnd//
-WikiPageStart:
-https://community.bistudio.com/wiki/removeAllWeapons
-//WikiPageEnd//
-SyntaxStart:
-removeAllWeapons Object
-//SyntaxEnd//
-RawSyntaxStart:
-removeAllWeapons unitName
-//RawSyntaxEnd//
-ExampleStart:
-$Code$removeAllWeapons player ;$/Code$
-//ExampleEnd//
-LocalityStart:
-local / global
-//LocalityEnd//
-NoteStart:
-(October 14, 2014)
-removeAllWeapons doesn't quite work with vehicles. If you need to remove all weapons from a vehicle, remove each weapon individually:
-$Code${tank removeWeapon _x} forEach weapons tank;$/Code$
-//NoteEnd//
-ReturnValueStart:
-Nothing
-//ReturnValueEnd//
-
-%NextListItem%
-
-KeywordStart:
-removeBackpack
-//KeywordEnd//
-DescriptionStart:
-Removes unit's backpack
-//DescriptionEnd//
-WikiPageStart:
-https://community.bistudio.com/wiki/removeBackpack
-//WikiPageEnd//
-SyntaxStart:
-removeBackpack Object
-//SyntaxEnd//
-RawSyntaxStart:
-removeBackpack unit
-//RawSyntaxEnd//
-ExampleStart:
-$Code$removeBackpack this ;$/Code$
-%NextExample%
-$Code$removeBackpack mySoldierDude;$/Code$
-//ExampleEnd//
-LocalityStart:
-local / global
-//LocalityEnd//
-NoteStart:
-//NoteEnd//
-ReturnValueStart:
-Nothing
-//ReturnValueEnd//
-
-%NextListItem%
-
-KeywordStart:
-removeBackpackGlobal
-//KeywordEnd//
-DescriptionStart:
-Removes backpack from a unit.
-//DescriptionEnd//
-WikiPageStart:
-https://community.bistudio.com/wiki/removeBackpackGlobal
-//WikiPageEnd//
-SyntaxStart:
-removeBackpackGlobal Object
-//SyntaxEnd//
-RawSyntaxStart:
-removeBackpackGlobal unit
-//RawSyntaxEnd//
-ExampleStart:
-$Code$removeBackpackGlobal player ;$/Code$
-//ExampleEnd//
-LocalityStart:
-global / global
-//LocalityEnd//
-NoteStart:
-(May 8, 2016)
-Because of AG (Arguments Global), you can use this command to remove the backpack from UNITS that are local as well as REMOTE.
-$Code$removeBackpackGlobal UNIT;$/Code$ where UNIT can be a local and/or REMOTE player and/or AI
-//NoteEnd//
-ReturnValueStart:
-Nothing
-//ReturnValueEnd//
-
-%NextListItem%
-
-KeywordStart:
-removeCuratorAddons
-//KeywordEnd//
-DescriptionStart:
-Restrict curator use of given addons.
-//DescriptionEnd//
-WikiPageStart:
-https://community.bistudio.com/wiki/removeCuratorAddons
-//WikiPageEnd//
-SyntaxStart:
-Object removeCuratorAddons Array
-//SyntaxEnd//
-RawSyntaxStart:
-curatorObj removeCuratorAddons addons
-//RawSyntaxEnd//
-ExampleStart:
-$Code$curatorModule removeCuratorAddons [addon1,addon2]$/Code$
-//ExampleEnd//
-LocalityStart:
-undefined / undefined
-//LocalityEnd//
-NoteStart:
-This scripting command must be executed on the server to work properly in multiplayer
-//NoteEnd//
-ReturnValueStart:
-Nothing
-//ReturnValueEnd//
-
-%NextListItem%
-
-KeywordStart:
-removeCuratorCameraArea
-//KeywordEnd//
-DescriptionStart:
-Removes curator camera area.
-//DescriptionEnd//
-WikiPageStart:
-https://community.bistudio.com/wiki/removeCuratorCameraArea
-//WikiPageEnd//
-SyntaxStart:
-Object removeCuratorCameraArea Number
-//SyntaxEnd//
-RawSyntaxStart:
-curatorObj removeCuratorCameraArea cameraAreaID
-//RawSyntaxEnd//
-ExampleStart:
-$Code$myCurator removeCuratorCameraArea 3;$/Code$
-//ExampleEnd//
-LocalityStart:
-undefined / undefined
-//LocalityEnd//
-NoteStart:
-//NoteEnd//
-ReturnValueStart:
-Nothing
-//ReturnValueEnd//
-
-%NextListItem%
-
-KeywordStart:
-removeCuratorEditableObjects
-//KeywordEnd//
-DescriptionStart:
-Unregister objects which can be edited by a curator.
-//DescriptionEnd//
-WikiPageStart:
-https://community.bistudio.com/wiki/removeCuratorEditableObjects
-//WikiPageEnd//
-SyntaxStart:
-Object removeCuratorEditableObjects Array
-//SyntaxEnd//
-RawSyntaxStart:
-curatorObj removeCuratorEditableObjects [[objects],removeCrew]
-//RawSyntaxEnd//
-ExampleStart:
-$Code$curatorModule removeCuratorEditableObjects [[ cursorTarget ],true]$/Code$
-//ExampleEnd//
-LocalityStart:
-undefined / undefined
-//LocalityEnd//
-NoteStart:
-This scripting command must be executed on the server to work properly in multiplayer
-//NoteEnd//
-ReturnValueStart:
-Nothing
-//ReturnValueEnd//
-
-%NextListItem%
-
-KeywordStart:
-removeCuratorEditingArea
-//KeywordEnd//
-DescriptionStart:
-Removes editing area for given curator.
-//DescriptionEnd//
-WikiPageStart:
-https://community.bistudio.com/wiki/removeCuratorEditingArea
-//WikiPageEnd//
-SyntaxStart:
-Object removeCuratorEditingArea Number
-//SyntaxEnd//
-RawSyntaxStart:
-curatorObj removeCuratorEditingArea editAreaID
-//RawSyntaxEnd//
-ExampleStart:
-$Code$myCurator removeCuratorEditingArea 3;$/Code$
-//ExampleEnd//
-LocalityStart:
-undefined / undefined
-//LocalityEnd//
-NoteStart:
-//NoteEnd//
-ReturnValueStart:
-Nothing
-//ReturnValueEnd//
-
-%NextListItem%
-
-KeywordStart:
-removeDrawIcon
-//KeywordEnd//
-DescriptionStart:
-Removes an icon for an editor object.
-//DescriptionEnd//
-WikiPageStart:
-https://community.bistudio.com/wiki/removeDrawIcon
-//WikiPageEnd//
-SyntaxStart:
-Control removeDrawIcon Array
-//SyntaxEnd//
-RawSyntaxStart:
-map removeDrawIcon [object,string identifier]
-//RawSyntaxEnd//
-ExampleStart:
-//ExampleEnd//
-LocalityStart:
-undefined / undefined
-//LocalityEnd//
-NoteStart:
-//NoteEnd//
-ReturnValueStart:
-Nothing
-//ReturnValueEnd//
-
-%NextListItem%
-
-KeywordStart:
-removeDrawLinks
-//KeywordEnd//
-DescriptionStart:
-Remove all drawn links for the given editor object for the given editor,object type. Pass an empty string as param type to remove all draw,links for an object.
-//DescriptionEnd//
-WikiPageStart:
-https://community.bistudio.com/wiki/removeDrawLinks
-//WikiPageEnd//
-SyntaxStart:
-Control removeDrawLinks Array
-//SyntaxEnd//
-RawSyntaxStart:
-map removeDrawLinks [from,param type]
-//RawSyntaxEnd//
-ExampleStart:
-//ExampleEnd//
-LocalityStart:
-undefined / undefined
-//LocalityEnd//
-NoteStart:
-//NoteEnd//
-ReturnValueStart:
-Nothing
-//ReturnValueEnd//
-
-%NextListItem%
-
-KeywordStart:
-removeEventHandler
-//KeywordEnd//
-DescriptionStart:
-Removes event handler added by addEventHandler.
-When any handler is removed, all handler indices higher than the deleted one should be decremented.
-//DescriptionEnd//
-WikiPageStart:
-https://community.bistudio.com/wiki/removeEventHandler
-//WikiPageEnd//
-SyntaxStart:
-Object removeEventHandler Array
-//SyntaxEnd//
-RawSyntaxStart:
-objectName removeEventHandler [type, index]
-//RawSyntaxEnd//
-ExampleStart:
-$Code$player removeEventHandler ["killed", 0]$/Code$
-//ExampleEnd//
-LocalityStart:
-undefined / undefined
-//LocalityEnd//
-NoteStart:
-//NoteEnd//
-ReturnValueStart:
-Nothing
-//ReturnValueEnd//
-
-%NextListItem%
-
-KeywordStart:
-removeFromRemainsCollector
-//KeywordEnd//
-DescriptionStart:
-Removes vehicles/units from disposal manager, added earlier with addToRemainsCollector
-//DescriptionEnd//
-WikiPageStart:
-https://community.bistudio.com/wiki/removeFromRemainsCollector
-//WikiPageEnd//
-SyntaxStart:
-removeFromRemainsCollector Array
-//SyntaxEnd//
-RawSyntaxStart:
-removeFromRemainsCollector remains
+removeFromRemainsCollector remains
//RawSyntaxEnd//
ExampleStart:
$Code$removeFromRemainsCollector [unit1, unit2, vehicle1];$/Code$
@@ -45565,6 +46243,8 @@ LocalityStart:
global / global
//LocalityEnd//
NoteStart:
+(August 5, 2016)
+To clarify, this command effectively DELETES the headgear. It does not simply remove it from unit's head and move it into inventory.
//NoteEnd//
ReturnValueStart:
Nothing
@@ -46009,6 +46689,35 @@ Nothing
%NextListItem%
+KeywordStart:
+removeOwnedMine
+//KeywordEnd//
+DescriptionStart:
+Removes ownership over a remotely detonatable mine from the unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeOwnedMine
+//WikiPageEnd//
+SyntaxStart:
+Object removeOwnedMine Object
+//SyntaxEnd//
+RawSyntaxStart:
+unit removeOwnedMine mine
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player removeOwnedMine SuperMine;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
removePrimaryWeaponItem
//KeywordEnd//
@@ -46135,7 +46844,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/removeTeamMember
//WikiPageEnd//
SyntaxStart:
-TeamMember removeTeamMember
+TeamMember removeTeamMember TeamMember
//SyntaxEnd//
RawSyntaxStart:
team removeTeamMember member
@@ -46781,88 +47490,697 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Array of Objects - connected road segments
+Array of Objects - connected road segments
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+roleDescription
+//KeywordEnd//
+DescriptionStart:
+Returns unit description set in Editor and visible on role selection screen in MP. Works in MP and SP.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/roleDescription
+//WikiPageEnd//
+SyntaxStart:
+roleDescription Object
+//SyntaxEnd//
+RawSyntaxStart:
+roleDescription unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_playerRole = roleDescription player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(June 29, 2015)
+One thing you should know about roles. When switching to units placed in editor on the fly in MP, it could mess up the role of the player. Could be bug, could be intended, but I would not recommend doing this. Create new unit dynamically if you need to switch to. Anyway, if role of the unit is messed up so is roleDescription.
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeAttachedObjects
+//KeywordEnd//
+DescriptionStart:
+Returns list of attached objects on ropes
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeAttachedObjects
+//WikiPageEnd//
+SyntaxStart:
+ropeAttachedObjects Object
+//SyntaxEnd//
+RawSyntaxStart:
+ropeAttachedObjects vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_cargoArray = ropeAttachedObjects heli1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeAttachedTo
+//KeywordEnd//
+DescriptionStart:
+Returns the object it is attached to by rope
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeAttachedTo
+//WikiPageEnd//
+SyntaxStart:
+ropeAttachedTo Object
+//SyntaxEnd//
+RawSyntaxStart:
+ropeAttachedTo vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_heli = ropeAttachedTo veh1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeAttachEnabled
+//KeywordEnd//
+DescriptionStart:
+Returns true if vehicle can be attached to ropes
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeAttachEnabled
+//WikiPageEnd//
+SyntaxStart:
+ropeAttachEnabled Object
+//SyntaxEnd//
+RawSyntaxStart:
+ropeAttachEnabled vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ropeAttachEnabled veh1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeAttachTo
+//KeywordEnd//
+DescriptionStart:
+Attach vehicle to rope with optional offset
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeAttachTo
+//WikiPageEnd//
+SyntaxStart:
+Array ropeAttachTo Object
+//SyntaxEnd//
+RawSyntaxStart:
+[veh, toPoint, ropeEndDownDir] ropeAttachTo rope
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[veh1,[0,0,0],[0,0,-1]] ropeAttachTo ( ropes heli1 select 0);$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeCreate
+//KeywordEnd//
+DescriptionStart:
+Create a rope (PhysX rope in Arma 3).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeCreate
+//WikiPageEnd//
+SyntaxStart:
+ropeCreate Array
+//SyntaxEnd//
+RawSyntaxStart:
+ropeCreate [fromObject, fromPoint, toObject, toPoint, segments, length]
+%NextRawSyntax%
+ropeCreate [fromObject, fromPoint, length, segments, unroll]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myRope = ropeCreate [ vehicle player, "slingload0", myCargo, [0, 0, 0], 10]; //A3 example$/Code$
+%NextExample%
+$Code$myRope = ropeCreate [ vehicle player, "fastrope0", 10, 10, true ]; //TakeOn example$/Code$
+%NextExample%
+$Code$myRope = ropeCreate [veh1, [0,0,-2], veh2, [0,0,0], 10] //A3 1.34$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(November 8, 2014)
+Doesn't work well for towing vehicles on the ground.
+Their wheels don't turn freely and have a LOT of friction. You'll most likely end up flipping the vehicle over if you try to tow it.
+Also note that ropes can be destroyed/cut by shooting at them.
+%NextNote%
+(January 4, 2015)
+Pay special attention to what is your fromObject and what is your toObject as this will have an impact on the physics of the rope.
+For example: If you want to tow an Assault CRRC from a heavier Speedboat Minigun, attach two boats together with a rope. If you drive the Speedboat Minigun and set the CRRC as the fromObject, the rope will have almost no elasticity and the CRRC will yank around as you tow it. However, if you set the CRRC as the toObject, the rope will have more elasticity and will be a little friendlier for the CRRC when you are towing it.
+%NextNote%
+(July 9, 2015)
+Parameters segments and unroll are not supported in Arma 3. Segments are set automatically according the length of a rope.
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeCut
+//KeywordEnd//
+DescriptionStart:
+Cut rope and detach rope from vehicle
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeCut
+//WikiPageEnd//
+SyntaxStart:
+ropeCut Array
+//SyntaxEnd//
+RawSyntaxStart:
+ropeCut [rope, distance]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ropeCut [ ropes heli1 select 0, 5];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeDestroy
+//KeywordEnd//
+DescriptionStart:
+Destroy a rope.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeDestroy
+//WikiPageEnd//
+SyntaxStart:
+ropeDestroy Object
+//SyntaxEnd//
+RawSyntaxStart:
+ropeDestroy rope
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ropeDestroy myRope;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeDetach
+//KeywordEnd//
+DescriptionStart:
+Detach a rope from an object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeDetach
+//WikiPageEnd//
+SyntaxStart:
+Object ropeDetach rope;
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle ropeDetach rope;
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicle player ropeDetach myRope;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeEndPosition
+//KeywordEnd//
+DescriptionStart:
+Return rope end positions in Position3D format
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeEndPosition
+//WikiPageEnd//
+SyntaxStart:
+ropeEndPosition Object
+//SyntaxEnd//
+RawSyntaxStart:
+ropeEndPosition rope
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ends = ropeEndPosition ( ropes heli1 select 0);
+_end1 = _ends select 0;
+_end2 = _ends select 1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - [endPos1,endPos2]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeLength
+//KeywordEnd//
+DescriptionStart:
+Return rope length in meters (set by ropeCreate, ropeCut, ropeUnwind )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeLength
+//WikiPageEnd//
+SyntaxStart:
+ropeLength Object
+//SyntaxEnd//
+RawSyntaxStart:
+ropeLength rope
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_length = ropeLength ( ropes heli1 select 0);$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(March 19, 2016)
+When a rope gets stretched ropeLength will still return the same length as before.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropes
+//KeywordEnd//
+DescriptionStart:
+Returns a vehicle's rope objects in an Array.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropes
+//WikiPageEnd//
+SyntaxStart:
+ropes Object
+//SyntaxEnd//
+RawSyntaxStart:
+ropes vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str ( ropes vehicle player );$/Code$
+%NextExample%
+$Code$_rope1 = ( ropes heli1) select 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(05 April, 2014)
+The ropes command seems to return each individual sling load rope. ropes will return an empty Array if the sling load ropes are not deployed. Ropes as of A3 1.33 have a cfgVehicles classname of "Rope".
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeUnwind
+//KeywordEnd//
+DescriptionStart:
+Unwind rope to target length. Use relative parameter for changing rope length +/- from current length
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeUnwind
+//WikiPageEnd//
+SyntaxStart:
+ropeUnwind Array
+//SyntaxEnd//
+RawSyntaxStart:
+ropeUnwind [rope, speed, targetLength, relative]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ropeUnwind [ ropes heli1 select 0, 3, 10];//set rope length to 10m at 3m/s$/Code$
+%NextExample%
+$Code$ropeUnwind [ ropes heli1 select 0, 3, -5, true];//decrease rope length by 5m at 3m/s$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(November 8, 2014)
+Unwinding speed is not linear but instead automatically accelerates at the beginning and slows down at the end.
+The speed also only seems to have no effect when pulling the rope in. (unless the end of the rope is not attached to anything)
+High unwinding speeds (over ~250) can cause your cargo to get stuck in midair.
+%NextNote%
+(January 4, 2015)
+Rope length limits are between 0.5 and 100 meters.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeUnwound
+//KeywordEnd//
+DescriptionStart:
+False if unwinding in progress, otherwise true
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeUnwound
+//WikiPageEnd//
+SyntaxStart:
+ropeUnwound Object
+//SyntaxEnd//
+RawSyntaxStart:
+ropeUnwound rope
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_isUnwound = ropeUnwound ( ropes heli1 select 0);$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+rotorsForcesRTD
+//KeywordEnd//
+DescriptionStart:
+Returns force produced by rotors.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/rotorsForcesRTD
+//WikiPageEnd//
+SyntaxStart:
+rotorsForcesRTD Object
+//SyntaxEnd//
+RawSyntaxStart:
+rotorsForcesRTD RTD_helicopter
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_rotorForces = rotorsForcesRTD _taru// Returns [[-465.981,351.941,45960.5],[-469.079,397.451,46933.3]]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(November 4, 2014)
+There is no official information I can find on what these values mean. According to my testing on the Mi-290 Taru, here is what I have come up with:
+$Code$[[ rotor 1 roll +right/-left, rotor 1 pitch +down/-up, rotor 1 collective +up/-down ],
+[ rotor 2 roll +right/-left, rotor 2 pitch +down/-up, rotor 2 collective +up/-down ]]$/Code$
+When yawing left and right, rotor 1 and 2 collective differ from each other. This is normal behaviour with coaxial rotors. Yawing right increase rotor 1 collective and decreases rotor 2 collective. Yawing left does the opposite. Rotor 1 in this example seems to be the bottom rotor.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+rotorsRpmRTD
+//KeywordEnd//
+DescriptionStart:
+Returns rotors RPM
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/rotorsRpmRTD
+//WikiPageEnd//
+SyntaxStart:
+rotorsRpmRTD Object
+//SyntaxEnd//
+RawSyntaxStart:
+rotorsRpmRTD RTD_helicopter
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_mh9_main = ( rotorsRpmRTD _MH9) select 0;//main rotor
+_mh9_tail = ( rotorsRpmRTD _MH9) select 1;//tail rotor$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+round
+//KeywordEnd//
+DescriptionStart:
+Rounds up or down to the closest integer.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/round
+//WikiPageEnd//
+SyntaxStart:
+round Number
+//SyntaxEnd//
+RawSyntaxStart:
+round x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_val= round 5.25, result is 5$/Code$
+%NextExample%
+$Code$_val= round 5.55, result is 6$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+runInitScript
+//KeywordEnd//
+DescriptionStart:
+Launch init.sqs or init.sqf scripts.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/runInitScript
+//WikiPageEnd//
+SyntaxStart:
+runInitScript
+//SyntaxEnd//
+RawSyntaxStart:
+runInitScript
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+rad
+//KeywordEnd//
+DescriptionStart:
+Convert x from Degrees to Radians. 360 degrees is equal to 2 multiplied with pi.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/rad
+//WikiPageEnd//
+SyntaxStart:
+rad Number
+//SyntaxEnd//
+RawSyntaxStart:
+rad x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_radians = rad 180
+// Result is 3.1415 (eg pi$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-roleDescription
+radioChannelAdd
//KeywordEnd//
DescriptionStart:
-Returns unit description set in Editor and visible on role selection screen in MP. Works in MP and SP.
+Add the units to the custom radio channel.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/roleDescription
+https://community.bistudio.com/wiki/radioChannelAdd
//WikiPageEnd//
SyntaxStart:
-roleDescription Object
+Number radioChannelAdd Array
//SyntaxEnd//
RawSyntaxStart:
-roleDescription unit
+index radioChannelAdd units
//RawSyntaxEnd//
ExampleStart:
-$Code$_playerRole = roleDescription player ;$/Code$
+$Code$2 radioChannelAdd [player, unit1];$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
//LocalityEnd//
NoteStart:
-(June 29, 2015)
-One thing you should know about roles. When switching to units placed in editor on the fly in MP, it could mess up the role of the player. Could be bug, could be intended, but I would not recommend doing this. Create new unit dynamically if you need to switch to. Anyway, if role of the unit is messed up so is roleDescription.
//NoteEnd//
ReturnValueStart:
-String
+Nothing
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-ropeAttachedObjects
+radioChannelCreate
//KeywordEnd//
DescriptionStart:
-Returns list of attached objects on ropes
+Create a custom radio channel with the given color, label, call sign and registered characters. The index returned can be used to manipulate the created channel later. There are 10 slots for custom radio channels which would correspond to channels 6-15 (see getPlayerChannel ). The command will find an unused index in this range and create it when found. Server only.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/ropeAttachedObjects
+https://community.bistudio.com/wiki/radioChannelCreate
//WikiPageEnd//
SyntaxStart:
-ropeAttachedObjects Object
+radioChannelCreate Array
//SyntaxEnd//
RawSyntaxStart:
-ropeAttachedObjects vehicle
+radioChannelCreate [color, label, callSign, units, sentenceType]
//RawSyntaxEnd//
ExampleStart:
-$Code$_cargoArray = ropeAttachedObjects heli1;$/Code$
+$Code$_index = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], "Q-dance Radio", "%UNIT_NAME", [player1, player2]];$/Code$
+%NextExample%
+$Code$_index = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], Q-dance Radio, %UNIT_NAME, [player1, player2], false ];
+// disable automatic quotes for chat in channel (ArmA 3)$/Code$
+%NextExample%
+$Code$// Create custom channel and add all players to it, present and JIP:
+if ( isServer ) then
+{
+private _channelName = "Q-dance Radio";
+private _channelID = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], _channelName, "%UNIT_NAME", []];
+if (_channelID == 0) exitWith { diag_log format ["Custom channel '%1' creation failed!", _channelName]};
+[_channelID, {_this radioChannelAdd [ player ]}] remoteExec ["call", [0, -2] select isDedicated, _channelName];
+};$/Code$
//ExampleEnd//
LocalityStart:
-undefined / undefined
+global / global
//LocalityEnd//
NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+%NextNote%
+(January 21, 2016)
+Make sure you add all units you intend to speak or receive messages on created custom channel to the channel.
//NoteEnd//
ReturnValueStart:
-Array
+Number - created channel ID (used in customChat command), 0 if failed
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-ropeAttachedTo
+radioChannelRemove
//KeywordEnd//
DescriptionStart:
-Returns the object it is attached to by rope
+Remove the characters from the custom radio channel.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/ropeAttachedTo
+https://community.bistudio.com/wiki/radioChannelRemove
//WikiPageEnd//
SyntaxStart:
-ropeAttachedTo Object
+Number radioChannelRemove Array
//SyntaxEnd//
RawSyntaxStart:
-ropeAttachedTo vehicle
+index radioChannelRemove characters
//RawSyntaxEnd//
ExampleStart:
-$Code$_heli = ropeAttachedTo veh1;$/Code$
+$Code$3 radioChannelRemove [myCharacter1, myCharacter2];$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -46870,28 +48188,40 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Object
+Nothing
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-ropeAttachEnabled
+radioChannelSetCallSign
//KeywordEnd//
DescriptionStart:
-Returns true if vehicle can be attached to ropes
+Set the custom radio channel's call sign.
+Available special parameters:
+$KEY (reference to a localized text)
+%CHANNEL_LABEL
+%UNIT_SIDE
+%UNIT_NAME
+%UNIT_RANK
+%UNIT_ID
+%UNIT_REF
+%UNIT_GRP_NAME
+%UNIT_GRP_LEADER
+%UNIT_VEH_NAME
+%UNIT_VEH_POSITION
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/ropeAttachEnabled
+https://community.bistudio.com/wiki/radioChannelSetCallSign
//WikiPageEnd//
SyntaxStart:
-ropeAttachEnabled Object
+Number radioChannelSetCallSign String
//SyntaxEnd//
RawSyntaxStart:
-ropeAttachEnabled vehicle
+index radioChannelSetCallSign callSign
//RawSyntaxEnd//
ExampleStart:
-$Code$ropeAttachEnabled veh1;$/Code$
+$Code$4 radioChannelSetCallSign "%UNIT_NAME";$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -46899,28 +48229,28 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Boolean
+Nothing
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-ropeAttachTo
+radioChannelSetLabel
//KeywordEnd//
DescriptionStart:
-Attach vehicle to rope with optional offset
+Set the custom radio channel's label.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/ropeAttachTo
+https://community.bistudio.com/wiki/radioChannelSetLabel
//WikiPageEnd//
SyntaxStart:
-Array ropeAttachTo Object
+Number radioChannelSetLabel String
//SyntaxEnd//
RawSyntaxStart:
-[veh, toPoint, ropeEndDownDir] ropeAttachTo rope
+index radioChannelSetLabel label
//RawSyntaxEnd//
ExampleStart:
-$Code$[veh1,[0,0,0],[0,0,-1]] ropeAttachTo ( ropes heli1 select 0);$/Code$
+$Code$5 radioChannelSetLabel "Q-dance Radio";$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -46934,68 +48264,51 @@ Nothing
%NextListItem%
KeywordStart:
-ropeCreate
+radioVolume
//KeywordEnd//
DescriptionStart:
-Create a rope (PhysX rope in Arma 3).
+Checks the current radio volume (set by fadeRadio ).
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/ropeCreate
+https://community.bistudio.com/wiki/radioVolume
//WikiPageEnd//
SyntaxStart:
-ropeCreate Array
+radioVolume
//SyntaxEnd//
RawSyntaxStart:
-ropeCreate [fromObject, fromPoint, toObject, toPoint, segments, length]
-%NextRawSyntax%
-ropeCreate [fromObject, fromPoint, length, segments, unroll]
+radioVolume
//RawSyntaxEnd//
ExampleStart:
-$Code$myRope = ropeCreate [ vehicle player, "slingload0", myCargo, [0, 0, 0], 10]; //A3 example$/Code$
-%NextExample%
-$Code$myRope = ropeCreate [ vehicle player, "fastrope0", 10, 10, true ]; //TakeOn example$/Code$
-%NextExample%
-$Code$myRope = ropeCreate [veh1, [0,0,-2], veh2, [0,0,0], 10] //A3 1.34$/Code$
+$Code$_volume = radioVolume;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
//LocalityEnd//
NoteStart:
-(November 8, 2014)
-Doesn't work well for towing vehicles on the ground.
-Their wheels don't turn freely and have a LOT of friction. You'll most likely end up flipping the vehicle over if you try to tow it.
-Also note that ropes can be destroyed/cut by shooting at them.
-%NextNote%
-(January 4, 2015)
-Pay special attention to what is your fromObject and what is your toObject as this will have an impact on the physics of the rope.
-For example: If you want to tow an Assault CRRC from a heavier Speedboat Minigun, attach two boats together with a rope. If you drive the Speedboat Minigun and set the CRRC as the fromObject, the rope will have almost no elasticity and the CRRC will yank around as you tow it. However, if you set the CRRC as the toObject, the rope will have more elasticity and will be a little friendlier for the CRRC when you are towing it.
-%NextNote%
-(July 9, 2015)
-Parameters segments and unroll are not supported in Arma 3. Segments are set automatically according the length of a rope.
//NoteEnd//
ReturnValueStart:
-Object
+Number
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-ropeCut
+rain
//KeywordEnd//
DescriptionStart:
-Cut rope and detach rope from vehicle
+Returns the current value of rain density in range 1...0
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/ropeCut
+https://community.bistudio.com/wiki/rain
//WikiPageEnd//
SyntaxStart:
-ropeCut Array
+rain
//SyntaxEnd//
RawSyntaxStart:
-ropeCut [rope, distance]
+rain
//RawSyntaxEnd//
ExampleStart:
-$Code$ropeCut [ ropes heli1 select 0, 5];$/Code$
+$Code$_rainLevel = rain ;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -47003,28 +48316,27 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Nothing
+Number
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-ropeDestroy
+rainbow
//KeywordEnd//
DescriptionStart:
-Destroy a rope.
+Returns the current rainbow intensity.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/ropeDestroy
+https://community.bistudio.com/wiki/rainbow
//WikiPageEnd//
SyntaxStart:
-ropeDestroy Object
+rainbow
//SyntaxEnd//
RawSyntaxStart:
-ropeDestroy rope
+rainbow
//RawSyntaxEnd//
ExampleStart:
-$Code$ropeDestroy myRope;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -47032,95 +48344,174 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Nothing
+Number
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-ropeDetach
+random
//KeywordEnd//
DescriptionStart:
-Detach a rope from an object.
+Random real (floating point) value from 0 (inclusive) to x (not inclusive).
+Since Arma 3 v1.55.133393 alternative syntax is added, allowing to define Gaussian Distribution params. Uses the same method as setTriggerTimeout command. Quite useful for spawning loot for example, making more valuable items more rare.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/ropeDetach
+https://community.bistudio.com/wiki/random
//WikiPageEnd//
SyntaxStart:
-Object ropeDetach rope;
+random Number
+%NextSyntax%
+random Array
//SyntaxEnd//
RawSyntaxStart:
-vehicle ropeDetach rope;
+random x
+%NextRawSyntax%
+random [min, mid, max]
//RawSyntaxEnd//
ExampleStart:
-$Code$vehicle player ropeDetach myRope;$/Code$
+$Code$_rNumber = random 1;$/Code$
+%NextExample%
+$Code$_rNumber = random -10;$/Code$
+%NextExample%
+$Code$// To select random value from an array:
+_array = ["apples", "pears", "bananas", "M16"];
+_random = _array select floor random count _array;
+// or since Arma 3 v1.55.133393
+_random = selectRandom _array;$/Code$
+%NextExample%
+$Code$// Compare (each command was executed 100000 times to gather statistics):
+floor random 10;
+// 0 - 10099 (10%)
+// 1 - 10040 (10%)
+// 2 - 10154 (10%)
+// 3 - 9910 (10%)
+// 4 - 10023 (10%)
+// 5 - 9937 (10%)
+// 6 - 10118 (10%)
+// 7 - 9716 (10%)
+// 8 - 9986 (10%)
+// 9 - 10017 (10%)
+floor random [0,5,10];
+// 0 - 109 (0%)
+// 1 - 1604 (2%)
+// 2 - 6839 (7%)
+// 3 - 16671 (17%)
+// 4 - 24706 (25%)
+// 5 - 24702 (25%)
+// 6 - 16626 (17%)
+// 7 - 6925 (7%)
+// 8 - 1702 (2%)
+// 9 - 116 (0%)
+floor random [0,10,0];
+// 0 - 19 (0%)
+// 1 - 209 (0%)
+// 2 - 817 (1%)
+// 3 - 2384 (2%)
+// 4 - 4841 (5%)
+// 5 - 8976 (9%)
+// 6 - 14067 (14%)
+// 7 - 18955 (19%)
+// 8 - 23605 (24%)
+// 9 - 26127 (26%)
+floor random [0,10,5];
+// 0 - 11 (0%)
+// 1 - 98 (0%)
+// 2 - 430 (0%)
+// 3 - 1149 (1%)
+// 4 - 2384 (2%)
+// 5 - 4546 (5%)
+// 6 - 8612 (9%)
+// 7 - 16283 (16%)
+// 8 - 28393 (28%)
+// 9 - 38094 (38%)$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
//LocalityEnd//
NoteStart:
+(July 12, 2015)
+Random selections including negative numbers can be obtained via:
+$Code$_Xrnd = round(random 200) -100;$/Code$
+This will yield numbers between -100 and 100.
+Be careful using random numbers in multiplayer, each client will come up with a different result. See multiplayer tutorials for more general information about locality.
+The number returned is unlikely to be a whole number. To return a whole number use either round, ceil or floor together with random :
+x=round(random 5) will return 0,1,2,3,4 or 5. (non-uniform distribution, 0 and 5 are half as likely to be selected than any of the other numbers)
+x=floor(random 5) will return 0,1,2,3 or 4. (uniform distribution, all numbers have the same probability of being selected)
+x=ceil(random 5) will return 0,1,2,3,4 or 5. (0 is very unlikely, but possible, as ceil 0 is 0)
//NoteEnd//
ReturnValueStart:
-Nothing
+Number
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-ropeEndPosition
+rank
//KeywordEnd//
DescriptionStart:
-Return rope end positions in Position3D format
+Returns the rank of the given unit. Rank can be one of the following:
+"PRIVATE"
+"CORPORAL"
+"SERGEANT"
+"LIEUTENANT"
+"CAPTAIN"
+"MAJOR"
+"COLONEL"
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/ropeEndPosition
+https://community.bistudio.com/wiki/rank
//WikiPageEnd//
SyntaxStart:
-ropeEndPosition Object
+rank Object
//SyntaxEnd//
RawSyntaxStart:
-ropeEndPosition rope
+rank unitName
//RawSyntaxEnd//
ExampleStart:
-$Code$_ends = ropeEndPosition ( ropes heli1 select 0);
-_end1 = _ends select 0;
-_end2 = _ends select 1;$/Code$
+$Code$_rank = rank player;$/Code$
//ExampleEnd//
LocalityStart:
-undefined / undefined
+global / undefined
//LocalityEnd//
NoteStart:
//NoteEnd//
ReturnValueStart:
-Array - [endPos1,endPos2]
+String
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-ropeLength
+rankId
//KeywordEnd//
DescriptionStart:
-Return rope length in meters (set by ropeCreate, ropeCut, ropeUnwind )
+Return the rank of the given unit for comparison.
+Value may be :
+0 - Private
+1 - Corporal
+2 - Sergeant
+3 - Lieutenant
+4 - Captain
+5 - Major
+6 - Colonel
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/ropeLength
+https://community.bistudio.com/wiki/rankId
//WikiPageEnd//
SyntaxStart:
-ropeLength Object
+rankId Object
//SyntaxEnd//
RawSyntaxStart:
-ropeLength rope
+rankId unit
//RawSyntaxEnd//
ExampleStart:
-$Code$_length = ropeLength ( ropes heli1 select 0);$/Code$
+$Code$_myIdRank = rankId player;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
//LocalityEnd//
NoteStart:
-(March 19, 2016)
-When a rope gets stretched ropeLength will still return the same length as before.
//NoteEnd//
ReturnValueStart:
Number
@@ -47129,93 +48520,86 @@ Number
%NextListItem%
KeywordStart:
-ropes
+rating
//KeywordEnd//
DescriptionStart:
-Returns a vehicle's rope objects in an Array.
+Check unit rating. Rating is increased for killing enemies, decreased for killing friendlies (see Rating Values ). Can be changed via addRating by the mission designer.
+The rating of the player is displayed as the "score" at the end of the mission. Via Description.ext one can define how many points it takes to get a perfect score, as well as the number of stars.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/ropes
+https://community.bistudio.com/wiki/rating
//WikiPageEnd//
SyntaxStart:
-ropes Object
+rating Object
//SyntaxEnd//
RawSyntaxStart:
-ropes vehicle
+rating unitName
//RawSyntaxEnd//
ExampleStart:
-$Code$hint str ( ropes vehicle player );$/Code$
-%NextExample%
-$Code$_rope1 = ( ropes heli1) select 0;$/Code$
+$Code$_score = rating player$/Code$
//ExampleEnd//
LocalityStart:
-undefined / undefined
+global / undefined
//LocalityEnd//
NoteStart:
-(05 April, 2014)
-The ropes command seems to return each individual sling load rope. ropes will return an empty Array if the sling load ropes are not deployed. Ropes as of A3 1.33 have a cfgVehicles classname of "Rope".
+In ArmA 1.18 rating does only return rating levels for units that are local.
//NoteEnd//
ReturnValueStart:
-Array
+Number
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-ropeUnwind
+rectangular
//KeywordEnd//
DescriptionStart:
-Unwind rope to target length. Use relative parameter for changing rope length +/- from current length
+Checks if a location is rectangular (returns true) or elliptical (returns false).
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/ropeUnwind
+https://community.bistudio.com/wiki/rectangular
//WikiPageEnd//
SyntaxStart:
-ropeUnwind Array
+rectangular Location
//SyntaxEnd//
RawSyntaxStart:
-ropeUnwind [rope, speed, targetLength, relative]
+rectangular location
//RawSyntaxEnd//
ExampleStart:
-$Code$ropeUnwind [ ropes heli1 select 0, 3, 10];//set rope length to 10m at 3m/s$/Code$
-%NextExample%
-$Code$ropeUnwind [ ropes heli1 select 0, 3, -5, true];//decrease rope length by 5m at 3m/s$/Code$
+$Code$_isRect = rectangular myLocation;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
//LocalityEnd//
NoteStart:
-(November 8, 2014)
-Unwinding speed is not linear but instead automatically accelerates at the beginning and slows down at the end.
-The speed also only seems to have no effect when pulling the rope in. (unless the end of the rope is not attached to anything)
-High unwinding speeds (over ~250) can cause your cargo to get stuck in midair.
-%NextNote%
-(January 4, 2015)
-Rope length limits are between 0.5 and 100 meters.
//NoteEnd//
ReturnValueStart:
-Nothing
+Boolean
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-ropeUnwound
+registeredTasks
//KeywordEnd//
DescriptionStart:
-False if unwinding in progress, otherwise true
+List all registered task types.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/ropeUnwound
+https://community.bistudio.com/wiki/registeredTasks
//WikiPageEnd//
SyntaxStart:
-ropeUnwound Object
+registeredTasks TeamMember
//SyntaxEnd//
RawSyntaxStart:
-ropeUnwound rope
+registeredTasks member
//RawSyntaxEnd//
ExampleStart:
-$Code$_isUnwound = ropeUnwound ( ropes heli1 select 0);$/Code$
+$Code$tasklist = registeredTasks teamMember player ;$/Code$
+%NextExample%
+$Code$_rabbit = createAgent ["Rabbit_F", position player,[], 0, "None"];
+hint str registeredTasks teamMember _rabbit;
+// Hint shows ["Animal Main Task"] in Arma 3.$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -47223,63 +48607,61 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Boolean
+Array of Strings
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-rotorsForcesRTD
+safeZoneH
//KeywordEnd//
DescriptionStart:
-Returns force produced by rotors.
+Returns the height of the screen in screen measurement units. Taken from top left corner of the default viewport (0,0) of the screen and going in the same direction as the Y axis, the value will be positive but resulting Y will end up beyond the bottom border. Therefore in order to calculate Y of the bottom screen border, the length of safeZoneY must be subtracted from safeZoneH, but because it is negative, it must be added instead. _screenBottomBorderY = safeZoneH + safeZoneY. The measurement units depend on the current screen resolution getResolution. See also SafeZone
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/rotorsForcesRTD
+https://community.bistudio.com/wiki/safeZoneH
//WikiPageEnd//
SyntaxStart:
-rotorsForcesRTD Object
+safeZoneH
//SyntaxEnd//
RawSyntaxStart:
-rotorsForcesRTD RTD_helicopter
+SafeZoneH
//RawSyntaxEnd//
ExampleStart:
-$Code$_rotorForces = rotorsForcesRTD _taru// Returns [[-465.981,351.941,45960.5],[-469.079,397.451,46933.3]]$/Code$
+$Code$_screenHeight = safeZoneH ;$/Code$
+%NextExample%
+$Code$_screenBottomBorderY = safeZoneH + safeZoneY ;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
//LocalityEnd//
NoteStart:
-(November 4, 2014)
-There is no official information I can find on what these values mean. According to my testing on the Mi-290 Taru, here is what I have come up with:
-$Code$[[ rotor 1 roll +right/-left, rotor 1 pitch +down/-up, rotor 1 collective +up/-down ],
-[ rotor 2 roll +right/-left, rotor 2 pitch +down/-up, rotor 2 collective +up/-down ]]$/Code$
-When yawing left and right, rotor 1 and 2 collective differ from each other. This is normal behaviour with coaxial rotors. Yawing right increase rotor 1 collective and decreases rotor 2 collective. Yawing left does the opposite. Rotor 1 in this example seems to be the bottom rotor.
//NoteEnd//
ReturnValueStart:
-Array
+Number
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-rotorsRpmRTD
+safeZoneW
//KeywordEnd//
DescriptionStart:
-Returns rotors RPM
+Returns the width of the screen in screen measurement units. Taken from top left corner of the default viewport (0,0) of the screen and going in the same direction as the X axis, the value will be positive but resulting X will end up beyond the right border. Therefore in order to calculate X of the right screen border, the length of safeZoneX must be subtracted from safeZoneW, but because it is negative, it must be added instead. _screenRightBorderX = safeZoneW + safeZoneX. The measurement units depend on the current screen resolution getResolution. See also SafeZone
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/rotorsRpmRTD
+https://community.bistudio.com/wiki/safeZoneW
//WikiPageEnd//
SyntaxStart:
-rotorsRpmRTD Object
+safeZoneW
//SyntaxEnd//
RawSyntaxStart:
-rotorsRpmRTD RTD_helicopter
+safeZoneW
//RawSyntaxEnd//
ExampleStart:
-$Code$_mh9_main = ( rotorsRpmRTD _MH9) select 0;//main rotor
-_mh9_tail = ( rotorsRpmRTD _MH9) select 1;//tail rotor$/Code$
+$Code$_screenWidth = safeZoneW ;$/Code$
+%NextExample%
+$Code$_screenRightBorderX = safeZoneW + safeZoneX ;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -47287,30 +48669,28 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Array
+Number
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-round
+safeZoneWAbs
//KeywordEnd//
DescriptionStart:
-Rounds up or down to the closest integer.
+Returns SafeZone width (of all monitors, in case there's more than one)
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/round
+https://community.bistudio.com/wiki/safeZoneWAbs
//WikiPageEnd//
SyntaxStart:
-round Number
+safeZoneWAbs
//SyntaxEnd//
RawSyntaxStart:
-round x
+safeZoneWAbs
//RawSyntaxEnd//
ExampleStart:
-$Code$_val= round 5.25, result is 5$/Code$
-%NextExample%
-$Code$_val= round 5.55, result is 6$/Code$
+$Code$_szW = safeZoneWAbs;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -47324,21 +48704,22 @@ Number
%NextListItem%
KeywordStart:
-runInitScript
+safeZoneX
//KeywordEnd//
DescriptionStart:
-Launch init.sqs or init.sqf scripts.
+Returns the X of the left border of the screen, which is also a distance in screen measurement units from top left corner of the default viewport (0,0) of the screen to the left border of the screen. Since it is going in opposite way of the X axis, the value is negative. The measurement units depend on the current screen resolution getResolution. See also SafeZone
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/runInitScript
+https://community.bistudio.com/wiki/safeZoneX
//WikiPageEnd//
SyntaxStart:
-runInitScript
+safeZoneX
//SyntaxEnd//
RawSyntaxStart:
-runInitScript
+SafeZoneX
//RawSyntaxEnd//
ExampleStart:
+$Code$_screenLeftBorderX = safeZoneX ; // returns a float value 0$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -47346,30 +48727,28 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Nothing
+Number
//ReturnValueEnd//
%NextListItem%
KeywordStart:
-safeZoneW
+safeZoneXAbs
//KeywordEnd//
DescriptionStart:
-Returns the width of the screen in screen measurement units. Taken from top left corner of the default viewport (0,0) of the screen and going in the same direction as the X axis, the value will be positive but resulting X will end up beyond the right border. Therefore in order to calculate X of the right screen border, the length of safeZoneX must be subtracted from safeZoneW, but because it is negative, it must be added instead. _screenRightBorderX = safeZoneW + safeZoneX. The measurement units depend on the current screen resolution getResolution. See also SafeZone
+Returns SafeZone left border (of all monitors, in case there's more than one)
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/safeZoneW
+https://community.bistudio.com/wiki/safeZoneXAbs
//WikiPageEnd//
SyntaxStart:
-safeZoneW
+safeZoneXAbs
//SyntaxEnd//
RawSyntaxStart:
-safeZoneW
+safeZoneXAbs
//RawSyntaxEnd//
ExampleStart:
-$Code$_screenWidth = safeZoneW ;$/Code$
-%NextExample%
-$Code$_screenRightBorderX = safeZoneW + safeZoneX ;$/Code$
+$Code$_szX = safeZoneXAbs;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -47383,22 +48762,22 @@ Number
%NextListItem%
KeywordStart:
-safeZoneWAbs
+safeZoneY
//KeywordEnd//
DescriptionStart:
-Returns SafeZone width (of all monitors, in case there's more than one)
+Returns the Y of the top border of the screen, which is also a distance in screen measurement units from top left corner of the default viewport (0,0) of the screen to the top border of the screen. Since it is going in opposite way of the Y axis, the value is negative. The measurement units depend on the current screen resolution getResolution. See also SafeZone
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/safeZoneWAbs
+https://community.bistudio.com/wiki/safeZoneY
//WikiPageEnd//
SyntaxStart:
-safeZoneWAbs
+safeZoneY
//SyntaxEnd//
RawSyntaxStart:
-safeZoneWAbs
+SafeZoneY
//RawSyntaxEnd//
ExampleStart:
-$Code$_szW = safeZoneWAbs;$/Code$
+$Code$_screenTopBorderY = safeZoneY ; // returns a float value 0$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -47412,22 +48791,22 @@ Number
%NextListItem%
KeywordStart:
-safeZoneXAbs
+save3DENInventory
//KeywordEnd//
DescriptionStart:
-Returns SafeZone left border (of all monitors, in case there's more than one)
+Saves current state of entitie's inventory to SQM.
//DescriptionEnd//
WikiPageStart:
-https://community.bistudio.com/wiki/safeZoneXAbs
+https://community.bistudio.com/wiki/save3DENInventory
//WikiPageEnd//
SyntaxStart:
-safeZoneXAbs
+save3DENInventory Entities
//SyntaxEnd//
RawSyntaxStart:
-safeZoneXAbs
+save3DENInventory [entities]
//RawSyntaxEnd//
ExampleStart:
-$Code$_szX = safeZoneXAbs;$/Code$
+$Code$save3DENInventory [_soldier1,_solider2]$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -47435,7 +48814,7 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Number
+Nothing
//ReturnValueEnd//
%NextListItem%
@@ -47703,7 +49082,7 @@ Object say Array
%NextSyntax%
Array say String
%NextSyntax%
-Array say
+Array say Array
//SyntaxEnd//
RawSyntaxStart:
from say sound
@@ -47749,7 +49128,7 @@ Object say2D Array
%NextSyntax%
Array say2D String
%NextSyntax%
-Array say2D
+Array say2D Array
//SyntaxEnd//
RawSyntaxStart:
from say2D sound
@@ -47792,7 +49171,7 @@ Object say3D Array
%NextSyntax%
Array say3D String
%NextSyntax%
-Array say3D
+Array say3D Array
//SyntaxEnd//
RawSyntaxStart:
from say3D sound
@@ -47918,6 +49297,44 @@ Number
%NextListItem%
+KeywordStart:
+screenshot
+//KeywordEnd//
+DescriptionStart:
+Captures a screenshot and stores it to given filename. PNG is the only available format and the file must have.png extension.
+The file is saved into Screenshots folder in the Profile directory. The folder is by default limited to 250 MB to prevent abuse.
+To increase the limit, add the following line at the end of the profile file:
+$Code$maxScreenShotFolderSizeMB = 2000;$/Code$
+2000 can be replaced by any value in MB.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/screenshot
+//WikiPageEnd//
+SyntaxStart:
+screenshot String
+//SyntaxEnd//
+RawSyntaxStart:
+screenshot filename
+//RawSyntaxEnd//
+ExampleStart:
+$Code$screenshot "testFile.png";$/Code$
+%NextExample%
+$Code$// The following code will result in the screenshot being placed in \Documents\Arma 3\Screenshots\any\where\you\want.png
+screenshot "any\where\you\want.png";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(July 18, 2016)
+This command only captures the rendered picture (including ppEffects). GUI nor the mouse are visible on the screenshot. (ArmA 3 1.62.137494)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
screenToWorld
//KeywordEnd//
@@ -48241,7 +49658,7 @@ Config select Number
%NextSyntax%
String select Array
%NextSyntax%
-Array select
+Array select Array
%NextSyntax%
Array select Code
//SyntaxEnd//
@@ -48291,6 +49708,14 @@ In ArmA3 ver 1.18, Boolean type supported. Which true defaulted as 1 and false a
$Code$[0,1] select (56 40) // 1
[0,1,2] select ((! isNil "v") false ) // 0$/Code$
%NextNote%
+(14 juil, 2016)
+You can substract array from array using select:
+$Code$_array = [[1],[2],[3]]; _sub = [2];
+_array - _sub // [[1],[2],[3];
+_array select {!(_x isEqualTo _sub)} // [[1],[3]];
+[[1],[2],[2],[2],[2],[3]] select {!(_x isEqualTo _sub)} // [[1],[3]];
+$/Code$
+%NextNote%
(June 22, 2015)
Usually when select tries to pick up element out of range, Arma throws "division by zero" error. However there are exceptions. Basically as long as index of element you are selecting is less then or equal to array size, you will get no error.
$Code$[] select 0; //ok, result is nil
@@ -48453,6 +49878,43 @@ Any
%NextListItem%
+KeywordStart:
+selectionNames
+//KeywordEnd//
+DescriptionStart:
+Returns the list of model selections
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/selectionNames
+//WikiPageEnd//
+SyntaxStart:
+selectionNames object;
+//SyntaxEnd//
+RawSyntaxStart:
+selectionNames object;
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_house= "Land_i_House_Small_02_V3_F" createVehicle _pos;
+selectionNames _house;
+//[
+//"door_1","door_2","damt_1","door_handle_1","door_handle_2","glass_1_hide",
+//"glass_2_hide","glass_3_hide","glass_1_unhide","glass_2_unhide","glass_3_unhide",
+//"glass_4_hide","glass_4_unhide"
+//]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(June 5, 2016)
+selectionNames returns an array of named selections from only the resolution LODs.
+//NoteEnd//
+ReturnValueStart:
+Array - List of selection names
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
selectionPosition
//KeywordEnd//
@@ -48520,7 +49982,7 @@ ExampleStart:
$Code$group player selectLeader player ;$/Code$
%NextExample%
$Code$// Make unit a leader from server:
-[ group _unit, _unit] remoteExec ["selectLeader", groupOwner _unit];$/Code$
+[ group _unit, _unit] remoteExec ["selectLeader", groupOwner group _unit];$/Code$
//ExampleEnd//
LocalityStart:
local / global
@@ -48537,7 +49999,7 @@ KeywordStart:
selectNoPlayer
//KeywordEnd//
DescriptionStart:
-Switch player to no unit.
+Switches player to no unit, makes player return objNull. SP only, the command is completely ignored in MP.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/selectNoPlayer
@@ -48566,7 +50028,7 @@ LocalityStart:
undefined / undefined
//LocalityEnd//
NoteStart:
--- Worldeater 09:48, 15 October 2010 (CEST)
+Player returns objNull after this command has been used. It also has at least the following side effects: closeDialog won't work anymore and onKeyDown event handlers cease to detect the ESC key. In order to get things back to normal a new player object has to be set with selectPlayer. Using objNull won't cut it in this case.
%NextNote%
(May 2, 2015)
SP only.
@@ -48736,7 +50198,7 @@ KeywordStart:
selectWeaponTurret
//KeywordEnd//
DescriptionStart:
-Selects the given weapon on specified turret. Use turret path [-1] for driver's turret.
+Selects the given weapon on specified turret. Use turret path [-1] for driver's turret. Since ver. 1.63.136864 this command supports both weapon name and muzzle name.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/selectWeaponTurret
@@ -48941,7 +50403,7 @@ https://community.bistudio.com/wiki/serverCommand
SyntaxStart:
serverCommand String
%NextSyntax%
-String serverCommand
+String serverCommand String
//SyntaxEnd//
RawSyntaxStart:
serverCommand command
@@ -49128,7 +50590,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/set
//WikiPageEnd//
SyntaxStart:
-Array set
+Array set Array
//SyntaxEnd//
RawSyntaxStart:
array set [index, value]
@@ -49374,6 +50836,34 @@ Bool - true if the value was set
%NextListItem%
+KeywordStart:
+set3DENModelsVisible
+//KeywordEnd//
+DescriptionStart:
+Enables or disables lines visibility in 3DEN
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/set3DENModelsVisible
+//WikiPageEnd//
+SyntaxStart:
+set3DENModelsVisible Array
+//SyntaxEnd//
+RawSyntaxStart:
+set3DENModelsVisible [map, scene]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
set3DENObjectType
//KeywordEnd//
@@ -49678,7 +51168,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setAttributes
//WikiPageEnd//
SyntaxStart:
-String setAttributes Array
+String/StructuredText setAttributes Array
//SyntaxEnd//
RawSyntaxStart:
text setAttributes [name1, value1, name2, value2,...]
@@ -49738,7 +51228,7 @@ Set group/unit behaviour mode. Behaviour is one of:
"AWARE"
"COMBAT"
"STEALTH".
-See this page for details of the effect of this command on AI units.
+See this page for details of the effect of this command on AI units. For Arma 3 see Arma_3_AI_Behavior
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/setBehaviour
@@ -49750,7 +51240,7 @@ RawSyntaxStart:
groupName setBehaviour behaviour
//RawSyntaxEnd//
ExampleStart:
-$Code$_group1 setBehaviour SAFE$/Code$
+$Code$_group1 setBehaviour "SAFE";$/Code$
//ExampleEnd//
LocalityStart:
local / global
@@ -50799,7 +52289,8 @@ KeywordStart:
setDropInterval
//KeywordEnd//
DescriptionStart:
-Set interval of emitting particles from particle source. In Arma 3 hardcoded limit of how many particles can exist at the same time is 18000.
+Set interval of emitting particles from particle source. In Arma 3 hardcoded limit of how many particles can exist at the same time is 18000. Correspondence between CfgCloudlets class param name and command param:
+$Code$particleSource setDropInterval interval;$/Code$
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/setDropInterval
@@ -50811,7 +52302,7 @@ RawSyntaxStart:
particleSource setDropInterval interval
//RawSyntaxEnd//
ExampleStart:
-$Code$_source setDropInterval 0.05$/Code$
+$Code$_source setDropInterval 0.05;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -50940,7 +52431,10 @@ RawSyntaxStart:
person setFace face
//RawSyntaxEnd//
ExampleStart:
-$Code$soldier1 setFace WhiteHead_02$/Code$
+$Code$soldier1 setFace "WhiteHead_02"$/Code$
+%NextExample%
+$Code$// Set persistent face for a unit in MP
+if ( isServer ) then {[_unit, "AsianHead_A3_02"] remoteExec ["setFace", 0, _unit]};$/Code$
//ExampleEnd//
LocalityStart:
global / local
@@ -51067,7 +52561,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setFlagOwner
//WikiPageEnd//
SyntaxStart:
-Object setFlagOwner
+Object setFlagOwner Object
//SyntaxEnd//
RawSyntaxStart:
flag setFlagOwner owner
@@ -51182,7 +52676,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setFog
//WikiPageEnd//
SyntaxStart:
-Number setFog
+Number setFog Number
%NextSyntax%
Number setFog Array
//SyntaxEnd//
@@ -51624,7 +53118,17 @@ KeywordStart:
setGroupId
//KeywordEnd//
DescriptionStart:
-Sets a group's identity, how it will be displayed in chat, for example. The identity setup consists of format keywords (marked with %) and param keywords taken from CfgWorlds config. Basically it is like format command but with some special group keywords. For Arma 3 possible values are:
+Sets a group's identity, how it will be displayed in chat, for example. While groups on the different sides can have identical ids, the groups on the same side cannot. When given id exists already, the group which currently has it will simply swap it with the current id of the group for which this id is intended. For example:
+$Code$group1 = createGroup west ;
+group2 = createGroup west ;
+group1 setGroupId ["Active Group"];
+group2 setGroupId ["Inactive Group"];
+systemChat groupId group1; //"Active Group";
+systemChat groupId group2; //"Inactive Group";
+group2 setGroupId ["Active Group"];
+systemChat groupId group1; //"Inactive Group";
+systemChat groupId group2; //"Active Group";$/Code$
+The identity setup could also consist of format keywords (marked with %) and param keywords taken from CfgWorlds config. Basically it is like format command but with some special group keywords. For Arma 3 possible values are:
%GroupSquad
"Squad1" - 1
"Squad2" - 2
@@ -51703,6 +53207,11 @@ group setGroupId [nameFormat, nameParam1,..., nameParamN]
//RawSyntaxEnd//
ExampleStart:
$Code$// Arma 3 :
+group player setGroupId ["Some name for the group"];
+hint groupId group player ; //"Some name for the group"
+player sideChat "lalala"; //Some name for the group (KK): "lalala"$/Code$
+%NextExample%
+$Code$// Arma 3 :
group player setGroupId ["%GroupNames :=: %GroupColors","Alpha","GroupColor2"];
hint groupId group player ; //"Alpha :=: Red"
player sideChat "lalala"; //Alpha :=: Red (KK): "lalala"$/Code$
@@ -51844,7 +53353,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setGusts
//WikiPageEnd//
SyntaxStart:
-Number setGusts
+Number setGusts Number
//SyntaxEnd//
RawSyntaxStart:
time setGusts value
@@ -52093,7 +53602,7 @@ RawSyntaxStart:
person setIdentity identity
//RawSyntaxEnd//
ExampleStart:
-$Code$_soldier1 setIdentity MyLittleSoldier ;$/Code$
+$Code$_soldier1 setIdentity "MyLittleSoldier";$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -52341,7 +53850,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setLeader
//WikiPageEnd//
SyntaxStart:
-TeamMember setLeader
+TeamMember setLeader TeamMember
//SyntaxEnd//
RawSyntaxStart:
team setLeader leader
@@ -52674,7 +54183,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setLightnings
//WikiPageEnd//
SyntaxStart:
-Number setLightnings
+Number setLightnings Number
//SyntaxEnd//
RawSyntaxStart:
time setLightnings value
@@ -52875,7 +54384,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setMarkerBrush
//WikiPageEnd//
SyntaxStart:
-String setMarkerBrush
+String setMarkerBrush String
//SyntaxEnd//
RawSyntaxStart:
markerName setMarkerBrush brush
@@ -52916,7 +54425,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setMarkerBrushLocal
//WikiPageEnd//
SyntaxStart:
-String setMarkerBrushLocal
+String setMarkerBrushLocal String
//SyntaxEnd//
RawSyntaxStart:
markerName setMarkerBrushLocal brush
@@ -52939,41 +54448,13 @@ KeywordStart:
setMarkerColor
//KeywordEnd//
DescriptionStart:
-Set marker color. Color is one of:
-"Default"
-"ColorBlack"
-"ColorGrey"
-"ColorRed"
-"ColorRedAlpha" (Arma 2 only)
-"ColorGreen"
-"ColorGreenAlpha" (Arma 2 only)
-"ColorBlue"
-"ColorYellow"
-"ColorOrange"
-"ColorWhite"
-"ColorPink"
-"ColorBrown"
-"ColorKhaki"
-"ColorWEST"
-"ColorEAST"
-"ColorGUER"
-"ColorCIV"
-"ColorUNKNOWN"
-"Color1_FD_F" (Light red)
-"Color2_FD_F" (Light khaki)
-"Color3_FD_F" (Light orange)
-"Color4_FD_F" (Light blue)
-Arma 3
-"ColorBLUFOR"
-"ColorCivilian"
-"ColorIndependent"
-"ColorOPFOR"
+Sets marker color. Marker color names and their corresponding RGBA values for Arma 3 could be found in here: CfgMarkerColors_Arma_3
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/setMarkerColor
//WikiPageEnd//
SyntaxStart:
-String setMarkerColor
+String setMarkerColor String
//SyntaxEnd//
RawSyntaxStart:
markerName setMarkerColor color
@@ -52996,41 +54477,13 @@ KeywordStart:
setMarkerColorLocal
//KeywordEnd//
DescriptionStart:
-Set marker color. Color is one of:
-"Default"
-"ColorBlack"
-"ColorGrey"
-"ColorRed"
-"ColorRedAlpha" (Arma 2 only)
-"ColorGreen"
-"ColorGreenAlpha" (Arma 2 only)
-"ColorBlue"
-"ColorYellow"
-"ColorOrange"
-"ColorWhite"
-"ColorPink"
-"ColorBrown"
-"ColorKhaki"
-"ColorWEST"
-"ColorEAST"
-"ColorGUER"
-"ColorCIV"
-"ColorUNKNOWN"
-"Color1_FD_F" (Light red)
-"Color2_FD_F" (Light khaki)
-"Color3_FD_F" (Light orange)
-"Color4_FD_F" (Light blue)
-Arma 3
-"ColorBLUFOR"
-"ColorCivilian"
-"ColorIndependent"
-"ColorOPFOR"
+Sets marker color for the given marker locally. Marker color names and their corresponding RGBA values for Arma 3 could be found in here: CfgMarkerColors_Arma_3
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/setMarkerColorLocal
//WikiPageEnd//
SyntaxStart:
-String setMarkerColorLocal
+String setMarkerColorLocal String
//SyntaxEnd//
RawSyntaxStart:
markerName setMarkerColorLocal color
@@ -53039,7 +54492,7 @@ ExampleStart:
$Code$"MarkerOne" setMarkerColorLocal "ColorBlack";$/Code$
//ExampleEnd//
LocalityStart:
-undefined / local
+global / local
//LocalityEnd//
NoteStart:
//NoteEnd//
@@ -53177,13 +54630,13 @@ setMarkerShape
//KeywordEnd//
DescriptionStart:
Selects the shape (type) of the marker.
-Shape can be "ICON", "RECTANGLE" or "ELLIPSE".
+Shape can be "ICON", "RECTANGLE", "ELLIPSE" or "POLYLINE".
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/setMarkerShape
//WikiPageEnd//
SyntaxStart:
-String setMarkerShape
+String setMarkerShape String
//SyntaxEnd//
RawSyntaxStart:
markerName setMarkerShape shape
@@ -53213,7 +54666,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setMarkerShapeLocal
//WikiPageEnd//
SyntaxStart:
-String setMarkerShapeLocal
+String setMarkerShapeLocal String
//SyntaxEnd//
RawSyntaxStart:
markerName setMarkerShapeLocal shape
@@ -53302,7 +54755,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setMarkerText
//WikiPageEnd//
SyntaxStart:
-String setMarkerText
+String setMarkerText String
//SyntaxEnd//
RawSyntaxStart:
markerName setMarkerText text
@@ -53333,7 +54786,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setMarkerTextLocal
//WikiPageEnd//
SyntaxStart:
-String setMarkerTextLocal
+String setMarkerTextLocal String
//SyntaxEnd//
RawSyntaxStart:
markerName setMarkerTextLocal text
@@ -53362,7 +54815,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setMarkerType
//WikiPageEnd//
SyntaxStart:
-String setMarkerType
+String setMarkerType String
//SyntaxEnd//
RawSyntaxStart:
markerName setMarkerType type
@@ -53391,7 +54844,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setMarkerTypeLocal
//WikiPageEnd//
SyntaxStart:
-String setMarkerTypeLocal
+String setMarkerTypeLocal String
//SyntaxEnd//
RawSyntaxStart:
markerName setMarkerTypeLocal type
@@ -54050,7 +55503,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setOvercast
//WikiPageEnd//
SyntaxStart:
-Number setOvercast
+Number setOvercast Number
//SyntaxEnd//
RawSyntaxStart:
time setOvercast overcast
@@ -54172,7 +55625,12 @@ KeywordStart:
setParticleCircle
//KeywordEnd//
DescriptionStart:
-Update particle source to create particles on circle with given radius. Velocity is transformed and added to total velocity.
+Updates particle source, creates particles in circle with given radius. Velocity is transformed and added to total velocity. Correspondence between CfgCloudlets class param names and command array of params:
+$Code$particleSource setParticleCircle
+[
+circleRadius,
+circleVelocity
+];$/Code$
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/setParticleCircle
@@ -54235,7 +55693,13 @@ setParticleFire
//KeywordEnd//
DescriptionStart:
Set fire parameters to particle effect.
-Note: You need to create emitter at first. Basic parameters of particle effect must be defined too. You can use script commands setParticleClass or setParticleParams to do so. See example.
+Note: You need to create emitter at first. Basic parameters of particle effect must be defined too. You can use script commands setParticleClass or setParticleParams to do so (see example). Correspondence between CfgCloudlets class param names and command array of params:
+$Code$particleSource setParticleFire
+[
+coreIntensity,
+coreDistance,
+damageTime
+];$/Code$
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/setParticleFire
@@ -54267,7 +55731,39 @@ setParticleParams
//KeywordEnd//
DescriptionStart:
Set parameters to particle source. Array is in format ParticleArray.
-Since Arma 3 version 1.11.114706 you can use this command to overwrite many values set by setParticleClass, particularity those defined in ParticleArray.
+Since Arma 3 version 1.11.114706 you can use this command to overwrite many values set by setParticleClass, particularity those defined in ParticleArray. Correspondence between CfgCloudlets class param names and command array of params:
+$Code$particleSource setParticleParams
+[
+[
+particleShape,
+particleFSNtieth,
+particleFSIndex,
+particleFSFrameCount,
+particleFSLoop
+],
+animationName,
+particleType,
+timerPeriod,
+lifeTime,
+position,
+moveVelocity,
+rotationVelocity,
+weight,
+volume,
+rubbing,
+size,
+color,
+animationSpeed,
+randomDirectionPeriod,
+randomDirectionIntensity,
+onTimerScript,
+beforeDestroyScript,
+this,
+angle,
+onSurface,
+bounceOnSurface,
+emissiveColor
+];$/Code$
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/setParticleParams
@@ -54296,7 +55792,20 @@ KeywordStart:
setParticleRandom
//KeywordEnd//
DescriptionStart:
-Set randomization of particle source parameters.
+Sets randomization of particle source parameters. Correspondence between CfgCloudlets class param names and command array of params:
+$Code$particleSource setParticleRandom
+[
+lifeTimeVar,
+positionVar,
+moveVelocityVar,
+rotationVelocityVar,
+sizeVar,
+colorVar,
+randomDirectionPeriodVar,
+randomDirectionIntensityVar,
+angleVar,
+bounceOnSurfaceVar
+];$/Code$
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/setParticleRandom
@@ -54774,7 +56283,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setRain
//WikiPageEnd//
SyntaxStart:
-Number setRain
+Number setRain Number
//SyntaxEnd//
RawSyntaxStart:
time setRain rain
@@ -54812,7 +56321,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setRainbow
//WikiPageEnd//
SyntaxStart:
-Number setRainbow
+Number setRainbow Number
//SyntaxEnd//
RawSyntaxStart:
time setRainbow value
@@ -55020,11 +56529,40 @@ Nothing
%NextListItem%
+KeywordStart:
+setSimpleTaskAlwaysVisible
+//KeywordEnd//
+DescriptionStart:
+Makes the given task allways visible or not.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setSimpleTaskAlwaysVisible
+//WikiPageEnd//
+SyntaxStart:
+Task setSimpleTaskAlwaysVisible Boolean
+//SyntaxEnd//
+RawSyntaxStart:
+taskID setSimpleTaskAlwaysVisible state
+//RawSyntaxEnd//
+ExampleStart:
+$Code$getWarka setSimpleTaskAlwaysVisible true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
setSimpleTaskCustomData
//KeywordEnd//
DescriptionStart:
-Set custom data for the task. Tooltip will be drawn in task list on the right side. Descriptin will be drawn in task description panel on the bottom.
+Set custom data for the task. Tooltip will be drawn in task list on the right side. Description will be drawn in task description panel on the bottom.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/setSimpleTaskCustomData
@@ -55151,6 +56689,7 @@ RawSyntaxStart:
task setSimpleTaskType taskType
//RawSyntaxEnd//
ExampleStart:
+$Code$(currentTask player) setSimpleTaskType "attack";$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -55271,16 +56810,16 @@ WikiPageStart:
https://community.bistudio.com/wiki/setSlingLoad
//WikiPageEnd//
SyntaxStart:
-Object setSlingLoad
+Object setSlingLoad Object
//SyntaxEnd//
RawSyntaxStart:
vehicle setSlingLoad cargo
//RawSyntaxEnd//
ExampleStart:
-$Code$heli1 setSlingLoad veh1;$/Code$
+$Code$_success = heli1 setSlingLoad veh1;$/Code$
%NextExample%
$Code$// To unload cargo:
-heli setSlingLoad objNull ;$/Code$
+_success = heli setSlingLoad objNull ;$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -55301,9 +56840,9 @@ setSoundEffect
//KeywordEnd//
DescriptionStart:
Defines the different sound effects.
-Sound / voice plays a 2D / 3D sound from CfgSounds.
-SoundEnv plays an enviromental sound from CfgEnvSounds.
-SoundDet (only for triggers) creates a dynamic sound object attached to a trigger defined in CfgSFX.
+Sound / voice plays a 2D / 3D sound from CfgSounds
+SoundEnv plays an enviromental sound from CfgEnvSounds
+SoundDet (only for triggers) creates a dynamic sound object attached to a trigger defined in CfgSFX
Use "$NONE$" to stop the sound (1st item). Also use $NONE$ to skip the sound (1st item), when there is none to be used (Example 3).
//DescriptionEnd//
WikiPageStart:
@@ -55312,7 +56851,7 @@ https://community.bistudio.com/wiki/setSoundEffect
SyntaxStart:
Object setSoundEffect Array
%NextSyntax%
-Array setSoundEffect
+Array setSoundEffect Array
//SyntaxEnd//
RawSyntaxStart:
trigger setSoundEffect [sound, voice, soundEnv, soundDet]
@@ -55601,6 +57140,9 @@ setStatValue
//KeywordEnd//
DescriptionStart:
Sets a value to a given stat.
+A list of possible StatNames can be found here: StatNames
+Its important to note that most Stats are restricted to scripts in certain paths.
+For example "ExpWarlockDown" is restricted to scripts in any subdirectory of "a3\Missions_F_Exp\Campaign\Missions\"
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/setStatValue
@@ -55609,9 +57151,10 @@ SyntaxStart:
setStatValue Array
//SyntaxEnd//
RawSyntaxStart:
-setStatValue [StatName, Value]
+setStatValue [name, value]
//RawSyntaxEnd//
ExampleStart:
+$Code$setStatValue ["ExpWarlockDown", 1]; //Unlocks the "Warlock Down" Steam achivement$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -55922,7 +57465,7 @@ https://community.bistudio.com/wiki/setTitleEffect
SyntaxStart:
Object setTitleEffect Array
%NextSyntax%
-Array setTitleEffect
+Array setTitleEffect Array
//SyntaxEnd//
RawSyntaxStart:
trigger setTitleEffect [type, effect, text]
@@ -56182,8 +57725,7 @@ KeywordStart:
setUnconscious
//KeywordEnd//
DescriptionStart:
-Set / reset the unconscious life state of the given unit (in MP works only for a local unit).
-In Arma 3 this command is disabled since "UNCONSCIOUS" lifeState doesn't exist in Arma 3
+Since Arma 3 v1.63.136889, this command sets unit into incapacitated state and lifeState command returns "INCAPACITATED". Animation played while incapacitated depends on the injuries received.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/setUnconscious
@@ -56242,6 +57784,37 @@ Nothing
%NextListItem%
+KeywordStart:
+setUnitLoadout
+//KeywordEnd//
+DescriptionStart:
+Creates a loadout from given inventory structure and applies it to a unit.
+This command is not final and might be changed in a near future.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setUnitLoadout
+//WikiPageEnd//
+SyntaxStart:
+Object setUnitLoadout Array
+//SyntaxEnd//
+RawSyntaxStart:
+unit setUnitLoadout [loadout, rearm]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_loadout = getUnitLoadout player_1 ;
+player_2 setUnitLoadout _loadout;//Copies loadout from player_1 and applies it to player_2$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
setUnitPos
//KeywordEnd//
@@ -56407,6 +57980,45 @@ Nothing
%NextListItem%
+KeywordStart:
+setUnitTrait
+//KeywordEnd//
+DescriptionStart:
+Enables or disables a trait or alters a trait of the given unit. Custom trait can only be a bool.
+Default traits are:
+audibleCoef (scalar)
+camouflageCoef (scalar)
+engineer (bool)
+explosiveSpecialist (bool)
+loadCoef (scalar)
+medic (bool)
+UAVHacker (bool)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setUnitTrait
+//WikiPageEnd//
+SyntaxStart:
+unit setUnitTrait Array
+//SyntaxEnd//
+RawSyntaxStart:
+unit setUnitTrait [skill_name, value, isCustom]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setUnitTrait ["Medic", true ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(April 27, 2016)
+The higher the value for the loadCoef the less stamina a unit has. Negative values will dramatically increase the stamina actually to a point where it extends the stamina bar.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
setUnloadInCombat
//KeywordEnd//
@@ -56440,7 +58052,8 @@ KeywordStart:
setUserActionText
//KeywordEnd//
DescriptionStart:
-Changes user added action menu item text.
+Changes user added action (see addAction ) menu item text.
+Since Arma 3 v1.61.136587 it is possible to set 2 more optional texts, one for background and one for foreground when action is displayed on the screen ( showWindow = true )
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/setUserActionText
@@ -56449,11 +58062,19 @@ SyntaxStart:
Object setUserActionText Array
//SyntaxEnd//
RawSyntaxStart:
-unit setUserActionText [index, text]
+object setUserActionText [actionIndex, textMenu, textWindowBackground, textWindowForeground]
//RawSyntaxEnd//
ExampleStart:
$Code$_id = player addAction ["Hello", ""];
player setUserActionText [_id, "Good Bye"];$/Code$
+%NextExample%
+$Code$_id = billboard addAction ["Some Action", {}];
+billboard setUserActionText [
+_id,
+"Some Action",
+t color='#ff0000' Background----------------- /t br/ Multiline br/ Multiline br/ Multiline br/...,
+t color='#00ff00' -----------------Foreground /t
+];$/Code$
//ExampleEnd//
LocalityStart:
global / local
@@ -56744,7 +58365,7 @@ KeywordStart:
setVectorUp
//KeywordEnd//
DescriptionStart:
-Set object's up vector. Direction vector will remain unchanged. Default object's vectorUp is [0,0,1].
+Set object's up vector. Direction of the object remain unchanged. Default object's vectorUp is [0,0,1].
In Multiplayer, setVectorUp must be executed on the machine where the object it applied to is local.
//DescriptionEnd//
WikiPageStart:
@@ -56767,10 +58388,10 @@ LocalityStart:
local / global
//LocalityEnd//
NoteStart:
+setVectorUp can only influence an object's bank. It can not influence pitch. Example:
player setVectorUp [0,1,0]
If the player is facing 0 degrees (north), then this will do NOTHING.
If the player is facing 90 degrees (east), then this will make him bank 90 degrees to his left.
--- General Barron 21:07, 3 March 2009 (CET)
%NextNote%
(March 22, 2007)
An in-depth discussion on the concept of vectors is available here.
@@ -56901,6 +58522,48 @@ Nothing
%NextListItem%
+KeywordStart:
+setVehicleCargo
+//KeywordEnd//
+DescriptionStart:
+Load cargo vehicle inside vehicle if possible, returns bool based on whether the vehicle was able to be loaded. Can also be used to unload a specific loaded vehicle or all loaded vehicles.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setVehicleCargo
+//WikiPageEnd//
+SyntaxStart:
+Object setVehicleCargo Object
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle setVehicleCargo cargo
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// Blackfish with no vehicle cargo loaded
+_success = blackfish setVehicleCargo offroad; //true$/Code$
+%NextExample%
+$Code$// Blackfish with full cargo already loaded
+_success = blackfish setVehicleCargo offroad; //false$/Code$
+%NextExample%
+$Code$// Unload specific loaded vehicle
+_success = objNull setVehicleCargo offroad;$/Code$
+%NextExample%
+$Code$// Unload all vehicles
+_success = blackfish setVehicleCargo objNull;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(July 4, 2016)
+From biforums :
+"objnull setVehicleCargo cargo vehicle - will unload specific loaded vehicle" and "transporting vehicle setVehicleCargo objnul - unload all vehicles"
+//NoteEnd//
+ReturnValueStart:
+Boolean - whether the vehicle was able to be loaded
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
setVehicleId
//KeywordEnd//
@@ -57305,7 +58968,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setWaves
//WikiPageEnd//
SyntaxStart:
-Number setWaves
+Number setWaves Number
//SyntaxEnd//
RawSyntaxStart:
time setWaves value
@@ -57465,6 +59128,35 @@ Nothing
%NextListItem%
+KeywordStart:
+setWaypointForceBehaviour
+//KeywordEnd//
+DescriptionStart:
+Forces the behavior of waypoint, disables AUTOCOMBAT.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWaypointForceBehaviour
+//WikiPageEnd//
+SyntaxStart:
+Waypoint setWaypointForceBehaviour Boolean
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint setWaypointForceBehaviour state
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[grp, 2] setWaypointForceBehaviour true;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
setWaypointFormation
//KeywordEnd//
@@ -57610,6 +59302,7 @@ RawSyntaxStart:
waypoint setWaypointName name
//RawSyntaxEnd//
ExampleStart:
+$Code$[_grp,2] setWaypointName "myName";$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -57632,7 +59325,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setWaypointPosition
//WikiPageEnd//
SyntaxStart:
-Array setWaypointPosition
+Array setWaypointPosition Array
//SyntaxEnd//
RawSyntaxStart:
waypoint setWaypointPosition [center, radius]
@@ -57729,7 +59422,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setWaypointStatements
//WikiPageEnd//
SyntaxStart:
-Array setWaypointStatements
+Array setWaypointStatements Array
//SyntaxEnd//
RawSyntaxStart:
waypoint setWaypointStatements [condition, statement]
@@ -57763,7 +59456,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setWaypointTimeout
//WikiPageEnd//
SyntaxStart:
-Array setWaypointTimeout
+Array setWaypointTimeout Array
//SyntaxEnd//
RawSyntaxStart:
waypoint setWaypointTimeout [min, mid, max]
@@ -57970,7 +59663,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setWindDir
//WikiPageEnd//
SyntaxStart:
-Number setWindDir
+Number setWindDir Number
//SyntaxEnd//
RawSyntaxStart:
time setWindDir value
@@ -58001,7 +59694,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setWindForce
//WikiPageEnd//
SyntaxStart:
-Number setWindForce
+Number setWindForce Number
//SyntaxEnd//
RawSyntaxStart:
time setWindForce wind
@@ -58030,7 +59723,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setWindStr
//WikiPageEnd//
SyntaxStart:
-Number setWindStr
+Number setWindStr Number
//SyntaxEnd//
RawSyntaxStart:
time setWindStr value
@@ -58058,7 +59751,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/setWPPos
//WikiPageEnd//
SyntaxStart:
-Array setWPPos
+Array setWPPos Array
//SyntaxEnd//
RawSyntaxStart:
waypoint setWPPos pos
@@ -58288,6 +59981,10 @@ HCCursorOnIconenemy
PlayerOwnRadio
CursorOnNeedFirstAID
CursorOnNeedHeal
+%NextNote%
+(July 23, 2016)
+You can combine the argument strings (see the above note) together to create OR conditions.
+Hence $Code$"HasRadioIsLeader"$/Code$ is true when the unit is a leader or has a radio.
//NoteEnd//
ReturnValueStart:
Nothing
@@ -58407,13 +60104,13 @@ showHUD Array
RawSyntaxStart:
showHUD enable
%NextRawSyntax%
-showHUD [hud, info, radar, compass, direction, menu, group, cursors]
+showHUD [hud, info, radar, compass, direction, menu, group, cursors, squadRadar]
//RawSyntaxEnd//
ExampleStart:
$Code$showHUD false ;$/Code$
%NextExample%
$Code$// Hide vehicle radar and compass:
-showHUD [ true, true, false, false, true, true, true, true ];$/Code$
+showHUD [ true, true, false, false, true, true, true, true, true ];$/Code$
%NextExample%
$Code$// Check if HUD visibility is hardcoded in mission config and showHUD command is overriden:
_disabledShowHUD = isArray ( missionConfigFile "showHUD");$/Code$
@@ -58686,7 +60383,7 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Array in format [hud, info, radar, compass, direction, menu, group, cursors]
+Array in format [hud, info, radar, compass, direction, menu, group, cursors, squadRadar]
//ReturnValueEnd//
%NextListItem%
@@ -58778,6 +60475,36 @@ Boolean
%NextListItem%
+KeywordStart:
+shownScoretable
+//KeywordEnd//
+DescriptionStart:
+Returns the state of the score table set with showScoretable command.
+Since Arma 3 v1.63.137869, the previous functionality of this command (score table visibility check) is moved to visibleScoretable command. Please update your scripts and sorry for any inconvinience.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/shownScoretable
+//WikiPageEnd//
+SyntaxStart:
+shownScoretable
+//SyntaxEnd//
+RawSyntaxStart:
+shownScoretable
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_state = shownScoretable ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - 0: Force hidden, 1: Force shown, -1: Default
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
shownUAVFeed
//KeywordEnd//
@@ -58924,11 +60651,40 @@ Nothing
%NextListItem%
+KeywordStart:
+showScoretable
+//KeywordEnd//
+DescriptionStart:
+Forces the score table to be shown, hidden or reset to default functionality. Forcing score table will make it show even in SP. When score table is forced opened it cannot be closed manually, when it is force closed, it cannot be opened manually.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showScoretable
+//WikiPageEnd//
+SyntaxStart:
+showScoretable Number
+//SyntaxEnd//
+RawSyntaxStart:
+showScoretable force
+//RawSyntaxEnd//
+ExampleStart:
+$Code$showScoretable 1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
showSubtitles
//KeywordEnd//
DescriptionStart:
-Enable / disable showing of subtitles. Return the previous state.
+Enables / disables showing of subtitles in a chat. Only scripted/engine chatter is affected, player manual chat is unaffected. Returns the previous state.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/showSubtitles
@@ -59074,6 +60830,35 @@ Nothing
%NextListItem%
+KeywordStart:
+showWaypoints
+//KeywordEnd//
+DescriptionStart:
+Shows/Hides task HUD markers and waypoints that will fade out in time. Dependable on difficulty settings.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showWaypoints
+//WikiPageEnd//
+SyntaxStart:
+showWaypoints Boolean
+//SyntaxEnd//
+RawSyntaxStart:
+showWaypoints enabled
+//RawSyntaxEnd//
+ExampleStart:
+$Code$showWaypoints true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
side
//KeywordEnd//
@@ -59171,8 +60956,7 @@ KeywordStart:
sideChat
//KeywordEnd//
DescriptionStart:
-Types text to the side radio channel. Must have assigned "itemRadio" to see or transmit the messages.
-Note: This function only types text to the list, it does not broadcast the message. If you want the message to show on all computers, you have to execute it on all of them.
+Types text to the side radio channel. Must have assigned "ItemRadio" to see or transmit the messages. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec )
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/sideChat
@@ -59185,12 +60969,12 @@ Array sideChat String
RawSyntaxStart:
unitName sideChat chatText
%NextRawSyntax%
-[side, string] sideChat chatText
+[side, identity] sideChat chatText
//RawSyntaxEnd//
ExampleStart:
$Code$_soldierOne sideChat "Show this text";$/Code$
%NextExample%
-$Code$PAPABEAR = [West,"HQ"]; PAPABEAR sideChat "Hi there";$/Code$
+$Code$[ west, "HQ"] sideChat "Hi there";$/Code$
%NextExample%
$Code$driver vehicle player sideChat "sideChat";
driver vehicle player globalChat "globalChat";
@@ -59338,19 +61122,28 @@ KeywordStart:
sideRadio
//KeywordEnd//
DescriptionStart:
-Send the message to the side radio channel. Message is defined in Description.ext file.
+Sends the audio message to the side radio channel. Must have assigned "ItemRadio" to send or receive the transmission. The message is defined in CfgRadio in the description.ext file or config radio protocol. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec ).
+Note: When transmitting unit gets killed, transmission will be interrupted, however when receiving unit gets killed, the transmission continues to play.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/sideRadio
//WikiPageEnd//
SyntaxStart:
Object sideRadio String
+%NextSyntax%
+Array sideRadio String
//SyntaxEnd//
RawSyntaxStart:
-unitName sideRadio chat
+unit sideRadio radioName
+%NextRawSyntax%
+[side, identity] sideRadio radioName
//RawSyntaxEnd//
ExampleStart:
-$Code$_soldierOne sideRadio messageOne$/Code$
+$Code$_soldierOne sideRadio "messageOne";$/Code$
+%NextExample%
+$Code$player sideRadio configName selectRandom ("true" configClasses ( configFile "CfgRadio"));$/Code$
+%NextExample%
+$Code$[ west, "Base"] sideRadio configName selectRandom ("true" configClasses ( configFile "CfgRadio"));$/Code$
//ExampleEnd//
LocalityStart:
global / local
@@ -60190,9 +61983,7 @@ hint str _scores; //[[200,"steve",11],[200,"dave",21],[123,"bob",15],[123,"bill"
%NextExample%
$Code$// Sort buildings by distance and return position of the most distant building:
_buildings = player nearObjects ["Land_Cargo_Patrol_V1_F", 500];
-{
-_buildings set [_forEachIndex, [_x distance player, _x]];
-} forEach _buildings;
+_buildings = _buildings apply { [_x distance player, _x] };
_buildings sort false ;
hint format [
"Most distant building is at %1, distance %2 m",
@@ -60407,7 +62198,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/splitString
//WikiPageEnd//
SyntaxStart:
-String splitString
+String splitString String
//SyntaxEnd//
RawSyntaxStart:
str splitString delimiters
@@ -60789,6 +62580,35 @@ Nothing
%NextListItem%
+KeywordStart:
+stopEngineRTD
+//KeywordEnd//
+DescriptionStart:
+Instant engines stop.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/stopEngineRTD
+//WikiPageEnd//
+SyntaxStart:
+stopEngineRTD heli
+//SyntaxEnd//
+RawSyntaxStart:
+stopEngineRTD heli
+//RawSyntaxEnd//
+ExampleStart:
+$Code$stopEngineRTD myHeli$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
stopped
//KeywordEnd//
@@ -61367,6 +63187,43 @@ Nothing
%NextListItem%
+KeywordStart:
+switchMove
+//KeywordEnd//
+DescriptionStart:
+When used on a person, the given move is started immediately (there is no transition). Use switchmove "" to switch back to the default movement if there is no transition back, otherwise the person may be stuck.
+List of moves in ArmA 2
+List of moves in Armed Assault
+List of moves in Operation Flashpoint: Resistance
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/switchMove
+//WikiPageEnd//
+SyntaxStart:
+Object switchMove String
+//SyntaxEnd//
+RawSyntaxStart:
+person switchmove movename
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_loon1 switchMove "FXStandDip"$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(March 25, 2007)
+In some cases the movement won't stay. I.e. AI hostages that put their hands behind their heads (_hostage switchMove "AmovPercMstpSsurWnonDnon") won't hold their hands up, unless you first use disableAI "autoTarget" on them. They mostly put their hands down because they 'noticed' unknown objects.
+%NextNote%
+(August 03, 2008)
+This command will not cause an AnimChanged or AnimDone event. However, playMove will.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
synchronizedObjects
//KeywordEnd//
@@ -61383,20 +63240,20 @@ RawSyntaxStart:
synchronizedObjects unit
//RawSyntaxEnd//
ExampleStart:
-$Code$_objects = synchronizedObjects _logic$/Code$
+$Code$_objects = synchronizedObjects _logic;$/Code$
//ExampleEnd//
LocalityStart:
local / undefined
//LocalityEnd//
NoteStart:
+This command only returns the LEADER of a vehicle that is synchronized. You have to use the "vehicle"
command to select the actual vehicle.
This command only returns the synchronized objects when used on intelligent objects such as units or
logic objects. All other objects returns an empty array.
In MP this command returns only values when the object is local. otherwise it returns an empty array.
%NextNote%
(February 26, 2015)
-When returning the synchronized objects, they are returned in order of their type:
-"Man","Logic","EmptyDetector"
+When returning the synchronized objects, they are returned in the order that they were placed on the map
//NoteEnd//
ReturnValueStart:
Array
@@ -61561,7 +63418,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/synchronizeWaypoint
//WikiPageEnd//
SyntaxStart:
-Array synchronizeWaypoint
+Array synchronizeWaypoint Array
//SyntaxEnd//
RawSyntaxStart:
waypoint synchronizeWaypoint [waypoint1, waypoint2,...]
@@ -61586,7 +63443,7 @@ KeywordStart:
systemChat
//KeywordEnd//
DescriptionStart:
-Types text to the system radio channel. This function only types text to the list, it does not broadcast the message. If you want the message to show on all computers, you have to execute it on all of them.
+Types text to the system radio channel. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec )
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/systemChat
@@ -61698,7 +63555,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/targetKnowledge
//WikiPageEnd//
SyntaxStart:
-Object targetKnowledge
+Object targetKnowledge Object
//SyntaxEnd//
RawSyntaxStart:
unit targetKnowledge target
@@ -61729,7 +63586,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/targetsAggregate
//WikiPageEnd//
SyntaxStart:
-Array targetsAggregate
+Array targetsAggregate Array
//SyntaxEnd//
RawSyntaxStart:
[speaker, side, unit, place, time] targetsAggregate candidates
@@ -61797,6 +63654,7 @@ RawSyntaxStart:
taskAlwaysVisible task
//RawSyntaxEnd//
ExampleStart:
+$Code$_isAlwaysVisible = taskAlwaysVisible (currentTask player);$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -61993,6 +63851,35 @@ Nothing
%NextListItem%
+KeywordStart:
+taskMarkerOffset
+//KeywordEnd//
+DescriptionStart:
+Returns model space position for the task marker
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/taskMarkerOffset
+//WikiPageEnd//
+SyntaxStart:
+taskMarkerOffset Object
+//SyntaxEnd//
+RawSyntaxStart:
+taskMarkerOffset unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_offset = taskMarkerOffset player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - x, y, z
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
taskNull
//KeywordEnd//
@@ -62136,6 +64023,7 @@ RawSyntaxStart:
taskType task
//RawSyntaxEnd//
ExampleStart:
+$Code$_type = taskType (currentTask player);$/Code$
//ExampleEnd//
LocalityStart:
undefined / undefined
@@ -64396,6 +66284,192 @@ Nothing
%NextListItem%
+KeywordStart:
+tvSetPictureColorDisabled
+//KeywordEnd//
+DescriptionStart:
+Sets the color of left picture of a tree item defined by path when item is disabled
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvSetPictureColorDisabled
+//WikiPageEnd//
+SyntaxStart:
+Control tvSetPictureColorDisabled Array
+//SyntaxEnd//
+RawSyntaxStart:
+control tvSetPictureColorDisabled [path, color]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control tvSetPictureColorDisabled [[0], [1,0,1,1]]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvSetPictureColorSelected
+//KeywordEnd//
+DescriptionStart:
+Sets the color of the left picture of a tree item defined by path when item is selected
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvSetPictureColorSelected
+//WikiPageEnd//
+SyntaxStart:
+Control tvSetPictureColorSelected Array
+//SyntaxEnd//
+RawSyntaxStart:
+control tvSetPictureColorSelected [path, color]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control tvSetPictureColorSelected [[0], [1,0,1,1]]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvSetPictureRight
+//KeywordEnd//
+DescriptionStart:
+Sets right picture on the tree view item defined by path
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvSetPictureRight
+//WikiPageEnd//
+SyntaxStart:
+tvSetPictureRight Array
+%NextSyntax%
+Control tvSetPictureRight Array
+//SyntaxEnd//
+RawSyntaxStart:
+tvSetPictureRight [idc, path, name]
+%NextRawSyntax%
+control tvSetPictureRight [path, name]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvSetPictureRight [101, [0], "picture"];$/Code$
+%NextExample%
+$Code$_ctrl tvSetPictureRight [[0], "picture"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvSetPictureRightColor
+//KeywordEnd//
+DescriptionStart:
+Sets color of the right picture on the tree view item defined by path
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvSetPictureRightColor
+//WikiPageEnd//
+SyntaxStart:
+tvSetPictureRightColor Array
+%NextSyntax%
+Control tvSetPictureRightColor Array
+//SyntaxEnd//
+RawSyntaxStart:
+tvSetPictureRightColor [idc, path, color]
+%NextRawSyntax%
+control tvSetPictureRightColor [path, color]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvSetPictureRightColor [101, [0], [1,0,1,1]];$/Code$
+%NextExample%
+$Code$_ctrl tvSetPictureRightColor [[0], [1,0,1,1]];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvSetPictureRightColorDisabled
+//KeywordEnd//
+DescriptionStart:
+Sets the color of the right picture of a tree item defined by path when item is disabled
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvSetPictureRightColorDisabled
+//WikiPageEnd//
+SyntaxStart:
+Control tvSetPictureRightColorDisabled Array
+//SyntaxEnd//
+RawSyntaxStart:
+control tvSetPictureRightColorDisabled [path, color]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control tvSetPictureRightColorDisabled [[0], [1,0,1,1]]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvSetPictureRightColorSelected
+//KeywordEnd//
+DescriptionStart:
+Sets the color of the right picture of a tree item defined by path when item is selected
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvSetPictureRightColorSelected
+//WikiPageEnd//
+SyntaxStart:
+Control tvSetPictureRightColorSelected Array
+//SyntaxEnd//
+RawSyntaxStart:
+control tvSetPictureRightColorSelected [path, color]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control tvSetPictureRightColorSelected [[0], [1,0,1,1]]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
tvSetText
//KeywordEnd//
@@ -64435,7 +66509,7 @@ KeywordStart:
tvSetTooltip
//KeywordEnd//
DescriptionStart:
-Sets the tooltip associated with the specified tree view path.
+Sets the tooltip text associated with the specified tree view path.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/tvSetTooltip
@@ -64456,7 +66530,7 @@ $Code$tvSetTooltip [101, [0,2], "This is a tooltip"];$/Code$
$Code$_tree tvSetTooltip [[0,2], "This is a tooltip"];$/Code$
//ExampleEnd//
LocalityStart:
-local / local
+undefined / undefined
//LocalityEnd//
NoteStart:
//NoteEnd//
@@ -64706,6 +66780,41 @@ String
%NextListItem%
+KeywordStart:
+tvTooltip
+//KeywordEnd//
+DescriptionStart:
+Gets the tooltip text associated with the specified tree view path.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvTooltip
+//WikiPageEnd//
+SyntaxStart:
+tvTooltip Array
+%NextSyntax%
+Control tvTooltip Array
+//SyntaxEnd//
+RawSyntaxStart:
+tvTooltip [idc, path]
+%NextRawSyntax%
+ctrl tvTooltip path
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_text = tvTooltip [101, [0,2]];$/Code$
+%NextExample%
+$Code$_text = _treeCtrl tvTooltip [0,2];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String - Tooltip text
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
tvValue
//KeywordEnd//
@@ -65334,6 +67443,64 @@ Array - addon names
%NextListItem%
+KeywordStart:
+unitAimPosition
+//KeywordEnd//
+DescriptionStart:
+Returns the position on the unit other units can aim at. Same as aimPos only returns position in PositionAGL format and has render scope alternative unitAimPositionVisual.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/unitAimPosition
+//WikiPageEnd//
+SyntaxStart:
+unitAimPosition Object
+//SyntaxEnd//
+RawSyntaxStart:
+unitAimPosition unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$unitAimPosition player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - position in format PositionAGL
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+unitAimPositionVisual
+//KeywordEnd//
+DescriptionStart:
+Returns the position on the unit other units can aim at in render scope. See also aimPos, unitAimPosition.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/unitAimPositionVisual
+//WikiPageEnd//
+SyntaxStart:
+unitAimPositionVisual Object
+//SyntaxEnd//
+RawSyntaxStart:
+unitAimPositionVisual unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$unitAimPositionVisual player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - position in format PositionAGL
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
unitBackpack
//KeywordEnd//
@@ -65369,6 +67536,35 @@ Object
%NextListItem%
+KeywordStart:
+unitIsUAV
+//KeywordEnd//
+DescriptionStart:
+Returns true if the unit type is UAV - coresponding to transport param "isUAV"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/unitIsUAV
+//WikiPageEnd//
+SyntaxStart:
+unitIsUAV Object
+//SyntaxEnd//
+RawSyntaxStart:
+unitIsUAV unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_isUAV = unitIsUAV veh;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Bool - true when UAV
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
unitPos
//KeywordEnd//
@@ -65731,6 +67927,35 @@ Nothing
%NextListItem%
+KeywordStart:
+useAISteeringComponent
+//KeywordEnd//
+DescriptionStart:
+Enable the new AI driving, used to test the old and new AI driving.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/useAISteeringComponent
+//WikiPageEnd//
+SyntaxStart:
+useAISteeringComponent Boolean
+//SyntaxEnd//
+RawSyntaxStart:
+useAISteeringComponent state
+//RawSyntaxEnd//
+ExampleStart:
+$Code$useAISteeringComponent true$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
useAudioTimeForMoves
//KeywordEnd//
@@ -65770,7 +67995,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/vectorAdd
//WikiPageEnd//
SyntaxStart:
-Array vectorAdd
+Array vectorAdd Array
//SyntaxEnd//
RawSyntaxStart:
vector1 vectorAdd vector2
@@ -65808,7 +68033,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/vectorCos
//WikiPageEnd//
SyntaxStart:
-Array vectorCos
+Array vectorCos Array
//SyntaxEnd//
RawSyntaxStart:
vector1 vectorCos vector2
@@ -65845,7 +68070,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/vectorCrossProduct
//WikiPageEnd//
SyntaxStart:
-Array vectorCrossProduct
+Array vectorCrossProduct Array
//SyntaxEnd//
RawSyntaxStart:
vector1 vectorCrossProduct vector2
@@ -65885,7 +68110,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/vectorDiff
//WikiPageEnd//
SyntaxStart:
-Array vectorDiff
+Array vectorDiff Array
//SyntaxEnd//
RawSyntaxStart:
vector1 vectorDiff vector2
@@ -65987,7 +68212,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/vectorDistance
//WikiPageEnd//
SyntaxStart:
-Array vectorDistance
+Array vectorDistance Array
//SyntaxEnd//
RawSyntaxStart:
vector1 vectorDistance vector2
@@ -66024,7 +68249,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/vectorDistanceSqr
//WikiPageEnd//
SyntaxStart:
-Array vectorDistanceSqr
+Array vectorDistanceSqr Array
//SyntaxEnd//
RawSyntaxStart:
vector1 vectorDistanceSqr vector2
@@ -66059,7 +68284,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/vectorDotProduct
//WikiPageEnd//
SyntaxStart:
-Array vectorDotProduct
+Array vectorDotProduct Array
//SyntaxEnd//
RawSyntaxStart:
vector1 vectorDotProduct vector2
@@ -66095,7 +68320,7 @@ WikiPageStart:
https://community.bistudio.com/wiki/vectorFromTo
//WikiPageEnd//
SyntaxStart:
-Array vectorFromTo
+Array vectorFromTo Array
//SyntaxEnd//
RawSyntaxStart:
vector1 vectorFromTo vector2
@@ -66292,7 +68517,7 @@ RawSyntaxStart:
vectorUp objectName
//RawSyntaxEnd//
ExampleStart:
-$Code$objVector = vectorUp myObject;;$/Code$
+$Code$objVector = vectorUp myObject;$/Code$
//ExampleEnd//
LocalityStart:
global / undefined
@@ -66369,14 +68594,43 @@ Object
%NextListItem%
+KeywordStart:
+vehicleCargoEnabled
+//KeywordEnd//
+DescriptionStart:
+Check if the vehicle has enabled transporting other vehicles or not.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vehicleCargoEnabled
+//WikiPageEnd//
+SyntaxStart:
+vehicleCargoEnabled Object
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleCargoEnabled vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// Blackfish (Vehicle Transport) with given variable name blackfish
+_canTransportVehicles = vehicleCargoEnabled blackfish; //returns true$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean - returns true if the vehicle has enabled transporting other vehicles, and false if the vehicle has not enabled transporting other vehicles
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
vehicleChat
//KeywordEnd//
DescriptionStart:
-Type text to vehicle radio channel.
-This function only types text to the list, it does not broadcast the message. If you want the message to show on all computers, you have to execute it on them.
-Object parameter must be a vehicle, not a player.
-If you are in a crew seat (i.e. driver, gunner or commander), then it will include that role in the chat name output (Eg: Driver (you_name): "Message").
+Types text to the vehicle radio channel. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec )
+Note: Object parameter must be a vehicle, not a player.
+Note: If you are in a crew seat (i.e. driver, gunner or commander), then it will include that role in the chat name output (Eg: Driver (you_name): "Message").
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/vehicleChat
@@ -66385,7 +68639,7 @@ SyntaxStart:
Object vehicleChat String
//SyntaxEnd//
RawSyntaxStart:
-vehicleName vehicleChat text
+vehicleName vehicleChat chatText
//RawSyntaxEnd//
ExampleStart:
$Code$vehicle player vehicleChat "Show this text";$/Code$
@@ -66413,7 +68667,8 @@ KeywordStart:
vehicleRadio
//KeywordEnd//
DescriptionStart:
-Send message to vehicle radio channel. Message is defined in description.ext.
+Sends the audio message to the vehicle radio channel. The message is defined in CfgRadio in the description.ext file or config radio protocol. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec ).
+Note: When transmitting unit gets killed, transmission will be interrupted, however when receiving unit gets killed, the transmission continues to play.
//DescriptionEnd//
WikiPageStart:
https://community.bistudio.com/wiki/vehicleRadio
@@ -66422,10 +68677,12 @@ SyntaxStart:
Object vehicleRadio String
//SyntaxEnd//
RawSyntaxStart:
-vehicleName vehicleRadio name
+unit vehicleRadio radioName
//RawSyntaxEnd//
ExampleStart:
-$Code$_vehicleOne vehicleRadio messageOne$/Code$
+$Code$_soldierOne vehicleRadio "messageOne";$/Code$
+%NextExample%
+$Code$player vehicleRadio configName selectRandom ("true" configClasses ( configFile "CfgRadio"));$/Code$
//ExampleEnd//
LocalityStart:
global / local
@@ -67342,6 +69599,35 @@ String
%NextListItem%
+KeywordStart:
+waypointForceBehaviour
+//KeywordEnd//
+DescriptionStart:
+Returns true if the waypoint behavior is forced.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointForceBehaviour
+//WikiPageEnd//
+SyntaxStart:
+waypointForceBehaviour waypoint;
+//SyntaxEnd//
+RawSyntaxStart:
+waypointForceBehaviour waypoint;
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_isForced = waypointForceBehaviour [groupOne, 1];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean - is forced
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
waypointFormation
//KeywordEnd//
@@ -67985,6 +70271,35 @@ Array - format Vector3D
%NextListItem%
+KeywordStart:
+weaponInertia
+//KeywordEnd//
+DescriptionStart:
+Returns current rate of how much the weapon view is distorted because of quick aiming
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/weaponInertia
+//WikiPageEnd//
+SyntaxStart:
+weaponInertia Object
+//SyntaxEnd//
+RawSyntaxStart:
+weaponInertia unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_inertia = weaponInertia player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
KeywordStart:
weaponLowered
//KeywordEnd//
@@ -68620,6 +70935,7 @@ with
//KeywordEnd//
DescriptionStart:
Executes given code inside given namespace.
+when used in scripts with allowed suspension canSuspend, unexpected namespace switch could happen (see note below)
NOTE for the reasons unknown, namespace switching might unexpectedly occur inside some scopes ( for, if, try, call ) started in scheduled scripts ( canSuspend true) after small suspension if with was not the main scope. For example:
$Code$[] spawn
{
@@ -68756,7 +71072,7 @@ SyntaxStart:
Object worldToModel Array
//SyntaxEnd//
RawSyntaxStart:
-object worldToModel position
+model worldToModel position
//RawSyntaxEnd//
ExampleStart:
$Code$_relPos = myObject worldToModel [0,0,0];$/Code$
@@ -68771,7 +71087,7 @@ undefined / undefined
NoteStart:
//NoteEnd//
ReturnValueStart:
-Array - PositionRelative
+Array - position relative to model, format PositionRelative
//ReturnValueEnd//
%NextListItem%
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/startup/SQDevStarter.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/startup/SQDevStarter.java
index 31c257ea..e55a04ad 100644
--- a/plugin/Raven.SQDev.Util/src/raven/sqdev/startup/SQDevStarter.java
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/startup/SQDevStarter.java
@@ -79,7 +79,8 @@ private void preferenceVersionChange(VersionChangeEvent event) {
}
private void miscVersionChanged(VersionChangeEvent event) {
- if (event.getNewVersion().compareTo(new Version(0, 2, 0)) > 0) {
+ if (event.getNewVersion().compareTo(new Version(0, 2, 0)) > 0
+ && event.getNewVersion().compareTo(new Version(0, 6, 0)) < 0) {
// update the keyword list on the hard drive as there is the new
// syntax attribute
ResourceManager manager = ResourceManager.getManager();
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/SQDevInfobox.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/SQDevInfobox.java
index a2989e4f..4da7a804 100644
--- a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/SQDevInfobox.java
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/SQDevInfobox.java
@@ -65,6 +65,35 @@ public SQDevInfobox(String message, Exception exception) {
: message + "\n\nReason: Unknown", SWT.ICON_ERROR);
}
+ /**
+ * Creates an instance of this Infobox. This constructor will automatically
+ * use the Yes/No-Option for the popup in order to allow the user to answer
+ * the given question.
+ *
+ * @param message
+ * The message exlpaining what went wrong. The message will be
+ * enhanced by a paragraph that states the reason (The message of
+ * the given exception)
+ * @param exception
+ * The exception whose message will be used for the explaination
+ * for what went wrong.
+ * @param question
+ * A question the user should answer with yes or no
+ */
+ public SQDevInfobox(String message, Exception exception, String question) {
+ this(((exception.getMessage() != null) ? message + "\n\nReason:\n" + exception.getMessage()
+ : message + "\n\nReason: Unknown") + "\n\n" + question,
+ SWT.ICON_ERROR | SWT.YES | SWT.NO);
+ }
+
+ /**
+ * Adds the given style to the popup
+ * @param style The style to add has to be one defined in {@linkplain SWT}
+ */
+ public void addStyle(int style) {
+ this.style = this.style | style;
+ }
+
/**
* Makes the dialog visible and brings it to the front of the display.
*
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/Util.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/Util.java
index aa814f6d..5590a020 100644
--- a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/Util.java
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/Util.java
@@ -187,7 +187,7 @@ public static boolean isMissionFolder(File file) {
* @return An array of terrain names
*/
public static String[] getTerrains() {
- return new String[] { "Altis", "Stratis", "VR" };
+ return new String[] { "Altis", "Stratis", "VR", "Tanoa" };
}
}
diff --git a/plugin/Raven.SQDev/feature.xml b/plugin/Raven.SQDev/feature.xml
index 2aca1fbc..31ddb3f7 100644
--- a/plugin/Raven.SQDev/feature.xml
+++ b/plugin/Raven.SQDev/feature.xml
@@ -2,7 +2,7 @@
@@ -24,7 +24,7 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-The distributed ANTLR components are published under the BSD licence. All copyrigths belong to the respective developers
+The distributed ANTLR and Abego components are published under the BSD licence. All copyrigths belong to the respective developers
ANTLR 4 License [The BSD License] Copyright (c) 2012 Terence Parr and Sam Harwell All rights reserved.
@@ -35,6 +35,35 @@ Redistributions in binary form must reproduce the above copyright notice, this l
Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+[The "BSD license"]
+Copyright (c) 2011, abego Software GmbH, Germany (http://www.abego.org)
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+3. Neither the name of the abego Software GmbH nor the names of its
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
@@ -54,14 +83,14 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS&
id="raven.sqdev.editors.sqfeditor"
download-size="0"
install-size="0"
- version="0.4.0"
+ version="0.5.0"
unpack="false"/>
diff --git a/plugin/RavenSQDev.Preferences/META-INF/MANIFEST.MF b/plugin/RavenSQDev.Preferences/META-INF/MANIFEST.MF
index 9ea1c660..67aaf22b 100644
--- a/plugin/RavenSQDev.Preferences/META-INF/MANIFEST.MF
+++ b/plugin/RavenSQDev.Preferences/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Preferences
Bundle-SymbolicName: raven.sqdev.preferences;singleton:=true
-Bundle-Version: 0.4.0
+Bundle-Version: 0.4.1
Bundle-Activator: raven.sqdev.preferences.activator.Activator
Bundle-Vendor: Raven
Require-Bundle: org.eclipse.ui,
diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$1.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$1.class
index 05f9737b..e3c2f629 100644
Binary files a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$1.class and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$1.class differ
diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$2.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$2.class
index 55db2c69..5a8282b9 100644
Binary files a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$2.class and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$2.class differ
diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$3$1.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$3$1.class
index 341709e8..d5d341d0 100644
Binary files a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$3$1.class and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$3$1.class differ
diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$3.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$3.class
index 1f702c75..6e731c85 100644
Binary files a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$3.class and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$3.class differ
diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage.class
index c05868b1..da98308c 100644
Binary files a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage.class and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage.class differ
diff --git a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevMiscPreferencePage.java b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevMiscPreferencePage.java
index de47d858..566fea8f 100644
--- a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevMiscPreferencePage.java
+++ b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevMiscPreferencePage.java
@@ -16,6 +16,7 @@
import org.eclipse.ui.PlatformUI;
import raven.sqdev.constants.SQDevPreferenceConstants;
+import raven.sqdev.exceptions.SQDevCollectionException;
import raven.sqdev.exceptions.SQDevException;
import raven.sqdev.infoCollection.SQFCommandCollector;
import raven.sqdev.infoCollection.base.KeywordList;
@@ -34,6 +35,10 @@ public class SQDevMiscPreferencePage extends SQDevPreferencePage {
* The button corresponding to the update function
*/
private Button updateButton;
+ /**
+ * The list storing previously processed commands
+ */
+ private KeywordList commandList;
public SQDevMiscPreferencePage() {
super();
@@ -105,9 +110,28 @@ public void mouseUp(MouseEvent e) {
}
/**
- * Schedules the keyword update Job
+ * Schedules the keyword update job
*/
private void updateKeywords() {
+ commandList = new KeywordList();
+
+ updateKeywords(SQDevPreferenceUtil.getFirstCommand(), SQDevPreferenceUtil.getLastCommand(),
+ false);
+ }
+
+ /**
+ * Schedules the keyword update Job
+ *
+ * @param firstCommand
+ * The command to start with
+ * @param lastCommand
+ * The command to stop at
+ * @param previous
+ * A list of already gathered commands
+ * @param skipFirst
+ * Indicating whether the first command should be skipped
+ */
+ private void updateKeywords(String firstCommand, String lastCommand, boolean skipFirst) {
collectionJob = new Job("Updating keywords") {
@Override
protected IStatus run(IProgressMonitor monitor) {
@@ -115,11 +139,21 @@ protected IStatus run(IProgressMonitor monitor) {
try {
// gather keywords from the wiki
- KeywordList list = new SQFCommandCollector(
+ SQFCommandCollector collector = new SQFCommandCollector(
new URL("https://community.bistudio.com/wiki/Category:"
+ "Scripting_Commands_Arma_3"),
- SQDevPreferenceUtil.getFirstCommand(),
- SQDevPreferenceUtil.getLastCommand()).collect(monitor);
+ firstCommand, lastCommand);
+
+ if (skipFirst) {
+ collector.skipFNext();
+ }
+
+ KeywordList list = collector.collect(monitor);
+
+ list.addKeywords(commandList.getKeywords()); // add
+ // previously
+ // gathered
+ // commands
if (monitor.isCanceled()) {
// ask whether to save the list
@@ -153,8 +187,36 @@ protected IStatus run(IProgressMonitor monitor) {
info.open();
} catch (IOException | SQDevException e) {
- SQDevInfobox info = new SQDevInfobox("Failed at updating keywords", e);
- info.open();
+ if (e instanceof SQDevCollectionException
+ && ((SQDevCollectionException) e).getFailedKeyword() != null) {
+ SQDevCollectionException ex = (SQDevCollectionException) e;
+
+ commandList.addKeywords(ex.getPreviouslyProcessedKeywords().getKeywords());
+
+ SQDevInfobox info = new SQDevInfobox(
+ "Failed at updating keywords at \""
+ + ex.getFailedKeyword().getKeyword() + "\"",
+ ex, "Do you want to retry this command?");
+ info.addStyle(SWT.CANCEL);
+
+ int result = info.open();
+ // TODO: store prev-Keywords in case of multiple
+ // interruptions
+ switch (result) {
+ case SWT.YES:
+ updateKeywords(ex.getFailedKeyword().getKeyword(),
+ SQDevPreferenceUtil.getLastCommand(), false);
+ break;
+
+ case SWT.NO:
+ updateKeywords(ex.getFailedKeyword().getKeyword(),
+ SQDevPreferenceUtil.getLastCommand(), true);
+ break;
+ }
+ } else {
+ SQDevInfobox info = new SQDevInfobox("Failed at updating keywords!", e);
+ info.open();
+ }
e.printStackTrace();
return Status.CANCEL_STATUS;
diff --git a/plugin/SQDev/SQDev_0.6.0.zip b/plugin/SQDev/SQDev_0.6.0.zip
new file mode 100644
index 00000000..0340332f
Binary files /dev/null and b/plugin/SQDev/SQDev_0.6.0.zip differ
diff --git a/plugin/SQDev/artifacts.jar b/plugin/SQDev/artifacts.jar
index d4cb480b..c84a6ce3 100644
Binary files a/plugin/SQDev/artifacts.jar and b/plugin/SQDev/artifacts.jar differ
diff --git a/plugin/SQDev/content.jar b/plugin/SQDev/content.jar
index 466fd2a0..0bd6919e 100644
Binary files a/plugin/SQDev/content.jar and b/plugin/SQDev/content.jar differ
diff --git a/plugin/SQDev/features/raven.sqdev_0.6.1.jar b/plugin/SQDev/features/raven.sqdev_0.6.1.jar
new file mode 100644
index 00000000..ad42c899
Binary files /dev/null and b/plugin/SQDev/features/raven.sqdev_0.6.1.jar differ
diff --git a/plugin/SQDev/plugins/raven.sqdev.editors.sqfeditor_0.5.0.jar b/plugin/SQDev/plugins/raven.sqdev.editors.sqfeditor_0.5.0.jar
new file mode 100644
index 00000000..bffada92
Binary files /dev/null and b/plugin/SQDev/plugins/raven.sqdev.editors.sqfeditor_0.5.0.jar differ
diff --git a/plugin/SQDev/plugins/raven.sqdev.editors_0.5.0.jar b/plugin/SQDev/plugins/raven.sqdev.editors_0.5.0.jar
new file mode 100644
index 00000000..8174330c
Binary files /dev/null and b/plugin/SQDev/plugins/raven.sqdev.editors_0.5.0.jar differ
diff --git a/plugin/SQDev/plugins/raven.sqdev.misc_0.3.1.jar b/plugin/SQDev/plugins/raven.sqdev.misc_0.3.1.jar
new file mode 100644
index 00000000..a408b6ef
Binary files /dev/null and b/plugin/SQDev/plugins/raven.sqdev.misc_0.3.1.jar differ
diff --git a/plugin/SQDev/plugins/raven.sqdev.preferences_0.4.1.jar b/plugin/SQDev/plugins/raven.sqdev.preferences_0.4.1.jar
new file mode 100644
index 00000000..741b66a0
Binary files /dev/null and b/plugin/SQDev/plugins/raven.sqdev.preferences_0.4.1.jar differ
diff --git a/plugin/SQDev/plugins/raven.sqdev.util_0.6.1.jar b/plugin/SQDev/plugins/raven.sqdev.util_0.6.1.jar
new file mode 100644
index 00000000..bf8d6f85
Binary files /dev/null and b/plugin/SQDev/plugins/raven.sqdev.util_0.6.1.jar differ
diff --git a/plugin/SQDev/plugins/raven.sqdev.wizards_0.3.0.jar b/plugin/SQDev/plugins/raven.sqdev.wizards_0.3.0.jar
index 5ba9cd0a..3721fe86 100644
Binary files a/plugin/SQDev/plugins/raven.sqdev.wizards_0.3.0.jar and b/plugin/SQDev/plugins/raven.sqdev.wizards_0.3.0.jar differ
diff --git a/plugin/SQDev/site.xml b/plugin/SQDev/site.xml
index 380b567f..e2f4882c 100644
--- a/plugin/SQDev/site.xml
+++ b/plugin/SQDev/site.xml
@@ -1,6 +1,6 @@
-
+