diff --git a/plugin/Raven.SQDev.Editors/.classpath b/plugin/Raven.SQDev.Editors/.classpath index eca7bdba..23636a05 100644 --- a/plugin/Raven.SQDev.Editors/.classpath +++ b/plugin/Raven.SQDev.Editors/.classpath @@ -3,5 +3,6 @@ + diff --git a/plugin/Raven.SQDev.Editors/ANTLR/antlr-runtime-4.5.3.jar b/plugin/Raven.SQDev.Editors/ANTLR/antlr-runtime-4.5.3.jar new file mode 100644 index 00000000..44353757 Binary files /dev/null and b/plugin/Raven.SQDev.Editors/ANTLR/antlr-runtime-4.5.3.jar differ diff --git a/plugin/Raven.SQDev.Editors/META-INF/MANIFEST.MF b/plugin/Raven.SQDev.Editors/META-INF/MANIFEST.MF index 54f34f47..97fa5961 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.3.1 +Bundle-Version: 0.4.0 Bundle-Activator: raven.sqdev.editors.activator.Activator Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, @@ -11,9 +11,41 @@ Require-Bundle: org.eclipse.ui, org.eclipse.swt, raven.sqdev.util;bundle-version="0.1.0", raven.sqdev.preferences, - raven.sqdev.misc;bundle-version="0.1.0" + raven.sqdev.misc;bundle-version="0.1.0", + org.eclipse.core.resources, + org.eclipse.ui.ide Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy -Export-Package: raven.sqdev.editors +Export-Package: org.antlr.v4.runtime; + uses:="org.antlr.v4.runtime.dfa, + org.antlr.v4.runtime.tree, + org.antlr.v4.runtime.misc, + org.antlr.v4.runtime.atn, + org.antlr.v4.runtime.tree.pattern", + org.antlr.v4.runtime.atn;uses:="org.antlr.v4.runtime,org.antlr.v4.runtime.dfa,org.antlr.v4.runtime.misc", + org.antlr.v4.runtime.dfa;uses:="org.antlr.v4.runtime,org.antlr.v4.runtime.atn", + org.antlr.v4.runtime.misc, + org.antlr.v4.runtime.tree;uses:="org.antlr.v4.runtime,org.antlr.v4.runtime.misc", + raven.sqdev.editors; + uses:="org.eclipse.ui.editors.text, + org.eclipse.swt.events, + org.eclipse.jface.text.source, + org.eclipse.swt.graphics, + raven.sqdev.misc, + org.eclipse.jface.text, + org.eclipse.swt.widgets, + org.eclipse.jface.viewers, + org.eclipse.jface.text.contentassist, + org.eclipse.core.runtime, + org.eclipse.ui.texteditor, + org.eclipse.jface.util, + raven.sqdev.infoCollection.base, + org.eclipse.jface.text.presentation, + org.eclipse.swt.custom, + org.antlr.v4.runtime.tree, + raven.sqdev.interfaces, + org.eclipse.jface.text.rules" 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/BasicCodeEditor$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCodeEditor$1.class new file mode 100644 index 00000000..4113f93c Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCodeEditor$1.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCodeEditor.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCodeEditor.class index a03be8b7..73d99b4c 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCodeEditor.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCodeEditor.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal$1.class index aeeb1092..e97c04b2 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal$1.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal$1.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal$2.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal$2.class index aede9c57..1805f551 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal$2.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal$2.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal.class index 30695b78..79c6cdd5 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicContentAssistProcessor.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicContentAssistProcessor.class index 334b4230..6569de43 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicContentAssistProcessor.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicContentAssistProcessor.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicDocumentProvider.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicDocumentProvider.class index acb2e212..2c71237c 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicDocumentProvider.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicDocumentProvider.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicErrorListener.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicErrorListener.class new file mode 100644 index 00000000..0fbbd535 Binary files /dev/null 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 new file mode 100644 index 00000000..218c1ab5 Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicFoldingManager.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$1.class index 6b68050d..7edb9721 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$1.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$1.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$2.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$2.class index b10f9015..634702c1 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$2.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$2.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$3.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$3.class index d2870081..4b90da8d 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$3.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$3.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$InfoComposite.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$InfoComposite.class index 37d18fea..6c6af6f8 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$InfoComposite.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$InfoComposite.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl.class index ff94c941..35b2ac99 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicKeywordProvider.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicKeywordProvider.class index 16f18334..286ce2b4 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicKeywordProvider.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicKeywordProvider.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicMarkerManager.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicMarkerManager.class new file mode 100644 index 00000000..d94bef15 Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicMarkerManager.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicParseTimeListener$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicParseTimeListener$1.class new file mode 100644 index 00000000..68e1c8ff Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicParseTimeListener$1.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicParseTimeListener.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicParseTimeListener.class new file mode 100644 index 00000000..8ca846f1 Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicParseTimeListener.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicPartitionScanner.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicPartitionScanner.class index cd10ce3e..918ebc38 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicPartitionScanner.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicPartitionScanner.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicSourceViewerConfiguration.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicSourceViewerConfiguration.class index b93bd9ce..0bdf3627 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicSourceViewerConfiguration.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicSourceViewerConfiguration.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicTextHover$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicTextHover$1.class index 6e15ed6b..0b6bafea 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicTextHover$1.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicTextHover$1.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicTextHover.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicTextHover.class index 6841dd80..ce8dd686 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicTextHover.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicTextHover.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/CharacterPairHandler.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/CharacterPairHandler.class index 1462d78d..3a87ee2a 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/CharacterPairHandler.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/CharacterPairHandler.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/KeywordScanner.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/KeywordScanner.class index a940acbc..604be157 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/KeywordScanner.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/KeywordScanner.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/MarkerInformation.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/MarkerInformation.class new file mode 100644 index 00000000..8784e993 Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/MarkerInformation.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/MultiKeywordScanner$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/MultiKeywordScanner$1.class new file mode 100644 index 00000000..1ac5f71a Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/MultiKeywordScanner$1.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/MultiKeywordScanner.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/MultiKeywordScanner.class new file mode 100644 index 00000000..a1c085ed Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/MultiKeywordScanner.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/NonRuleBasedDamagerRepairer.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/NonRuleBasedDamagerRepairer.class index 1d8b00e8..1f98ac3b 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/NonRuleBasedDamagerRepairer.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/NonRuleBasedDamagerRepairer.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/activator/Activator.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/activator/Activator.class index 13f350d0..637f1087 100644 Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/activator/Activator.class and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/activator/Activator.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 2ef078af..9f6e5c07 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$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/Language$1.class new file mode 100644 index 00000000..b1ae9acb Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/Language$1.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 new file mode 100644 index 00000000..7fc7c1ca Binary files /dev/null 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 new file mode 100644 index 00000000..7c6eeb1c Binary files /dev/null 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 new file mode 100644 index 00000000..42f2455e Binary files /dev/null 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 new file mode 100644 index 00000000..49ae09b9 Binary files /dev/null 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/StringTableCellLabelProvider.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellLabelProvider.class new file mode 100644 index 00000000..d9ec1d24 Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellLabelProvider.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableContainer.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableContainer.class new file mode 100644 index 00000000..e9901bba Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableContainer.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableContentProvider.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableContentProvider.class new file mode 100644 index 00000000..9ae39b6a Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableContentProvider.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 new file mode 100644 index 00000000..f458e05e Binary files /dev/null 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 new file mode 100644 index 00000000..fb0bce82 Binary files /dev/null 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 new file mode 100644 index 00000000..9b6f2c6b Binary files /dev/null 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 new file mode 100644 index 00000000..2cf34227 Binary files /dev/null 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 new file mode 100644 index 00000000..d1c51877 Binary files /dev/null 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 new file mode 100644 index 00000000..6914663c Binary files /dev/null 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 new file mode 100644 index 00000000..03b1147d Binary files /dev/null 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 new file mode 100644 index 00000000..2e9084c3 Binary files /dev/null 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 new file mode 100644 index 00000000..cf64d8d6 Binary files /dev/null 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 new file mode 100644 index 00000000..106a0af6 Binary files /dev/null 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 new file mode 100644 index 00000000..5ed03b86 Binary files /dev/null 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 new file mode 100644 index 00000000..818c1cde Binary files /dev/null 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 new file mode 100644 index 00000000..2d3bbb7e Binary files /dev/null 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 new file mode 100644 index 00000000..99954aca Binary files /dev/null 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 new file mode 100644 index 00000000..a0de86a9 Binary files /dev/null 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 new file mode 100644 index 00000000..514f7e7a Binary files /dev/null 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 new file mode 100644 index 00000000..5aa3fbfe Binary files /dev/null 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 new file mode 100644 index 00000000..79ff4f7e Binary files /dev/null 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 new file mode 100644 index 00000000..a7b305de Binary files /dev/null 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 new file mode 100644 index 00000000..b39209f5 Binary files /dev/null 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 new file mode 100644 index 00000000..20e94c59 Binary files /dev/null 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 new file mode 100644 index 00000000..e25f554c Binary files /dev/null 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 new file mode 100644 index 00000000..a7a97f08 Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableKey.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableKey.class new file mode 100644 index 00000000..82b915e4 Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableKey.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTablePackage.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTablePackage.class new file mode 100644 index 00000000..c21b1635 Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTablePackage.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableSourceViewerConfiguration.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableSourceViewerConfiguration.class new file mode 100644 index 00000000..853ef9f2 Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableSourceViewerConfiguration.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableXMLEditor.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableXMLEditor.class new file mode 100644 index 00000000..7d48dd5a Binary files /dev/null and b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableXMLEditor.class differ diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTable.tokens b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTable.tokens new file mode 100644 index 00000000..3002f98e --- /dev/null +++ b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTable.tokens @@ -0,0 +1,19 @@ +PROJECT=6 +EQUALS=5 +CLOSE=4 +ANY=15 +PKG=8 +OPEN=3 +NAME=7 +OPEN_CLOSE=2 +CONTAINER=9 +STRING=12 +IDENTIFIER=11 +ID=13 +WS=14 +INFO_TAG=1 +KEY=10 +'>'=4 +'='=5 +'<'=3 +''=4 +'='=5 +'<'=3 +' + id="Raven.SQDev.Editors.BasicCodeEditor" + name="BasicCodeEditor"> + + diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicCodeEditor.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicCodeEditor.java index ec7043d3..f1257cd5 100644 --- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicCodeEditor.java +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicCodeEditor.java @@ -1,23 +1,41 @@ package raven.sqdev.editors; +import java.util.AbstractMap; +import java.util.ArrayList; +import java.util.List; + +import org.antlr.v4.runtime.tree.ParseTree; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IDocumentExtension3; import org.eclipse.jface.text.ITextViewerExtension; +import org.eclipse.jface.text.Position; import org.eclipse.jface.text.source.DefaultCharacterPairMatcher; import org.eclipse.jface.text.source.ICharacterPairMatcher; import org.eclipse.jface.text.source.ISourceViewer; import org.eclipse.jface.text.source.ISourceViewerExtension2; import org.eclipse.jface.text.source.IVerticalRuler; +import org.eclipse.jface.text.source.projection.ProjectionAnnotation; +import org.eclipse.jface.text.source.projection.ProjectionSupport; +import org.eclipse.jface.text.source.projection.ProjectionViewer; import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.IFileEditorInput; +import org.eclipse.ui.PlatformUI; import org.eclipse.ui.editors.text.TextEditor; import org.eclipse.ui.texteditor.SourceViewerDecorationSupport; import raven.sqdev.constants.SQDevPreferenceConstants; +import raven.sqdev.exceptions.SQDevEditorException; +import raven.sqdev.interfaces.IManager; import raven.sqdev.misc.CharacterPair; +import raven.sqdev.misc.MultiPreferenceStore; import raven.sqdev.util.SQDevPreferenceUtil; -/** +/*** * A default implementation of a code editor. This contains the autoCompletion - * for some baisc CharacterPairs. If you want to change those you + * for some basic CharacterPairs. If you want to change those you * have to override addCharacterPairHandler().
* Also this editor provides an EditorKeyEventQueue that can be * used.
@@ -26,12 +44,12 @@ * raven.sqdev.preferences. * * @author Raven - * + * * @see {@linkplain CharacterPairHandler} * @see {@linkplain CharacterPair} * @see {@linkplain EditorKeyEventQueue} * @see {@linkplain EditorKeyEventManager} - * + * */ public class BasicCodeEditor extends TextEditor { @@ -50,10 +68,27 @@ public class BasicCodeEditor extends TextEditor { */ protected BasicSourceViewerConfiguration configuration; + /** + * The parse tree representing the input of this editor + */ + protected ParseTree parseTree; + /** + * The name sof the rules used for parsing this editor's input + */ + protected List parseRuleNames; + /** * The document provider of this editor */ protected BasicDocumentProvider provider; + /** + * A list of IManager working on this editor + */ + protected List managerList; + /** + * A list of character pairs that shoud be used in this editor + */ + protected List characterPairs; public BasicCodeEditor() { super(); @@ -61,11 +96,14 @@ public BasicCodeEditor() { setColorManager(new ColorManager()); setEditorKeyEventQueue(new EditorKeyEventQueue()); - // add a implementation for the autoCompletion of pairing characters - addCharacterPairHandler(); - this.setSourceViewerConfiguration(getBasicConfiguration()); this.setDocumentProvider(getBasicProvider()); + + managerList = new ArrayList(); + characterPairs = getCharacterPairs(); + + // add a implementation for the autoCompletion of pairing characters + configureCharacterPairHandler(); } @Override @@ -84,7 +122,10 @@ public void setColorManager(ColorManager colorManager) { @Override public ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) { - ISourceViewer viewer = super.createSourceViewer(parent, ruler, styles); + ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), + isOverviewRulerVisible(), styles); + + getSourceViewerDecorationSupport(viewer); if (viewer instanceof ITextViewerExtension) { EditorKeyEventManager manager = new EditorKeyEventManager(); @@ -94,11 +135,16 @@ public ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, getEditorKeyEventQueue().setManager(manager); ((ITextViewerExtension) viewer).appendVerifyKeyListener(manager); + + // add listener that parses the input during typing + ((ITextViewerExtension) viewer) + .appendVerifyKeyListener(new BasicParseTimeListener(this)); } return viewer; } + @Override protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) { super.configureSourceViewerDecorationSupport(support); @@ -106,18 +152,18 @@ protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupp // to match ICharacterPairMatcher matcher = new DefaultCharacterPairMatcher(matchChars, IDocumentExtension3.DEFAULT_PARTITIONING, true); - + // character pair matching support.setCharacterPairMatcher(matcher); support.setMatchingCharacterPainterPreferenceKeys( SQDevPreferenceConstants.SQDEV_EDITOR_MATCHING_BRACKETS_KEY, SQDevPreferenceConstants.SQDEV_EDITOR_MATCHING_BRACKETS_COLOR_KEY); - + // newLine highlighting support.setCursorLinePainterPreferenceKeys( SQDevPreferenceConstants.SQDEV_EDITOR_HIGHLIGHT_CURRENTLINE_KEY, SQDevPreferenceConstants.SQDEV_EDITOR_HIGHLIGHT_CURRENTLINE_COLOR_KEY); - + } /** @@ -134,55 +180,117 @@ public void setEditorKeyEventQueue(EditorKeyEventQueue editorKeyEventQueue) { } /** - * Adds a default implementation of CharacterPairHandler - * including all pairs defined in CharacterPair
- *
- * If you want a different CharacterPairHandler override this - * method and provide your own CharacterPairHandler and add it to the - * EditorKeyEventQueue of BasicTextEditor + * Adds the configured CharacterPairs as a + * CharacterPairHandler to this editor.
+ * If you want to change the pairs you have to override + * {@link #getCharacterPairs()} * * @see CharacterPairHandler * @see CharacterPair */ - public void addCharacterPairHandler() { + protected void configureCharacterPairHandler() { CharacterPairHandler pairHandler = new CharacterPairHandler(this); - // TODO: make all completions optional via preference - pairHandler.addPair(CharacterPair.DOUBLE_QUOTATION_MARKS); - pairHandler.addPair(CharacterPair.SINGLE_QUOTATION_MARKS); - pairHandler.addPair(CharacterPair.ROUND_BRACKETS); - pairHandler.addPair(CharacterPair.SQUARE_BRACKETS); - pairHandler.addPair(CharacterPair.CURLY_BRACKETS); + for (CharacterPair currentPair : getConfiguredCharacterPairs()) { + pairHandler.addPair(currentPair); + } getEditorKeyEventQueue().queueEditorKeyHandler(pairHandler); } + /** + * Gets the CharacterPairs that should be used by this editor + * + * @return A List of CharacterPairs + */ + protected List getCharacterPairs() { + List pairList = new ArrayList(); + + pairList.add(CharacterPair.DOUBLE_QUOTATION_MARKS); + pairList.add(CharacterPair.SINGLE_QUOTATION_MARKS); + pairList.add(CharacterPair.ROUND_BRACKETS); + pairList.add(CharacterPair.SQUARE_BRACKETS); + pairList.add(CharacterPair.CURLY_BRACKETS); + + return pairList; + } + + /** + * Gets a list of all configured character pairs from this editor + */ + public List getConfiguredCharacterPairs() { + if (characterPairs == null) { + characterPairs = new ArrayList(0); + } + + return characterPairs; + } + @Override public void createPartControl(Composite parent) { super.createPartControl(parent); + // infrastructure for code folding + ProjectionViewer viewer = (ProjectionViewer) getSourceViewer(); + + ProjectionSupport projectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), + getSharedColors()); + + projectionSupport.install(); + + // turn projection mode on + viewer.doOperation(ProjectionViewer.TOGGLE); + + if (fSourceViewerDecorationSupport != null) { - // set the plugin's shared preference store instead of the default - // one - fSourceViewerDecorationSupport.install(SQDevPreferenceUtil.getPreferenceStore()); + // combine the SQDev PreferenceStore with the editor's one + + // use the SQDev preferenceStore as the baseStore + MultiPreferenceStore multiStore = new MultiPreferenceStore( + SQDevPreferenceUtil.getPreferenceStore()); + + // add the editor's preferenceStore if available + IPreferenceStore editorStore = this.getPreferenceStore(); + if (editorStore != null) { + multiStore.addPreferenceStore(editorStore); + } + + fSourceViewerDecorationSupport.install(multiStore); } + + createManagers(managerList); + + // parse the input for the first time + parseInput(); } /** * Updates the editor. Needed when some changes are made to the way the * editor content should be displayed or when the behaviour of the editor - * should change + * should change.
+ *
+ * Note: This method can be called from any Thread + * + * @param reconfigureSourceViewer + * Whether it is necessary to reconfigure the sourceVieweer */ - public void update() { - if (getSourceViewer() != null) { - getSourceViewer().invalidateTextPresentation(); + public void update(boolean reconfigureSourceViewer) { + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { - if (getSourceViewer() instanceof ISourceViewerExtension2) { - // reconfigure the SourceViewer - ((ISourceViewerExtension2) getSourceViewer()).unconfigure(); - getSourceViewer().configure(getBasicConfiguration()); + @Override + public void run() { + if (getSourceViewer() != null) { + getSourceViewer().invalidateTextPresentation(); + + if ((getSourceViewer() instanceof ISourceViewerExtension2) + && reconfigureSourceViewer) { + // reconfigure the SourceViewer + ((ISourceViewerExtension2) getSourceViewer()).unconfigure(); + getSourceViewer().configure(getBasicConfiguration()); + } + } } - } + }); } /** @@ -190,7 +298,7 @@ public void update() { * * @see {@linkplain BasicSourceViewerConfiguration} */ - protected BasicSourceViewerConfiguration getBasicConfiguration() { + public BasicSourceViewerConfiguration getBasicConfiguration() { if (configuration == null) { configuration = new BasicSourceViewerConfiguration(getColorManager(), this); } @@ -203,11 +311,217 @@ protected BasicSourceViewerConfiguration getBasicConfiguration() { * * @see {@linkplain BasicDocumentProvider} */ - protected BasicDocumentProvider getBasicProvider() { + public BasicDocumentProvider getBasicProvider() { if (provider == null) { provider = new BasicDocumentProvider(); } return provider; } + + /** + * Gets the ParseTree representing the input of this editor + * + * @return The ParseTree or null if none has been + * set so far + */ + public ParseTree getParseTree() { + return parseTree; + } + + /** + * Gets the names of the rules used for parsing this editor's input + * + * @return The default implementation returns null + */ + public List getParseRuleNames() { + return parseRuleNames; + } + + /** + * Parses the input of this editor, updates the parseTree and sends it to + * the {@link #processParseTree(ParseTree)} method automatically + * + * @return True if the parsing could be done successfully and + * False otherwise + */ + public boolean parseInput() { + if (getEditorInput() == null) { + return false; + } + + IDocument document = getBasicProvider().getDocument(getEditorInput()); + + if (document == null) { + return false; + } + + String input = document.get(); + + if (input == null) { + return false; + } + + ParseTree output = doParse(input); + + if (output == null) { + return false; + } else { + parseTree = output; + + processParseTree(parseTree); + + return true; + } + } + + /** + * Processes whatever needs to be processed when the ParseTree has changed + *
+ * Note: You might want to call {@link #applyParseChanges()} after the + * processing + * + * @param tree + * The generated tree + */ + protected void processParseTree(ParseTree parseTree) { + } + + /** + * Parses the input of this editor in order to set the {@link #parseTree} + * for this editor.
+ * It is recommended to do the parsing in an extra thread
+ * Note: You might want to call {@link #applyParseChanges()} after parsing + * (or rather after {@link #processParseTree(ParseTree)} + * + * @param input + * The input to parse + * + * @return The resulting ParseTree or null if the + * parsing failed (if not overridden by subclasses this method + * always returns null + */ + protected ParseTree doParse(String input) { + // parsing diabled + return null; + } + + /** + * Creates all managers that should work on this editor + * + * @param managerList + * The list of managers. The newly created ones have to be added + * to this list + */ + protected void createManagers(List managerList) { + // add folding manager + managerList.add(new BasicFoldingManager( + ((ProjectionViewer) getSourceViewer()).getProjectionAnnotationModel())); + managerList.add(new BasicMarkerManager(this)); + } + + /** + * Creates a problem marker that will be visible in the editor.
+ * Note: Can only be called if {@link #getEditorInput()} does not return + * null and is of type {@linkplain IFileEditorInput} + * + * @param type + * The marker type + * @param offset + * The offset of this marker area + * @param length + * The length of the marker area + * @param message + * The message of this marker + * @param severity + * The severity of the marker (has to be one specified by + * IMarker) + */ + public void createMarker(String type, int offset, int length, String message, int severity) { + if (getEditorInput() == null) { + return; + } + + int line; + try { + line = getBasicProvider().getDocument(getEditorInput()).getLineOfOffset(offset); + } catch (BadLocationException e) { + try { + throw new SQDevEditorException("Can't create marker", e); + } catch (SQDevEditorException e1) { + e1.printStackTrace(); + + return; + } + } + + ((BasicMarkerManager) getManager(BasicMarkerManager.TYPE)).addMarker(type, line, offset, + length, severity, message); + } + + @Override + public void doSave(IProgressMonitor progressMonitor) { + super.doSave(progressMonitor); + + // reparse on save + parseInput(); + } + + /** + * Applies the changes detected by the parsing by notifying the respective + * managers to apply their work + */ + public void applyParseChanges() { + for (IManager manager : managerList) { + manager.apply(); + } + } + + /** + * Gets a manager working on this editor of the given type + * + * @param type + * The type of the editor + * @return The respective editor or null if none could be found + */ + public IManager getManager(String type) { + for (IManager manager : managerList) { + if (manager.getType().equals(type)) { + return manager; + } + } + + return null; + } + + /** + * Adds a foldable area to the editor if a {@link BasicFoldingManager} has + * been installed.
+ * In order of the changes to take effect {@link #applyParseChanges()} has + * to be called + * + * @param position + * The Position this area should be on + */ + public void addFoldingArea(Position position) { + ProjectionAnnotation annotation = new ProjectionAnnotation(); + + BasicFoldingManager foldingManager = (BasicFoldingManager) getManager( + BasicFoldingManager.getManagerType()); + + if (foldingManager == null) { + return; + } + + foldingManager.addFoldingArea( + new AbstractMap.SimpleEntry(annotation, position)); + } + + /** + * Checks whether this editor is in a valid state (no errors in the source + * code) + */ + public boolean isValid() { + return ((BasicMarkerManager) getManager(BasicMarkerManager.TYPE)).isValidState(); + } } diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicCompletionProposal.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicCompletionProposal.java index 1855a723..108438bb 100644 --- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicCompletionProposal.java +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicCompletionProposal.java @@ -134,6 +134,7 @@ public BasicCompletionProposal(String replacementString, int replacementOffset, /* * @see ICompletionProposal#apply(IDocument) */ + @Override public void apply(IDocument document) { try { document.replace(replacementOffset, replacementLength, replacementString); @@ -145,6 +146,7 @@ public void apply(IDocument document) { /* * @see ICompletionProposal#getSelection(IDocument) */ + @Override public Point getSelection(IDocument document) { return new Point(replacementOffset + cursorPosition, 0); } @@ -152,6 +154,7 @@ public Point getSelection(IDocument document) { /* * @see ICompletionProposal#getContextInformation() */ + @Override public IContextInformation getContextInformation() { return contextInformation; } @@ -159,6 +162,7 @@ public IContextInformation getContextInformation() { /* * @see ICompletionProposal#getImage() */ + @Override public Image getImage() { return image; } @@ -166,6 +170,7 @@ public Image getImage() { /* * @see ICompletionProposal#getDisplayString() */ + @Override public String getDisplayString() { if (displayString != null) return displayString; @@ -175,6 +180,7 @@ public String getDisplayString() { @Override public IInformationControlCreator getInformationControlCreator() { return new IInformationControlCreator() { + @Override public IInformationControl createInformationControl(Shell parent) { return new BasicInformationControl(parent); } diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicContentAssistProcessor.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicContentAssistProcessor.java index 02df7042..c083ba77 100644 --- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicContentAssistProcessor.java +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicContentAssistProcessor.java @@ -19,7 +19,7 @@ * content assist for them * * @author Raven - * + * */ public class BasicContentAssistProcessor implements IContentAssistProcessor { /** @@ -38,11 +38,9 @@ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int List keywords; // get the respective list of keywords if (prefix.isEmpty()) { - keywords = editor.getBasicConfiguration().getKeywordScanner().getKeywordProvider() - .getKeywordList().getKeywords(); + keywords = editor.getBasicConfiguration().getAllConfiguredKeywords(); } else { - keywords = editor.getBasicConfiguration().getKeywordScanner().getKeywordProvider() - .getKeywordList().getListFor(prefix.charAt(0)); + keywords = editor.getBasicConfiguration().getConfiguredKeywordsFor(prefix.charAt(0)); } ArrayList proposals = new ArrayList(); diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicDocumentProvider.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicDocumentProvider.java index 72f4a4ed..ea94f07c 100644 --- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicDocumentProvider.java +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicDocumentProvider.java @@ -1,18 +1,37 @@ package raven.sqdev.editors; +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CodingErrorAction; +import java.nio.charset.IllegalCharsetNameException; +import java.nio.charset.UnsupportedCharsetException; + +import org.eclipse.core.filebuffers.manipulation.ContainerCreator; +import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IDocumentPartitioner; import org.eclipse.jface.text.rules.FastPartitioner; +import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.editors.text.FileDocumentProvider; +import org.eclipse.ui.texteditor.ResourceMarkerAnnotationModel; + +import raven.sqdev.exceptions.SQDevCoreException; /** * A basic document provider using the BasicPartitionScanner * * @author Raven - * + * * @see {@linkplain BasicPartitionScanner} - * + * */ public class BasicDocumentProvider extends FileDocumentProvider { @@ -26,14 +45,15 @@ public class BasicDocumentProvider extends FileDocumentProvider { */ protected IDocumentPartitioner partitioner; + @Override protected IDocument createDocument(Object element) throws CoreException { IDocument document = super.createDocument(element); if (document != null) { IDocumentPartitioner partitioner = new FastPartitioner(getPartitionScanner(), getPartitionScanner().getConfiguredContentTypes()); - - + + partitioner.connect(document); document.setDocumentPartitioner(partitioner); @@ -58,7 +78,95 @@ public BasicPartitionScanner getPartitionScanner() { * Gets the partitioner this documentProvider uses */ public IDocumentPartitioner getPartitioner() { + this.setEncoding(null, null); return partitioner; } + @Override + protected void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, + boolean overwrite) throws CoreException { + if (element instanceof IFileEditorInput) { + + IFileEditorInput input = (IFileEditorInput) element; + + FileInfo info = (FileInfo) getElementInfo(element); + IFile file = input.getFile(); + + Charset charset; + try { + charset = Charset.forName("UTF-8"); + } catch (UnsupportedCharsetException ex) { + throw new SQDevCoreException("UTF-8 is not supported!", ex); + } catch (IllegalCharsetNameException ex) { + throw new SQDevCoreException("Impossible exception in BasicDocumentProvider!", ex); + } + + CharsetEncoder encoder = charset.newEncoder(); + encoder.onMalformedInput(CodingErrorAction.REPLACE); + encoder.onUnmappableCharacter(CodingErrorAction.REPORT); + + InputStream stream; + + try { + byte[] bytes; + ByteBuffer byteBuffer = encoder.encode(CharBuffer.wrap(document.get())); + if (byteBuffer.hasArray()) + bytes = byteBuffer.array(); + else { + bytes = new byte[byteBuffer.limit()]; + byteBuffer.get(bytes); + } + stream = new ByteArrayInputStream(bytes, 0, byteBuffer.limit()); + } catch (CharacterCodingException ex) { + throw new SQDevCoreException("Error while encoding...", ex); + } + + if (file.exists()) { + + if (info != null && !overwrite) + checkSynchronizationState(info.fModificationStamp, file); + + // inform about the upcoming content change + fireElementStateChanging(element); + try { + file.setContents(stream, overwrite, true, monitor); + } catch (CoreException x) { + // inform about failure + fireElementStateChangeFailed(element); + throw x; + } catch (RuntimeException x) { + // inform about failure + fireElementStateChangeFailed(element); + throw x; + } + + // If here, the editor state will be flipped to "not dirty". + // Thus, the state changing flag will be reset. + + if (info != null) { + + ResourceMarkerAnnotationModel model = (ResourceMarkerAnnotationModel) info.fModel; + if (model != null) + model.updateMarkers(info.fDocument); + + info.fModificationStamp = computeModificationStamp(file); + } + + } else { + try { + monitor.beginTask("Saving file...", 2000); + ContainerCreator creator = new ContainerCreator(file.getWorkspace(), + file.getParent().getFullPath()); + creator.createContainer(new SubProgressMonitor(monitor, 1000)); + file.create(stream, false, new SubProgressMonitor(monitor, 1000)); + } finally { + monitor.done(); + } + } + + } else { + super.doSaveDocument(monitor, element, document, overwrite); + } + } + } diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicErrorListener.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicErrorListener.java new file mode 100644 index 00000000..43d75bbc --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicErrorListener.java @@ -0,0 +1,50 @@ +package raven.sqdev.editors; + +import org.antlr.v4.runtime.BaseErrorListener; +import org.antlr.v4.runtime.RecognitionException; +import org.antlr.v4.runtime.Recognizer; +import org.antlr.v4.runtime.Token; +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.runtime.Assert; + +/** + * A basic error listener implementation that can be added to an ANTLR parser + * that will create error markers on the editor for every syntax error reported + * by the parser + * + * @author Raven + * + */ +public class BasicErrorListener extends BaseErrorListener { + /** + * The editor this listener resports to + */ + private BasicCodeEditor editor; + + /** + * Create an instance of this error listener + * + * @param editor + * The editor the syntax errors should be reported to + */ + public BasicErrorListener(BasicCodeEditor editor) { + Assert.isNotNull(editor); + this.editor = editor; + } + + @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(); + + editor.createMarker(IMarker.PROBLEM, offendingToken.getStartIndex(), 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 new file mode 100644 index 00000000..f9b32444 --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicFoldingManager.java @@ -0,0 +1,85 @@ +package raven.sqdev.editors; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Map.Entry; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.jface.text.Position; +import org.eclipse.jface.text.source.projection.ProjectionAnnotation; +import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel; + +import raven.sqdev.interfaces.IManager; + +/** + * This manager takes care about what parts of the document are foldable + * + * @author Raven + * + */ +public class BasicFoldingManager implements IManager { + /** + * A queue of annotations that should be processed on the next apply + */ + protected Map annotationQueue; + /** + * The annotation model of the editor this manager should contribute to + */ + protected ProjectionAnnotationModel model; + + + /** + * Creates a new instance of this manager + * + * @param model + * The ProjectionAnnotationModel this manager should + * contribute to + */ + public BasicFoldingManager(ProjectionAnnotationModel model) { + Assert.isNotNull(model, "The given model may not be null!"); + + this.model = model; + + annotationQueue = new HashMap(); + } + + /** + * Adds a foldable area + * + * @param entry + * The Entry to add consisting of a + * ProjectionAnnotation and the respective position + */ + public void addFoldingArea(Entry entry) { + annotationQueue.put(entry.getKey(), entry.getValue()); + } + + @Override + public void apply() { + // clear + model.removeAllAnnotations(); + + Iterator> mapIterator = annotationQueue.entrySet() + .iterator(); + + while (mapIterator.hasNext()) { + // add the foladable areas TODO: implement some overlap logic + Entry entry = mapIterator.next(); + + model.addAnnotation(entry.getKey(), entry.getValue()); + } + } + + @Override + public String getType() { + return BasicFoldingManager.getManagerType(); + } + + /** + * Gets the type representation of a BasicFoldingManger + */ + public static String getManagerType() { + return "BasicFoldingManager"; + } +} diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicInformationControl.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicInformationControl.java index 388a90cb..52c6fcd2 100644 --- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicInformationControl.java +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicInformationControl.java @@ -2,6 +2,7 @@ import java.util.ArrayList; +import org.eclipse.jface.action.Action; import org.eclipse.jface.action.ToolBarManager; import org.eclipse.jface.text.AbstractInformationControl; import org.eclipse.jface.text.IInformationControl; @@ -50,7 +51,7 @@ */ public class BasicInformationControl extends AbstractInformationControl implements IInformationControlExtension2 { - + /** * The TabFolder used to display information */ @@ -172,10 +173,15 @@ public void setInput(Object input) { if (input instanceof AdditionalKeywordProposalInformation) { // add the respective toolbar action this info does provide - getToolBarManager() - .add(((AdditionalKeywordProposalInformation) input).getToolbarAction()); - - getToolBarManager().update(false); + + Action action = ((AdditionalKeywordProposalInformation) input).getToolbarAction(); + + if (action != null) { + // add action if available + getToolBarManager().add(action); + + getToolBarManager().update(false); + } } } else { setInfo(new AbstractAdditionalProposalInformation(true) { @@ -185,7 +191,7 @@ protected ArrayList computeCategories( ArrayList categories) { categories.add( new StringProposalInformationCategory("General", input.toString())); - + return categories; } }); @@ -224,7 +230,7 @@ private void configureScrolledComposite(Composite parent) { int width = scroller.getSize().x - 2 * border; int height = content.computeSize(scroller.getSize().x, SWT.DEFAULT, true).y + getToolBarManager().createControl(getShell()).getSize().y; - + scroller.setMinSize(width, height); ScrollBar scrollBar = scroller.getVerticalBar(); diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicKeywordProvider.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicKeywordProvider.java index 172a14e8..1e28dcd9 100644 --- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicKeywordProvider.java +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicKeywordProvider.java @@ -1,6 +1,11 @@ package raven.sqdev.editors; +import java.util.ArrayList; +import java.util.List; + +import raven.sqdev.infoCollection.base.Keyword; import raven.sqdev.infoCollection.base.KeywordList; +import raven.sqdev.interfaces.IKeywordListChangeListener; import raven.sqdev.interfaces.IKeywordProvider; /** @@ -8,7 +13,7 @@ * syntax highlighting * * @author Raven - * + * */ public class BasicKeywordProvider implements IKeywordProvider { @@ -28,19 +33,70 @@ public class BasicKeywordProvider implements IKeywordProvider { */ protected boolean isSorting; + /** + * A list of IKeywordListChangeListeners + */ + protected List keywordListListeners; + public BasicKeywordProvider() { keywordsAreSorted = false; isSorting = false; + keywordListListeners = new ArrayList(); } @Override public KeywordList getKeywordList() { - return (keywords == null) ? new KeywordList() : keywords; + if (keywords == null) { + keywords = new KeywordList(); + } + + return keywords; } @Override public void setKeywordList(KeywordList keywords) { this.keywords = keywords; + + notifyKeywordListChangeListener(); + } + + @Override + public void addKeywordListChangeListener(IKeywordListChangeListener listener) { + if (!keywordListListeners.contains(listener)) { + keywordListListeners.add(listener); + } + } + + @Override + public void removeKeywordListChangeListener(IKeywordListChangeListener listener) { + keywordListListeners.remove(listener); + + } + + @Override + public void addKeyword(Keyword keyword) { + if (!getKeywordList().contains(keyword)) { + getKeywordList().addKeyword(keyword); + + notifyKeywordListChangeListener(); + } + } + + @Override + public void removeKeyword(Keyword keyword) { + getKeywordList().removeKeyword(keyword); + + notifyKeywordListChangeListener(); + } + + /** + * Notifies all registered listeners that the keyword list has changed + */ + private void notifyKeywordListChangeListener() { + // notify listeners_ + for (IKeywordListChangeListener listener : keywordListListeners) { + listener.keywordListChanged(IKeywordListChangeListener.CTX_LIST_CHANGED); + } } } diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicMarkerManager.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicMarkerManager.java new file mode 100644 index 00000000..f92a4872 --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicMarkerManager.java @@ -0,0 +1,123 @@ +package raven.sqdev.editors; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.ui.IFileEditorInput; + +import raven.sqdev.exceptions.SQDevEditorException; +import raven.sqdev.interfaces.IManager; + +/** + * This manager is used in order to manage the placement and removal of markers + * + * @author Raven + * + */ +public class BasicMarkerManager implements IManager { + /** + * The managr type of this manager + */ + public static final String TYPE = "BasicMarkerManager"; + /** + * The editor this manager is woking on + */ + protected BasicCodeEditor editor; + /** + * A list of markers this editor manages + */ + protected List markers; + /** + * Indicates whether this manager is in a valid state + */ + protected boolean isValid; + + + public BasicMarkerManager(BasicCodeEditor editor) { + Assert.isNotNull(editor, "Editor may not be null!"); + + this.editor = editor; + + markers = new ArrayList(); + } + + /** + * Adds a marker with the given information to this manager + * + * @param type + * The marker's type + * @param line + * The line associated with this marker + * @param offset + * The marker's offset + * @param length + * The marker's length + * @param severity + * The marker's severity + * @param message + * The marker's message + * @return True on success and False otherwise + */ + public boolean addMarker(String type, int line, int offset, int length, int severity, + String message) { + if (!(editor.getEditorInput() instanceof IFileEditorInput)) { + return false; + } + + markers.add(new MarkerInformation(type, line, offset, length, severity, message)); + + return true; + } + + @Override + public void apply() { + if (!(editor.getEditorInput() instanceof IFileEditorInput)) { + return; + } + + try { + ((IFileEditorInput) editor.getEditorInput()).getFile().deleteMarkers(null, false, + IResource.DEPTH_INFINITE); + } catch (CoreException e) { + try { + throw new SQDevEditorException("Failed at deleting marker!", e); + } catch (SQDevEditorException e1) { + e1.printStackTrace(); + + return; + } + } + + IResource resource = ((IFileEditorInput) editor.getEditorInput()).getFile(); + + isValid = true; + + for (MarkerInformation currentMarker : markers) { + if (isValid && currentMarker.getSeverity() == IMarker.SEVERITY_ERROR) { + isValid = false; + } + + // create the actual markers + currentMarker.applyOn(resource); + } + + markers.clear(); + } + + @Override + public String getType() { + return TYPE; + } + + /** + * Checks whether this manager represents a valid state (= no errors) + */ + public boolean isValidState() { + return isValid; + } + +} diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicParseTimeListener.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicParseTimeListener.java new file mode 100644 index 00000000..2700fa32 --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicParseTimeListener.java @@ -0,0 +1,82 @@ +package raven.sqdev.editors; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.swt.custom.VerifyKeyListener; +import org.eclipse.swt.events.VerifyEvent; + +import raven.sqdev.util.SQDevPreferenceUtil; + +/** + * This listener will cause the editor to reparse it's input when the user + * stopped typing for a longer time + * + * @author Raven + * + */ +public class BasicParseTimeListener implements VerifyKeyListener { + /** + * The editor this listener works on + */ + protected BasicCodeEditor editor; + /** + * The timer used to determine when to parse the editor's input + */ + protected ScheduledExecutorService timer; + /** + * The actual parsing task + */ + protected final Runnable parsing = new Runnable() { + + @Override + public void run() { + try { + editor.parseInput(); + } catch (Exception e) { + e.printStackTrace(); + } + } + }; + + protected ScheduledFuture runningTask; + + public BasicParseTimeListener(BasicCodeEditor editor) { + Assert.isNotNull(editor); + + this.editor = editor; + timer = Executors.newSingleThreadScheduledExecutor(); + } + + @Override + public void verifyKey(VerifyEvent event) { + if (runningTask != null && !runningTask.isCancelled() && !runningTask.isDone()) { + runningTask.cancel(true); + } + + int basicDelay = SQDevPreferenceUtil.getParseDelay() * 1000; + + switch (event.character) { + case ';': + // semicolon=end of statement -> parse fastly after key event + runningTask = timer.schedule(parsing, basicDelay / 4, TimeUnit.MILLISECONDS); + break; + + case ' ': + case '\n': + case '\b': + // whitespace indicates the end of a word -> parse normal after + // key event + runningTask = timer.schedule(parsing, basicDelay / 2, TimeUnit.MILLISECONDS); + break; + + default: + // any other character -> parse slowly after key event + runningTask = timer.schedule(parsing, basicDelay, TimeUnit.MILLISECONDS); + } + } + +} diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicPartitionScanner.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicPartitionScanner.java index b1be4084..38ea10ff 100644 --- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicPartitionScanner.java +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicPartitionScanner.java @@ -2,6 +2,7 @@ import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import org.eclipse.core.runtime.Assert; import org.eclipse.jface.text.IDocument; @@ -12,12 +13,12 @@ import org.eclipse.jface.text.rules.Token; /** - * A partionScanner for the basic partitions.
It's default rules are - * MULTILINE_COMMENT_RULE, SINGLELINE_COMMENT_RULE, DOUBLE_QUOTE_STRING_RULE and - * SINGLE_QUOTE_STRING_RULE + * A partionScanner for the basic partitions.
+ * It's default rules are MULTILINE_COMMENT_RULE, SINGLELINE_COMMENT_RULE, + * DOUBLE_QUOTE_STRING_RULE and SINGLE_QUOTE_STRING_RULE * * @author Raven - * + * */ public class BasicPartitionScanner extends RuleBasedPartitionScanner { @@ -46,7 +47,7 @@ public class BasicPartitionScanner extends RuleBasedPartitionScanner { */ public static final IPredicateRule SINGLE_QUOTE_STRING_RULE = new MultiLineRule("'", "'", new Token(BASIC_STRING)); - + /** * An array containing all currently used rules */ @@ -63,7 +64,7 @@ public BasicPartitionScanner() { DOUBLE_QUOTE_STRING_RULE, // rule for strings in single quotes SINGLE_QUOTE_STRING_RULE }; - + setRules(rules); } @@ -87,7 +88,7 @@ public void setRules(IPredicateRule[] rules) { * @param rules * The new set of rules */ - public void setRules(ArrayList rules) { + public void setRules(List rules) { setRules(rules.toArray(new IPredicateRule[rules.size()])); } 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 54fde244..6bd1e261 100644 --- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicSourceViewerConfiguration.java +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicSourceViewerConfiguration.java @@ -1,5 +1,12 @@ package raven.sqdev.editors; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.ITextHover; import org.eclipse.jface.text.TextAttribute; @@ -9,6 +16,8 @@ import org.eclipse.jface.text.presentation.IPresentationReconciler; import org.eclipse.jface.text.presentation.PresentationReconciler; import org.eclipse.jface.text.rules.DefaultDamagerRepairer; +import org.eclipse.jface.text.source.DefaultAnnotationHover; +import org.eclipse.jface.text.source.IAnnotationHover; import org.eclipse.jface.text.source.ISourceViewer; import org.eclipse.jface.text.source.SourceViewerConfiguration; import org.eclipse.jface.util.IPropertyChangeListener; @@ -16,28 +25,38 @@ import raven.sqdev.constants.ISQDevColorConstants; import raven.sqdev.constants.SQDevPreferenceConstants; +import raven.sqdev.infoCollection.base.Keyword; import raven.sqdev.util.SQDevPreferenceUtil; /** * Basic implementation of a SourceViewerConfiguration * * @author Raven - * + * * @see {@linkplain SourceViewerConfiguration} - * + * */ public class BasicSourceViewerConfiguration extends SourceViewerConfiguration implements IPropertyChangeListener { - + /** * The color manager */ protected ColorManager colorManager; /** - * The keywordScanner providing the keywords for the syntax highlighting + * The configured keywordScanner providing the keywords for the syntax + * highlighting
+ * They are sorted according to the PreferenceKey they use for the color of + * their keyword highlighting */ - protected KeywordScanner keywordScanner; + protected Map configuredKeywordScanners; + + /** + * The MultiKeywordScanner that will be applied for this + * SourceViewerConfiguration + */ + protected MultiKeywordScanner multiScanner; /** * The editor this SourceViewer is applied on @@ -53,6 +72,9 @@ public BasicSourceViewerConfiguration(ColorManager manager, BasicCodeEditor edit this.setColorManager(manager); this.editor = editor; + this.configuredKeywordScanners = new HashMap(); + this.multiScanner = new MultiKeywordScanner(editor); + // register to get notified about preference changes SQDevPreferenceUtil.getPreferenceStore().addPropertyChangeListener(this); } @@ -75,42 +97,190 @@ public void setColorManager(ColorManager colorManager) { this.colorManager = colorManager; } + /** + * Gets all configured Keywords + */ + public List getAllConfiguredKeywords() { + ArrayList keywordList = new ArrayList(); + + Iterator> iterator = configuredKeywordScanners.entrySet() + .iterator(); + + while (iterator.hasNext()) { + // add the respective keywords to the list + keywordList.addAll( + iterator.next().getValue().getKeywordProvider().getKeywordList().getKeywords()); + } + + return keywordList; + } + + /** + * Gets a list of all configured Keywords starting with the given character + * + * @param c + * The starting charcter + */ + public List getConfiguredKeywordsFor(char c) { + ArrayList keywordList = new ArrayList(); + + Iterator> iterator = configuredKeywordScanners.entrySet() + .iterator(); + + while (iterator.hasNext()) { + // add the respective keywords to the list + keywordList.addAll( + iterator.next().getValue().getKeywordProvider().getKeywordList().getListFor(c)); + } + + return keywordList; + } + /** * Gets the keywordScanner for this configuration * + * @param colorPreferenceKey + * 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 */ - public KeywordScanner getKeywordScanner() { + public KeywordScanner getKeywordScanner(String colorPreferenceKey) { + if (!configuredKeywordScanners.containsKey(colorPreferenceKey)) { + return null; + } - if (this.keywordScanner == null) { - this.keywordScanner = new KeywordScanner(new BasicKeywordProvider(), - SQDevPreferenceConstants.SQDEV_EDITOR_SYNTAXHIGHLIGHTING_COLOR_KEY, editor); + // return scanner + return configuredKeywordScanners.get(colorPreferenceKey); + } + + /** + * Creates a KeywordScanner for the given preference key that + * is automatically registered to this + * BasicSourceViewerConfiguration if there is no other scanner + * for that key + * + * @param colorPreferenceKey + * The key the scanner should be configured for + * @param caseSensitive + * Whether or not the created scanner should be case sensitive + */ + public void createKeywordScanner(String colorPreferenceKey, boolean caseSensitive) { + if (!configuredKeywordScanners.containsKey(colorPreferenceKey)) { + // create new scanner + KeywordScanner scanner = new KeywordScanner(new BasicKeywordProvider(), + colorPreferenceKey, this.editor); + + if (!caseSensitive) { + scanner.makeCaseSensitive(caseSensitive); + } + + configuredKeywordScanners.put(colorPreferenceKey, scanner); + + // add to multiScanner + multiScanner.addScanner(scanner); + } + } + + /** + * Checks if a KeywordScanner for the given preference key does + * exist in this BasicSourceViewerConfiguration + * + * @param colorPreferenceKey + * The preference key the scanner has to work on + */ + public boolean scannerExists(String colorPreferenceKey) { + return configuredKeywordScanners.containsKey(colorPreferenceKey); + } + + /** + * Gets the KeywordScanner that contains the given + * Keyword + * + * @param keyword + * The Keyword to search for + * @return The matching KeywordScanner or null if + * none could be found + */ + public KeywordScanner getKeywordScannerContaining(Keyword keyword) { + Iterator> iterator = configuredKeywordScanners.entrySet() + .iterator(); + + while (iterator.hasNext()) { + KeywordScanner currentScanner = iterator.next().getValue(); + + if (currentScanner.contains(keyword)) { + return currentScanner; + } + } + + return null; + } + + /** + * Gets the KeywordScanner that contains a Keyword + * matching the given word + * + * @param word + * The word to search for + * @return The matching KeywordScanner or null if + * none could be found + */ + public KeywordScanner getKeywordScannerContaining(String word) { + Iterator> iterator = configuredKeywordScanners.entrySet() + .iterator(); + + while (iterator.hasNext()) { + KeywordScanner currentScanner = iterator.next().getValue(); + + if (currentScanner.contains(word)) { + return currentScanner; + } } - return this.keywordScanner; + return null; } @Override public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) { PresentationReconciler reconciler = new PresentationReconciler(); - // TODO: make procedural - - // syntax highlighting - DefaultDamagerRepairer dr_Default = new DefaultDamagerRepairer(this.getKeywordScanner()); + // syntax highlighting for keywords + DefaultDamagerRepairer dr_Default = new DefaultDamagerRepairer(multiScanner); reconciler.setDamager(dr_Default, IDocument.DEFAULT_CONTENT_TYPE); reconciler.setRepairer(dr_Default, IDocument.DEFAULT_CONTENT_TYPE); - // colorize strings - NonRuleBasedDamagerRepairer ndr_String = new NonRuleBasedDamagerRepairer( - new TextAttribute(colorManager.getColor(ISQDevColorConstants.STRING))); - reconciler.setDamager(ndr_String, BasicPartitionScanner.BASIC_STRING); - reconciler.setRepairer(ndr_String, BasicPartitionScanner.BASIC_STRING); + boolean containsString = false; + boolean containsComment = false; + + for (String currentType : editor.getBasicProvider().getPartitionScanner() + .getConfiguredContentTypes()) { + switch (currentType) { + case BasicPartitionScanner.BASIC_STRING: + containsString = true; + break; + + case BasicPartitionScanner.BASIC_COMMENT: + containsComment = true; + break; + } + } + + if (containsString) { + // colorize strings + NonRuleBasedDamagerRepairer ndr_String = new NonRuleBasedDamagerRepairer( + new TextAttribute(colorManager.getColor(ISQDevColorConstants.STRING))); + reconciler.setDamager(ndr_String, BasicPartitionScanner.BASIC_STRING); + reconciler.setRepairer(ndr_String, BasicPartitionScanner.BASIC_STRING); + } - // colorize comments - NonRuleBasedDamagerRepairer ndr_Comment = new NonRuleBasedDamagerRepairer( - new TextAttribute(colorManager.getColor(ISQDevColorConstants.COMMENT))); - reconciler.setDamager(ndr_Comment, BasicPartitionScanner.BASIC_COMMENT); - reconciler.setRepairer(ndr_Comment, BasicPartitionScanner.BASIC_COMMENT); + if (containsComment) { + // colorize comments + NonRuleBasedDamagerRepairer ndr_Comment = new NonRuleBasedDamagerRepairer( + new TextAttribute(colorManager.getColor(ISQDevColorConstants.COMMENT))); + reconciler.setDamager(ndr_Comment, BasicPartitionScanner.BASIC_COMMENT); + reconciler.setRepairer(ndr_Comment, BasicPartitionScanner.BASIC_COMMENT); + } return reconciler; } @@ -135,6 +305,11 @@ public ITextHover getTextHover(ISourceViewer sv, String contentType) { return new BasicTextHover(editor); } + @Override + public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) { + return new DefaultAnnotationHover(); + } + @Override public void propertyChange(PropertyChangeEvent event) { if (event.getNewValue() == null) { @@ -147,16 +322,17 @@ public void propertyChange(PropertyChangeEvent event) { case SQDevPreferenceConstants.SQDEV_EDITOR_ENABLE_AUTOCOMPLETE_KEY: assistant.enableAutoActivation((boolean) event.getNewValue()); break; - - case SQDevPreferenceConstants.SQDEV_EDITOR_SYNTAXHIGHLIGHTING_COLOR_KEY: - getKeywordScanner().syncToPropertyChange(event); - break; - + default: - // don't update the editor - return; + if (configuredKeywordScanners.containsKey(event.getProperty())) { + // configure respective keyword scanner + configuredKeywordScanners.get(event.getProperty()).syncToPropertyChange(event); + } else { + // don't update editor + return; + } } - editor.update(); + editor.update(true); } } diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicTextHover.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicTextHover.java index d812d36c..7d809fd2 100644 --- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicTextHover.java +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicTextHover.java @@ -10,7 +10,6 @@ import org.eclipse.jface.text.Region; import org.eclipse.swt.widgets.Shell; -import raven.sqdev.infoCollection.base.Keyword; import raven.sqdev.miscellaneous.AdditionalKeywordProposalInformation; import raven.sqdev.util.EditorUtil; @@ -59,17 +58,18 @@ public Object getHoverInfo2(ITextViewer textViewer, IRegion hoverRegion) { // get the respective word String word = EditorUtil.getWordAroundOffset(textViewer.getDocument(), hoverRegion.getOffset()); - + AdditionalKeywordProposalInformation info = null; if (!word.isEmpty()) { // check if there is a corresponding keyword - Keyword keyword = editor.getBasicConfiguration().getKeywordScanner() - .getKeywordProvider().getKeywordList().getKeyword(word); - - if (keyword != null) { + KeywordScanner scanner = editor.getBasicConfiguration() + .getKeywordScannerContaining(word); + + if (scanner != null) { // create the info for this keyword - info = new AdditionalKeywordProposalInformation(keyword); + info = new AdditionalKeywordProposalInformation( + scanner.getKeywordProvider().getKeywordList().getKeyword(word)); } } return info; diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/CharacterPairHandler.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/CharacterPairHandler.java index b32d0fe7..62d15eab 100644 --- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/CharacterPairHandler.java +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/CharacterPairHandler.java @@ -8,7 +8,7 @@ import raven.sqdev.interfaces.IEditorKeyHandler; import raven.sqdev.misc.CharacterPair; -import raven.sqdev.util.TextUtils; +import raven.sqdev.misc.TextUtils; /** * This class will handle character inputs that have a predefined partner to @@ -67,17 +67,17 @@ public boolean willHandle(VerifyEvent event) { return false; } + if (IEditorKeyHandler.isDeletion(event.character)) { + // handle deletions + return true; + } + if (editor.getBasicProvider().getPartitioner().getContentType(selection.x).toLowerCase() .contains("string")) { // disable in strings return false; } - if (IEditorKeyHandler.isDeletion(event.character)) { - // handle deletions - return true; - } - if (isRegisteredOpeningCharacter(event.character) || isRegisteredClosingCharacter(event.character)) { // if the character belongs to a registered CharacterPair handle it diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/ColorManager.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/ColorManager.java index feb52de5..42c25518 100644 --- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/ColorManager.java +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/ColorManager.java @@ -24,7 +24,7 @@ public class ColorManager { public void dispose() { Iterator e = colorTable.values().iterator(); while (e.hasNext()) - ((Color) e.next()).dispose(); + e.next().dispose(); } /** @@ -36,7 +36,7 @@ public void dispose() { */ public Color getColor(RGB rgb) { // check if the color has already been stored - Color color = (Color) colorTable.get(rgb); + Color color = colorTable.get(rgb); if (color == null) { color = new Color(Display.getCurrent(), rgb); diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/KeywordScanner.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/KeywordScanner.java index a3163af3..fe0761c0 100644 --- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/KeywordScanner.java +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/KeywordScanner.java @@ -1,6 +1,7 @@ package raven.sqdev.editors; import java.util.ArrayList; +import java.util.List; import org.eclipse.core.runtime.Assert; import org.eclipse.jface.text.TextAttribute; @@ -16,27 +17,23 @@ import raven.sqdev.infoCollection.base.Keyword; import raven.sqdev.infoCollection.base.KeywordList; +import raven.sqdev.interfaces.IKeywordListChangeListener; import raven.sqdev.interfaces.IKeywordProvider; +import raven.sqdev.interfaces.IUpdateListener; import raven.sqdev.util.ColorUtils; import raven.sqdev.util.SQDevPreferenceUtil; /** - * A scanner that scans for keywords and colors them with the - * ISQDevColorConstants.KEYWORD color + * A scanner that scans for keywords and colors them with the given color.
+ *
+ * Note: This KeywordScanner can only handle one set of + * keywords that are all colored in the same way. If you need support for + * multiple catgeories see {@link MultiKeywordScanner} * * @author Raven - * + * */ -public class KeywordScanner extends RuleBasedScanner { - - /** - * A token that indicates an unrecognized word meaning any word, that is not - * part of the keywords the respective Keywordcanner works on.
- * These words are not colored in any way. - */ - public static IToken UNRECOGNIZED_WORD_TOKEN = new Token( - new TextAttribute(null, null, SWT.NULL)); - +public class KeywordScanner extends RuleBasedScanner implements IKeywordListChangeListener { /** * The preferenceKey for the color of the token */ @@ -67,6 +64,22 @@ public class KeywordScanner extends RuleBasedScanner { */ protected boolean caseSensitive; + /** + * A list of IKeywordListChangeListeners + */ + protected List keywordListListeners; + + /** + * A list of IUpdateListener + */ + protected List updateListeners; + + /** + * Indicates whether this scanner is part of a + * MultiKeywordScanner + */ + protected boolean isPartOfMultiScanner; + /** * Creates an instance of this scanner * @@ -95,13 +108,18 @@ public KeywordScanner(IKeywordProvider provider, String colorPreferenceKey, this.provider = provider; this.editor = editor; this.caseSensitive = caseSensitive; - defaultToken = UNRECOGNIZED_WORD_TOKEN; + defaultToken = Token.UNDEFINED; + keywordListListeners = new ArrayList(); + updateListeners = new ArrayList(); Color color = new Color(Display.getCurrent(), ColorUtils.decodeRGB(strColor)); - IToken keywordToken = new Token(new TextAttribute(color, null, SWT.BOLD)); + token = new Token(new TextAttribute(color, null, SWT.BOLD)); + + updateRules(provider.getKeywordList().getKeywords().size() > 0); - updateRules(keywordToken); + // add this as a listener for the keyword provider + this.provider.addKeywordListChangeListener(this); } /** @@ -136,23 +154,23 @@ public void syncToPropertyChange(PropertyChangeEvent event) { if (event.getNewValue() != null) { Color color = new Color(Display.getCurrent(), ColorUtils.decodeRGB((String) event.getNewValue())); - - IToken token = new Token(new TextAttribute(color, null, SWT.BOLD)); - updateRules(token); + token = new Token(new TextAttribute(color, null, SWT.BOLD)); + + updateRules(true); } } } /** * Will update the applied rules for this scanner according to the - * keywordProvider.
+ * keywordProvider and the {@link #token}.
* Will apply the newly created rule immediately * - * @param token - * The token the rule should use + * @param updateEditor + * Indicates if the editor shoukd be updated */ - protected void updateRules(IToken token) { + protected void updateRules(boolean updateEditor) { ArrayList keywordList = provider.getKeywordList().getKeywords(); Keyword[] keywords = keywordList.toArray(new Keyword[keywordList.size()]); @@ -160,7 +178,7 @@ protected void updateRules(IToken token) { // create the respective WordRule WordRule keywordRule = new WordRule(new WordDetector(), getDefaultToken(), !isCaseSensitive()); - + // add keywords for (Keyword currentKeyword : keywords) { keywordRule.addWord(currentKeyword.getKeyword(), token); @@ -170,7 +188,27 @@ protected void updateRules(IToken token) { this.setRules(rules); - editor.update(); + if (!isPartOfMultiScanner && updateEditor) { + // only update editor if this scanner is autonomous + editor.update(false); + } + + notifyUpdateListener(); + } + + /** + * Gets the rule for this KeywordScanner that describes which + * keywords to color in the respective color of this scanner + * + * @return The respective IRule or null if no such + * rule exists + */ + public IRule getRule() { + if (fRules == null || fRules.length == 0) { + return null; + } + + return fRules[0]; } /** @@ -190,7 +228,9 @@ public IKeywordProvider getKeywordProvider() { public void setKeywordProvider(IKeywordProvider provider) { this.provider = provider; - updateRules(getToken()); + updateRules(true); + + notifyKeywordListChangeListeners(IKeywordListChangeListener.CTX_LIST_REMOVED); } /** @@ -204,13 +244,20 @@ public void setKeywords(KeywordList list) { provider.setKeywordList(list); setKeywordProvider(provider); + + // notify listeners about change + notifyKeywordListChangeListeners(IKeywordListChangeListener.CTX_LIST_CHANGED); } /** * Gets the token of this scanner */ public IToken getToken() { - return (token != null) ? token : new Token(new TextAttribute(getColor(), null, SWT.BOLD)); + if (token == null) { + token = new Token(new TextAttribute(getColor(), null, SWT.BOLD)); + } + + return token; } /** @@ -231,7 +278,7 @@ public void makeCaseSensitive(boolean sensitive) { caseSensitive = sensitive; // apply changes - updateRules(getToken()); + updateRules(true); } /** @@ -262,4 +309,104 @@ public void setDefaultToken(IToken token) { public IToken getDefaultToken() { return defaultToken; } + + /** + * Checks whether this KeywordScanner contains the given + * Keyword + * + * @param keyword + * The Keyword to search for + */ + public boolean contains(Keyword keyword) { + return getKeywordProvider().getKeywordList().contains(keyword); + } + + /** + * Checks whether this KeywordScanner contains a + * Keyword matching the given word + * + * @param word + * The word to search for + */ + public boolean contains(String word) { + return getKeywordProvider().getKeywordList().getKeyword(word) != null; + } + + /** + * Notifies all IKeywordListChangeListeners + * + * @param ctx + * The context of the change + */ + protected void notifyKeywordListChangeListeners(String ctx) { + for (IKeywordListChangeListener listener : keywordListListeners) { + listener.keywordListChanged(ctx); + } + } + + /** + * Notifies all IUpdateListeners + */ + protected void notifyUpdateListener() { + for (IUpdateListener listener : updateListeners) { + listener.updated(); + } + } + + /** + * Adds the given IKeywordListChangeListener if it is not + * already registered + * + * @param listener + * The listener to add + */ + public void addKeywordListChangeListener(IKeywordListChangeListener listener) { + if (!keywordListListeners.contains(listener)) { + keywordListListeners.add(listener); + } + } + + /** + * Removes the given IKeywordListChangeListener + * + * @param listener + * The listener to remove + */ + public void removeKeywordListChangeListener(IKeywordListChangeListener listener) { + keywordListListeners.remove(listener); + } + + /** + * Adds the given listener if it is not already added + * + * @param listener + * The IUpdateListener to add + */ + public void addUpdateListener(IUpdateListener listener) { + if (!updateListeners.contains(listener)) { + updateListeners.add(listener); + } + } + + /** + * Removes the given listener + * + * @param listener + * The IUpdateListener to remove + */ + public void removeUpdateListener(IUpdateListener listener) { + updateListeners.remove(listener); + } + + @Override + public void keywordListChanged(String ctx) { + if (ctx.equals(IKeywordListChangeListener.CTX_LIST_CHANGED)) { + // update rules + + updateRules(true); + } + + // forward event + notifyKeywordListChangeListeners(ctx); + } } diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/MarkerInformation.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/MarkerInformation.java new file mode 100644 index 00000000..a681e8c7 --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/MarkerInformation.java @@ -0,0 +1,154 @@ +package raven.sqdev.editors; + +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; + +import raven.sqdev.exceptions.SQDevEditorException; + +/** + * A container for all information necessary to create an IMarker from it + * + * @author Raven + * + */ +public class MarkerInformation { + /** + * The line information of the potential marker + */ + protected int line; + /** + * The offset information of the potential marker + */ + protected int offset; + /** + * The length information of the potential marker + */ + protected int length; + /** + * The line severity of the potential marker + */ + protected int severity; + /** + * The type information of the potential marker + */ + protected String type; + /** + * The message information of the potential marker + */ + protected String message; + + + /** + * Creates a new, empty instance of this information. Use at your own risk + * as someneeded information may not be set to the point they are needed + */ + public MarkerInformation() { + } + + /** + * Creates a new instance with the given information + * + * @param type + * The Marker type + * @param line + * The line the marker should be associated with + * @param offset + * The marker's offset + * @param length + * The marker's length + * @param severity + * The marker's severity + * @param message + * The marker's message + */ + public MarkerInformation(String type, int line, int offset, int length, int severity, + String message) { + setType(type); + setLine(line); + setOffset(offset); + setLength(length); + setSeverity(severity); + setMessage(message); + } + + + public int getLine() { + return line; + } + + public void setLine(int line) { + this.line = line; + } + + public int getOffset() { + return offset; + } + + public void setOffset(int offset) { + this.offset = offset; + } + + public int getLength() { + return length; + } + + public void setLength(int length) { + this.length = length; + } + + public int getSeverity() { + return severity; + } + + public void setSeverity(int severity) { + this.severity = severity; + } + + public String getType() { + return (type == null) ? "" : type; + } + + public void setType(String type) { + this.type = type; + } + + public String getMessage() { + return (message == null) ? "" : message; + } + + public void setMessage(String message) { + this.message = message; + } + + /** + * Applies this information to the given resource in form of an IMarker + * + * @param resource + * The resource ot create the marker on + * @return The created marker or null if the marker couldn't be + * created + */ + public IMarker applyOn(IResource resource) { + try { + IMarker marker = resource.createMarker(getType()); + + marker.setAttribute(IMarker.LINE_NUMBER, getLine()); + marker.setAttribute(IMarker.MESSAGE, getMessage()); + marker.setAttribute(IMarker.SEVERITY, getSeverity()); + marker.setAttribute(IMarker.CHAR_START, getOffset()); + marker.setAttribute(IMarker.CHAR_END, getOffset() + getLength()); + + return marker; + } catch (CoreException e) { + try { + throw new SQDevEditorException("Failed at creating marker", e); + } catch (SQDevEditorException e1) { + e1.printStackTrace(); + + return null; + } + } + } + +} diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/MultiKeywordScanner.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/MultiKeywordScanner.java new file mode 100644 index 00000000..b0f4076f --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/MultiKeywordScanner.java @@ -0,0 +1,240 @@ +package raven.sqdev.editors; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.jface.text.rules.ICharacterScanner; +import org.eclipse.jface.text.rules.IRule; +import org.eclipse.jface.text.rules.IToken; +import org.eclipse.jface.text.rules.RuleBasedScanner; +import org.eclipse.jface.text.rules.Token; + +import raven.sqdev.interfaces.IKeywordListChangeListener; +import raven.sqdev.interfaces.IUpdateListener; + +/** + * This is a keyword scanner that can handle multiple keyword categories that + * are all colored differently.
+ *
+ * Note: A MultiKeywordScanner can not specify keywords by + * itself. This work has to be done in a {@link KeywordScanner} that is added to + * it + * + * @author Raven + * + */ +public class MultiKeywordScanner extends RuleBasedScanner + implements IKeywordListChangeListener, IUpdateListener { + + /** + * A list of all KeywordScanners that are combined in this + * MultiKeywordScanner + */ + private List scannerList; + + /** + * The editor this scanner works for + */ + protected BasicCodeEditor editor; + + /** + * Creates an instance of this scanner with no content + * + * @param editor + * The BasicCodeEditor this scanner works for + */ + public MultiKeywordScanner(BasicCodeEditor editor) { + scannerList = new ArrayList(); + + this.editor = editor; + } + + /** + * Creates an instance of this scanner with the given scanner + * + * @param scanner + * The scanner to register + * @param editor + * The BasicCodeEditor this scanner works for + */ + public MultiKeywordScanner(KeywordScanner scanner, BasicCodeEditor editor) { + this(editor); + + addScanner(scanner); + } + + /** + * Creates an instance of this scanner with the given scanners + * + * @param scanner + * The list of scanners to register + * @param editor + * The BasicCodeEditor this scanner works for + */ + public MultiKeywordScanner(Collection scanners, BasicCodeEditor editor) { + this(editor); + + addScanners(scanners); + } + + /** + * Gets the list of all regiestered KeywordScanners + */ + protected List getScanners() { + return scannerList; + } + + /** + * Adds the given scanner if it is not already registered + * + * @param scanner + * The KeywordScanner to add + * + * @param update + * Indicates whether the rules of this scanner should be updated + * after this addition + */ + private void addScanner(KeywordScanner scanner, boolean update) { + if (!scannerList.contains(scanner)) { + scanner.addKeywordListChangeListener(this); + scanner.addUpdateListener(this); + + scanner.isPartOfMultiScanner = true; + + scannerList.add(scanner); + + if (update) { + updateRules(); + } + } + } + + /** + * Adds the given scanner if it is not already registered + * + * @param scanner + * The KeywordScanner to add + */ + public void addScanner(KeywordScanner scanner) { + addScanner(scanner, true); + } + + + /** + * Adds all the given scanners + * + * @param scanners + * The list of KeywordScanners to add + */ + public void addScanners(Collection scanners) { + for (KeywordScanner scanner : scanners) { + addScanner(scanner, false); + } + + updateRules(); + } + + /** + * Removes the given scanner + * + * @param scanner + * The KeywordScanner to remove + * @param update + * Indicates whether the rules of this scanner should be updated + * after this deletion + */ + private void removeScanner(KeywordScanner scanner, boolean update) { + scanner.removeKeywordListChangeListener(this); + scanner.removeUpdateListener(this); + + scannerList.remove(scanner); + + if (update) { + updateRules(); + } + } + + /** + * Removes the given scanner if it is not already registered + * + * @param scanner + * The KeywordScanner to remove + */ + public void removeScanner(KeywordScanner scanner) { + removeScanner(scanner, true); + } + + /** + * Removes the given list of scanners + * + * @param scanners + * The KeywordScanners to remove + */ + public void removeScanners(Collection scanners) { + for (KeywordScanner scanner : scanners) { + removeScanner(scanner, false); + } + } + + /** + * Checks whether the given KeywordScanner is contained in this + * MultiKeywordScanner + * + * @param scanner + * The KeywordScanner to search for + */ + public boolean contains(KeywordScanner scanner) { + return scannerList.contains(scanner); + } + + /** + * Updates the rules for this scanner according tho the registered + * keywordScanner + */ + protected void updateRules() { + List rules = new ArrayList(); + + for (KeywordScanner currentScanner : scannerList) { + rules.add(currentScanner.getRule()); + } + + // add one final rule that will match every possible word as an + // uncolored token in order to prevent partly highlighted words + rules.add(new IRule() { + + @Override + public IToken evaluate(ICharacterScanner scanner) { + WordDetector detector = new WordDetector(); + + char c = (char) scanner.read(); + + if (!detector.isWordStart(c)) { + scanner.unread(); + return Token.UNDEFINED; + } + + while (detector.isWordPart(c)) { + c = (char) scanner.read(); + } + scanner.unread(); + + return new Token(null); + } + }); + + setRules(rules.toArray(new IRule[rules.size()])); + + editor.update(false); + } + + @Override + public void keywordListChanged(String ctx) { + updateRules(); + } + + @Override + public void updated() { + updateRules(); + } +} diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/NonRuleBasedDamagerRepairer.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/NonRuleBasedDamagerRepairer.java index 22d94688..fdc9d094 100644 --- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/NonRuleBasedDamagerRepairer.java +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/NonRuleBasedDamagerRepairer.java @@ -35,6 +35,7 @@ public NonRuleBasedDamagerRepairer(TextAttribute defaultTextAttribute) { /** * @see IPresentationRepairer#setDocument(IDocument) */ + @Override public void setDocument(IDocument document) { fDocument = document; } @@ -69,6 +70,7 @@ protected int endOfLineOf(int offset) throws BadLocationException { * @see IPresentationDamager#getDamageRegion(ITypedRegion, DocumentEvent, * boolean) */ + @Override public IRegion getDamageRegion(ITypedRegion partition, DocumentEvent event, boolean documentPartitioningChanged) { if (!documentPartitioningChanged) { @@ -101,6 +103,7 @@ public IRegion getDamageRegion(ITypedRegion partition, DocumentEvent event, * @see IPresentationRepairer#createPresentation(TextPresentation, * ITypedRegion) */ + @Override public void createPresentation(TextPresentation presentation, ITypedRegion region) { addRange(presentation, region.getOffset(), region.getLength(), fDefaultTextAttribute); } diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/activator/Activator.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/activator/Activator.java index 95422f6a..f10966aa 100644 --- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/activator/Activator.java +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/activator/Activator.java @@ -24,6 +24,7 @@ public class Activator extends AbstractUIPlugin { * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework. * BundleContext) */ + @Override public void start(BundleContext context) throws Exception { super.start(context); plugin = this; @@ -37,6 +38,7 @@ public void start(BundleContext context) throws Exception { * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework. * BundleContext) */ + @Override public void stop(BundleContext context) throws Exception { plugin = null; 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 a97931d7..67fb2352 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 @@ -1,5 +1,6 @@ package raven.sqdev.editors.sqdevEditor; +import raven.sqdev.constants.SQDevPreferenceConstants; import raven.sqdev.editors.BasicCodeEditor; import raven.sqdev.editors.BasicPartitionScanner; import raven.sqdev.infoCollection.base.Keyword; @@ -11,7 +12,7 @@ * An editor for the SQDev file type * * @author Raven - * + * */ public class SQDevFileEditor extends BasicCodeEditor { @@ -23,8 +24,11 @@ public SQDevFileEditor() { // remove the multi-line comment getBasicProvider().getPartitionScanner() .removeRule(BasicPartitionScanner.MULTILINE_COMMENT_RULE); - - getBasicConfiguration().getKeywordScanner().makeCaseSensitive(false); + + getBasicConfiguration() + .getKeywordScanner( + SQDevPreferenceConstants.SQDEV_EDITOR_KEYWORDHIGHLIGHTING_COLOR_KEY) + .makeCaseSensitive(false); } /** @@ -50,7 +54,10 @@ protected void setKeywords() { } // set the keywords - getBasicConfiguration().getKeywordScanner().setKeywords(keywordList); + getBasicConfiguration() + .getKeywordScanner( + SQDevPreferenceConstants.SQDEV_EDITOR_KEYWORDHIGHLIGHTING_COLOR_KEY) + .setKeywords(keywordList); } } 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 new file mode 100644 index 00000000..37d900ad --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/Language.java @@ -0,0 +1,44 @@ +package raven.sqdev.editors.stringTableEditor; + +/** + * An enum representing all available languages in ArmA 3 + * + * @author Raven + * + */ +public enum Language { + /** + * The default value + */ + ORIGINAL { + @Override + public String getTooltip() { + return "The default value"; + } + }, + ENGLISH, + CZECH, + FRENCH, + SPANISH, + ITALIAN, + POLISH, + PORTUGUESE, + RUSSIAN, + GERMAN, + KOREAN, + JAPANESE; + + @Override + public String toString() { + String name = this.name().toLowerCase(); + + return Character.toUpperCase(name.charAt(0)) + name.substring(1, name.length()); + } + + /** + * Gets the tooltip for this languge + */ + public String getTooltip() { + return "In case the user has set his/her game to \"" + 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 new file mode 100644 index 00000000..81e25562 --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport.java @@ -0,0 +1,224 @@ +package raven.sqdev.editors.stringTableEditor; + +import org.eclipse.jface.viewers.CellEditor; +import org.eclipse.jface.viewers.EditingSupport; +import org.eclipse.jface.viewers.ICellEditorListener; +import org.eclipse.jface.viewers.ICellEditorValidator; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.TextCellEditor; +import org.eclipse.jface.viewers.ViewerCell; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.PlatformUI; + +public class StringTableCellEditingSupport extends EditingSupport { + + /** + * The currently active cell + */ + private ViewerCell activeCell; + /** + * Indicates whether current input is valid + */ + private boolean isValid = true; + + public StringTableCellEditingSupport(TableViewer viewer) { + super(viewer); + } + + @Override + protected CellEditor getCellEditor(Object element) { + TextCellEditor editor = new TextCellEditor(getViewer().getTable(), SWT.SINGLE); + + Point mousePos = PlatformUI.getWorkbench().getDisplay().getCursorLocation(); + Point relMousePos = PlatformUI.getWorkbench().getDisplay().getFocusControl() + .toControl(mousePos); + + ViewerCell cell = getViewer().getCell(relMousePos); + + if (cell.getColumnIndex() == 0) { + // add validator to key cell + editor.setValidator(new ICellEditorValidator() { + + @Override + public String isValid(Object value) { + String str = (String) value; + + isValid = false; + + if (str.contains(" ")) { + return "A key may not contain a blank!"; + } + + if (str.isEmpty()) { + return "The key may not be empty!"; + } + + if (!Character.isLetter(str.charAt(0))) { + return "A key must start with a letter!"; + } + + isValid = true; + return null; + } + }); + + editor.addListener(new ICellEditorListener() { + + private Shell errorShell; + private Label errorLabel; + + @Override + public void editorValueChanged(boolean oldValidState, boolean newValidState) { + if (!newValidState) { + if (errorShell == null || errorLabel == null || errorShell.isDisposed() + || errorLabel.isDisposed()) { + errorShell = new Shell(getViewer().getTable().getShell(), + SWT.ON_TOP | SWT.TOOL); + + errorShell.setLayout(new FillLayout()); + + errorLabel = new Label(errorShell, SWT.NONE); + } + + errorLabel.setText(editor.getErrorMessage()); + errorLabel.setBackground(PlatformUI.getWorkbench().getDisplay() + .getSystemColor(SWT.COLOR_RED)); + + + FontData data = new FontData(); + data.setStyle(SWT.BOLD); + data.setHeight(8); + errorLabel.setFont(new Font(PlatformUI.getWorkbench().getDisplay(), data)); + + errorShell.setLocation(getTooltipLocation(cell, mousePos)); + errorShell.pack(); + errorShell.setVisible(true); + } else { + if (errorShell != null && !errorShell.isDisposed()) { + errorShell.setVisible(false); + } + } + } + + /** + * Gets the tooltip location for the given cell + * + * @param cell + * The cell the tooltip should be applied to + * @param mousePos + * The absolute mouse position for the given cell + * @return The location the tooltip should be put on + */ + private Point getTooltipLocation(ViewerCell cell, Point mousePos) { + // TODO: make work properly + + /* + * Point relPos = + * PlatformUI.getWorkbench().getDisplay().getFocusControl() + * .toControl(mousePos); + * + * int counter = 1; while (leftBorder == -1) { Point + * testPoint = new Point(relPos.x - counter, relPos.y); + * + * ViewerCell testCell = getViewer().getCell(testPoint); + * + * if (testCell == null || !testCell.equals(cell)) { + * leftBorder = mousePos.x + counter - 1; } else { + * counter++; } } + * + * counter = 1; while (downBorder == -1) { Point testPoint = + * new Point(relPos.x, relPos.y - counter); + * + * if (getViewer().getCell(testPoint) == null || + * !getViewer().getCell(testPoint).equals(cell)) { + * downBorder = mousePos.y + counter - 1; } else { + * counter++; } } + */ + + + // create the respective tooltip location + return new Point(mousePos.x - 10, mousePos.y + 10); + } + + @Override + public void cancelEditor() { + if (errorShell != null) { + errorShell.dispose(); + } + } + + @Override + public void applyEditorValue() { + if (errorShell != null) { + errorShell.dispose(); + } + } + }); + } + + return editor; + } + + @Override + protected boolean canEdit(Object element) { + Point cursorLocation = PlatformUI.getWorkbench().getDisplay().getCursorLocation(); + Point relativeCursorLocation = PlatformUI.getWorkbench().getDisplay().getFocusControl() + .toControl(cursorLocation); + + activeCell = getViewer().getCell(relativeCursorLocation); + + return (element instanceof StringTableKey) && activeCell != null; + } + + @Override + protected Object getValue(Object element) { + if (activeCell == null) { + return ""; + } else { + return activeCell.getText(); + } + } + + @Override + protected void setValue(Object element, Object val) { + StringTableKey keyObj = (StringTableKey) element; + String value = (String) val; + + Object data = getViewer().getTable().getColumn(activeCell.getColumnIndex()).getData(); + + if (data == null || value == null) { + // TODO: log + return; + } + + if (isValid) { + if (data instanceof Language) { + // update respective key object + keyObj.setString((Language) data, value); + } else { + if (data instanceof String) { + if (((String) data).equals(StringTableEditor.KEY_COLUMN) && !value.isEmpty()) { + keyObj.setKey(value); + } else { + return; + } + } + } + + // update cellText + activeCell.setText(value); + } + } + + @Override + public TableViewer getViewer() { + return (TableViewer) super.getViewer(); + } + +} diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableCellLabelProvider.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableCellLabelProvider.java new file mode 100644 index 00000000..0c7a77ee --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableCellLabelProvider.java @@ -0,0 +1,65 @@ +package raven.sqdev.editors.stringTableEditor; + +import org.eclipse.jface.viewers.CellLabelProvider; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.ViewerCell; + +public class StringTableCellLabelProvider extends CellLabelProvider { + + /** + * The TableViewer this provider works for + */ + private TableViewer viewer; + + public StringTableCellLabelProvider(TableViewer viewer) { + this.viewer = viewer; + } + + @Override + public void update(ViewerCell cell) { + int columnIndex = cell.getColumnIndex(); + + Object data = viewer.getTable().getColumn(columnIndex).getData(); + + if (!(data instanceof Language) || data == null) { + // this is the "add" column + return; + } + + Object key = cell.getViewerRow().getItem().getData(); + + // remove any remaining images + cell.setImage(null); + + if (key instanceof StringTableKey) { + String text = ((StringTableKey) key).getString((Language) data); + + if (text != null) { + cell.setText(text); + } else { + cell.setText("Not specified"); + } + } else { + if (key.equals(StringTableEditor.ADD_ROW) || key.equals(StringTableEditor.EMPTY_ROW)) { + // no text for an "add" row nor for an empty row + return; + } + + setErrorText(cell, "Row data is not appropriate"); + } + } + + /** + * Sets the text of the given cell to an error message + * + * @param cell + * The cell whose text should be changed + * @param msg + * The message that should be printed (may be null) + */ + private void setErrorText(ViewerCell cell, String msg) { + cell.setText("Failed" + ((msg != null) ? " " + msg : "")); + } + + +} diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableContainer.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableContainer.java new file mode 100644 index 00000000..1ec0c86f --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableContainer.java @@ -0,0 +1,177 @@ +package raven.sqdev.editors.stringTableEditor; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.core.runtime.Assert; + +import raven.sqdev.misc.UpdateReporter; + +/** + * A container for multiple StringTableKeys + * + * @author Raven + * + */ +public class StringTableContainer extends UpdateReporter implements Cloneable { + + /** + * A list of StringTableKeys contained in this container + */ + private List keyList; + + private String name; + + /** + * Creates a new container with the given name + * + * @param name + * The name of this container + */ + public StringTableContainer(String name) { + super(false); + + Assert.isTrue(name != null && !name.isEmpty()); + + this.name = name; + keyList = new ArrayList(); + } + + /** + * Adds a StringTableKey to this container if it is not already + * contained + * + * @param key + * The key to add + */ + public void addKey(StringTableKey key) { + if (!keyList.contains(key)) { + keyList.add(key); + + notifyUpdateListener(); + } + } + + /** + * Adds all StringTableKeys of the given Collection + * + * @param keys + * The Collection of keys to add + */ + public void addKeys(Collection keys) { + keyList.addAll(keys); + + notifyUpdateListener(); + } + + /** + * Removes the given StringTableKey + * + * @param key + * The key to remove + */ + public void removeKey(StringTableKey key) { + int size = keyList.size(); + + keyList.remove(key); + + if (size != keyList.size()) { + // only if something has changed + notifyUpdateListener(); + } + } + + /** + * Removes all keys of the given Collection + * + * @param keys + * The Collection of keys to remove + */ + public void removeKeys(Collection keys) { + int size = keyList.size(); + + keyList.removeAll(keys); + + if (size != keyList.size()) { + // only if something has changed + notifyUpdateListener(); + } + } + + /** + * Checks if the given key is contained in this container + * + * @param key + * The StringTableKey to search for + */ + public boolean contains(StringTableKey key) { + return keyList.contains(key); + } + + /** + * Gets the list of StringTableKeys contained in this container + */ + public List getKeys() { + return keyList; + } + + /** + * Gets the nameof this container + */ + public String getName() { + return name; + } + + /** + * Sets the name for this container + * + * @param name + * The new name + */ + public void setName(String name) { + Assert.isTrue(name != null && !name.isEmpty()); + + this.name = name; + + notifyUpdateListener(); + } + + /** + * Gets the XML representation for this container + */ + public String getXMLRepresentation() { + StringBuilder builder = new StringBuilder("\n"); + + for (StringTableKey currentKey : keyList) { + builder.append(currentKey.getXMLRepresentation() + "\n"); + } + + // add indent + String representation = builder.toString().trim().replace("\n", "\n\t"); + + return representation + "\n"; + } + + @Override + public boolean equals(Object obj) { + if (!this.getClass().equals(obj.getClass())) { + return false; + } + + StringTableContainer comparer = (StringTableContainer) obj; + + return getXMLRepresentation().equals(comparer.getXMLRepresentation()); + } + + @Override + public StringTableContainer clone() { + StringTableContainer container = new StringTableContainer(getName()); + + for(StringTableKey currentKey : getKeys()) { + container.addKey(currentKey.clone()); + } + + return container; + } +} diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableContentProvider.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableContentProvider.java new file mode 100644 index 00000000..27e633fa --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableContentProvider.java @@ -0,0 +1,41 @@ +package raven.sqdev.editors.stringTableEditor; + +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.Viewer; + +public class StringTableContentProvider implements IStructuredContentProvider { + + public StringTableContentProvider() { + // TODO Auto-generated constructor stub + } + + @Override + public void dispose() { + // TODO Auto-generated method stub + + } + + @Override + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + // TODO Auto-generated method stub + + } + + @Override + public Object[] getElements(Object inputElement) { + if (inputElement instanceof StringTableKey[]) { + return (StringTableKey[]) inputElement; + } + + if (inputElement instanceof StringTableKey) { + return new StringTableKey[] { (StringTableKey) inputElement }; + } + + if (inputElement instanceof Object[]) { + return (Object[]) inputElement; + } else { + return new Object[] { inputElement }; + } + } + +} 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 new file mode 100644 index 00000000..faad1c70 --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableEditor.java @@ -0,0 +1,1201 @@ +package raven.sqdev.editors.stringTableEditor; + +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Collection; +import java.util.EventObject; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.jface.dialogs.IPageChangedListener; +import org.eclipse.jface.dialogs.PageChangedEvent; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.viewers.CellLabelProvider; +import org.eclipse.jface.viewers.ColumnViewerEditor; +import org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent; +import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy; +import org.eclipse.jface.viewers.FocusCellOwnerDrawHighlighter; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.TableViewerColumn; +import org.eclipse.jface.viewers.TableViewerEditor; +import org.eclipse.jface.viewers.TableViewerFocusCellManager; +import org.eclipse.jface.viewers.ViewerCell; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.SashForm; +import org.eclipse.swt.custom.TreeEditor; +import org.eclipse.swt.events.FocusAdapter; +import org.eclipse.swt.events.FocusEvent; +import org.eclipse.swt.events.KeyAdapter; +import org.eclipse.swt.events.KeyEvent; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.MenuItem; +import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.swt.widgets.TableItem; +import org.eclipse.swt.widgets.Text; +import org.eclipse.swt.widgets.Tree; +import org.eclipse.swt.widgets.TreeItem; +import org.eclipse.swt.widgets.Widget; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IFileEditorInput; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.part.MultiPageEditorPart; +import raven.sqdev.editors.BasicCodeEditor; +import raven.sqdev.exceptions.SQDevCoreException; +import raven.sqdev.interfaces.IUpdateListener; +import raven.sqdev.pluginManagement.ResourceManager; +import raven.sqdev.util.SQDevInfobox; + +public class StringTableEditor extends MultiPageEditorPart { + + /** + * Indicates that the column this data is applied to represents a key and + * not a Language + */ + public static final String KEY_COLUMN = "raven.sqdev.StringTableEditor.keyRow"; + /** + * Indicates that the column this data is applied to represents the add + * column + */ + public static final String ADD_COLUMN = "raven.sqdev.StringTableEditor.addColumn"; + /** + * The TreeItem that is used for adding packages + */ + public static final String ADD_ITEM = "raven.sqdev.StringTableEditor.addItem"; + /** + * Indicates that the column this data is applied to represents the remove + * column + */ + public static final String REMOVE_COLUMN = "raven.sqdev.StringTableEditor.removeRow"; + /** + * Indicates that this row is an "add" row + */ + public static final String ADD_ROW = "raven.sqdev.StringTableEditor.addRow"; + /** + * Inicates an empty row + */ + public static final String EMPTY_ROW = "raven.sqdev.StringTableEditor.emptyRow"; + + /** + * The editor used for editing the generated output + */ + protected StringTableXMLEditor editor; + /** + * Indicates whether this editor is in dirty state + */ + protected boolean isDirty; + /** + * The index of the user interface for editing the stringTable + */ + protected int GUI_INDEX = -1; + /** + * The index of the actual XML editor + */ + protected int EDITOR_INDEX = -1; + /** + * The TableViewer for displaying the table + */ + private TableViewer viewer; + /** + * The tree showing the available packages and container + */ + private Tree packageTree; + /** + * The plus icon image + */ + private Image plusIcon; + /** + * The remove icon image + */ + private Image removeIcon; + /** + * The minus icon image + */ + private Image minusIcon; + /** + * A map containing all displayed languages and the index of the respective + * column + */ + private Map displayedLanguages; + /** + * The context menu for adding a new row + */ + private Menu addRowMenu; + /** + * The input list for the table + */ + private List tableInputList; + /** + * The container that is currently edited in the table + */ + private StringTableContainer currentTableContainer; + + /** + * A list of packages that exist in this stringTable + */ + private List packageList; + /** + * A list of "old" packages + */ + private List oldPackageList; + + + public StringTableEditor() { + super(); + + displayedLanguages = new HashMap(); + tableInputList = new ArrayList(); + packageList = new ArrayList(); + oldPackageList = new ArrayList(); + + addPageChangedListener(new IPageChangedListener() { + + @Override + public void pageChanged(PageChangedEvent event) { + if (event.getSelectedPage() instanceof BasicCodeEditor) { + // The XML editor was selected + // refresh parse + editor.parseInput(); + } else { + if (event.getSelectedPage() instanceof SashForm) { + // the GUI/table was selected + if (!editor.isValid()) { + // don't allow switching editor when there are + // errors + setActivePage(EDITOR_INDEX); + + SQDevInfobox info = new SQDevInfobox( + "Can't change to UI as there are errors in the source code!", + SWT.ICON_WARNING); + + info.open(false); + + return; + } + + List packages = editor.getPackageList(); + + if (packages.isEmpty()) { + setPackages(null); + } else { + setPackages(packages); + } + } + } + } + }); + } + + @Override + protected void createPages() { + createUIPage(); + createXMLEditorPage(); + } + + /** + * Creates the page that offers the user the UI for editing the stringtable + */ + private void createUIPage() { + // Create Basic SahsForm + SashForm sashForm = new SashForm(getContainer(), SWT.HORIZONTAL); + sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + // The package and container tree + createPackageTree(sashForm); + + // create table + createTableViewer(sashForm); + + updateTableInput(); + + sashForm.setWeights(new int[] { 1, 4 }); + + GUI_INDEX = addPage(sashForm); + setPageText(GUI_INDEX, "GUI"); + } + + /** + * Creates the tree for displaying packages and composites + * + * @param parent + * The parent to use + */ + private void createPackageTree(Composite parent) { + packageTree = new Tree(parent, SWT.SINGLE); + + TreeEditor editor = new TreeEditor(packageTree); + editor.horizontalAlignment = SWT.LEFT; + editor.grabHorizontal = true; + editor.grabVertical = true; + editor.minimumWidth = 50; + + packageTree.addListener(SWT.MouseUp, new Listener() { + + @Override + public void handleEvent(Event event) { + if (packageTree.getSelection() == null || packageTree.getSelection()[0] == null) { + return; + } + + TreeItem selectedItem = packageTree.getSelection()[0]; + + if (event.button == 1) { + // left mouseclick + Object data = selectedItem.getData(); + + if (data == null) { + return; + } + + if (data instanceof StringTableContainer) { + // display currently selected container + setTableInput((StringTableContainer) data); + } else { + if (data.equals(ADD_ITEM)) { + StringTablePackage newPackage = new StringTablePackage("New package"); + + packageList.add(packageList.size(), newPackage); + + updateTree(); + + packageChanged(newPackage); + } + } + } else { + if (event.button != 3) { + return; + } + // right mouseClick + + Menu contextMenu = new Menu(packageTree); + + if (selectedItem == null || selectedItem.getData() == null) { + return; + } + + if (selectedItem.getData() instanceof StringTablePackage) { + addPackageContextItems(contextMenu, + (StringTablePackage) selectedItem.getData()); + } else { + if (selectedItem.getData() instanceof StringTableContainer) { + addContainerContextItems(contextMenu, + (StringTableContainer) selectedItem.getData(), + (StringTablePackage) selectedItem.getParentItem().getData()); + } + } + + contextMenu.setVisible(true); + } + } + }); + + packageTree.addListener(SWT.MouseDoubleClick, new Listener() { + + @Override + public void handleEvent(Event event) { + // Clean up any previous editor control + Control oldEditor = editor.getEditor(); + if (oldEditor != null) { + oldEditor.dispose(); + } + + if (packageTree.getSelection() == null) { + return; + } + + // Identify the selected row + TreeItem item = packageTree.getSelection()[0]; + if (item == null) { + return; + } + + // The control that will be the editor must be a child of the + // Tree + Text newEditor = new Text(packageTree, SWT.NONE); + newEditor.setText(item.getText()); + newEditor.addModifyListener(new ModifyListener() { + @Override + public void modifyText(ModifyEvent e) { + + } + }); + + newEditor.addKeyListener(new KeyAdapter() { + + @Override + public void keyPressed(KeyEvent e) { + if (e.character == '\n' || e.character == '\r') { + Text textField = (Text) editor.getEditor(); + + String text = textField.getText(); + + if (!text.isEmpty() && item.getData() != null) { + + editor.getItem().setText(textField.getText()); + + Object data = item.getData(); + + if (data instanceof StringTableContainer) { + ((StringTableContainer) data).setName(text); + } else { + if (data instanceof StringTablePackage) { + ((StringTablePackage) data).setName(text); + } + } + } + + newEditor.dispose(); + } + } + }); + + newEditor.addFocusListener(new FocusAdapter() { + + @Override + public void focusLost(FocusEvent e) { + newEditor.dispose(); + } + }); + + newEditor.selectAll(); + newEditor.setFocus(); + editor.setEditor(newEditor, item); + } + }); + + updateTree(); + } + + /** + * Adds the MenuItems for the package context menu + * + * @param menu + * The menu to add the items to + * @param pkg + * The package that is affected + */ + private void addPackageContextItems(Menu menu, StringTablePackage pkg) { + // add container option + MenuItem addContainerItem = new MenuItem(menu, SWT.PUSH); + addContainerItem.setText("Add Container"); + addContainerItem.setImage(getPlusIconImage()); + + addContainerItem.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent event) { + StringTableContainer newContainer = new StringTableContainer("New container"); + StringTableKey newKey = new StringTableKey("New_Key"); + newKey.setString(Language.ORIGINAL, ""); + newContainer.addKey(newKey); + + pkg.addContainer(newContainer); + + updateTree(); + } + }); + + // add separator + new MenuItem(menu, SWT.SEPARATOR); + + // remove option + MenuItem removeItem = new MenuItem(menu, SWT.PUSH); + removeItem.setText("Delete package \"" + pkg.getName() + "\""); + removeItem.setImage(getRemoveIconImage()); + + removeItem.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent event) { + pkg.removeAllUpdateListener(); + + packageList.remove(pkg); + + for (StringTableContainer currentContainer : pkg.getContainer()) { + if (currentContainer.equals(currentTableContainer)) { + // don't display a container that does no longer exist + setTableInput(null); + break; + } + } + + if (packageList.size() == 0) { + StringTablePackage defaultPackage = new StringTablePackage("Default package"); + packageList.add(defaultPackage); + } + + updateTree(); + } + }); + } + + /** + * Adds the MenuItems for the container context menu + * + * @param menu + * The menu to add the items to + * @param container + * The container that is affected + * @param pkg + * The package of the container + */ + private void addContainerContextItems(Menu menu, StringTableContainer container, + StringTablePackage pkg) { + MenuItem removeItem = new MenuItem(menu, SWT.PUSH); + removeItem.setText("Delete container \"" + container.getName() + "\""); + removeItem.setImage(getRemoveIconImage()); + + removeItem.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent event) { + container.removeAllUpdateListener(); + + pkg.removeContainer(container); + + if (currentTableContainer.equals(container)) { + setTableInput(null); + } + + updateTree(); + } + }); + } + + /** + * Updates the input of the table according to {@link #tableInputList} + */ + private void updateTableInput() { + if (viewer != null) { + // don't show the single update steps + viewer.getTable().setRedraw(false); + + // reset used languages + displayedLanguages.clear(); + + // remove old columns + for (TableColumn currentColumn : viewer.getTable().getColumns()) { + currentColumn.dispose(); + } + + createBasicColumns(); + + + List languages = new ArrayList(); + + if (tableInputList.isEmpty()) { + viewer.getTable().setEnabled(false); + viewer.getTable().setRedraw(true); + return; + } + + // find out the configured languages + for (Object current : tableInputList) { + if (current instanceof StringTableKey) { + for (Language currentLanguage : ((StringTableKey) current).getLanguages()) { + if (!languages.contains(currentLanguage)) { + languages.add(currentLanguage); + } + } + } + } + + // show the needed columns + for (Language currentLanguage : languages) { + addLanguageColumn(currentLanguage); + } + + viewer.setInput(tableInputList.toArray(new Object[tableInputList.size()])); + + // update table + viewer.getTable().setRedraw(true); + if (!viewer.getTable().isEnabled()) { + viewer.getTable().setEnabled(true); + viewer.getTable().update(); + } + } + } + + /** + * Creates and configures the TableViewer used to display the data + * + * @param parent + * The parent composite to use + */ + private void createTableViewer(Composite parent) { + viewer = new TableViewer(parent, SWT.SINGLE | SWT.FULL_SELECTION | SWT.HIDE_SELECTION); + + viewer.getTable().setLinesVisible(true); + viewer.getTable().setHeaderVisible(true); + + viewer.setContentProvider(new StringTableContentProvider()); + viewer.setLabelProvider(new LabelProvider()); + + viewer.getTable().addSelectionListener(new SelectionAdapter() { + + @Override + public void widgetSelected(SelectionEvent e) { + Widget item = e.item; + + if (item instanceof TableItem) { + Object data = ((TableItem) item).getData(); + + Point mousePos = PlatformUI.getWorkbench().getDisplay().getCursorLocation(); + Point relPos = PlatformUI.getWorkbench().getDisplay().getFocusControl() + .toControl(mousePos); + + ViewerCell cell = viewer.getCell(relPos); + + if (data.equals(ADD_ROW)) { + if (cell == null) { + return; + } + + if (viewer.getTable().getColumn(cell.getColumnIndex()).getData() + .equals(KEY_COLUMN)) { + // only open when clicked on the plus cell + openAddRowMenu(); + } + } else { + if (data instanceof StringTableKey && viewer.getTable() + .getColumn(cell.getColumnIndex()).getData().equals(REMOVE_COLUMN)) { + // open when clicked on a key row + openRemoveRowMenu((StringTableKey) data); + } + } + } + } + }); + + TableViewerFocusCellManager focusCellManager = new TableViewerFocusCellManager(viewer, + new FocusCellOwnerDrawHighlighter(viewer)); + + ColumnViewerEditorActivationStrategy activationSupport = new ColumnViewerEditorActivationStrategy( + viewer) { + @Override + protected boolean isEditorActivationEvent(ColumnViewerEditorActivationEvent event) { + // Enable editor only with mouse double click + if (event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION) { + EventObject source = event.sourceEvent; + if (source instanceof MouseEvent && ((MouseEvent) source).button == 3) + return false; + + return true; + } + + return false; + } + }; + + TableViewerEditor.create(viewer, focusCellManager, activationSupport, + ColumnViewerEditor.TABBING_HORIZONTAL + | ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR + | ColumnViewerEditor.TABBING_VERTICAL + | ColumnViewerEditor.KEYBOARD_ACTIVATION); + + updateTableInput(); + } + + /** + * Creates the basic columns for the specified languages + */ + 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().setWidth(100); + keyColumn.getColumn().setResizable(true); + keyColumn.getColumn().setData(KEY_COLUMN); + + keyColumn.setLabelProvider(new CellLabelProvider() { + + @Override + public void update(ViewerCell cell) { + Object data = cell.getViewerRow().getItem().getData(); + + // remove possible remaining image + cell.setImage(null); + + if (data == null) { + cell.setText(""); + return; + } + + if (data instanceof String) { + String input = (String) data; + + if (input.equals(ADD_ROW)) { + cell.setImage(getPlusIconImage()); + + return; + } + + if (input.equals(EMPTY_ROW)) { + // nothing to display in an empty row + return; + } + + cell.setText(""); + + return; + } + + if (data instanceof StringTableKey) { + cell.setText(((StringTableKey) data).getKey()); + } else { + cell.setText("Inappropriate data in row"); + } + } + }); + keyColumn.setEditingSupport(new StringTableCellEditingSupport(viewer)); + + + // column for adding a language + TableViewerColumn addColumn = new TableViewerColumn(viewer, SWT.NONE); + addColumn.getColumn().setToolTipText("Adds a language column"); + addColumn.getColumn().setResizable(false); + addColumn.getColumn().setData(ADD_COLUMN); + addColumn.getColumn().setImage(getPlusIconImage()); + addColumn.getColumn().pack(); + + addColumn.setLabelProvider(new StringTableCellLabelProvider(viewer)); + + addColumn.getColumn().addSelectionListener(new SelectionAdapter() { + + @Override + public void widgetSelected(SelectionEvent e) { + openAddColumnPopupMenu(); + } + }); + + + TableViewerColumn removeRowColumn = new TableViewerColumn(viewer, SWT.NONE); + removeRowColumn.getColumn().setResizable(false); + removeRowColumn.getColumn().setWidth(50); + removeRowColumn.getColumn().setData(REMOVE_COLUMN); + + removeRowColumn.setLabelProvider(new CellLabelProvider() { + + @Override + public void update(ViewerCell cell) { + if (!cell.getItem().getData().equals(ADD_ROW) + && !cell.getItem().getData().equals(EMPTY_ROW)) { + cell.setImage(getMinusIcon()); + } + } + }); + } + + /** + * Adds a column for the given language + * + * @param language + * The Language the column should be created for + */ + private void addLanguageColumn(Language language) { + // TODO: sort alphabetically + int index = viewer.getTable().getColumnCount() - 2; + + // store index for this language + displayedLanguages.put(language, index); + + // add the column before the "add" column + TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE, index); + + column.getColumn().setText(language.toString()); + column.getColumn().setToolTipText(language.getTooltip()); + column.getColumn().setWidth(200); + column.getColumn().setResizable(true); + column.getColumn().setMoveable(false); + column.getColumn().setData(language); + + column.setEditingSupport(new StringTableCellEditingSupport(viewer)); + column.setLabelProvider(new StringTableCellLabelProvider(viewer)); + + + // add context menu + column.getColumn().addSelectionListener(new SelectionAdapter() { + + @Override + public void widgetSelected(SelectionEvent e) { + Menu contextMenu = new Menu(viewer.getTable()); + + MenuItem remove = new MenuItem(contextMenu, SWT.PUSH); + remove.setText("Remove column"); + remove.setImage(getRemoveIconImage()); + + remove.addSelectionListener(new SelectionAdapter() { + + @Override + public void widgetSelected(SelectionEvent e) { + SQDevInfobox info = new SQDevInfobox( + "This will delete the language " + language + + " from this stringTable (and all defined Strings for it)!\n\n" + + "Do you want to proceed", + SWT.ICON_QUESTION | SWT.NO | SWT.YES); + + if (info.open() != SWT.YES) { + // abort + return; + } + + // dispose respective column + viewer.getTable().getColumn(getColumnIndex(language)).dispose(); + + // update input + for (Object current : tableInputList) { + if (current instanceof StringTableKey) { + ((StringTableKey) current).remove(language); + } + } + + displayedLanguages.remove(language); + + updateColumnIndices(); + } + }); + + contextMenu.setVisible(true); + } + }); + } + + /** + * Gets the plus icon as an image + */ + private Image getPlusIconImage() { + if (plusIcon == null) { + InputStream plusStream = ResourceManager.getManager() + .getInternalResourceStream(ResourceManager.PLUS_ICON); + + plusIcon = new Image(PlatformUI.getWorkbench().getDisplay(), plusStream); + } + + return plusIcon; + } + + /** + * Gets the remove icon as an image + */ + private Image getRemoveIconImage() { + if (removeIcon == null) { + InputStream removeStream = ResourceManager.getManager() + .getInternalResourceStream(ResourceManager.REMOVE_ICON); + + removeIcon = new Image(PlatformUI.getWorkbench().getDisplay(), removeStream); + } + + return removeIcon; + } + + /** + * Gets the minus icon as an image + */ + private Image getMinusIcon() { + if (minusIcon == null) { + InputStream minusStream = ResourceManager.getManager() + .getInternalResourceStream(ResourceManager.MINUS_ICON); + + minusIcon = new Image(PlatformUI.getWorkbench().getDisplay(), minusStream); + } + + return minusIcon; + } + + /** + * Opens the context menu for adding a column + */ + private void openAddColumnPopupMenu() { + Menu menu = new Menu(viewer.getTable()); + + for (Language language : Language.values()) { + if (!displayedLanguages.containsKey(language)) { + MenuItem languageItem = new MenuItem(menu, SWT.PUSH); + languageItem.setText("Add " + language.toString()); + languageItem.setImage(getPlusIconImage()); + + languageItem.addSelectionListener(new SelectionAdapter() { + + @Override + public void widgetSelected(SelectionEvent e) { + addLanguageColumn(language); + } + }); + } + } + + if (menu.getItemCount() == 0) { + MenuItem item = new MenuItem(menu, SWT.PUSH); + item.setText("No further languages available in ArmA..."); + + item.setEnabled(false); + } + + menu.setVisible(true); + } + + private void openAddRowMenu() { + if (addRowMenu == null) { + addRowMenu = new Menu(viewer.getTable()); + + MenuItem addRow = new MenuItem(addRowMenu, SWT.PUSH); + addRow.setText("Add new key"); + addRow.setImage(getPlusIconImage()); + + addRow.addSelectionListener(new SelectionAdapter() { + + @Override + public void widgetSelected(SelectionEvent e) { + StringTableKey newKey = new StringTableKey("My_Key"); + + tableInputList.add(tableInputList.size() - 1, newKey); + currentTableContainer.addKey(newKey); + + updateTableInput(); + } + }); + } + + addRowMenu.setVisible(true); + } + + /** + * Opens the remove row meu for the given key row + * + * @param key + * The key corresponding to the row to delete + */ + private void openRemoveRowMenu(StringTableKey key) { + Menu removeMenu = new Menu(viewer.getTable()); + + MenuItem removeItem = new MenuItem(removeMenu, SWT.PUSH); + removeItem.setText("Remove key \"" + key.getKey() + "\""); + removeItem.setImage(getRemoveIconImage()); + + removeItem.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent event) { + key.removeAllUpdateListener(); + tableInputList.remove(key); + currentTableContainer.removeKey(key); + + updateTableInput(); + } + }); + + + removeMenu.setVisible(true); + } + + /** + * Updates the indices of the displayed columns + */ + private void updateColumnIndices() { + TableColumn[] columns = viewer.getTable().getColumns(); + int[] indices = viewer.getTable().getColumnOrder(); + + for (int i = 0; i < columns.length; i++) { + TableColumn currentColumn = columns[i]; + + Object data = currentColumn.getData(); + + if (data instanceof Language) { + displayedLanguages.put((Language) data, indices[i]); + } + } + } + + /** + * Gets the index for the column that is associated with the given language + * + * @param language + * The Language whose column index should be + * obtained. The language has to be displayed at the time this + * method is called + */ + private int getColumnIndex(Language language) { + Assert.isTrue(displayedLanguages.containsKey(language)); + + return displayedLanguages.get(language).intValue(); + } + + /** + * Updates the {@link #packageTree} according to the {@link #packageList} + */ + private void updateTree() { + if (packageTree != null) { + packageTree.removeAll(); + + for (StringTablePackage currentPackage : packageList) { + // create package node + TreeItem packageItem = new TreeItem(packageTree, SWT.NONE); + packageItem.setText(currentPackage.getName()); + packageItem.setData(currentPackage); + + for (StringTableContainer currentContainer : currentPackage.getContainer()) { + TreeItem containerItem = new TreeItem(packageItem, SWT.NONE); + containerItem.setText(currentContainer.getName()); + containerItem.setData(currentContainer); + } + } + + // add "add" item + TreeItem addItem = new TreeItem(packageTree, SWT.NONE); + addItem.setImage(getPlusIconImage()); + addItem.setData(ADD_ITEM); + + if (packageTree.getItemCount() > 1) { + packageTree.select(packageTree.getItem(0)); + } + + packageTree.update(); + } + } + + /** + * Sets the input for the table of this editor + * + * @param input + * The StringTableContainer to use as an input. Can + * be null in order to clear the table + */ + public void setTableInput(StringTableContainer input) { + this.tableInputList.clear(); + currentTableContainer = input; + + if (input != null) { + this.tableInputList.addAll(input.getKeys()); + this.tableInputList.add(ADD_ROW); + } + + updateTableInput(); + } + + /** + * Sets the packages for this editor + * + * @param packages + * The StringTablePackages for this editor + */ + public void setPackages(Collection packages) { + packageList.clear(); + + if (packages == null) { + packages = new ArrayList(); + StringTablePackage defaultPackage = new StringTablePackage("Default package"); + + packages.add(defaultPackage); + } + + packageList.addAll(packages); + + boolean isSelectionContained = false; + + for (StringTablePackage currentPackage : packageList) { + configurePackageListener(currentPackage); + + if (!isSelectionContained && currentPackage.contains(currentTableContainer)) { + isSelectionContained = true; + } + } + + if (!isSelectionContained) { + setTableInput(null); + } + + updateTree(); + changed(); + } + + /** + * Adds the needed IUpdateListener to the given package, it's + * container and the keys contained in these container + * + * @param pkg + * The StringTablePackage to configure + */ + private void configurePackageListener(StringTablePackage pkg) { + pkg.addUpdateListener(new IUpdateListener() { + + @Override + public void updated() { + packageChanged(pkg); + } + }); + + for (StringTableContainer currentContainer : pkg.getContainer()) { + configureContainerListener(currentContainer); + } + } + + /** + * Adds needed IUpdateListener to the given container and all + * of it's keys + * + * @param container + * The StringTableContainer to configure + */ + private void configureContainerListener(StringTableContainer container) { + container.addUpdateListener(new IUpdateListener() { + + @Override + public void updated() { + containerChanged(container); + } + }); + + for (StringTableKey currentKey : container.getKeys()) { + configureKeyListener(currentKey); + } + } + + /** + * Adds the needed IUpdateListener to the given key + * + * @param key + * The StringTableKey to configure + */ + private void configureKeyListener(StringTableKey key) { + key.addUpdateListener(new IUpdateListener() { + + @Override + public void updated() { + keyChanged(key); + } + }); + } + + /** + * Gets called when a package has changed + * + * @param pkg + * The changed package + */ + private void packageChanged(StringTablePackage pkg) { + System.out.println("Package \"" + pkg.getName() + "\" changed"); + changed(); + } + + /** + * Gets called when a container has changed + * + * @param container + * The changed container + */ + private void containerChanged(StringTableContainer container) { + System.out.println("Container \"" + container.getName() + "\" changed"); + changed(); + } + + /** + * Gets called whenever a key changed + * + * @param key + * The changed key + */ + private void keyChanged(StringTableKey key) { + System.out.println("Key \"" + key.getKey() + "\" changed"); + changed(); + } + + /** + * Gets called whenever the UI part of this editor has changed + */ + private void changed() { + if (!oldPackageList.equals(packageList)) { + if (!oldPackageList.isEmpty()) { + isDirty = true; + syncXMLPresentation(); + } + + oldPackageList.clear(); + // update old package list + for (StringTablePackage currentPackage : packageList) { + oldPackageList.add(currentPackage.clone()); + } + } + } + + /** + * Creates the page with the XML editor + */ + private void createXMLEditorPage() { + try { + editor = new StringTableXMLEditor(); + + EDITOR_INDEX = addPage(editor, getEditorInput()); + setPageText(EDITOR_INDEX, "XML"); + + // syncXMLPresentation(); + } catch (PartInitException e) { + throw new SQDevCoreException("Couldn't create stringTableEditor", e); + } + } + + /** + * Syncs the XML representation to the current state of the GUI + */ + protected void syncXMLPresentation() { + if (editor == null) { + return; + } + + // the editor was selected + IDocument editorDocument = editor.getBasicProvider().getDocument(editor.getEditorInput()); + + IEditorInput input = getEditorInput(); + + String projectName = "MyProject"; + + if (input instanceof IFileEditorInput) { + IProject project = ((IFileEditorInput) input).getFile().getProject(); + + if (project != null) { + projectName = project.getName(); + ; + } + } + + StringBuilder builder = new StringBuilder("\n"); + builder.append("\n"); + + for (StringTablePackage currentPackage : packageList) { + builder.append(currentPackage.getXMLRepresentation() + "\n"); + } + + String editorInput = builder.toString().trim().replace("\n", "\n\t"); + + editorDocument.set(editorInput.replaceFirst("\n\t", "\n") + "\n"); + } + + @Override + public void doSave(IProgressMonitor monitor) { + editor.doSave(monitor); + } + + @Override + public void doSaveAs() { + editor.doSaveAs(); + } + + @Override + public boolean isSaveAsAllowed() { + return editor.isSaveAsAllowed(); + } + +} diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableKey.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableKey.java new file mode 100644 index 00000000..2ed867eb --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableKey.java @@ -0,0 +1,170 @@ +package raven.sqdev.editors.stringTableEditor; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map.Entry; + +import org.eclipse.core.runtime.Assert; + +import raven.sqdev.misc.UpdateReporter; + +public class StringTableKey extends UpdateReporter implements Cloneable { + + /** + * The respective key + */ + private String key; + + private HashMap localizedStrings; + + public StringTableKey(String key) { + super(false); + + Assert.isTrue(key != null && !key.isEmpty(), "Invalid key (null or empty)"); + + this.key = key; + + localizedStrings = new HashMap(); + } + + /** + * Gets the String for the given language + * + * @param language + * The Language the String should be returned for + * @return The respective String or an empty String if none could be found + */ + public String getString(Language language) { + return (localizedStrings.containsKey(language)) ? localizedStrings.get(language) : ""; + } + + /** + * Sets the String for the given language + * + * @param language + * The Language the string should be associated with + * @param string + * The string to store + */ + public void setString(Language language, String string) { + Assert.isNotNull(language); + Assert.isNotNull(string); + + localizedStrings.put(language, string); + + notifyUpdateListener(); + } + + /** + * Checks whether a string for the given language is stored + * + * @param language + * The Language to search for + */ + public boolean containsString(Language language) { + return localizedStrings.containsKey(language); + } + + /** + * @return The key represneted by this object + */ + public String getKey() { + return key; + } + + @Override + public String toString() { + return "Key: " + getKey(); + } + + /** + * Sets the key for this object + * + * @param value + * The new key + */ + public void setKey(String value) { + this.key = value; + + notifyUpdateListener(); + } + + /** + * Removes the given language + * + * @param language + * The Lamguage to remove + */ + public void remove(Language language) { + int size = localizedStrings.size(); + + localizedStrings.remove(language); + + if (size != localizedStrings.size()) { + // only if something has changed + notifyUpdateListener(); + } + } + + /** + * Gets the Languages this key is configured for + */ + public Language[] getLanguages() { + return localizedStrings.keySet().toArray(new Language[localizedStrings.keySet().size()]); + } + + /** + * Gets the XML representation for this key + */ + public String getXMLRepresentation() { + StringBuilder builder = new StringBuilder("\n"); + + Iterator it = localizedStrings.keySet().iterator(); + + while (it.hasNext()) { + Language currentLanguage = it.next(); + + String str = localizedStrings.get(currentLanguage); + + // escape special characters + str = str.replace("'", "&#" + (int) '\'' + ";"); + str = str.replace("\"", "&#" + (int) '"' + ";"); + str = str.replace("<", "&#" + (int) '<' + ";"); + str = str.replace(">", "&#" + (int) '>' + ";"); + + builder.append("<" + currentLanguage.toString() + ">"); + builder.append(str); + builder.append("\n"); + } + + String representation = builder.toString().trim().replace("\n", "\n\t"); + + return representation + "\n"; + } + + @Override + public boolean equals(Object obj) { + if (!this.getClass().equals(obj.getClass())) { + return false; + } + + StringTableKey comparer = (StringTableKey) obj; + + return getXMLRepresentation().equals(comparer.getXMLRepresentation()); + } + + @Override + public StringTableKey clone() { + StringTableKey key = new StringTableKey(getKey()); + + Iterator> it = localizedStrings.entrySet().iterator(); + + while (it.hasNext()) { + Entry entry = it.next(); + + key.setString(entry.getKey(), entry.getValue()); + } + + return key; + } +} diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTablePackage.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTablePackage.java new file mode 100644 index 00000000..210bed48 --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTablePackage.java @@ -0,0 +1,173 @@ +package raven.sqdev.editors.stringTableEditor; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.core.runtime.Assert; + +import raven.sqdev.misc.UpdateReporter; + +/** + * A container for multiple StringTableContainer + * + * @author Raven + * + */ +public class StringTablePackage extends UpdateReporter implements Cloneable { + + /** + * The name of this package + */ + private String name; + /** + * A list of containers contained in this package + */ + private List containerList; + + + /** + * Creates a new package with the given name + * + * @param name + * The name of the new package + */ + public StringTablePackage(String name) { + super(false); + + Assert.isTrue(name != null && !name.isEmpty()); + + this.name = name; + containerList = new ArrayList(); + } + + /** + * Gets the name of this package + */ + public String getName() { + return name; + } + + /** + * Sets the name of this package + * + * @param name + * The new name for this package + */ + public void setName(String name) { + Assert.isTrue(name != null && !name.isEmpty()); + + this.name = name; + + notifyUpdateListener(); + } + + /** + * Adds the given container to this package if it is not already added + * + * @param container + * The StringTableContainer to add + */ + public void addContainer(StringTableContainer container) { + if (!containerList.contains(container)) { + containerList.add(container); + + notifyUpdateListener(); + } + } + + /** + * Adds all container from the given Collection + * + * @param containers + * The Collection with the + * StringTableContainer to add + */ + public void addContainers(Collection containers) { + containerList.addAll(containers); + + notifyUpdateListener(); + } + + /** + * Removes the container to remove + * + * @param container + * The StringTableContainer to remove + */ + public void removeContainer(StringTableContainer container) { + containerList.remove(container); + + notifyUpdateListener(); + } + + /** + * Removes all containers of the given Collection + * + * @param containers + * The Collection of + * StringTableContainer to remove + */ + public void removeContainer(Collection containers) { + containerList.removeAll(containers); + + notifyUpdateListener(); + } + + /** + * Checks whether the given container is contained in this package + * + * @param container + * The StringTableContainer to search for + */ + public boolean contains(StringTableContainer container) { + return containerList.contains(container); + } + + /** + * Gets the list of StringTableContainer that are contained in + * this package + */ + public List getContainer() { + return containerList; + } + + /** + * Fets the XML representation for this package + */ + public String getXMLRepresentation() { + StringBuilder builder = new StringBuilder("\n"); + + for (StringTableContainer currentContainer : containerList) { + builder.append(currentContainer.getXMLRepresentation() + "\n"); + } + + // add indent + String representation = builder.toString().trim().replace("\n", "\n\t"); + + return representation + "\n"; + } + + @Override + public boolean equals(Object obj) { + if (!this.getClass().equals(obj.getClass())) { + return false; + } + + StringTablePackage comparer = (StringTablePackage) obj; + + return getXMLRepresentation().equals(comparer.getXMLRepresentation()); + } + + @Override + public StringTablePackage clone() { + StringTablePackage pkg = new StringTablePackage(getName()); + + for (StringTableContainer currentContainer : getContainer()) { + pkg.addContainer(currentContainer.clone()); + } + + return pkg; + } + +} diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableSourceViewerConfiguration.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableSourceViewerConfiguration.java new file mode 100644 index 00000000..4864263d --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableSourceViewerConfiguration.java @@ -0,0 +1,34 @@ +package raven.sqdev.editors.stringTableEditor; + +import org.eclipse.jface.text.TextAttribute; +import org.eclipse.jface.text.presentation.IPresentationReconciler; +import org.eclipse.jface.text.presentation.PresentationReconciler; +import org.eclipse.jface.text.source.ISourceViewer; + +import raven.sqdev.constants.ISQDevColorConstants; +import raven.sqdev.editors.BasicCodeEditor; +import raven.sqdev.editors.BasicSourceViewerConfiguration; +import raven.sqdev.editors.ColorManager; +import raven.sqdev.editors.NonRuleBasedDamagerRepairer; + +public class StringTableSourceViewerConfiguration extends BasicSourceViewerConfiguration { + + public StringTableSourceViewerConfiguration(ColorManager manager, BasicCodeEditor editor) { + super(manager, editor); + } + + @Override + public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) { + PresentationReconciler reconciler = (PresentationReconciler) super.getPresentationReconciler( + sourceViewer); + + NonRuleBasedDamagerRepairer dr = new NonRuleBasedDamagerRepairer( + new TextAttribute(colorManager.getColor(ISQDevColorConstants.TAG))); + + reconciler.setDamager(dr, StringTableXMLEditor.TAG); + reconciler.setRepairer(dr, StringTableXMLEditor.TAG); + + return reconciler; + } + +} diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableXMLEditor.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableXMLEditor.java new file mode 100644 index 00000000..d30d2fce --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableXMLEditor.java @@ -0,0 +1,112 @@ +package raven.sqdev.editors.stringTableEditor; + +import java.util.ArrayList; +import java.util.List; + +import org.antlr.v4.runtime.ANTLRInputStream; +import org.antlr.v4.runtime.CommonTokenStream; +import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.runtime.tree.ParseTreeWalker; +import org.eclipse.jface.text.rules.IPredicateRule; +import org.eclipse.jface.text.rules.MultiLineRule; +import org.eclipse.jface.text.rules.Token; + +import raven.sqdev.editors.BasicCodeEditor; +import raven.sqdev.editors.BasicErrorListener; +import raven.sqdev.editors.BasicSourceViewerConfiguration; +import raven.sqdev.editors.stringtableParsing.StringTableLexer; +import raven.sqdev.editors.stringtableParsing.StringTableParser; +import raven.sqdev.editors.stringtableParsing.StringTableWalkListener; +import raven.sqdev.misc.CharacterPair; + +/** + * The editor used in the StringTableEditor for editing the XML file + * + * @author Raven + * + */ +public class StringTableXMLEditor extends BasicCodeEditor { + + public static final String TAG = "__stringTableEditor_Tag"; + public static final IPredicateRule TAG_RULE = new MultiLineRule("<", ">", new Token(TAG)); + /** + * The token stream corresponding to the current parse tree + */ + protected CommonTokenStream stream; + /** + * The package list contained in this editor + */ + private List packageList; + + + public StringTableXMLEditor() { + getBasicProvider().getPartitionScanner().setRules(new IPredicateRule[] { TAG_RULE }); + } + + @Override + protected ParseTree doParse(String input) { + ANTLRInputStream in = new ANTLRInputStream(input); + + BasicErrorListener listener = new BasicErrorListener(this); + + StringTableLexer lexer = new StringTableLexer(in); + lexer.removeErrorListeners(); + lexer.addErrorListener(listener); + + stream = new CommonTokenStream(lexer); + + StringTableParser parser = new StringTableParser(stream); + parser.removeErrorListeners(); + parser.addErrorListener(listener); + + return parser.content(); + } + + @Override + protected void processParseTree(ParseTree tree) { + ParseTreeWalker walker = new ParseTreeWalker(); + + StringTableWalkListener listener = new StringTableWalkListener(stream); + + walker.walk(listener, tree); + + packageList = listener.getPackageList(); + + applyParseChanges(); + } + + @Override + protected List getCharacterPairs() { + List pairs = new ArrayList(); + + pairs.add(CharacterPair.DOUBLE_QUOTATION_MARKS); + pairs.add(CharacterPair.SINGLE_QUOTATION_MARKS); + pairs.add(CharacterPair.TAG); + + return pairs; + } + + @Override + public BasicSourceViewerConfiguration getBasicConfiguration() { + if (configuration == null + || !(configuration instanceof StringTableSourceViewerConfiguration)) { + configuration = new StringTableSourceViewerConfiguration(getColorManager(), this); + } + + return configuration; + } + + /** + * Gets the list of StringTablePackages contained in this + * editor. May be null if not yet initialized + */ + public List getPackageList() { + return packageList; + } + + @Override + public boolean isDirty() { + return super.isDirty(); + } + +} diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTable.tokens b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTable.tokens new file mode 100644 index 00000000..3002f98e --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTable.tokens @@ -0,0 +1,19 @@ +PROJECT=6 +EQUALS=5 +CLOSE=4 +ANY=15 +PKG=8 +OPEN=3 +NAME=7 +OPEN_CLOSE=2 +CONTAINER=9 +STRING=12 +IDENTIFIER=11 +ID=13 +WS=14 +INFO_TAG=1 +KEY=10 +'>'=4 +'='=5 +'<'=3 +' + * The default implementation does nothing. + */ + @Override public void enterPackageStartTag(@NotNull StringTableParser.PackageStartTagContext ctx) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void exitPackageStartTag(@NotNull StringTableParser.PackageStartTagContext ctx) { } + + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void enterContainer(@NotNull StringTableParser.ContainerContext ctx) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void exitContainer(@NotNull StringTableParser.ContainerContext ctx) { } + + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void enterKeyCloseTag(@NotNull StringTableParser.KeyCloseTagContext ctx) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void exitKeyCloseTag(@NotNull StringTableParser.KeyCloseTagContext ctx) { } + + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void enterKeyStartTag(@NotNull StringTableParser.KeyStartTagContext ctx) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void exitKeyStartTag(@NotNull StringTableParser.KeyStartTagContext ctx) { } + + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void enterProject(@NotNull StringTableParser.ProjectContext ctx) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void exitProject(@NotNull StringTableParser.ProjectContext ctx) { } + + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void enterLanguageCloseTag(@NotNull StringTableParser.LanguageCloseTagContext ctx) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void exitLanguageCloseTag(@NotNull StringTableParser.LanguageCloseTagContext ctx) { } + + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void enterProjectStartTag(@NotNull StringTableParser.ProjectStartTagContext ctx) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void exitProjectStartTag(@NotNull StringTableParser.ProjectStartTagContext ctx) { } + + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void enterLanguage(@NotNull StringTableParser.LanguageContext ctx) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void exitLanguage(@NotNull StringTableParser.LanguageContext ctx) { } + + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void enterPkg(@NotNull StringTableParser.PkgContext ctx) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void exitPkg(@NotNull StringTableParser.PkgContext ctx) { } + + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void enterContent(@NotNull StringTableParser.ContentContext ctx) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void exitContent(@NotNull StringTableParser.ContentContext ctx) { } + + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void enterContainerStartTag(@NotNull StringTableParser.ContainerStartTagContext ctx) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void exitContainerStartTag(@NotNull StringTableParser.ContainerStartTagContext ctx) { } + + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void enterContainerEndTag(@NotNull StringTableParser.ContainerEndTagContext ctx) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void exitContainerEndTag(@NotNull StringTableParser.ContainerEndTagContext ctx) { } + + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void enterPackageEndTag(@NotNull StringTableParser.PackageEndTagContext ctx) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void exitPackageEndTag(@NotNull StringTableParser.PackageEndTagContext ctx) { } + + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void enterProjectEndTag(@NotNull StringTableParser.ProjectEndTagContext ctx) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void exitProjectEndTag(@NotNull StringTableParser.ProjectEndTagContext ctx) { } + + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void enterKey(@NotNull StringTableParser.KeyContext ctx) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void exitKey(@NotNull StringTableParser.KeyContext ctx) { } + + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void enterLanguageOpenTag(@NotNull StringTableParser.LanguageOpenTagContext ctx) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void exitLanguageOpenTag(@NotNull StringTableParser.LanguageOpenTagContext ctx) { } + + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void enterEveryRule(@NotNull ParserRuleContext ctx) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void exitEveryRule(@NotNull ParserRuleContext ctx) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void visitTerminal(@NotNull TerminalNode node) { } + /** + * {@inheritDoc} + *

+ * The default implementation does nothing. + */ + @Override public void visitErrorNode(@NotNull ErrorNode node) { } +} \ No newline at end of file diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableBaseVisitor.class b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableBaseVisitor.class new file mode 100644 index 00000000..ae5ae664 Binary files /dev/null and b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableBaseVisitor.class differ diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableBaseVisitor.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableBaseVisitor.java new file mode 100644 index 00000000..8c660049 --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableBaseVisitor.java @@ -0,0 +1,142 @@ +package raven.sqdev.editors.stringtableParsing; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; + +/** + * This class provides an empty implementation of {@link StringTableVisitor}, + * 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. + */ +@SuppressWarnings("deprecation") +public class StringTableBaseVisitor extends AbstractParseTreeVisitor implements StringTableVisitor { + /** + * {@inheritDoc} + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + */ + @Override public T visitPackageStartTag(@NotNull StringTableParser.PackageStartTagContext ctx) { return visitChildren(ctx); } + + /** + * {@inheritDoc} + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + */ + @Override public T visitContainer(@NotNull StringTableParser.ContainerContext ctx) { return visitChildren(ctx); } + + /** + * {@inheritDoc} + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + */ + @Override public T visitKeyCloseTag(@NotNull StringTableParser.KeyCloseTagContext ctx) { return visitChildren(ctx); } + + /** + * {@inheritDoc} + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + */ + @Override public T visitKeyStartTag(@NotNull StringTableParser.KeyStartTagContext ctx) { return visitChildren(ctx); } + + /** + * {@inheritDoc} + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + */ + @Override public T visitProject(@NotNull StringTableParser.ProjectContext ctx) { return visitChildren(ctx); } + + /** + * {@inheritDoc} + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + */ + @Override public T visitLanguageCloseTag(@NotNull StringTableParser.LanguageCloseTagContext ctx) { return visitChildren(ctx); } + + /** + * {@inheritDoc} + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + */ + @Override public T visitProjectStartTag(@NotNull StringTableParser.ProjectStartTagContext ctx) { return visitChildren(ctx); } + + /** + * {@inheritDoc} + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + */ + @Override public T visitLanguage(@NotNull StringTableParser.LanguageContext ctx) { return visitChildren(ctx); } + + /** + * {@inheritDoc} + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + */ + @Override public T visitPkg(@NotNull StringTableParser.PkgContext ctx) { return visitChildren(ctx); } + + /** + * {@inheritDoc} + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + */ + @Override public T visitContent(@NotNull StringTableParser.ContentContext ctx) { return visitChildren(ctx); } + + /** + * {@inheritDoc} + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + */ + @Override public T visitContainerStartTag(@NotNull StringTableParser.ContainerStartTagContext ctx) { return visitChildren(ctx); } + + /** + * {@inheritDoc} + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + */ + @Override public T visitContainerEndTag(@NotNull StringTableParser.ContainerEndTagContext ctx) { return visitChildren(ctx); } + + /** + * {@inheritDoc} + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + */ + @Override public T visitPackageEndTag(@NotNull StringTableParser.PackageEndTagContext ctx) { return visitChildren(ctx); } + + /** + * {@inheritDoc} + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + */ + @Override public T visitProjectEndTag(@NotNull StringTableParser.ProjectEndTagContext ctx) { return visitChildren(ctx); } + + /** + * {@inheritDoc} + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + */ + @Override public T visitKey(@NotNull StringTableParser.KeyContext ctx) { return visitChildren(ctx); } + + /** + * {@inheritDoc} + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + */ + @Override public T visitLanguageOpenTag(@NotNull StringTableParser.LanguageOpenTagContext ctx) { return visitChildren(ctx); } +} \ No newline at end of file diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableLexer.class b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableLexer.class new file mode 100644 index 00000000..5dc79217 Binary files /dev/null and b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableLexer.class differ diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableLexer.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableLexer.java new file mode 100644 index 00000000..5bf52700 --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableLexer.java @@ -0,0 +1,124 @@ +package raven.sqdev.editors.stringtableParsing; +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class StringTableLexer extends Lexer { + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + INFO_TAG=1, OPEN_CLOSE=2, OPEN=3, CLOSE=4, EQUALS=5, PROJECT=6, NAME=7, + PKG=8, CONTAINER=9, KEY=10, IDENTIFIER=11, STRING=12, ID=13, WS=14, ANY=15; + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + public static final String[] tokenNames = { + "", + "INFO_TAG", "''", "'='", "PROJECT", "NAME", "PKG", "CONTAINER", + "KEY", "IDENTIFIER", "STRING", "ID", "WS", "ANY" + }; + public static final String[] ruleNames = { + "INFO_TAG", "OPEN_CLOSE", "OPEN", "CLOSE", "EQUALS", "PROJECT", "NAME", + "PKG", "CONTAINER", "KEY", "IDENTIFIER", "STRING", "ID", "WS", "ANY", + "A", "C", "D", "E", "G", "I", "J", "K", "M", "N", "O", "P", "R", "T", + "Y" + }; + + + public StringTableLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "StringTable.g4"; } + + @Override + public String[] getTokenNames() { return tokenNames; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + @Override + public void action(RuleContext _localctx, int ruleIndex, int actionIndex) { + switch (ruleIndex) { + case 13: WS_action(_localctx, actionIndex); break; + } + } + private void WS_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 0: _channel = HIDDEN; break; + } + } + + public static final String _serializedATN = + "\3\uacf5\uee8c\u4f5d\u8b0d\u4a45\u78bd\u1b2f\u3378\2\21\u00af\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\3\2"+ + "\3\2\3\2\3\2\7\2D\n\2\f\2\16\2G\13\2\3\2\3\2\3\2\3\3\3\3\3\3\3\4\3\4\3"+ + "\5\3\5\3\6\3\6\3\7\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\t"+ + "\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3"+ + "\13\3\13\3\13\3\13\3\f\3\f\3\f\3\r\3\r\7\r}\n\r\f\r\16\r\u0080\13\r\3"+ + "\r\3\r\3\16\6\16\u0085\n\16\r\16\16\16\u0086\3\17\6\17\u008a\n\17\r\17"+ + "\16\17\u008b\3\17\3\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\3\27\3\27\3\30\3\30\3\31\3\31\3\32\3\32\3\33\3"+ + "\33\3\34\3\34\3\35\3\35\3\36\3\36\3\37\3\37\4E~ \3\3\1\5\4\1\7\5\1\t\6"+ + "\1\13\7\1\r\b\1\17\t\1\21\n\1\23\13\1\25\f\1\27\r\1\31\16\1\33\17\1\35"+ + "\20\2\37\21\1!\2\1#\2\1%\2\1\'\2\1)\2\1+\2\1-\2\1/\2\1\61\2\1\63\2\1\65"+ + "\2\1\67\2\19\2\1;\2\1=\2\1\3\2\23\5\2\62;C\\c|\5\2\13\f\17\17\"\"\4\2"+ + "CCcc\4\2EEee\4\2FFff\4\2GGgg\4\2IIii\4\2KKkk\4\2LLll\4\2MMmm\4\2OOoo\4"+ + "\2PPpp\4\2QQqq\4\2RRrr\4\2TTtt\4\2VVvv\4\2[[{{\u00a3\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\3?\3\2\2\2\5K\3\2\2\2\7N\3\2\2\2\tP\3"+ + "\2\2\2\13R\3\2\2\2\rT\3\2\2\2\17\\\3\2\2\2\21a\3\2\2\2\23i\3\2\2\2\25"+ + "s\3\2\2\2\27w\3\2\2\2\31z\3\2\2\2\33\u0084\3\2\2\2\35\u0089\3\2\2\2\37"+ + "\u008f\3\2\2\2!\u0091\3\2\2\2#\u0093\3\2\2\2%\u0095\3\2\2\2\'\u0097\3"+ + "\2\2\2)\u0099\3\2\2\2+\u009b\3\2\2\2-\u009d\3\2\2\2/\u009f\3\2\2\2\61"+ + "\u00a1\3\2\2\2\63\u00a3\3\2\2\2\65\u00a5\3\2\2\2\67\u00a7\3\2\2\29\u00a9"+ + "\3\2\2\2;\u00ab\3\2\2\2=\u00ad\3\2\2\2?@\7>\2\2@A\7A\2\2AE\3\2\2\2BD\13"+ + "\2\2\2CB\3\2\2\2DG\3\2\2\2EF\3\2\2\2EC\3\2\2\2FH\3\2\2\2GE\3\2\2\2HI\7"+ + "A\2\2IJ\7@\2\2J\4\3\2\2\2KL\7>\2\2LM\7\61\2\2M\6\3\2\2\2NO\7>\2\2O\b\3"+ + "\2\2\2PQ\7@\2\2Q\n\3\2\2\2RS\7?\2\2S\f\3\2\2\2TU\5\67\34\2UV\59\35\2V"+ + "W\5\65\33\2WX\5-\27\2XY\5\'\24\2YZ\5#\22\2Z[\5;\36\2[\16\3\2\2\2\\]\5"+ + "\63\32\2]^\5!\21\2^_\5\61\31\2_`\5\'\24\2`\20\3\2\2\2ab\5\67\34\2bc\5"+ + "!\21\2cd\5#\22\2de\5/\30\2ef\5!\21\2fg\5)\25\2gh\5\'\24\2h\22\3\2\2\2"+ + "ij\5#\22\2jk\5\65\33\2kl\5\63\32\2lm\5;\36\2mn\5!\21\2no\5+\26\2op\5\63"+ + "\32\2pq\5\'\24\2qr\59\35\2r\24\3\2\2\2st\5/\30\2tu\5\'\24\2uv\5=\37\2"+ + "v\26\3\2\2\2wx\5+\26\2xy\5%\23\2y\30\3\2\2\2z~\7$\2\2{}\13\2\2\2|{\3\2"+ + "\2\2}\u0080\3\2\2\2~\177\3\2\2\2~|\3\2\2\2\177\u0081\3\2\2\2\u0080~\3"+ + "\2\2\2\u0081\u0082\7$\2\2\u0082\32\3\2\2\2\u0083\u0085\t\2\2\2\u0084\u0083"+ + "\3\2\2\2\u0085\u0086\3\2\2\2\u0086\u0084\3\2\2\2\u0086\u0087\3\2\2\2\u0087"+ + "\34\3\2\2\2\u0088\u008a\t\3\2\2\u0089\u0088\3\2\2\2\u008a\u008b\3\2\2"+ + "\2\u008b\u0089\3\2\2\2\u008b\u008c\3\2\2\2\u008c\u008d\3\2\2\2\u008d\u008e"+ + "\b\17\2\2\u008e\36\3\2\2\2\u008f\u0090\13\2\2\2\u0090 \3\2\2\2\u0091\u0092"+ + "\t\4\2\2\u0092\"\3\2\2\2\u0093\u0094\t\5\2\2\u0094$\3\2\2\2\u0095\u0096"+ + "\t\6\2\2\u0096&\3\2\2\2\u0097\u0098\t\7\2\2\u0098(\3\2\2\2\u0099\u009a"+ + "\t\b\2\2\u009a*\3\2\2\2\u009b\u009c\t\t\2\2\u009c,\3\2\2\2\u009d\u009e"+ + "\t\n\2\2\u009e.\3\2\2\2\u009f\u00a0\t\13\2\2\u00a0\60\3\2\2\2\u00a1\u00a2"+ + "\t\f\2\2\u00a2\62\3\2\2\2\u00a3\u00a4\t\r\2\2\u00a4\64\3\2\2\2\u00a5\u00a6"+ + "\t\16\2\2\u00a6\66\3\2\2\2\u00a7\u00a8\t\17\2\2\u00a88\3\2\2\2\u00a9\u00aa"+ + "\t\20\2\2\u00aa:\3\2\2\2\u00ab\u00ac\t\21\2\2\u00ac<\3\2\2\2\u00ad\u00ae"+ + "\t\22\2\2\u00ae>\3\2\2\2\7\2E~\u0086\u008b"; + public static final ATN _ATN = + ATNSimulator.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/stringtableParsing/StringTableLexer.tokens b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableLexer.tokens new file mode 100644 index 00000000..3002f98e --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableLexer.tokens @@ -0,0 +1,19 @@ +PROJECT=6 +EQUALS=5 +CLOSE=4 +ANY=15 +PKG=8 +OPEN=3 +NAME=7 +OPEN_CLOSE=2 +CONTAINER=9 +STRING=12 +IDENTIFIER=11 +ID=13 +WS=14 +INFO_TAG=1 +KEY=10 +'>'=4 +'='=5 +'<'=3 +'", "INFO_TAG", "''", "'='", "PROJECT", "NAME", + "PKG", "CONTAINER", "KEY", "IDENTIFIER", "STRING", "ID", "WS", "ANY" + }; + public static final int + RULE_content = 0, RULE_project = 1, RULE_projectStartTag = 2, RULE_projectEndTag = 3, + RULE_pkg = 4, RULE_packageStartTag = 5, RULE_packageEndTag = 6, RULE_container = 7, + RULE_containerStartTag = 8, RULE_containerEndTag = 9, RULE_key = 10, RULE_keyStartTag = 11, + RULE_keyCloseTag = 12, RULE_language = 13, RULE_languageOpenTag = 14, + RULE_languageCloseTag = 15; + public static final String[] ruleNames = { + "content", "project", "projectStartTag", "projectEndTag", "pkg", "packageStartTag", + "packageEndTag", "container", "containerStartTag", "containerEndTag", + "key", "keyStartTag", "keyCloseTag", "language", "languageOpenTag", "languageCloseTag" + }; + + @Override + public String getGrammarFileName() { return "StringTable.g4"; } + + @Override + public String[] getTokenNames() { return tokenNames; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public ATN getATN() { return _ATN; } + + public StringTableParser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + public static class ContentContext extends ParserRuleContext { + public TerminalNode EOF() { return getToken(Recognizer.EOF, 0); } + public TerminalNode INFO_TAG() { return getToken(StringTableParser.INFO_TAG, 0); } + public ProjectContext project() { + return getRuleContext(ProjectContext.class,0); + } + public ContentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_content; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).enterContent(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).exitContent(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof StringTableVisitor ) return ((StringTableVisitor)visitor).visitContent(this); + else return visitor.visitChildren(this); + } + } + + public final ContentContext content() throws RecognitionException { + ContentContext _localctx = new ContentContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_content); + int _la; + try { + setState(37); + switch (_input.LA(1)) { + case INFO_TAG: + case OPEN: + enterOuterAlt(_localctx, 1); + { + setState(33); + _la = _input.LA(1); + if (_la==INFO_TAG) { + { + setState(32); match(INFO_TAG); + } + } + + setState(35); project(); + } + break; + case EOF: + enterOuterAlt(_localctx, 2); + { + setState(36); 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 ProjectContext extends ParserRuleContext { + public List container() { + return getRuleContexts(ContainerContext.class); + } + public ProjectEndTagContext projectEndTag() { + return getRuleContext(ProjectEndTagContext.class,0); + } + public List key() { + return getRuleContexts(KeyContext.class); + } + public ContainerContext container(int i) { + return getRuleContext(ContainerContext.class,i); + } + public ProjectStartTagContext projectStartTag() { + return getRuleContext(ProjectStartTagContext.class,0); + } + public KeyContext key(int i) { + return getRuleContext(KeyContext.class,i); + } + public List pkg() { + return getRuleContexts(PkgContext.class); + } + public PkgContext pkg(int i) { + return getRuleContext(PkgContext.class,i); + } + public ProjectContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_project; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).enterProject(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).exitProject(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof StringTableVisitor ) return ((StringTableVisitor)visitor).visitProject(this); + else return visitor.visitChildren(this); + } + } + + public final ProjectContext project() throws RecognitionException { + ProjectContext _localctx = new ProjectContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_project); + int _la; + try { + setState(66); + switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(39); projectStartTag(); + setState(43); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==OPEN) { + { + { + setState(40); pkg(); + } + } + setState(45); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(46); projectEndTag(); + } + break; + + case 2: + enterOuterAlt(_localctx, 2); + { + setState(48); projectStartTag(); + setState(52); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==OPEN) { + { + { + setState(49); container(); + } + } + setState(54); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(55); projectEndTag(); + } + break; + + case 3: + enterOuterAlt(_localctx, 3); + { + setState(57); projectStartTag(); + setState(61); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==OPEN) { + { + { + setState(58); key(); + } + } + setState(63); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(64); projectEndTag(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ProjectStartTagContext extends ParserRuleContext { + public TerminalNode EQUALS() { return getToken(StringTableParser.EQUALS, 0); } + public TerminalNode OPEN() { return getToken(StringTableParser.OPEN, 0); } + public TerminalNode NAME() { return getToken(StringTableParser.NAME, 0); } + public TerminalNode CLOSE() { return getToken(StringTableParser.CLOSE, 0); } + public TerminalNode PROJECT() { return getToken(StringTableParser.PROJECT, 0); } + public TerminalNode STRING() { return getToken(StringTableParser.STRING, 0); } + public ProjectStartTagContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_projectStartTag; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).enterProjectStartTag(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).exitProjectStartTag(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof StringTableVisitor ) return ((StringTableVisitor)visitor).visitProjectStartTag(this); + else return visitor.visitChildren(this); + } + } + + public final ProjectStartTagContext projectStartTag() throws RecognitionException { + ProjectStartTagContext _localctx = new ProjectStartTagContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_projectStartTag); + try { + enterOuterAlt(_localctx, 1); + { + setState(68); match(OPEN); + setState(69); match(PROJECT); + setState(70); match(NAME); + setState(71); match(EQUALS); + setState(72); match(STRING); + setState(73); match(CLOSE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ProjectEndTagContext extends ParserRuleContext { + public TerminalNode CLOSE() { return getToken(StringTableParser.CLOSE, 0); } + public TerminalNode OPEN_CLOSE() { return getToken(StringTableParser.OPEN_CLOSE, 0); } + public TerminalNode PROJECT() { return getToken(StringTableParser.PROJECT, 0); } + public ProjectEndTagContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_projectEndTag; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).enterProjectEndTag(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).exitProjectEndTag(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof StringTableVisitor ) return ((StringTableVisitor)visitor).visitProjectEndTag(this); + else return visitor.visitChildren(this); + } + } + + public final ProjectEndTagContext projectEndTag() throws RecognitionException { + ProjectEndTagContext _localctx = new ProjectEndTagContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_projectEndTag); + try { + enterOuterAlt(_localctx, 1); + { + setState(75); match(OPEN_CLOSE); + setState(76); match(PROJECT); + setState(77); match(CLOSE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PkgContext extends ParserRuleContext { + public List container() { + return getRuleContexts(ContainerContext.class); + } + public PackageStartTagContext packageStartTag() { + return getRuleContext(PackageStartTagContext.class,0); + } + public PackageEndTagContext packageEndTag() { + return getRuleContext(PackageEndTagContext.class,0); + } + public ContainerContext container(int i) { + return getRuleContext(ContainerContext.class,i); + } + public PkgContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_pkg; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).enterPkg(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).exitPkg(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof StringTableVisitor ) return ((StringTableVisitor)visitor).visitPkg(this); + else return visitor.visitChildren(this); + } + } + + public final PkgContext pkg() throws RecognitionException { + PkgContext _localctx = new PkgContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_pkg); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(79); packageStartTag(); + setState(83); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==OPEN) { + { + { + setState(80); container(); + } + } + setState(85); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(86); packageEndTag(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PackageStartTagContext extends ParserRuleContext { + public TerminalNode PKG() { return getToken(StringTableParser.PKG, 0); } + public TerminalNode EQUALS() { return getToken(StringTableParser.EQUALS, 0); } + public TerminalNode OPEN() { return getToken(StringTableParser.OPEN, 0); } + public TerminalNode NAME() { return getToken(StringTableParser.NAME, 0); } + public TerminalNode CLOSE() { return getToken(StringTableParser.CLOSE, 0); } + public TerminalNode STRING() { return getToken(StringTableParser.STRING, 0); } + public PackageStartTagContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_packageStartTag; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).enterPackageStartTag(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).exitPackageStartTag(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof StringTableVisitor ) return ((StringTableVisitor)visitor).visitPackageStartTag(this); + else return visitor.visitChildren(this); + } + } + + public final PackageStartTagContext packageStartTag() throws RecognitionException { + PackageStartTagContext _localctx = new PackageStartTagContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_packageStartTag); + try { + enterOuterAlt(_localctx, 1); + { + setState(88); match(OPEN); + setState(89); match(PKG); + setState(90); match(NAME); + setState(91); match(EQUALS); + setState(92); match(STRING); + setState(93); match(CLOSE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PackageEndTagContext extends ParserRuleContext { + public TerminalNode PKG() { return getToken(StringTableParser.PKG, 0); } + public TerminalNode CLOSE() { return getToken(StringTableParser.CLOSE, 0); } + public TerminalNode OPEN_CLOSE() { return getToken(StringTableParser.OPEN_CLOSE, 0); } + public PackageEndTagContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_packageEndTag; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).enterPackageEndTag(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).exitPackageEndTag(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof StringTableVisitor ) return ((StringTableVisitor)visitor).visitPackageEndTag(this); + else return visitor.visitChildren(this); + } + } + + public final PackageEndTagContext packageEndTag() throws RecognitionException { + PackageEndTagContext _localctx = new PackageEndTagContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_packageEndTag); + try { + enterOuterAlt(_localctx, 1); + { + setState(95); match(OPEN_CLOSE); + setState(96); match(PKG); + setState(97); match(CLOSE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ContainerContext extends ParserRuleContext { + public ContainerEndTagContext containerEndTag() { + return getRuleContext(ContainerEndTagContext.class,0); + } + public List key() { + return getRuleContexts(KeyContext.class); + } + public ContainerStartTagContext containerStartTag() { + return getRuleContext(ContainerStartTagContext.class,0); + } + public KeyContext key(int i) { + return getRuleContext(KeyContext.class,i); + } + public ContainerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_container; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).enterContainer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).exitContainer(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof StringTableVisitor ) return ((StringTableVisitor)visitor).visitContainer(this); + else return visitor.visitChildren(this); + } + } + + public final ContainerContext container() throws RecognitionException { + ContainerContext _localctx = new ContainerContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_container); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(99); containerStartTag(); + setState(103); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==OPEN) { + { + { + setState(100); key(); + } + } + setState(105); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(106); containerEndTag(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ContainerStartTagContext extends ParserRuleContext { + public TerminalNode EQUALS() { return getToken(StringTableParser.EQUALS, 0); } + public TerminalNode OPEN() { return getToken(StringTableParser.OPEN, 0); } + public TerminalNode NAME() { return getToken(StringTableParser.NAME, 0); } + public TerminalNode CLOSE() { return getToken(StringTableParser.CLOSE, 0); } + public TerminalNode STRING() { return getToken(StringTableParser.STRING, 0); } + public TerminalNode CONTAINER() { return getToken(StringTableParser.CONTAINER, 0); } + public ContainerStartTagContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_containerStartTag; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).enterContainerStartTag(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).exitContainerStartTag(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof StringTableVisitor ) return ((StringTableVisitor)visitor).visitContainerStartTag(this); + else return visitor.visitChildren(this); + } + } + + public final ContainerStartTagContext containerStartTag() throws RecognitionException { + ContainerStartTagContext _localctx = new ContainerStartTagContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_containerStartTag); + try { + enterOuterAlt(_localctx, 1); + { + setState(108); match(OPEN); + setState(109); match(CONTAINER); + setState(110); match(NAME); + setState(111); match(EQUALS); + setState(112); match(STRING); + setState(113); match(CLOSE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ContainerEndTagContext extends ParserRuleContext { + public TerminalNode CLOSE() { return getToken(StringTableParser.CLOSE, 0); } + public TerminalNode OPEN_CLOSE() { return getToken(StringTableParser.OPEN_CLOSE, 0); } + public TerminalNode CONTAINER() { return getToken(StringTableParser.CONTAINER, 0); } + public ContainerEndTagContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_containerEndTag; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).enterContainerEndTag(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).exitContainerEndTag(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof StringTableVisitor ) return ((StringTableVisitor)visitor).visitContainerEndTag(this); + else return visitor.visitChildren(this); + } + } + + public final ContainerEndTagContext containerEndTag() throws RecognitionException { + ContainerEndTagContext _localctx = new ContainerEndTagContext(_ctx, getState()); + enterRule(_localctx, 18, RULE_containerEndTag); + try { + enterOuterAlt(_localctx, 1); + { + setState(115); match(OPEN_CLOSE); + setState(116); match(CONTAINER); + setState(117); match(CLOSE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class KeyContext extends ParserRuleContext { + public KeyStartTagContext keyStartTag() { + return getRuleContext(KeyStartTagContext.class,0); + } + public LanguageContext language(int i) { + return getRuleContext(LanguageContext.class,i); + } + public List language() { + return getRuleContexts(LanguageContext.class); + } + public KeyCloseTagContext keyCloseTag() { + return getRuleContext(KeyCloseTagContext.class,0); + } + public KeyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_key; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).enterKey(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).exitKey(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof StringTableVisitor ) return ((StringTableVisitor)visitor).visitKey(this); + else return visitor.visitChildren(this); + } + } + + public final KeyContext key() throws RecognitionException { + KeyContext _localctx = new KeyContext(_ctx, getState()); + enterRule(_localctx, 20, RULE_key); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(119); keyStartTag(); + setState(123); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==OPEN) { + { + { + setState(120); language(); + } + } + setState(125); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(126); keyCloseTag(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class KeyStartTagContext extends ParserRuleContext { + public TerminalNode KEY() { return getToken(StringTableParser.KEY, 0); } + public TerminalNode EQUALS() { return getToken(StringTableParser.EQUALS, 0); } + public TerminalNode OPEN() { return getToken(StringTableParser.OPEN, 0); } + public TerminalNode CLOSE() { return getToken(StringTableParser.CLOSE, 0); } + public TerminalNode STRING() { return getToken(StringTableParser.STRING, 0); } + public TerminalNode IDENTIFIER() { return getToken(StringTableParser.IDENTIFIER, 0); } + public KeyStartTagContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_keyStartTag; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).enterKeyStartTag(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).exitKeyStartTag(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof StringTableVisitor ) return ((StringTableVisitor)visitor).visitKeyStartTag(this); + else return visitor.visitChildren(this); + } + } + + public final KeyStartTagContext keyStartTag() throws RecognitionException { + KeyStartTagContext _localctx = new KeyStartTagContext(_ctx, getState()); + enterRule(_localctx, 22, RULE_keyStartTag); + try { + enterOuterAlt(_localctx, 1); + { + setState(128); match(OPEN); + setState(129); match(KEY); + setState(130); match(IDENTIFIER); + setState(131); match(EQUALS); + setState(132); match(STRING); + setState(133); match(CLOSE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class KeyCloseTagContext extends ParserRuleContext { + public TerminalNode KEY() { return getToken(StringTableParser.KEY, 0); } + public TerminalNode CLOSE() { return getToken(StringTableParser.CLOSE, 0); } + public TerminalNode OPEN_CLOSE() { return getToken(StringTableParser.OPEN_CLOSE, 0); } + public KeyCloseTagContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_keyCloseTag; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).enterKeyCloseTag(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).exitKeyCloseTag(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof StringTableVisitor ) return ((StringTableVisitor)visitor).visitKeyCloseTag(this); + else return visitor.visitChildren(this); + } + } + + public final KeyCloseTagContext keyCloseTag() throws RecognitionException { + KeyCloseTagContext _localctx = new KeyCloseTagContext(_ctx, getState()); + enterRule(_localctx, 24, RULE_keyCloseTag); + try { + enterOuterAlt(_localctx, 1); + { + setState(135); match(OPEN_CLOSE); + setState(136); match(KEY); + setState(137); match(CLOSE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LanguageContext extends ParserRuleContext { + public LanguageCloseTagContext languageCloseTag() { + return getRuleContext(LanguageCloseTagContext.class,0); + } + public List ID() { return getTokens(StringTableParser.ID); } + public List EQUALS() { return getTokens(StringTableParser.EQUALS); } + public TerminalNode ANY(int i) { + return getToken(StringTableParser.ANY, i); + } + public TerminalNode EQUALS(int i) { + return getToken(StringTableParser.EQUALS, i); + } + public TerminalNode ID(int i) { + return getToken(StringTableParser.ID, i); + } + public List ANY() { return getTokens(StringTableParser.ANY); } + public LanguageOpenTagContext languageOpenTag() { + return getRuleContext(LanguageOpenTagContext.class,0); + } + public LanguageContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_language; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).enterLanguage(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).exitLanguage(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof StringTableVisitor ) return ((StringTableVisitor)visitor).visitLanguage(this); + else return visitor.visitChildren(this); + } + } + + public final LanguageContext language() throws RecognitionException { + LanguageContext _localctx = new LanguageContext(_ctx, getState()); + enterRule(_localctx, 26, RULE_language); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(139); languageOpenTag(); + setState(143); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,9,_ctx); + while ( _alt!=1 && _alt!=-1 ) { + if ( _alt==1+1 ) { + { + { + setState(140); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << EQUALS) | (1L << ID) | (1L << ANY))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + } + } + setState(145); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,9,_ctx); + } + setState(146); languageCloseTag(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LanguageOpenTagContext extends ParserRuleContext { + public TerminalNode ID() { return getToken(StringTableParser.ID, 0); } + public TerminalNode OPEN() { return getToken(StringTableParser.OPEN, 0); } + public TerminalNode CLOSE() { return getToken(StringTableParser.CLOSE, 0); } + public LanguageOpenTagContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_languageOpenTag; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).enterLanguageOpenTag(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).exitLanguageOpenTag(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof StringTableVisitor ) return ((StringTableVisitor)visitor).visitLanguageOpenTag(this); + else return visitor.visitChildren(this); + } + } + + public final LanguageOpenTagContext languageOpenTag() throws RecognitionException { + LanguageOpenTagContext _localctx = new LanguageOpenTagContext(_ctx, getState()); + enterRule(_localctx, 28, RULE_languageOpenTag); + try { + enterOuterAlt(_localctx, 1); + { + setState(148); match(OPEN); + setState(149); match(ID); + setState(150); match(CLOSE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LanguageCloseTagContext extends ParserRuleContext { + public TerminalNode ID() { return getToken(StringTableParser.ID, 0); } + public TerminalNode CLOSE() { return getToken(StringTableParser.CLOSE, 0); } + public TerminalNode OPEN_CLOSE() { return getToken(StringTableParser.OPEN_CLOSE, 0); } + public LanguageCloseTagContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_languageCloseTag; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).enterLanguageCloseTag(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof StringTableListener ) ((StringTableListener)listener).exitLanguageCloseTag(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof StringTableVisitor ) return ((StringTableVisitor)visitor).visitLanguageCloseTag(this); + else return visitor.visitChildren(this); + } + } + + public final LanguageCloseTagContext languageCloseTag() throws RecognitionException { + LanguageCloseTagContext _localctx = new LanguageCloseTagContext(_ctx, getState()); + enterRule(_localctx, 30, RULE_languageCloseTag); + try { + enterOuterAlt(_localctx, 1); + { + setState(152); match(OPEN_CLOSE); + setState(153); match(ID); + setState(154); match(CLOSE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static final String _serializedATN = + "\3\uacf5\uee8c\u4f5d\u8b0d\u4a45\u78bd\u1b2f\u3378\3\21\u009f\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\3\2\5\2"+ + "$\n\2\3\2\3\2\5\2(\n\2\3\3\3\3\7\3,\n\3\f\3\16\3/\13\3\3\3\3\3\3\3\3\3"+ + "\7\3\65\n\3\f\3\16\38\13\3\3\3\3\3\3\3\3\3\7\3>\n\3\f\3\16\3A\13\3\3\3"+ + "\3\3\5\3E\n\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\6\3\6\7\6"+ + "T\n\6\f\6\16\6W\13\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\t\3\t\7\th\n\t\f\t\16\tk\13\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n"+ + "\3\13\3\13\3\13\3\13\3\f\3\f\7\f|\n\f\f\f\16\f\177\13\f\3\f\3\f\3\r\3"+ + "\r\3\r\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3\17\3\17\7\17\u0090\n\17\f"+ + "\17\16\17\u0093\13\17\3\17\3\17\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3\21"+ + "\3\21\3\u0091\22\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \2\3\5\2\7\7\17"+ + "\17\21\21\u0099\2\'\3\2\2\2\4D\3\2\2\2\6F\3\2\2\2\bM\3\2\2\2\nQ\3\2\2"+ + "\2\fZ\3\2\2\2\16a\3\2\2\2\20e\3\2\2\2\22n\3\2\2\2\24u\3\2\2\2\26y\3\2"+ + "\2\2\30\u0082\3\2\2\2\32\u0089\3\2\2\2\34\u008d\3\2\2\2\36\u0096\3\2\2"+ + "\2 \u009a\3\2\2\2\"$\7\3\2\2#\"\3\2\2\2#$\3\2\2\2$%\3\2\2\2%(\5\4\3\2"+ + "&(\7\2\2\3\'#\3\2\2\2\'&\3\2\2\2(\3\3\2\2\2)-\5\6\4\2*,\5\n\6\2+*\3\2"+ + "\2\2,/\3\2\2\2-+\3\2\2\2-.\3\2\2\2.\60\3\2\2\2/-\3\2\2\2\60\61\5\b\5\2"+ + "\61E\3\2\2\2\62\66\5\6\4\2\63\65\5\20\t\2\64\63\3\2\2\2\658\3\2\2\2\66"+ + "\64\3\2\2\2\66\67\3\2\2\2\679\3\2\2\28\66\3\2\2\29:\5\b\5\2:E\3\2\2\2"+ + ";?\5\6\4\2<>\5\26\f\2=<\3\2\2\2>A\3\2\2\2?=\3\2\2\2?@\3\2\2\2@B\3\2\2"+ + "\2A?\3\2\2\2BC\5\b\5\2CE\3\2\2\2D)\3\2\2\2D\62\3\2\2\2D;\3\2\2\2E\5\3"+ + "\2\2\2FG\7\5\2\2GH\7\b\2\2HI\7\t\2\2IJ\7\7\2\2JK\7\16\2\2KL\7\6\2\2L\7"+ + "\3\2\2\2MN\7\4\2\2NO\7\b\2\2OP\7\6\2\2P\t\3\2\2\2QU\5\f\7\2RT\5\20\t\2"+ + "SR\3\2\2\2TW\3\2\2\2US\3\2\2\2UV\3\2\2\2VX\3\2\2\2WU\3\2\2\2XY\5\16\b"+ + "\2Y\13\3\2\2\2Z[\7\5\2\2[\\\7\n\2\2\\]\7\t\2\2]^\7\7\2\2^_\7\16\2\2_`"+ + "\7\6\2\2`\r\3\2\2\2ab\7\4\2\2bc\7\n\2\2cd\7\6\2\2d\17\3\2\2\2ei\5\22\n"+ + "\2fh\5\26\f\2gf\3\2\2\2hk\3\2\2\2ig\3\2\2\2ij\3\2\2\2jl\3\2\2\2ki\3\2"+ + "\2\2lm\5\24\13\2m\21\3\2\2\2no\7\5\2\2op\7\13\2\2pq\7\t\2\2qr\7\7\2\2"+ + "rs\7\16\2\2st\7\6\2\2t\23\3\2\2\2uv\7\4\2\2vw\7\13\2\2wx\7\6\2\2x\25\3"+ + "\2\2\2y}\5\30\r\2z|\5\34\17\2{z\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\5\32\16\2\u0081\27\3\2\2\2"+ + "\u0082\u0083\7\5\2\2\u0083\u0084\7\f\2\2\u0084\u0085\7\r\2\2\u0085\u0086"+ + "\7\7\2\2\u0086\u0087\7\16\2\2\u0087\u0088\7\6\2\2\u0088\31\3\2\2\2\u0089"+ + "\u008a\7\4\2\2\u008a\u008b\7\f\2\2\u008b\u008c\7\6\2\2\u008c\33\3\2\2"+ + "\2\u008d\u0091\5\36\20\2\u008e\u0090\t\2\2\2\u008f\u008e\3\2\2\2\u0090"+ + "\u0093\3\2\2\2\u0091\u0092\3\2\2\2\u0091\u008f\3\2\2\2\u0092\u0094\3\2"+ + "\2\2\u0093\u0091\3\2\2\2\u0094\u0095\5 \21\2\u0095\35\3\2\2\2\u0096\u0097"+ + "\7\5\2\2\u0097\u0098\7\17\2\2\u0098\u0099\7\6\2\2\u0099\37\3\2\2\2\u009a"+ + "\u009b\7\4\2\2\u009b\u009c\7\17\2\2\u009c\u009d\7\6\2\2\u009d!\3\2\2\2"+ + "\f#\'-\66?DUi}\u0091"; + public static final ATN _ATN = + ATNSimulator.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/stringtableParsing/StringTableVisitor.class b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableVisitor.class new file mode 100644 index 00000000..b884922e Binary files /dev/null and b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableVisitor.class differ diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableVisitor.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableVisitor.java new file mode 100644 index 00000000..6270921d --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableVisitor.java @@ -0,0 +1,125 @@ +package raven.sqdev.editors.stringtableParsing; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ParseTreeVisitor; + +/** + * This interface defines a complete generic visitor for a parse tree produced + * by {@link StringTableParser}. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +@SuppressWarnings("deprecation") +public interface StringTableVisitor extends ParseTreeVisitor { + /** + * Visit a parse tree produced by {@link StringTableParser#packageStartTag}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPackageStartTag(@NotNull StringTableParser.PackageStartTagContext ctx); + + /** + * Visit a parse tree produced by {@link StringTableParser#container}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitContainer(@NotNull StringTableParser.ContainerContext ctx); + + /** + * Visit a parse tree produced by {@link StringTableParser#keyCloseTag}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitKeyCloseTag(@NotNull StringTableParser.KeyCloseTagContext ctx); + + /** + * Visit a parse tree produced by {@link StringTableParser#keyStartTag}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitKeyStartTag(@NotNull StringTableParser.KeyStartTagContext ctx); + + /** + * Visit a parse tree produced by {@link StringTableParser#project}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitProject(@NotNull StringTableParser.ProjectContext ctx); + + /** + * Visit a parse tree produced by {@link StringTableParser#languageCloseTag}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLanguageCloseTag(@NotNull StringTableParser.LanguageCloseTagContext ctx); + + /** + * Visit a parse tree produced by {@link StringTableParser#projectStartTag}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitProjectStartTag(@NotNull StringTableParser.ProjectStartTagContext ctx); + + /** + * Visit a parse tree produced by {@link StringTableParser#language}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLanguage(@NotNull StringTableParser.LanguageContext ctx); + + /** + * Visit a parse tree produced by {@link StringTableParser#pkg}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPkg(@NotNull StringTableParser.PkgContext ctx); + + /** + * Visit a parse tree produced by {@link StringTableParser#content}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitContent(@NotNull StringTableParser.ContentContext ctx); + + /** + * Visit a parse tree produced by {@link StringTableParser#containerStartTag}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitContainerStartTag(@NotNull StringTableParser.ContainerStartTagContext ctx); + + /** + * Visit a parse tree produced by {@link StringTableParser#containerEndTag}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitContainerEndTag(@NotNull StringTableParser.ContainerEndTagContext ctx); + + /** + * Visit a parse tree produced by {@link StringTableParser#packageEndTag}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPackageEndTag(@NotNull StringTableParser.PackageEndTagContext ctx); + + /** + * Visit a parse tree produced by {@link StringTableParser#projectEndTag}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitProjectEndTag(@NotNull StringTableParser.ProjectEndTagContext ctx); + + /** + * Visit a parse tree produced by {@link StringTableParser#key}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitKey(@NotNull StringTableParser.KeyContext ctx); + + /** + * Visit a parse tree produced by {@link StringTableParser#languageOpenTag}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLanguageOpenTag(@NotNull StringTableParser.LanguageOpenTagContext ctx); +} \ No newline at end of file diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableWalkListener.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableWalkListener.java new file mode 100644 index 00000000..e153115f --- /dev/null +++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringtableParsing/StringTableWalkListener.java @@ -0,0 +1,186 @@ +package raven.sqdev.editors.stringtableParsing; + +import java.util.ArrayList; +import java.util.List; + +import org.antlr.v4.runtime.CommonTokenStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.tree.TerminalNode; +import org.eclipse.core.runtime.Assert; + +import raven.sqdev.editors.stringTableEditor.Language; +import raven.sqdev.editors.stringTableEditor.StringTableContainer; +import raven.sqdev.editors.stringTableEditor.StringTableKey; +import raven.sqdev.editors.stringTableEditor.StringTablePackage; +import raven.sqdev.editors.stringtableParsing.StringTableParser.ContainerStartTagContext; +import raven.sqdev.editors.stringtableParsing.StringTableParser.KeyStartTagContext; +import raven.sqdev.editors.stringtableParsing.StringTableParser.LanguageContext; +import raven.sqdev.editors.stringtableParsing.StringTableParser.LanguageOpenTagContext; +import raven.sqdev.editors.stringtableParsing.StringTableParser.PackageStartTagContext; + +/** + * The listener that will extract the neccessary information from the XML file + * + * @author Raven + * + */ +public class StringTableWalkListener extends StringTableBaseListener { + /** + * The list of all extracted packages + */ + private ArrayList packageList; + /** + * The currently processed package + */ + private StringTablePackage currentPackage; + /** + * The currently processed container + */ + private StringTableContainer currentContainer; + /** + * The currently processed key + */ + private StringTableKey currentKey; + /** + * The currently processed language + */ + private Language currentLanguage; + /** + * The tolen stream associated with the parse tree to walk + */ + private CommonTokenStream stream; + + + /** + * Creates a new instance of this walker + * + * @param stream + * The CommonTokenStream associated with the parse + * tree to walk + */ + public StringTableWalkListener(CommonTokenStream stream) { + Assert.isNotNull(stream, "Token stream may not be null!"); + + packageList = new ArrayList(); + this.stream = stream; + } + + + @Override + public void enterPackageStartTag(PackageStartTagContext ctx) { + String name = ctx.children.get(ctx.children.size() - 2).getText(); + name = name.substring(1, name.length() - 1); + + currentPackage = new StringTablePackage(name); + + packageList.add(currentPackage); + } + + @Override + public void enterContainerStartTag(ContainerStartTagContext ctx) { + String name = ctx.children.get(ctx.children.size() - 2).getText(); + name = name.substring(1, name.length() - 1); + + currentContainer = new StringTableContainer(name); + + addContainer(currentContainer); + } + + @Override + public void enterKeyStartTag(KeyStartTagContext ctx) { + String name = ctx.children.get(ctx.children.size() - 2).getText(); + + if (name.length() <= 2) { + return; + } + + name = name.substring(1, name.length() - 1); + + currentKey = new StringTableKey(name); + + addKey(currentKey); + } + + @Override + public void enterLanguageOpenTag(LanguageOpenTagContext ctx) { + String name = ctx.children.get(ctx.children.size() - 2).getText(); + + try { + currentLanguage = Language.valueOf(name.toUpperCase()); + } catch (IllegalArgumentException e) { + // TODO: create error marker + currentLanguage = null; + } + } + + @Override + public void exitLanguage(LanguageContext ctx) { + if (currentLanguage != null) { + StringBuilder builder = new StringBuilder(); + + for (int i = 1; i < ctx.children.size() - 1; i++) { + TerminalNode child = (TerminalNode) ctx.children.get(i); + + Token token = child.getSymbol(); + int index = token.getTokenIndex(); + + List hiddenTokens = stream.getHiddenTokensToLeft(index); + + if (hiddenTokens != null) { + for (Token currentToken : hiddenTokens) { + builder.append(currentToken.getText()); + } + } + + builder.append(child.getText()); + } + + currentKey.setString(currentLanguage, builder.toString().trim()); + } + } + + /** + * Adds the given container to the current package. If the current package + * is not yet defined it will create it as the default package + * + * @param container + * The container to add + */ + private void addContainer(StringTableContainer container) { + if (currentPackage == null) { + currentPackage = new StringTablePackage("Default package"); + packageList.add(currentPackage); + } + + currentPackage.addContainer(container); + } + + /** + * Adds the given key to the current container. If the current container + * and/or the current package is not yet defined default ones will be + * created + * + * @param key + * The key to add + */ + private void addKey(StringTableKey key) { + if (currentPackage == null) { + currentPackage = new StringTablePackage("Default package"); + } + + if (currentContainer == null) { + currentContainer = new StringTableContainer("Default container"); + currentPackage.addContainer(currentContainer); + ; + } + + currentContainer.addKey(currentKey); + } + + /** + * Gets the package list that has been created during parsing + */ + public ArrayList getPackageList() { + return packageList; + } +} diff --git a/plugin/Raven.SQDev.Misc/META-INF/MANIFEST.MF b/plugin/Raven.SQDev.Misc/META-INF/MANIFEST.MF index 18967047..0954d94d 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.2.0 +Bundle-Version: 0.3.0 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/activator/Activator.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/activator/Activator.class index 79cb198e..b0c18750 100644 Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/activator/Activator.class and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/activator/Activator.class differ diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/ISQDevColorConstants.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/ISQDevColorConstants.class index 0b9ef3d2..41a53f33 100644 Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/ISQDevColorConstants.class and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/ISQDevColorConstants.class differ diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/SQDevPreferenceConstants.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/SQDevPreferenceConstants.class index 6b405719..d575e84c 100644 Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/SQDevPreferenceConstants.class and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/SQDevPreferenceConstants.class differ diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/BadSyntaxException.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/BadSyntaxException.class new file mode 100644 index 00000000..a8f2c916 Binary files /dev/null and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/BadSyntaxException.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 8a90933a..2d0b93fe 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/KeywordList.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/KeywordList.class index 5b349ec0..5c1ab502 100644 Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/KeywordList.class and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/KeywordList.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 a94bdc5b..b9071be2 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/interfaces/IKeywordListChangeListener.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IKeywordListChangeListener.class new file mode 100644 index 00000000..3107e700 Binary files /dev/null and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IKeywordListChangeListener.class differ diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IKeywordProvider.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IKeywordProvider.class index 9796fbbf..b125ced4 100644 Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IKeywordProvider.class and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IKeywordProvider.class differ diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IManager.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IManager.class new file mode 100644 index 00000000..42fadf20 Binary files /dev/null and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IManager.class differ diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IUpdateListener.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IUpdateListener.class new file mode 100644 index 00000000..aa551360 Binary files /dev/null and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IUpdateListener.class differ diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/CharacterPair.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/CharacterPair.class index 420894b5..d7339c0a 100644 Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/CharacterPair.class and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/CharacterPair.class differ diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/ListUtils.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/ListUtils.class new file mode 100644 index 00000000..3a6dce1e Binary files /dev/null and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/ListUtils.class differ diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/MultiPreferenceStore.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/MultiPreferenceStore.class new file mode 100644 index 00000000..a562cd70 Binary files /dev/null and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/MultiPreferenceStore.class differ diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/StyledRegion.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/StyledRegion.class index 2b5f74b8..097186d2 100644 Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/StyledRegion.class and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/StyledRegion.class differ diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/TextUtils.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/TextUtils.class new file mode 100644 index 00000000..b9946f1c Binary files /dev/null and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/TextUtils.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 new file mode 100644 index 00000000..f92ab2b1 Binary files /dev/null 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 465ef813..fdaefdba 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/bin/raven/sqdev/syntax/SyntaxElement.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/syntax/SyntaxElement.class index 1f7f0c66..3bd59ae2 100644 Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/syntax/SyntaxElement.class and b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/syntax/SyntaxElement.class differ diff --git a/plugin/Raven.SQDev.Misc/plugin.xml b/plugin/Raven.SQDev.Misc/plugin.xml index 5535690d..e7b1b056 100644 --- a/plugin/Raven.SQDev.Misc/plugin.xml +++ b/plugin/Raven.SQDev.Misc/plugin.xml @@ -1,5 +1,6 @@ + diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/activator/Activator.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/activator/Activator.java index 0929ad54..829538b9 100644 --- a/plugin/Raven.SQDev.Misc/src/raven/sqdev/activator/Activator.java +++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/activator/Activator.java @@ -14,6 +14,7 @@ public class Activator extends AbstractUIPlugin { * @see org.osgi.framework.BundleActivator#start(org.osgi.framework. * BundleContext) */ + @Override public void start(BundleContext bundleContext) throws Exception { super.start(bundleContext); SQDevPluginManager.getManager().register(this); @@ -25,6 +26,7 @@ public void start(BundleContext bundleContext) throws Exception { * @see * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) */ + @Override public void stop(BundleContext bundleContext) throws Exception { SQDevPluginManager.getManager().unregister(this); diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/constants/ISQDevColorConstants.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/constants/ISQDevColorConstants.java index ccfdf3ba..0dd77de1 100644 --- a/plugin/Raven.SQDev.Misc/src/raven/sqdev/constants/ISQDevColorConstants.java +++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/constants/ISQDevColorConstants.java @@ -7,6 +7,9 @@ public interface ISQDevColorConstants { public static final RGB BRACKETMATCH = new RGB(192, 192, 192); public static final RGB CURRENTLINE = new RGB(220, 220, 255); public static final RGB KEYWORD = new RGB(127, 0, 85); + public static final RGB LOCAL_VARIABLE = new RGB(106, 62, 62); + public static final RGB GLOBAL_VARIABLE = new RGB(0, 0, 255); public static final RGB COMMENT = new RGB(63, 127, 95); public static final RGB STRING = new RGB(42, 0, 255); + public static final RGB TAG = new RGB(77, 80, 82); } diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/constants/SQDevPreferenceConstants.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/constants/SQDevPreferenceConstants.java index 940754f4..a62dc945 100644 --- a/plugin/Raven.SQDev.Misc/src/raven/sqdev/constants/SQDevPreferenceConstants.java +++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/constants/SQDevPreferenceConstants.java @@ -70,9 +70,25 @@ public class SQDevPreferenceConstants { public static final String SQDEV_EDITOR_HIGHLIGHT_CURRENTLINE_COLOR_KEY = "raven.sqdev.currentLineHighlightingColor"; /** - * The preferences indicating the color of the syntax highlighting + * The preferences indicating the color of the keyword highlighting */ - public static final String SQDEV_EDITOR_SYNTAXHIGHLIGHTING_COLOR_KEY = "raven.sqdev.syntaxHighlightingColor"; + public static final String SQDEV_EDITOR_KEYWORDHIGHLIGHTING_COLOR_KEY = "raven.sqdev.keywordHighlightingColor"; + + /** + * The preference indicating the color of the local variable highlighting + */ + public static final String SQDEV_EDITOR_LOCALVARIABLEHIGHLIGHTING_COLOR_KEY = "raven.sqdev.localVariableHighlightingColor"; + + /** + * The preference indicating the color of the global variable highlighting + */ + public static final String SQDEV_EDITOR_GLOBALVARIABLEHIGHLIGHTING_COLOR_KEY = "raven.sqdev.globalVariableHighlightingColor"; + + /** + * The preference indicating the delay before parsing after the user typed + * in something + */ + public static final String SQDEV_EDITOR_PARSE_DELAY = "raven.sqdev.parsingInterval"; /** * The preference indicating if a directory should be cleaned without asking diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/exceptions/BadSyntaxException.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/exceptions/BadSyntaxException.java new file mode 100644 index 00000000..47230150 --- /dev/null +++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/exceptions/BadSyntaxException.java @@ -0,0 +1,34 @@ +package raven.sqdev.exceptions; + +/** + * An excpetion that is thrown whenever a bad syntax occurs + * + * @author Raven + * + */ +public class BadSyntaxException extends SQDevException { + + private static final long serialVersionUID = 2819258652076585225L; + + + public BadSyntaxException() { + super(); + } + + public BadSyntaxException(String message) { + super(message); + } + + public BadSyntaxException(Throwable cause) { + super(cause); + } + + public BadSyntaxException(String message, Throwable cause) { + super(message, cause); + } + + public BadSyntaxException(String message, Throwable cause, boolean enableSuppression, + boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + } +} 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 52406eba..05210317 100644 --- a/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/SQFCommandCollector.java +++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/SQFCommandCollector.java @@ -1,30 +1,35 @@ package raven.sqdev.infoCollection; import java.io.BufferedReader; +import java.io.ByteArrayOutputStream; import java.io.IOException; -import java.io.InputStreamReader; +import java.io.InputStream; import java.io.StringReader; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.IProgressMonitor; +import raven.sqdev.exceptions.BadSyntaxException; import raven.sqdev.exceptions.SQDevCollectionException; import raven.sqdev.infoCollection.base.ELocality; import raven.sqdev.infoCollection.base.KeywordList; import raven.sqdev.infoCollection.base.SQFCommand; -import raven.sqdev.infoCollection.base.SQFControlStructure; import raven.sqdev.misc.SQDev; +import raven.sqdev.misc.TextUtils; +import raven.sqdev.syntax.Syntax; /** * A class for collecting all SQF commands from the BIKI. * * @author Raven - * + * */ public class SQFCommandCollector { /** @@ -71,7 +76,7 @@ public class SQFCommandCollector { */ public static final List CONTROL_STRUCTURE_KEYWORDS = Arrays .asList(CONTROL_STRUCTURE_KEYWORDS_ARRAY); - + /** * The URL to the base site where all commands are listed */ @@ -125,10 +130,10 @@ public KeywordList collect(IProgressMonitor monitor) throws SQDevCollectionExcep // compose the line where the collecting should start at String relevanStarttLine = "

  • " + firstCommandName + "
  • "; - + String relevantEndLine = "
  • " + 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 \"" @@ -138,8 +143,8 @@ public KeywordList collect(IProgressMonitor monitor) throws SQDevCollectionExcep // start the list at the first command siteContent = siteContent.substring(siteContent.indexOf(relevanStarttLine), siteContent.indexOf(relevantEndLine) + relevantEndLine.length()).trim(); - - + + // create keywordList KeywordList list = new KeywordList(); @@ -186,9 +191,24 @@ public KeywordList collect(IProgressMonitor monitor) throws SQDevCollectionExcep list.addKeyword(command); } } else { - SQFControlStructure control = processControlStructure(new SQFControlStructure(name), - commandPageURL); - + SQFCommand control = processControlStructure(new SQFCommand(name), commandPageURL); + + switch (control.getKeyword()) { + case "then": + case "else": + case "do": + // make binary + control.addSyntax(Syntax.parseSyntax( + "leftConstruct " + control.getKeyword() + " rigthConstruct", + control.getKeyword())); + break; + + default: + // make unary + control.addSyntax(Syntax.parseSyntax( + control.getKeyword() + " rigthConstruct", control.getKeyword())); + } + if (control != null) { list.addKeyword(control); } @@ -212,8 +232,8 @@ public KeywordList collect(IProgressMonitor monitor) throws SQDevCollectionExcep * @return The SQFControlStructure filled with information * @throws SQDevCollectionException */ - private SQFControlStructure processControlStructure(SQFControlStructure control, - URL commandPage) throws SQDevCollectionException { + private SQFCommand processControlStructure(SQFCommand control, URL commandPage) + throws SQDevCollectionException { // set wiki URL control.setWikiPage(commandPage); @@ -241,20 +261,48 @@ private SQFControlStructure processControlStructure(SQFControlStructure control, */ private String getSite(URL url) throws SQDevCollectionException { try { - BufferedReader siteReader = new BufferedReader(new InputStreamReader(url.openStream())); + // read the site's content + InputStream in = url.openStream(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); - String content = ""; + byte[] bArray = new byte[in.available()]; - String inputLine = ""; + in.read(bArray); - while ((inputLine = siteReader.readLine()) != null) { - content += inputLine + "\n"; + out.write(bArray); + + int next; + while ((next = in.read()) > 0) { + out.write((char) next); } - siteReader.close(); + String content = out.toString(); - return content.trim(); + // 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(); + + 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); + } + + return content; } catch (IOException e) { e.printStackTrace(); @@ -316,7 +364,7 @@ private SQFCommand processCommand(SQFCommand command, URL commandPage) String[] categories = categorizeContent(siteContent); if (!commandPage.toString().endsWith(command.getKeyword()) - || command.getKeyword().endsWith("_array")) { + || !categories[CATEGORY_SYNTAX].contains(command.getKeyword())) { // The current command should be integrated in the previous command // with this name TODO return null; @@ -343,15 +391,16 @@ private SQFCommand processCommand(SQFCommand command, URL commandPage) command.setDescription(description); } - for (String currentLine : categories) { - System.out.println(currentLine); - System.out.println(); - } - // syntax String syntax = categories[CATEGORY_SYNTAX]; if (!syntax.isEmpty()) { + if (command.getKeyword().toLowerCase().equals("private")) { + // exception for private as a keyword + syntax = syntax.substring(0, + syntax.toLowerCase().lastIndexOf("alternative syntax")); + } + applySyntax(command, syntax); } else { throw new SQDevCollectionException( @@ -393,13 +442,13 @@ private String formatCommandPageContent(String content) { // remove tags boolean proceed = content.contains("<" + currentTag) && content.contains(""); - + while (proceed) { String fragment1 = content.substring(0, content.indexOf("<" + currentTag)); String fragment2 = content.substring(content.indexOf("<" + currentTag)); String fragment3 = fragment2.substring( fragment2.indexOf("") + 3 + currentTag.length()); - + content = fragment1 + fragment3; proceed = content.contains("<" + currentTag) @@ -426,7 +475,7 @@ private String formatCommandPageContent(String content) { // check if there are futher notes proceed = fragment2.substring(fragment2.indexOf("\n")) .contains("
    "); - + if (proceed) { // reassemble fragments to process further notes String previousNoteLine = fragment2.substring(0, fragment2.indexOf("\n")); @@ -558,14 +607,14 @@ private String[] categorizeContent(String content) { // add the command infos commandInfo += content.substring(content.indexOf("\n") + 1, content.indexOf("#EndCommandInfo") - 1); - + content = content.substring(content.indexOf("#EndCommandInfo") + 15).trim(); // add the name of the command commandInfo = "Name: " + content.substring(0, content.indexOf("\n")).trim().replace(" ", "_") + "\n" + commandInfo; - + content = content.substring(content.indexOf("\n") + 1); String currentCategory = ""; @@ -708,7 +757,7 @@ private void applyExamples(SQFCommand command, String examples) { // if there is an example with this number examples = examples.substring(examples.indexOf(exampleNum) + exampleNum.length()) .trim(); - + counter++; String nextExampleNum = "Example " + counter + ":"; @@ -717,7 +766,7 @@ private void applyExamples(SQFCommand command, String examples) { // only take the content until next example starts String currentExample = examples.substring(0, examples.indexOf(nextExampleNum)) .trim(); - + command.addExample(currentExample); // remove processed examples from the examples String @@ -805,13 +854,31 @@ private void applyNotes(SQFCommand command, String notes) throws SQDevCollection * @param syntaxContent * The syntax with it's parameters that should be applied to the * command + * @throws SQDevCollectionException */ - private void applySyntax(SQFCommand command, String syntaxContent) { + private void applySyntax(SQFCommand command, String syntaxContent) + throws SQDevCollectionException { String[][] syntaxes = splitSyntaxes(syntaxContent); for (String[] currentSyntax : syntaxes) { + String syntax = currentSyntax[SYNTAXPART_SYNTAX]; + // add the raw syntax to the command - command.addRawSyntax(currentSyntax[SYNTAXPART_SYNTAX]); + command.addRawSyntax(syntax); + + Pattern arrayPattern = Pattern.compile("\\[[^\\[\\]]*\\]"); + Matcher arrayMatcher = arrayPattern.matcher(syntax); + + // replace all array constructs with Array type keyword + while (arrayMatcher.find()) { + syntax = arrayMatcher.replaceAll("Array"); + + arrayMatcher = arrayPattern.matcher(syntax); + } + + syntax = processSyntax(syntax, currentSyntax[SYNTAXPART_PARAMETERS]); + + command.addSyntax(Syntax.parseSyntax(syntax, command.getKeyword())); } if (syntaxes.length > 0) { @@ -822,6 +889,80 @@ private void applySyntax(SQFCommand command, String syntaxContent) { command.setReturnType(returnType); } } + + System.out.println(command.getSyntaxes()); + } + + /** + * Replaces the parameters in the syntax with the actual data types + * + * @param syntax + * The raw syntax + * @param parameter + * The list of parameters with their corresponding data type + * @return The processed syntax with data types instead of placeholders + * @throws SQDevCollectionException + */ + private String processSyntax(String syntax, String parameter) throws SQDevCollectionException { + for (String currentParameter : parameter.split("param:\n")) { + // process each listed parameter + currentParameter = currentParameter.trim(); + + if (currentParameter.isEmpty()) { + continue; + } + + // make a copy in order to avoid case sensitive problems + String syntaxCopy = syntax.toLowerCase(); + + String[] elements; + try { + elements = TextUtils.getTextAreas(currentParameter); + + // make sure parameter are in proper format + if (!elements[0].contains(":") || elements.length == 1) { + if (elements.length > 2 && 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]); + } + } + + String parameterName = elements[0].substring(0, elements[0].indexOf(":")) + .toLowerCase(); + + // remove dots from dataType + String value = elements[1].replace(".", ""); + + String[] syntaxElements = TextUtils.getTextAreas(syntax); + String[] syntaxCopyElements = TextUtils.getTextAreas(syntaxCopy); + + for (int i = 0; i < syntaxCopyElements.length; i++) { + if (syntaxCopyElements[i].equals(parameterName)) { + // replace placeholder with actual value + syntaxElements[i] = value; + break; + } + } + + // convert syntax back to String + StringBuilder builder = new StringBuilder(); + + for (String currentElement : syntaxElements) { + builder.append(" " + currentElement); + } + + syntax = builder.toString().trim(); + } catch (BadSyntaxException e) { + throw new SQDevCollectionException("Failed at processing syntax", e); + } + } + + return syntax; } /** @@ -864,23 +1005,22 @@ private String formatSyntaxContent(String syntaxContent) { syntaxContent = syntaxContent.substring(0, syntaxContent.indexOf("Return Value:")) + "\n" + syntaxContent.substring(syntaxContent.indexOf("Return Value:")); - + syntaxContent = syntaxContent.substring(0, syntaxContent.indexOf("Return Value:") + 13) .trim() + " " + syntaxContent.substring(syntaxContent.indexOf("Return Value:") + 13).trim(); - - - if (syntaxContent.substring(0, syntaxContent.indexOf("\n")).contains("=")) { - syntaxContent = syntaxContent.substring(syntaxContent.indexOf("=") + 1).trim(); + + String syntaxLine = syntaxContent.substring(0, syntaxContent.indexOf("\n")); + + if (syntaxLine.contains("=")) { + // remove asignments from syntax + syntaxLine = syntaxLine.substring(syntaxLine.indexOf("=") + 1).trim(); } + // remove version tags that are not necessarily between brackets + syntaxLine = syntaxLine.replaceAll("[sS]ince [aA]rm[aA][^)]*", ""); - /* - * TODO: alternative syntaxes; optional parameters; repeating - * parameters: TKOH only parameters; parameter description; multiple - * options parameters; - */ - return syntaxContent; + return syntaxLine + syntaxContent.substring(syntaxContent.indexOf("\n")); } /** @@ -896,8 +1036,9 @@ private String formatSyntaxContent(String syntaxContent) { *
  • index 1: The parameters (each prefixed by "param:\n") with * their description
  • *
  • index 2: The return value
  • + * @throws SQDevCollectionException */ - private String[][] splitSyntaxes(String syntaxContent) { + private String[][] splitSyntaxes(String syntaxContent) throws SQDevCollectionException { // split the syntaxes and their components ArrayList> syntaxes = new ArrayList>(1); @@ -910,15 +1051,15 @@ private String[][] splitSyntaxes(String syntaxContent) { // get the syntax String currentSyntax = currentSyntaxContent.substring(0, currentSyntaxContent.indexOf("\n")); - + // trim syntaxContent to remove processed line currentSyntaxContent = currentSyntaxContent.substring(currentSyntax.length()).trim(); // get the parameters String currentParameter = currentSyntaxContent.substring(0, currentSyntaxContent.indexOf("Return Value:")); - - + + // trim syntaxContent to remove processed line currentSyntaxContent = currentSyntaxContent.substring(currentParameter.length()).trim(); @@ -933,7 +1074,7 @@ private String[][] splitSyntaxes(String syntaxContent) { currentSyntaxComponents.add(SYNTAXPART_PARAMETERS, formatParameters(currentParameter)); currentSyntaxComponents.add(SYNTAXPART_RETURN_VALUE, formatReturnValue(currentReturnValue)); - + syntaxes.add(currentSyntaxComponents); } @@ -955,8 +1096,15 @@ private String[][] splitSyntaxes(String syntaxContent) { */ private String formatRawSyntax(String syntax) { // remove round brackets - syntax = syntax.replaceAll("\\(.*\\)", "").trim(); - // TODO + Pattern bracketPattern = Pattern.compile("\\([^\\(\\)]*\\)"); + Matcher bracketMatcher = bracketPattern.matcher(syntax); + + while (bracketMatcher.find()) { + syntax = bracketMatcher.replaceAll(""); + + bracketMatcher = bracketPattern.matcher(syntax); + } + return syntax; } @@ -966,13 +1114,134 @@ private String formatRawSyntax(String syntax) { * @param parameters * The parameters to format * @return The formatted parameters + * @throws SQDevCollectionException */ - private String formatParameters(String parameters) { - parameters = parameters.trim(); - // TODO + private String formatParameters(String parameters) throws SQDevCollectionException { + String[] paramArray = parameters.split("param:\n"); + parameters = ""; + + for (String currentParameter : paramArray) { + if (currentParameter.isEmpty()) { + continue; + } + // process alternatove data types + parameters += "§PARAM§ " + formatAlternativeDataTypes(currentParameter); + } + + String[] areas; + try { + areas = TextUtils.getTextAreas(parameters); + } catch (BadSyntaxException e) { + throw new SQDevCollectionException("Can't format parameter", e); + } + + StringBuilder builder = new StringBuilder(); + + boolean matchedColon = false; + boolean matchedDataType = false; + + for (String currentArea : areas) { + if (currentArea.startsWith("(")) { + if (currentArea.toLowerCase().contains("optional")) { + // TODO mark optional parameter + } else { + if (matchedDataType) { + // maintain only brackets after dataType has been + // matched + builder.append(" " + currentArea); + } + } + } else { + switch (currentArea.toLowerCase()) { + case "§param§": + // maintan proper format + currentArea = "param:\n"; + + // new parameter beginning -> reset colon and dataType + // matches + matchedColon = false; + matchedDataType = false; + break; + + case "bool": + // don't use bool shortcut + currentArea = "Boolean"; + default: + if (matchedColon) { + // colon has been matched therefore this must be the + // data type + matchedDataType = true; + } + } + + builder.append(" " + currentArea); + + if (currentArea.endsWith(":")) { + matchedColon = true; + } + } + } + + parameters = builder.toString().trim().replace(" :", ":").replace(" / ", "/"); + + String paramCopy = parameters.toLowerCase(); + + // format data types consisting of more than one word + final String[] dataTypesToReplace = { "structured text", "if type", "team member", + "any value" }; + final String[] dataTypeReplacements = { "StructuredText", "IfType", "TeamMember", + "Anything" }; + + for (int i = 0; i < dataTypesToReplace.length; i++) { + while (paramCopy.contains(dataTypesToReplace[i])) { + parameters = parameters.substring(0, paramCopy.indexOf(dataTypesToReplace[i])) + + dataTypeReplacements[i] + + parameters.substring(paramCopy.indexOf(dataTypesToReplace[i]) + + dataTypesToReplace[i].length()); + + paramCopy = parameters.toLowerCase(); + } + } + return parameters; } + /** + * Formats alternative data types (this is when more than one dataType is + * allowed) by seperating them with a "/" + * + * @param input + * The input to process + * @return The formatted input + */ + private String formatAlternativeDataTypes(String input) { + // look for alternative data types + int pos1 = input.indexOf(":"); + String prefix = input.substring(0, pos1 + 1); + + int pos2 = input.length(); + + if (input.contains("-") && input.indexOf("-") > prefix.length() - 1) { + pos2 = input.indexOf("-"); + } + + String relevantPart = input.substring(pos1 + 1, pos2); + String postfix = input.substring(pos2, input.length()); + + // replace all seperators by slash + relevantPart = relevantPart.replace(",", "/").replace("or", "/"); + + // make sure the seperators are not seperated from the next word + while (relevantPart.contains(" /")) { + relevantPart = relevantPart.replace(" /", "/"); + } + while (relevantPart.contains("/ ")) { + relevantPart = relevantPart.replace("/ ", "/"); + } + + return prefix + relevantPart + postfix; + } + /** * Brings the given returnValue into the proper format * diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/base/KeywordList.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/base/KeywordList.java index add8960f..da3559b0 100644 --- a/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/base/KeywordList.java +++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/base/KeywordList.java @@ -1,6 +1,7 @@ package raven.sqdev.infoCollection.base; import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; import java.util.List; @@ -12,7 +13,7 @@ * A list containing multiple Keywords * * @author Raven - * + * */ public class KeywordList implements ISaveable { @@ -69,13 +70,38 @@ public KeywordList(String saveFormat) { } } + /** + * Creates a KeywordList out of the given list of keywords + * + * @param keywords + * The list of variables that should be transformed into a + * KeywordList + */ + public KeywordList(List keywords) { + this(); + + addKeywords(keywords); + } + /** * Adds a keyword to this list * * @param keyword - * Th keyword to add + * The keyword to add */ public void addKeyword(Keyword keyword) { + addKeyword(keyword, true); + } + + /** + * Adds a keyword to this list + * + * @param keyword + * The keyword to add + * @param sort + * Whether to sort the respective list after addition + */ + private void addKeyword(Keyword keyword, boolean sort) { Assert.isNotNull(keyword); int listIndex; @@ -86,10 +112,32 @@ public void addKeyword(Keyword keyword) { listIndex = 0; } - keywords.get(listIndex).add(keyword); + if (!keywords.get(listIndex).contains(keyword)) { + keywords.get(listIndex).add(keyword); + } - // sort the list the keywords has been added to - Collections.sort(keywords.get(listIndex)); + if (sort) { + // sort the list the keywords has been added to + Collections.sort(keywords.get(listIndex)); + } + } + + /** + * Adds all given keywords to this list + * + * @param keywords + * The Collection of keywords to add + */ + public void addKeywords(Collection keywords) { + // add all keywords + for (Keyword currentKeyword : keywords) { + addKeyword(currentKeyword, false); + } + + // sort list + for (List current : this.keywords) { + Collections.sort(current); + } } /** @@ -204,7 +252,7 @@ public boolean recreateFrom(String savedFormat) { String listContent = savedFormat.substring( savedFormat.indexOf(LIST_START_SAVESEQUENCE) + LIST_START_SAVESEQUENCE.length(), savedFormat.indexOf(LIST_END_SAVESEQUENCE)).trim(); - + for (String currentKeywordContent : listContent.split(LIST_SEPERATOR_SAVESEQUENCE)) { currentKeywordContent = currentKeywordContent.trim(); 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 c76f0a88..a1082ad3 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 @@ -13,7 +13,7 @@ * information about it * * @author Raven - * + * */ public class SQFCommand extends SQFElement { @@ -187,6 +187,21 @@ public ArrayList getSyntaxes() { return syntaxes; } + /** + * Gets the syntaxes of this command as a String representation. + * + * @return The syntaxes of this command + */ + public ArrayList getStringSyntaxes() { + ArrayList syntaxes = new ArrayList(); + + for (Syntax currentSyntax : getSyntaxes()) { + syntaxes.add(currentSyntax.toString()); + } + + return syntaxes; + } + /** * Sets the syntaxes of this command * @@ -300,7 +315,7 @@ public void addExample(String example) { // make sure the example is surrounded by code tags taggedExample = ((taggedExample.startsWith(codeOpener)) ? "" : codeOpener) + taggedExample + ((taggedExample.endsWith(codeCloser)) ? "" : codeCloser); - + // add example if it has not been added yet if (!getExamples().contains(taggedExample)) { getExamples().add(taggedExample); @@ -510,6 +525,45 @@ public boolean hasRawSyntax() { return !getRawSytaxes().isEmpty(); } + /** + * Checks whether this command can be used as a binary operator + */ + public boolean isBinaryOperator() { + for (Syntax currentSyntax : getSyntaxes()) { + if (currentSyntax.isBinary()) { + return true; + } + } + + return false; + } + + /** + * Checks whether this command can be used as a unary operator + */ + public boolean isUnaryOperator() { + for (Syntax currentSyntax : getSyntaxes()) { + if (currentSyntax.isUnary()) { + return true; + } + } + + return false; + } + + /** + * Checks whether this command can be used as a nular operator + */ + public boolean isNularOperator() { + for (Syntax currentSyntax : getSyntaxes()) { + if (currentSyntax.isNular()) { + return true; + } + } + + return false; + } + @Override public String toString() { String representation = ""; @@ -602,17 +656,17 @@ public boolean recreateFrom(String savedFormat) { return false; } - // symtax + // syntax String syntaxContent = savedFormat.substring( savedFormat.indexOf(SYNTAX_START_SAVESEQUENCE) + SYNTAX_START_SAVESEQUENCE.length(), savedFormat.indexOf(SYNTAX_END_SAVESEQUENCE)).trim(); - + for (String currentSyntax : syntaxContent.split(SYNTAX_SEPERATOR_SAVESEQUENCE)) { // process each syntax currentSyntax = currentSyntax.trim(); if (!currentSyntax.isEmpty()) { - // TODO parse to Syntax + addSyntax(Syntax.parseSyntax(currentSyntax, getKeyword())); } } @@ -621,7 +675,7 @@ public boolean recreateFrom(String savedFormat) { savedFormat.indexOf(RAWSYNTAX_START_SAVESEQUENCE) + RAWSYNTAX_START_SAVESEQUENCE.length(), savedFormat.indexOf(RAWSYNTAX_END_SAVESEQUENCE)).trim(); - + for (String currentRawSyntax : rawSyntaxContent.split(RAWSYNTAX_SEPERATOR_SAVESEQUENCE)) { // process each rawSyntax currentRawSyntax = currentRawSyntax.trim(); @@ -636,7 +690,7 @@ public boolean recreateFrom(String savedFormat) { savedFormat.indexOf(EXAMPLE_START_SAVESEQUENCE) + EXAMPLE_START_SAVESEQUENCE.length(), savedFormat.indexOf(EXAMPLE_END_SAVESEQUENCE)).trim(); - + for (String currentExample : exampleContent.split(EXAMPLE_SEPERATOR_SAVESEQUENCE)) { // process each example currentExample = currentExample.trim(); @@ -651,14 +705,14 @@ public boolean recreateFrom(String savedFormat) { savedFormat.indexOf(LOCALITY_START_SAVESEQUENCE) + LOCALITY_START_SAVESEQUENCE.length(), savedFormat.indexOf(LOCALITY_END_SAVESEQUENCE)).trim(); - + String argumentLocality = localityContent .substring(0, localityContent.indexOf(LOCALITY_SEPERATOR_SAVESEQUENCE)).trim(); String effectsLocality = localityContent .substring(localityContent.indexOf(LOCALITY_SEPERATOR_SAVESEQUENCE) + LOCALITY_SEPERATOR_SAVESEQUENCE.length()) .trim(); - + if (ELocality.resolve(argumentLocality) == null || ELocality.resolve(effectsLocality) == null) { return false; @@ -670,7 +724,7 @@ public boolean recreateFrom(String savedFormat) { String noteContent = savedFormat.substring( savedFormat.indexOf(NOTE_START_SAVESEQUENCE) + NOTE_START_SAVESEQUENCE.length(), savedFormat.indexOf(NOTE_END_SAVESEQUENCE)).trim(); - + for (String currentNote : noteContent.split(NOTE_SEPERATOR_SAVESEQUENCE)) { // process each note currentNote = currentNote.trim(); @@ -685,7 +739,7 @@ public boolean recreateFrom(String savedFormat) { savedFormat.indexOf(RETURNVALUE_START_SAVESEQUENCE) + RETURNVALUE_START_SAVESEQUENCE.length(), savedFormat.indexOf(RETURNVALUE_END_SAVESEQUENCE)).trim(); - + if (returnType.isEmpty()) { return false; } else { diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IKeywordListChangeListener.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IKeywordListChangeListener.java new file mode 100644 index 00000000..7e5b2d3c --- /dev/null +++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IKeywordListChangeListener.java @@ -0,0 +1,26 @@ +package raven.sqdev.interfaces; + +/** + * A listener that gets notified whenever a change in the keyword list occurs + * + * @author Raven + * + */ +public interface IKeywordListChangeListener { + /** + * The context of a list change + */ + public static final String CTX_LIST_CHANGED = "KeywordListChangeListener.changed"; + /** + * The context when the list gets removed + */ + public static final String CTX_LIST_REMOVED = "KeywordListChangeListener.removed"; + + /** + * Gets called after the keyword list has changed + * + * @param ctx + * The context of the change + */ + public void keywordListChanged(String ctx); +} diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IKeywordProvider.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IKeywordProvider.java index 48cead3d..33d80647 100644 --- a/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IKeywordProvider.java +++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IKeywordProvider.java @@ -1,5 +1,6 @@ package raven.sqdev.interfaces; +import raven.sqdev.infoCollection.base.Keyword; import raven.sqdev.infoCollection.base.KeywordList; /** @@ -7,7 +8,7 @@ * providing an array of Strings * * @author Raven - * + * */ public interface IKeywordProvider { /** @@ -23,4 +24,37 @@ public interface IKeywordProvider { * The array of keywords */ public void setKeywordList(KeywordList keywords); + + /** + * Adds the given Keyword to the keyword list + * + * @param keyword + * The Keyword to add + */ + public void addKeyword(Keyword keyword); + + /** + * Removes the given Keyword from the keyword list + * + * @param keyword + * The Keyword to remove + */ + public void removeKeyword(Keyword keyword); + + /** + * Adds the given IKeywordListChangeListener if it is not + * already registered + * + * @param listener + * The listener to add + */ + public void addKeywordListChangeListener(IKeywordListChangeListener listener); + + /** + * Removes the given IKeywordListChangeListener + * + * @param listener + * The listener to remove + */ + public void removeKeywordListChangeListener(IKeywordListChangeListener listener); } diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IManager.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IManager.java new file mode 100644 index 00000000..e102ce77 --- /dev/null +++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IManager.java @@ -0,0 +1,19 @@ +package raven.sqdev.interfaces; + +/** + * This interface describes a manager class + * + * @author Raven + * + */ +public interface IManager { + /** + * Applies the changes of this manager + */ + public void apply(); + + /** + * Gets the type of this manager. + */ + public String getType(); +} diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IUpdateListener.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IUpdateListener.java new file mode 100644 index 00000000..5932c4a5 --- /dev/null +++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IUpdateListener.java @@ -0,0 +1,15 @@ +package raven.sqdev.interfaces; + +/** + * An interface describing a listener that gets notified about updates + * + * @author Raven + * + */ +public interface IUpdateListener { + + /** + * Gets called whenever an update was made + */ + public void updated(); +} diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/CharacterPair.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/CharacterPair.java index 7ee975aa..c16b1934 100644 --- a/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/CharacterPair.java +++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/CharacterPair.java @@ -1,12 +1,15 @@ package raven.sqdev.misc; +import java.util.ArrayList; +import java.util.List; + /** * This class is to associate a character with a respective partner element.
    * A typical example of a character pair is '(' and * ')' * * @author Raven - * + * */ public class CharacterPair { @@ -15,18 +18,37 @@ public class CharacterPair { public static final CharacterPair ROUND_BRACKETS = new CharacterPair('(', ')'); public static final CharacterPair SQUARE_BRACKETS = new CharacterPair('[', ']'); public static final CharacterPair CURLY_BRACKETS = new CharacterPair('{', '}'); + public static final CharacterPair TAG = new CharacterPair('<', '>'); + + /** + * A list of all defined CharacterPairs + */ + private static List definedPairs; + /** + * The actual pair + */ private char[] pair; /** * Creates a new character pair - * @param a Opening character of the pair - * @param b Closing character of the pair + * + * @param a + * Opening character of the pair + * @param b + * Closing character of the pair */ public CharacterPair(char a, char b) { char[] pair = { a, b }; this.setPair(pair); + + if (definedPairs == null) { + definedPairs = new ArrayList(); + } + + // register pair + definedPairs.add(this); } public char[] getPair() { @@ -39,6 +61,7 @@ public void setPair(char[] pair) { /** * Gets the opening character of this pair + * * @return */ public char getOpener() { @@ -47,6 +70,7 @@ public char getOpener() { /** * Gets the closing character of this pair + * * @return */ public char getCloser() { @@ -55,11 +79,36 @@ public char getCloser() { /** * Check if this pair includes the given character - * @param c The character to search for + * + * @param c + * The character to search for * @return */ public boolean includes(char c) { return (this.getOpener() == c || this.getCloser() == c); } + /** + * Finds the defined CharacterPair that includes the + * given Character + * + * @param c + * The character to search for + * @return The respective CharacterPair or null if + * none could be found + */ + public static CharacterPair getDefinedPairFor(char c) { + for (CharacterPair current : definedPairs) { + if (current.includes(c)) { + return current; + } + } + + return null; + } + + @Override + public String toString() { + return "'" + getOpener() + "' + '" + getCloser() + "'"; + } } diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/ListUtils.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/ListUtils.java new file mode 100644 index 00000000..4a50f19b --- /dev/null +++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/ListUtils.java @@ -0,0 +1,30 @@ +package raven.sqdev.misc; + +import java.util.List; +import java.util.ListIterator; + +/** + * A class containing various util functions for lists + * + * @author Raven + * + */ +public class ListUtils { + + /** + * Turns every element in the given String list into lowercase + * + * @param list + * The String list to process + * @return The processed list + */ + public static List toLowerCase(List list) { + ListIterator iterator = list.listIterator(); + + while (iterator.hasNext()) { + iterator.set(iterator.next().toLowerCase()); + } + + return list; + } +} diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/MultiPreferenceStore.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/MultiPreferenceStore.java new file mode 100644 index 00000000..6724d7e2 --- /dev/null +++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/MultiPreferenceStore.java @@ -0,0 +1,298 @@ +package raven.sqdev.misc; + +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceStore; +import org.eclipse.jface.util.IPropertyChangeListener; + +/** + * A preferenceStore that allows to combine multiple preferenceStores + * + * @author Raven + * + */ +public class MultiPreferenceStore extends PreferenceStore { + + /** + * A list of all preferenceStores that should be combined + */ + List stores; + + /** + * Creates an instance of this preferenceStore + * + * @param store + * The base store to start with + */ + public MultiPreferenceStore(IPreferenceStore store) { + Assert.isNotNull(store); + + stores = new ArrayList(2); + + stores.add(store); + } + + @Override + public void addPropertyChangeListener(IPropertyChangeListener listener) { + for (IPreferenceStore currentStore : stores) { + currentStore.addPropertyChangeListener(listener); + } + } + + @Override + public boolean contains(String name) { + for (IPreferenceStore currentStore : stores) { + if (currentStore.contains(name)) { + return true; + } + } + + return false; + } + + @Override + public void firePropertyChangeEvent(String name, Object oldValue, Object newValue) { + for (IPreferenceStore currentStore : stores) { + currentStore.firePropertyChangeEvent(name, oldValue, newValue); + } + } + + /** + * Retrieves the respective preferenceStore that contains the given + * preference (It will return the first store that matches a preference with + * the given name) + * + * @param name + * The name of the preference to search for + * @return The respective preferenceStore or the first one when the name + * could not be matched by any of the stores + */ + private IPreferenceStore getStoreContaining(String name) { + for (IPreferenceStore currentStore : stores) { + if (currentStore.contains(name)) { + return currentStore; + } + } + + // return the first one in order to avoid NullPointerExceptions + return stores.get(0); + } + + @Override + public boolean getBoolean(String name) { + return getStoreContaining(name).getBoolean(name); + } + + @Override + public boolean getDefaultBoolean(String name) { + return getStoreContaining(name).getDefaultBoolean(name); + } + + @Override + public double getDefaultDouble(String name) { + return getStoreContaining(name).getDefaultDouble(name); + } + + @Override + public float getDefaultFloat(String name) { + return getStoreContaining(name).getDefaultFloat(name); + } + + @Override + public int getDefaultInt(String name) { + return getStoreContaining(name).getDefaultInt(name); + } + + @Override + public long getDefaultLong(String name) { + return getStoreContaining(name).getDefaultLong(name); + } + + @Override + public String getDefaultString(String name) { + return getStoreContaining(name).getDefaultString(name); + } + + @Override + public double getDouble(String name) { + return getStoreContaining(name).getDouble(name); + } + + @Override + public float getFloat(String name) { + return getStoreContaining(name).getFloat(name); + } + + @Override + public int getInt(String name) { + return getStoreContaining(name).getInt(name); + } + + @Override + public long getLong(String name) { + return getStoreContaining(name).getLong(name); + } + + @Override + public String getString(String name) { + return getStoreContaining(name).getString(name); + } + + @Override + public boolean isDefault(String name) { + return getStoreContaining(name).isDefault(name); + } + + @Override + public boolean needsSaving() { + for (IPreferenceStore currentStore : stores) { + if (currentStore.needsSaving()) { + return true; + } + } + + return false; + } + + @Override + public void putValue(String name, String value) { + // put in base store + stores.get(0).putValue(name, value); + } + + @Override + public void removePropertyChangeListener(IPropertyChangeListener listener) { + for (IPreferenceStore currentStore : stores) { + currentStore.removePropertyChangeListener(listener); + } + } + + @Override + public void setDefault(String name, double value) { + // add to the base store + stores.get(0).setDefault(name, value); + } + + @Override + public void setDefault(String name, float value) { + // add to the base store + stores.get(0).setDefault(name, value); + } + + @Override + public void setDefault(String name, int value) { + // add to the base store + stores.get(0).setDefault(name, value); + } + + @Override + public void setDefault(String name, long value) { + // add to the base store + stores.get(0).setDefault(name, value); + } + + @Override + public void setDefault(String name, String defaultObject) { + // add to the base store + stores.get(0).setDefault(name, defaultObject); + } + + @Override + public void setDefault(String name, boolean value) { + // add to the base store + stores.get(0).setDefault(name, value); + } + + @Override + public void setToDefault(String name) { + getStoreContaining(name).setToDefault(name); + } + + @Override + public void setValue(String name, double value) { + // add to the base store + stores.get(0).setValue(name, value); + } + + @Override + public void setValue(String name, float value) { + // add to the base store + stores.get(0).setValue(name, value); + } + + @Override + public void setValue(String name, int value) { + // add to the base store + stores.get(0).setValue(name, value); + } + + @Override + public void setValue(String name, long value) { + // add to the base store + stores.get(0).setValue(name, value); + } + + @Override + public void setValue(String name, String value) { + // add to the base store + stores.get(0).setValue(name, value); + } + + @Override + public void setValue(String name, boolean value) { + // add to the base store + stores.get(0).setValue(name, value); + } + + @Override + public void save() throws IOException { + super.save(); + + for (IPreferenceStore currentStore : stores) { + if (currentStore instanceof PreferenceStore) { + ((PreferenceStore) currentStore).save(); + } else { + try { + // see if there is a save method and if yes try to invoke it + Method saveMethod = currentStore.getClass().getMethod("save", + (Class[]) null); + + saveMethod.invoke(currentStore, (Object[]) null); + } catch (NoSuchMethodException | SecurityException | IllegalAccessException + | IllegalArgumentException | InvocationTargetException e) { + // can't save + e.printStackTrace(); + } + } + } + } + + /** + * Adds the given IPreferenceStore to this store if it is not + * already contained + * + * @param store + * The store to add + */ + public void addPreferenceStore(IPreferenceStore store) { + if (!stores.contains(store)) { + stores.add(store); + } + } + + /** + * Removes the given IPreferenceStore from this store + * + * @param store + * The store to remove + */ + public void removePreferenceStore(IPreferenceStore store) { + stores.remove(store); + } +} diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/StyledRegion.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/StyledRegion.java index e59d9297..2c2df594 100644 --- a/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/StyledRegion.java +++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/StyledRegion.java @@ -81,6 +81,7 @@ public boolean addToStyledText(StyledText styledText) { return true; } + @Override public String toString() { return "Style: \n\t" + getStyle() + "\nContent: \n\t" + getContent().replace("\n", "\n\t"); } diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/TextUtils.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/TextUtils.java new file mode 100644 index 00000000..64efc38e --- /dev/null +++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/TextUtils.java @@ -0,0 +1,372 @@ +package raven.sqdev.misc; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.StringReader; +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.runtime.Assert; + +import raven.sqdev.constants.TextConstants; +import raven.sqdev.exceptions.BadSyntaxException; +import raven.sqdev.exceptions.SQDevException; + +/** + * A class containing various static text functions + * + * @author Raven + * + */ +public class TextUtils { + /** + * An array containing all special characters that are allowed in file names + */ + public static final char[] ALLOWED_SPECIAL_CHARACTER_FILENAME = { '.', '_' }; + + /** + * Counts the occurence of a String in another String + * + * @param str + * The String to be searched + * @param match + * The String to be searched for + * @return How often the searched string has been found + */ + public static int countMatches(String str, String match) { + int counter = 0; + + while (str.contains(match)) { + counter++; + + str = str.substring(str.indexOf(match) + match.length()); + } + + return counter; + } + + /** + * Checks if the given name is valid.
    + * A name is considered valid if it starts with a letter and then continues + * with either letters or digits or any character specified in + * allowedChars.
    + * If you don't want any additional characters to be allowed just pass + * null + * + * @param name + * The name to validate + * @param allowedChars + * A list of additional characters that are allowed for this + * name. May be null + */ + public static boolean isValidName(String name, ArrayList allowedChars) { + return whyIsInvalidName(name, allowedChars) == null; + } + + /** + * Checks for the reason the given name is invalid. + * + * @param name + * The invalid name (mustn't be valid) + * @param allowedChars + * A list of additional characters that are allowed for this + * name. May be null + * @return The error message explaining why the given name isn't valid. + */ + public static String whyIsInvalidName(String name, ArrayList allowedChars) { + if (name.isEmpty()) { + return "A name must not be empty!"; + } + + if (allowedChars == null) { + // initialize empty list + allowedChars = new ArrayList(); + } + + char[] chars = name.toCharArray(); + + if (!Character.isLetter(chars[0])) { + // name has to start with a letter + return "A name has to start with a letter!"; + } + + for (char currentChar : chars) { + if (!Character.isLetterOrDigit(currentChar)) { + // check if special character is allowed + if (!allowedChars.contains(currentChar)) { + if (currentChar == ' ') { + return "Blanks are not allowed in this name!"; + } + + return "Invalid character '" + currentChar + "' in \"" + name + "\"!"; + } + } + } + + // all good with the given name + return null; + } + + /** + * Checks if the given name is a valid project name + * + * @param name + * The name to check + * @see #isValidName + */ + public static boolean isValidFileName(String name) { + ArrayList allowedChars = new ArrayList(); + + for (char currentChar : ALLOWED_SPECIAL_CHARACTER_FILENAME) { + allowedChars.add(currentChar); + } + + return isValidName(name, allowedChars); + } + + /** + * Get the error code for why the name isn't valid + * + * @param name + * The name to check (mustn't be valid) + * @see #whyIsInvalidName + */ + public static String whyIsInvalidFileName(String name) { + ArrayList allowedChars = new ArrayList(); + + for (char currentChar : ALLOWED_SPECIAL_CHARACTER_FILENAME) { + allowedChars.add(currentChar); + } + + return whyIsInvalidName(name, allowedChars); + } + + /** + * Checks if the given character is a bracket + * + * @param c + * @see #BRACKETS + */ + public static boolean isBracket(char c) { + for (char currentChar : TextConstants.BRACKETS) { + if (currentChar == c) { + return true; + } + } + + return false; + } + + /** + * Checks whether the given character can be part of a word + * + * @param c + * The character to check + */ + public static boolean isWordPart(char c) { + if (Character.isLetterOrDigit(c)) { + return true; + } + + // check for valid special characters + for (char currentChar : TextConstants.SPECIAL_WORD_CHARACTERS) { + if (c == currentChar) { + return true; + } + } + + return false; + } + + /** + * Gets the different areas from an input such as words(seperated + * whitespace) or bracket areas (encapsulated in brackets). + * + * @param input + * The input whose areas should be obtained + * @param repair + * Indicates whether this function should try to repair the input + * in case the syntax is not correct (most commonly this applies + * to inserting closing brackets at the end of the input) + * @return The found areas or null if an error occured + * @throws BadSyntaxException + * If a bracket area is missing it's closing bracket + */ + public static String[] getTextAreas(String input, boolean repair) throws BadSyntaxException { + Assert.isNotNull(input); + + if (input.isEmpty()) { + // empty string results in no areas + return new String[0]; + } + + StringReader reader = new StringReader(input); + + char currentChar; + int currentCharInt; + + List areaList = new ArrayList(); + ByteArrayOutputStream characterStream = new ByteArrayOutputStream(); + + /** + * A bracket pair that might be found in the input + */ + CharacterPair bracketPair = null; + /** + * How often trailing opener of the same bracketPair occured before the + * last closer (wrapped brackets) + */ + int remainingOpenerToBeClosed = 0; + + try { + while ((currentCharInt = reader.read()) > 0) { + boolean flush = false; + + currentChar = (char) currentCharInt; + + if (isWordPart(currentChar)) { + // simply append + characterStream.write(currentChar); + } else { + if (Character.isWhitespace(currentChar)) { + // check that there this is not in a bracket area + if (bracketPair == null) { + flush = true; + } else { + // write it to the stream as it belongs to the + // bracket area + characterStream.write(currentChar); + } + } else { + if (isBracket(currentChar)) { + if (bracketPair == null) { + // get the bracket pair + bracketPair = CharacterPair.getDefinedPairFor(currentChar); + + if (bracketPair.getOpener() == currentChar) { + // manually flush + if (characterStream.size() > 0) { + areaList.add(characterStream.toString()); + characterStream.reset(); + } + } else { + // There is a closing bracket whose starting + throw new BadSyntaxException( + "Missing opening bracket " + bracketPair.getOpener()); + } + } else { + // check if the closer has been reached + if (bracketPair.getCloser() == currentChar) { + // check for wrapping + if (remainingOpenerToBeClosed == 0) { + flush = true; + + // reset bracket pair + bracketPair = null; + } else { + remainingOpenerToBeClosed--; + } + } else { + if (bracketPair.getOpener() == currentChar) { + // beginning wrap + remainingOpenerToBeClosed++; + } + // if it is another bracket don't care about + // it -> no wrapped areas + } + } + + // add bracket to stream + characterStream.write(currentChar); + } else { + // just put the character into the stream + characterStream.write(currentChar); + } + } + } + + if (flush && characterStream.size() > 0) { + // add stream as an area + areaList.add(characterStream.toString()); + + // reset stream + characterStream.reset(); + } + } + + if (bracketPair != null) { + // one more bracket has to be closed + remainingOpenerToBeClosed++; + + // we are still in a warped area -> missing closing character + if (remainingOpenerToBeClosed > 0 && repair && characterStream.size() > 0) { + // "repair" the input by inserting respective amount of + // closing brackets + String closer = ""; + + while (remainingOpenerToBeClosed > 0) { + closer += bracketPair.getCloser(); + + remainingOpenerToBeClosed--; + } + + // append it to buffer + characterStream.write(closer.getBytes()); + } else { + throw new BadSyntaxException( + "Incomplete CharacterPair " + bracketPair + " in input!"); + } + } + + if (characterStream.size() > 0) { + areaList.add(characterStream.toString()); + } + + return areaList.toArray(new String[areaList.size()]); + } catch (IOException e) { + try { + // rethrow + throw new SQDevException("Failed at retrieving areas", e); + } catch (SQDevException e1) { + e1.printStackTrace(); + + return null; + } + } + } + + /** + * Gets the different areas from an input such as words(seperated by blank + * or newLine) or bracket areas (encapsulated in brackets). + * + * @param input + * The input whose areas should be obtained + * @return The found areas or null if an error occured + * @throws BadSyntaxException + * If a bracket area is missing it's closing bracket + */ + public static String[] getTextAreas(String input) throws BadSyntaxException { + return getTextAreas(input, false); + } + + /** + * Checks whether the given input conists of only one text area. That is + * when getTextAreas() returns an array of size 1 + * + * @param input + * The input to check + * @throws BadSyntaxException + * When getTextAreas() throws such an exception + * + * @see #getTextAreas(String) + */ + public static boolean isSingleTextArea(String input) throws BadSyntaxException { + input = input.trim(); + + if (input.isEmpty()) { + return true; + } + + return getTextAreas(input).length == 1; + } +} diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/UpdateReporter.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/UpdateReporter.java new file mode 100644 index 00000000..433e56dc --- /dev/null +++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/UpdateReporter.java @@ -0,0 +1,76 @@ +package raven.sqdev.misc; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.runtime.Assert; + +import raven.sqdev.interfaces.IUpdateListener; + +/** + * A class providing all necessary methods for an update-listener framework + * + * @author Ravem + * + */ +public class UpdateReporter { + + /** + * A list of all registered IUpdateListener + */ + protected List updateListenerList; + + protected boolean allowDuplicates; + + /** + * Initializes the listener framework + * + * @param allowDuplicates + * Indicates whether listener duplicates should be allowed + */ + public UpdateReporter(boolean allowDuplicates) { + updateListenerList = new ArrayList(); + } + + /** + * Adds the given update listener. If it is a duplicate of a listener that + * is already added it might not get added + * + * @param listener + * The IUpdateListener to add + */ + public void addUpdateListener(IUpdateListener listener) { + Assert.isNotNull(listener); + + if (allowDuplicates || !updateListenerList.contains(listener)) { + updateListenerList.add(listener); + } + } + + /** + * Removes the given update listener + * + * @param listener + * The IUpdateListener to remove + */ + public void removeUpdateListener(IUpdateListener listener) { + updateListenerList.remove(listener); + } + + /** + * Removes all registered IUpdateListener + */ + public void removeAllUpdateListener() { + updateListenerList.clear(); + } + + /** + * Notifies all registered IUpdateListener + */ + protected 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 b2496bcd..e9fb3cf6 100644 --- a/plugin/Raven.SQDev.Misc/src/raven/sqdev/syntax/Syntax.java +++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/syntax/Syntax.java @@ -4,13 +4,17 @@ import org.eclipse.core.runtime.Assert; +import raven.sqdev.exceptions.BadSyntaxException; +import raven.sqdev.exceptions.SQDevCoreException; +import raven.sqdev.misc.TextUtils; + /** * A class representing a syntax that consist SyntaxElements * * @see SyntaxElement - * + * * @author Raven - * + * */ public class Syntax { @@ -30,6 +34,13 @@ public Syntax(String commandName) { elements = new ArrayList(); } + /** + * Creates a subSyntax that does not have a command name + */ + protected Syntax() { + this("!SubSyntax!"); + } + /** * Gets the command name this syntax is associated with */ @@ -140,4 +151,104 @@ public boolean equals(Object obj) { return true; } + + /** + * Check if this syntax is a nular syntax (= contains only the command with + * no arguments) + */ + public boolean isNular() { + return getArgumentCount() == 0; + } + + /** + * Check if this syntax is an unary syntax (= contains only the command with + * one argument) + */ + public boolean isUnary() { + return getArgumentCount() == 1; + } + + /** + * Check if this syntax is a binary syntax (= contains the command with an + * argument on both sides of it) + */ + public boolean isBinary() { + return getArgumentCount() == 2; + } + + /** + * Creates a syntax out of the given input + * + * @param input + * The input to derive the syntax from + * @param commandName + * The name of the command this Syntax belongs to. + * Has to be contained in input + * @return + */ + public static Syntax parseSyntax(String input, String commandName) { + if (input == null || input.isEmpty() || commandName == null || commandName.isEmpty()) { + // can't process + throw new IllegalArgumentException("The given input or commandName is invalid!"); + } + + // check that the commandName is properly contained in the input + boolean isContained = false; + + try { + String[] elements = TextUtils.getTextAreas(input); + String[] lowerElements = TextUtils.getTextAreas(input.toLowerCase()); + String lowerCommandName = commandName.toLowerCase(); + + for (int i = 0; i < lowerElements.length; i++) { + String currentElement = lowerElements[i]; + + if (currentElement.equals(lowerCommandName)) { + // use the specified commandName + elements[i] = commandName; + isContained = true; + break; + } + } + + if (!isContained) { + throw new BadSyntaxException("The command is not contained in the given input!"); + } + + // recreate String out of the array + StringBuilder builder = new StringBuilder(); + for (String currentElement : elements) { + builder.append(" " + currentElement); + } + input = builder.toString().trim(); + } catch (BadSyntaxException e) { + throw new SQDevCoreException("Failed at creating syntax", e); + } + + Syntax syntax = new Syntax(commandName); + + String inputBeforeCommand = input.substring(0, input.indexOf(commandName)).trim(); + String inputAfterCommand = input + .substring(input.indexOf(commandName) + commandName.length()).trim(); + + try { + if (!inputBeforeCommand.isEmpty()) { + // add leading syntaxElement + syntax.addElement(SyntaxElement.parseSyntaxElement(inputBeforeCommand)); + } + + // add the command as a syntaxElement + syntax.addElement(SyntaxElement.parseSyntaxElement(commandName)); + + if (!inputAfterCommand.isEmpty()) { + // add trailing syntaxElement + syntax.addElement(SyntaxElement.parseSyntaxElement(inputAfterCommand)); + } + + return syntax; + } catch (BadSyntaxException e) { + e.printStackTrace(); + return null; + } + } } diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/syntax/SyntaxElement.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/syntax/SyntaxElement.java index a322b3fa..a055b4b0 100644 --- a/plugin/Raven.SQDev.Misc/src/raven/sqdev/syntax/SyntaxElement.java +++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/syntax/SyntaxElement.java @@ -2,7 +2,9 @@ import org.eclipse.core.runtime.Assert; +import raven.sqdev.exceptions.BadSyntaxException; import raven.sqdev.misc.CharacterPair; +import raven.sqdev.misc.TextUtils; /** * A class representing a syntax element.
    @@ -11,7 +13,7 @@ * of another sub-syntax and the respective encapsulating characters. * * @author Raven - * + * */ public class SyntaxElement { @@ -40,7 +42,7 @@ public class SyntaxElement { * SyntaxElement. It may only be one word */ public SyntaxElement(String leafElement) { - Assert.isTrue(leafElement != null && !leafElement.isEmpty() && !leafElement.contains(" ")); + Assert.isTrue(leafElement != null && !leafElement.isEmpty()); this.leafElement = leafElement; } @@ -59,6 +61,7 @@ public SyntaxElement(Syntax subSyntax, CharacterPair encapsulator) { Assert.isTrue(subSyntax != null && !subSyntax.isEmpty()); this.subSyntax = subSyntax; + this.encapsulator = encapsulator; } /** @@ -76,8 +79,12 @@ public String toString() { if (isLeafElement()) { return leafElement; } else { - return getEncapsulator().getOpener() + subSyntax.toString() - + getEncapsulator().getCloser(); + if (encapsulator != null) { + return getEncapsulator().getOpener() + subSyntax.toString() + + getEncapsulator().getCloser(); + } else { + return subSyntax.toString(); + } } } @@ -118,4 +125,59 @@ public boolean equals(Object obj) { return this.toString().equals(comp.toString()); } + public static SyntaxElement parseSyntaxElement(String input) throws BadSyntaxException { + if (input == null || (input = input.trim()).isEmpty()) { + throw new BadSyntaxException("The given input cannot be parsed into a syntaxElement!"); + } + + char startingChar = input.charAt(0); + CharacterPair encapsulator = null; + + if (!Character.isLetterOrDigit(startingChar)) { + // find the respective encapsulator + encapsulator = CharacterPair.getDefinedPairFor(startingChar); + } + + String[] elements = TextUtils.getTextAreas(input); + + if (elements == null || elements.length == 0) { + throw new BadSyntaxException( + "TextUtils.getAreas() was not able to find areas in input"); + } + + if (elements.length > 1) { + // create a subSyntax with each of those elements as a + // syntaxElements + + Syntax subSyntax = new Syntax(); + + for (String currentArea : elements) { + if (TextUtils.isSingleTextArea(currentArea)) { + // add as leaf node + subSyntax.addElement(new SyntaxElement(currentArea)); + } else { + // add as sub node + subSyntax.addElement(parseSyntaxElement(currentArea)); + } + } + + return new SyntaxElement(subSyntax, encapsulator); + } else { + if (encapsulator == null) { + // There is just one area -> leaf element + return new SyntaxElement(elements[0]); + } else { + Syntax subSyntax = new Syntax(); + + String value = elements[0]; + // remove encapsulating characters + value = value.substring(value.indexOf(encapsulator.getOpener()) + 1, + value.lastIndexOf(encapsulator.getCloser())); + + subSyntax.addElement(new SyntaxElement(value)); + + return new SyntaxElement(subSyntax, encapsulator); + } + } + } } diff --git a/plugin/Raven.SQDev.SQFEditor/META-INF/MANIFEST.MF b/plugin/Raven.SQDev.SQFEditor/META-INF/MANIFEST.MF index f3bdcab9..31c83941 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.3.0 +Bundle-Version: 0.4.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/activator/Activator.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/activator/Activator.class index 084488ed..3da97cee 100644 Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/activator/Activator.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/activator/Activator.class differ diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQFStringPartitionRule$DecreasingCharArrayLengthComparator.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQFStringPartitionRule$DecreasingCharArrayLengthComparator.class index 1b258604..c9d6edde 100644 Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQFStringPartitionRule$DecreasingCharArrayLengthComparator.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQFStringPartitionRule$DecreasingCharArrayLengthComparator.class differ diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQFStringPartitionRule.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQFStringPartitionRule.class index 3b13eb30..9c395e03 100644 Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQFStringPartitionRule.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQFStringPartitionRule.class differ 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 35430cb5..d0c31908 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 c958d209..6ff4553c 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/Variable.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/Variable.class new file mode 100644 index 00000000..5207bea6 Binary files /dev/null and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/Variable.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 new file mode 100644 index 00000000..775d9169 --- /dev/null +++ b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQF.tokens @@ -0,0 +1,39 @@ +COMMA=1 +SEMICOLON=2 +EQUALS=3 +ELSE=4 +OR=5 +AND=6 +NOT=7 +EXP=8 +COMPARATOR=9 +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 +','=1 +';'=2 +'='=3 +'^'=8 +'>>'=10 +'('=15 +')'=16 +'['=17 +']'=18 +'{'=19 +'}'=20 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 new file mode 100644 index 00000000..93f8858a Binary files /dev/null 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 new file mode 100644 index 00000000..512876ea Binary files /dev/null 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 new file mode 100644 index 00000000..48523541 Binary files /dev/null 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 new file mode 100644 index 00000000..951293e0 --- /dev/null +++ b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.tokens @@ -0,0 +1,38 @@ +COMMA=1 +SEMICOLON=2 +EQUALS=3 +ELSE=4 +OR=5 +AND=6 +NOT=7 +EXP=8 +COMPARATOR=9 +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 +','=1 +';'=2 +'='=3 +'^'=8 +'>>'=10 +'('=15 +')'=16 +'['=17 +']'=18 +'{'=19 +'}'=20 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 new file mode 100644 index 00000000..7ae7f4a3 Binary files /dev/null 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 new file mode 100644 index 00000000..ef405f85 Binary files /dev/null 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 new file mode 100644 index 00000000..a8883fd1 Binary files /dev/null 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 new file mode 100644 index 00000000..96ee56b9 Binary files /dev/null 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 new file mode 100644 index 00000000..42578b74 Binary files /dev/null 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$BinaryContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$BinaryContext.class new file mode 100644 index 00000000..dd8a41a6 Binary files /dev/null and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$BinaryContext.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 new file mode 100644 index 00000000..0b694d95 Binary files /dev/null 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 new file mode 100644 index 00000000..9a2c97ad Binary files /dev/null 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 new file mode 100644 index 00000000..572ce78f Binary files /dev/null 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 new file mode 100644 index 00000000..6b99f701 Binary files /dev/null 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 new file mode 100644 index 00000000..9d1d925e Binary files /dev/null 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 new file mode 100644 index 00000000..a0490aac Binary files /dev/null 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 new file mode 100644 index 00000000..b945b8aa Binary files /dev/null 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 new file mode 100644 index 00000000..27614b0a Binary files /dev/null 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 new file mode 100644 index 00000000..f8da0a92 Binary files /dev/null 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$NularExpressionContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$NularExpressionContext.class new file mode 100644 index 00000000..1d08c7f3 Binary files /dev/null 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 new file mode 100644 index 00000000..5757ef4f Binary files /dev/null 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$StatementContext.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFParser$StatementContext.class new file mode 100644 index 00000000..66cac1b2 Binary files /dev/null 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 new file mode 100644 index 00000000..a0c9cf93 Binary files /dev/null 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 new file mode 100644 index 00000000..8a548b85 Binary files /dev/null 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 new file mode 100644 index 00000000..9f17c059 Binary files /dev/null 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 new file mode 100644 index 00000000..8bca5b4c Binary files /dev/null and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/parsing/SQFVisitor.class differ diff --git a/plugin/Raven.SQDev.SQFEditor/plugin.xml b/plugin/Raven.SQDev.SQFEditor/plugin.xml index b9c18327..cd12d65a 100644 --- a/plugin/Raven.SQDev.SQFEditor/plugin.xml +++ b/plugin/Raven.SQDev.SQFEditor/plugin.xml @@ -7,7 +7,7 @@ class="raven.sqdev.editors.sqfeditor.SQF_Editor" default="true" extensions="sqf" - icon="platform:plugin/raven.sqdev.util/resources/icons/SQF_image.gif" + icon="platform:plugin/raven.sqdev.util/resources/icons/SQFIcon.png" id="raven.sqdev.sqfEditor" name="sqfEditor"> diff --git a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/activator/Activator.java b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/activator/Activator.java index 68bf5a98..b898a66e 100644 --- a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/activator/Activator.java +++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/activator/Activator.java @@ -24,6 +24,7 @@ public class Activator extends AbstractUIPlugin { * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework. * BundleContext) */ + @Override public void start(BundleContext context) throws Exception { super.start(context); plugin = this; @@ -37,6 +38,7 @@ public void start(BundleContext context) throws Exception { * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework. * BundleContext) */ + @Override public void stop(BundleContext context) throws Exception { plugin = null; diff --git a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/SQFStringPartitionRule.java b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/SQFStringPartitionRule.java index 15556b8e..bebcb542 100644 --- a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/SQFStringPartitionRule.java +++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/SQFStringPartitionRule.java @@ -18,6 +18,7 @@ public class SQFStringPartitionRule extends PatternRule { */ @SuppressWarnings("rawtypes") private static class DecreasingCharArrayLengthComparator implements Comparator { + @Override public int compare(Object o1, Object o2) { return ((char[]) o2).length - ((char[]) o1).length; } @@ -103,6 +104,7 @@ public SQFStringPartitionRule(String startSequence, String endSequence, IToken t } } + @Override @SuppressWarnings("unchecked") protected boolean endSequenceDetected(ICharacterScanner scanner) { 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 67c84833..2dbe2fff 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 @@ -1,7 +1,14 @@ package raven.sqdev.editors.sqfeditor; import java.io.FileNotFoundException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.antlr.v4.runtime.ANTLRInputStream; +import org.antlr.v4.runtime.CommonTokenStream; +import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.runtime.tree.ParseTreeWalker; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; @@ -11,11 +18,23 @@ import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IFileEditorInput; +import raven.sqdev.constants.SQDevPreferenceConstants; import raven.sqdev.editors.BasicCodeEditor; +import raven.sqdev.editors.BasicErrorListener; import raven.sqdev.editors.BasicPartitionScanner; +import raven.sqdev.editors.BasicSourceViewerConfiguration; import raven.sqdev.editors.KeywordScanner; +import raven.sqdev.editors.sqfeditor.parsing.SQFLexer; +import raven.sqdev.editors.sqfeditor.parsing.SQFParseListener; +import raven.sqdev.editors.sqfeditor.parsing.SQFParser; import raven.sqdev.exceptions.IllegalAccessStateException; +import raven.sqdev.exceptions.SQDevCoreException; import raven.sqdev.exceptions.SQDevFileIsInvalidException; +import raven.sqdev.infoCollection.base.Keyword; +import raven.sqdev.infoCollection.base.KeywordList; +import raven.sqdev.infoCollection.base.SQFCommand; +import raven.sqdev.interfaces.IKeywordListChangeListener; +import raven.sqdev.misc.ListUtils; import raven.sqdev.sqdevFile.ESQDevFileAnnotation; import raven.sqdev.sqdevFile.ESQDevFileAttribute; import raven.sqdev.sqdevFile.ESQDevFileType; @@ -29,21 +48,69 @@ * The editor for working with SQF files * * @author Raven - * + * */ -public class SQF_Editor extends BasicCodeEditor { +public class SQF_Editor extends BasicCodeEditor implements IKeywordListChangeListener { + + /** + * The KeywordProvider for the SQF keywords + */ + private SQFKeywordProvider provider; + + /** + * A list of all commands that can be used as a binary operator + */ + private List binaryCommands; + /** + * A list of all commands that can be used as a unary operator + */ + private List unaryCommands; + /** + * A list of all commands that can be used as a nular operator + */ + private List nularCommands; + /** + * A list of local variables in this editor + */ + private List localVariables; + /** + * A list of global variables in this editor + */ + private List globalVariables; + /** + * The CommonTokenStream that is associated with the current + * parse tree + */ + private CommonTokenStream currentStream; public SQF_Editor() { super(); + BasicSourceViewerConfiguration configuration = getBasicConfiguration(); + + // create respective keywordScanners + configuration.createKeywordScanner( + SQDevPreferenceConstants.SQDEV_EDITOR_KEYWORDHIGHLIGHTING_COLOR_KEY, false); + configuration.createKeywordScanner( + SQDevPreferenceConstants.SQDEV_EDITOR_LOCALVARIABLEHIGHLIGHTING_COLOR_KEY, false); + configuration.createKeywordScanner( + SQDevPreferenceConstants.SQDEV_EDITOR_GLOBALVARIABLEHIGHLIGHTING_COLOR_KEY, false); + + // get keywordScanner - KeywordScanner keywordScanner = getBasicConfiguration().getKeywordScanner(); + KeywordScanner keywordScanner = configuration.getKeywordScanner( + SQDevPreferenceConstants.SQDEV_EDITOR_KEYWORDHIGHLIGHTING_COLOR_KEY); + + provider = new SQFKeywordProvider(); // set KeywordProvider - keywordScanner.setKeywordProvider(new SQFKeywordProvider()); + keywordScanner.setKeywordProvider(provider); + + + // configure this editor as a keyword list listener + provider.addKeywordListChangeListener(this); + keywordScanner.addKeywordListChangeListener(this); - // make cas insensitive - keywordScanner.makeCaseSensitive(false); // get PartitionScanner BasicPartitionScanner partitionScanner = getBasicProvider().getPartitionScanner(); @@ -52,6 +119,16 @@ public SQF_Editor() { partitionScanner.removeRule(BasicPartitionScanner.DOUBLE_QUOTE_STRING_RULE); partitionScanner .addRule(new SQFStringPartitionRule(new Token(BasicPartitionScanner.BASIC_STRING))); + + + binaryCommands = new ArrayList(); + unaryCommands = new ArrayList(); + nularCommands = new ArrayList(); + localVariables = new ArrayList(); + globalVariables = new ArrayList(); + + + categorizeCommands(); } @Override @@ -70,11 +147,11 @@ public void doSave(IProgressMonitor progressMonitor) { // get the linking file SQDevFile linkFile = new SQDevFile(containingProject .getFile(ESQDevFileType.LINK + EFileType.SQDEV.getExtension())); - + // check if autoExport is enabled for this project boolean autoExport = linkFile.parseAttribute(ESQDevFileAttribute.AUTOEXPORT) .getValue().equals("true"); - + if (autoExport) { // outsource the export process to another thread Job exportJob = new Job("Export") { @@ -91,7 +168,7 @@ protected IStatus run(IProgressMonitor monitor) { .getValues(), linkFile.parseAnnotation(ESQDevFileAnnotation.PRESERVE) .getValues()); - + monitor.worked(1); } catch (SQDevFileIsInvalidException e) { e.printStackTrace(); @@ -122,4 +199,218 @@ protected IStatus run(IProgressMonitor monitor) { } } } + + @Override + protected ParseTree doParse(String input) { + BasicErrorListener listener = new BasicErrorListener(this); + + ANTLRInputStream in = new ANTLRInputStream(input); + + SQFLexer lexer = new SQFLexer(in, ListUtils.toLowerCase(getBinaryKeywords())); + lexer.removeErrorListeners(); + lexer.addErrorListener(listener); + + currentStream = new CommonTokenStream(lexer); + + SQFParser parser = new SQFParser(currentStream); + + if (parseRuleNames == null) { + parseRuleNames = Arrays.asList(parser.getRuleNames()); + } + + parser.removeErrorListeners(); + parser.addErrorListener(listener); + + return parser.code(); + } + + @Override + public void processParseTree(ParseTree parseTree) { + ParseTreeWalker walker = new ParseTreeWalker(); + + walker.walk(new SQFParseListener(this, currentStream), parseTree); + + applyParseChanges(); + } + + /** + * Categorizes the commands according to their ability to be used as a + * binary/unary/nular operator + */ + private void categorizeCommands() { + for (Keyword currentKeyword : provider.getKeywordList().getKeywords()) { + if (currentKeyword instanceof SQFCommand) { + SQFCommand currentCommand = (SQFCommand) currentKeyword; + + if (currentCommand.isBinaryOperator()) { + binaryCommands.add(currentCommand); + } + + if (currentCommand.isUnaryOperator()) { + unaryCommands.add(currentCommand); + } + + if (currentCommand.isNularOperator()) { + nularCommands.add(currentCommand); + } + } + } + } + + /** + * Gets all SQF commands that can be used as a binary operator + */ + public List getBinaryOperators() { + return binaryCommands; + } + + /** + * Gets all SQF commands that can be used as a unary operator + */ + public List getUnaryOperators() { + return unaryCommands; + } + + /** + * Gets all SQF commands that can be used as a nular operator + */ + public List getNularOperators() { + return nularCommands; + } + + /** + * Gets a list of all keywords that can be used as a binary operator + */ + public List getBinaryKeywords() { + ArrayList list = new ArrayList(); + + for (SQFCommand currentCommand : getBinaryOperators()) { + list.add(currentCommand.getKeyword()); + } + + return list; + } + + /** + * Gets a list of all keywords that can be used as a unnary operator + */ + public List getUnnaryKeywords() { + ArrayList list = new ArrayList(); + + for (SQFCommand currentCommand : getUnaryOperators()) { + list.add(currentCommand.getKeyword()); + } + + return list; + } + + /** + * Gets a list of all keywords that can be used as a nular operator + */ + public List getNularKeywords() { + ArrayList list = new ArrayList(); + + for (SQFCommand currentCommand : getNularOperators()) { + list.add(currentCommand.getKeyword()); + } + + return list; + } + + @Override + public void keywordListChanged(String ctx) { + switch (ctx) { + case IKeywordListChangeListener.CTX_LIST_CHANGED: + categorizeCommands(); + break; + + case IKeywordListChangeListener.CTX_LIST_REMOVED: + throw new SQDevCoreException("Unimplemented behaviour necessary"); + } + } + + /** + * Sets the local variables for this editor. If there is a change compared + * to the current set of local variables the editor will update itself + * + * @param variables + * The local variables to add + * @param update + * Whether to update the editor + * + * @return True when variables were updated + */ + public boolean setLocalVariables(List variables, boolean update) { + if (!localVariables.equals(variables)) { + localVariables = new ArrayList(variables); + + // update respective scanner/provider + getBasicConfiguration() + .getKeywordScanner( + SQDevPreferenceConstants.SQDEV_EDITOR_LOCALVARIABLEHIGHLIGHTING_COLOR_KEY) + .getKeywordProvider().setKeywordList(new KeywordList(variables)); + + if (update) { + update(false); + } + + return true; + } + + return false; + } + + /** + * Sets the global variables for this editor. If there is a change compared + * to the current set of global variables the editor will update itself + * + * @param variables + * The gloabl variables to add + * @param update + * Whether to update the editor + * + * @return True when variables were updated + */ + public boolean setGlobalVariables(List variables, boolean update) { + if (!globalVariables.equals(variables)) { + globalVariables = new ArrayList(variables); + + // update respective scanner/provider + getBasicConfiguration() + .getKeywordScanner( + SQDevPreferenceConstants.SQDEV_EDITOR_GLOBALVARIABLEHIGHLIGHTING_COLOR_KEY) + .getKeywordProvider().setKeywordList(new KeywordList(variables)); + + if (update) { + update(false); + } + + return true; + } + + return false; + } + + /** + * Sets the variables for this editor. If there are any changes in + * comparison to the current set of variables the editor will updates itself + * + * @param localVariables + * The new set of local variables + * @param globalVariables + * The new set of global variables + */ + public void setVariables(List localVariables, List globalVariables) { + boolean localUpdate = setLocalVariables(localVariables, false); + boolean globalUpdate = setGlobalVariables(globalVariables, false); + + if (localUpdate || globalUpdate) { + update(false); + } + } + + @Override + public void createMarker(String type, int offset, int length, String message, int severity) { + // do nothing TODO: remove + fix macros + } } diff --git a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/Variable.java b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/Variable.java new file mode 100644 index 00000000..fb92ab64 --- /dev/null +++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/Variable.java @@ -0,0 +1,55 @@ +package raven.sqdev.editors.sqfeditor; + +import raven.sqdev.infoCollection.base.Keyword; + +/** + * A Keyword corresponding to a variable + * + * @author Raven + * + */ +public class Variable extends Keyword { + + /** + * Creates an empty variable + */ + public Variable() { + this("", null); + } + + /** + * Creates an instance of a variable + * + * @param variableName + * The variable name + */ + public Variable(String variableName) { + this(variableName, null); + } + + /** + * Creates an instance of a variable + * + * @param variableName + * The variable name + * @param description + * The description for this variable + */ + public Variable(String variableName, String description) { + setKeyword(variableName); + setDescription(description); + } + + /** + * Checks whether this variable is local (starts with an underscore) + */ + public boolean isLocal() { + return getKeyword().startsWith("_"); + } + + @Override + public String getSaveableFormat() { + throw new IllegalAccessError("Not yet saveable!"); + } + +} 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 new file mode 100644 index 00000000..775d9169 --- /dev/null +++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQF.tokens @@ -0,0 +1,39 @@ +COMMA=1 +SEMICOLON=2 +EQUALS=3 +ELSE=4 +OR=5 +AND=6 +NOT=7 +EXP=8 +COMPARATOR=9 +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 +','=1 +';'=2 +'='=3 +'^'=8 +'>>'=10 +'('=15 +')'=16 +'['=17 +']'=18 +'{'=19 +'}'=20 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 new file mode 100644 index 00000000..915a0105 --- /dev/null +++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFBaseListener.java @@ -0,0 +1,243 @@ +// Generated from SQF.g4 by ANTLR 4.5.3 +package raven.sqdev.editors.sqfeditor.parsing; + +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 SQFListener}, + * which can be extended to create a listener which only needs to handle a subset + * of the available methods. + */ +public class SQFBaseListener implements SQFListener { + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void enterCode(SQFParser.CodeContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void exitCode(SQFParser.CodeContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void enterStatement(SQFParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void exitStatement(SQFParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void enterAssignment(SQFParser.AssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void exitAssignment(SQFParser.AssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void enterBinaryExpression(SQFParser.BinaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void exitBinaryExpression(SQFParser.BinaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void enterArray(SQFParser.ArrayContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void exitArray(SQFParser.ArrayContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void enterBooleanExpression(SQFParser.BooleanExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void exitBooleanExpression(SQFParser.BooleanExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void enterMacroExpression(SQFParser.MacroExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void exitMacroExpression(SQFParser.MacroExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void enterElseExpression(SQFParser.ElseExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void exitElseExpression(SQFParser.ElseExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void enterModifyExpression(SQFParser.ModifyExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void exitModifyExpression(SQFParser.ModifyExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void enterBinary(SQFParser.BinaryContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void exitBinary(SQFParser.BinaryContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void enterParenthese(SQFParser.ParentheseContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void exitParenthese(SQFParser.ParentheseContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void enterInlineCode(SQFParser.InlineCodeContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void exitInlineCode(SQFParser.InlineCodeContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void enterArithmeticExpression(SQFParser.ArithmeticExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void exitArithmeticExpression(SQFParser.ArithmeticExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void enterUnary(SQFParser.UnaryContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void exitUnary(SQFParser.UnaryContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void enterUnaryExpression(SQFParser.UnaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void exitUnaryExpression(SQFParser.UnaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void enterNularExpression(SQFParser.NularExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void exitNularExpression(SQFParser.NularExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void enterMacro(SQFParser.MacroContext ctx) { } + /** + * {@inheritDoc} + * + *

    The default implementation does nothing.

    + */ + @Override public void exitMacro(SQFParser.MacroContext 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.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFBaseVisitor.java b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFBaseVisitor.java new file mode 100644 index 00000000..929b0363 --- /dev/null +++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFBaseVisitor.java @@ -0,0 +1,133 @@ +// Generated from SQF.g4 by ANTLR 4.5.3 +package raven.sqdev.editors.sqfeditor.parsing; +import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; + +/** + * This class provides an empty implementation of {@link SQFVisitor}, + * 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 SQFBaseVisitor extends AbstractParseTreeVisitor implements SQFVisitor { + /** + * {@inheritDoc} + * + *

    The default implementation returns the result of calling + * {@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 visitStatement(SQFParser.StatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

    The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

    + */ + @Override public T visitAssignment(SQFParser.AssignmentContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

    The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

    + */ + @Override public T visitBinaryExpression(SQFParser.BinaryExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

    The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

    + */ + @Override public T visitArray(SQFParser.ArrayContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

    The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

    + */ + @Override public T visitBooleanExpression(SQFParser.BooleanExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

    The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

    + */ + @Override public T visitMacroExpression(SQFParser.MacroExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

    The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

    + */ + @Override public T visitElseExpression(SQFParser.ElseExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

    The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

    + */ + @Override public T visitModifyExpression(SQFParser.ModifyExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

    The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

    + */ + @Override public T visitBinary(SQFParser.BinaryContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

    The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

    + */ + @Override public T visitParenthese(SQFParser.ParentheseContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

    The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

    + */ + @Override public T visitInlineCode(SQFParser.InlineCodeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

    The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

    + */ + @Override public T visitArithmeticExpression(SQFParser.ArithmeticExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

    The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

    + */ + @Override public T visitUnary(SQFParser.UnaryContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

    The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

    + */ + @Override public T visitUnaryExpression(SQFParser.UnaryExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

    The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

    + */ + @Override public T visitNularExpression(SQFParser.NularExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

    The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

    + */ + @Override public T visitMacro(SQFParser.MacroContext ctx) { return visitChildren(ctx); } +} \ No newline at end of file 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 new file mode 100644 index 00000000..8a3e1b73 --- /dev/null +++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.java @@ -0,0 +1,338 @@ +// Generated from SQF.g4 by ANTLR 4.5.3 +package raven.sqdev.editors.sqfeditor.parsing; + + import java.util.ArrayList; + import java.util.List; + +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class SQFLexer 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 + COMMA=1, SEMICOLON=2, EQUALS=3, ELSE=4, OR=5, AND=6, NOT=7, EXP=8, COMPARATOR=9, + 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; + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + public static final String[] ruleNames = { + "COMMA", "SEMICOLON", "EQUALS", "ELSE", "OR", "AND", "NOT", "EXP", "COMPARATOR", + "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" + }; + + private static final String[] _LITERAL_NAMES = { + null, "','", "';'", "'='", null, null, null, null, "'^'", null, "'>>'", + null, null, null, null, "'('", "')'", "'['", "']'", "'{'", "'}'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, "COMMA", "SEMICOLON", "EQUALS", "ELSE", "OR", "AND", "NOT", "EXP", + "COMPARATOR", "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" + }; + 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; + } + + + /** + * The id for the hidden whitespace token channel + */ + public static final int WHITESPACE_CHANNEL = 1; + /** + * The id for the hidden comment token channel + */ + public static final int COMMENT_CHANNEL = 2; + /** + * 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(); + + /** + * Creates an instance of this lexer + * @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! + */ + public SQFLexer(CharStream in, List binaryOperators) { + this(in); + this.binaryOperators = binaryOperators; + } + + + public SQFLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "SQF.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; } + + @Override + public void action(RuleContext _localctx, int ruleIndex, int actionIndex) { + switch (ruleIndex) { + case 22: + ID_action(_localctx, actionIndex); + break; + case 23: + PREPROCESSOR_action(_localctx, actionIndex); + break; + case 24: + DOC_action(_localctx, actionIndex); + break; + case 25: + COMMENT_action(_localctx, actionIndex); + break; + case 26: + WS_action(_localctx, actionIndex); + break; + } + } + private void ID_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 0: + + if(binaryOperators.contains(getText().toLowerCase())) { + setType(SQFParser.BINARY_OPERATOR); + } + + break; + } + } + private void PREPROCESSOR_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 1: + _channel = PREPROCESSOR_CHANNEL; + break; + } + } + private void DOC_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 2: + _channel = DOCUMENTATION_CHANNEL; + break; + } + } + private void COMMENT_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 3: + _channel = COMMENT_CHANNEL; + break; + } + } + private void WS_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 4: + _channel = WHITESPACE_CHANNEL; + break; + } + } + + 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"; + 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.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.tokens b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.tokens new file mode 100644 index 00000000..951293e0 --- /dev/null +++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFLexer.tokens @@ -0,0 +1,38 @@ +COMMA=1 +SEMICOLON=2 +EQUALS=3 +ELSE=4 +OR=5 +AND=6 +NOT=7 +EXP=8 +COMPARATOR=9 +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 +','=1 +';'=2 +'='=3 +'^'=8 +'>>'=10 +'('=15 +')'=16 +'['=17 +']'=18 +'{'=19 +'}'=20 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 new file mode 100644 index 00000000..65e34acd --- /dev/null +++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFListener.java @@ -0,0 +1,200 @@ +// Generated from SQF.g4 by ANTLR 4.5.3 +package raven.sqdev.editors.sqfeditor.parsing; +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link SQFParser}. + */ +public interface SQFListener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link SQFParser#code}. + * @param ctx the parse tree + */ + void enterCode(SQFParser.CodeContext ctx); + /** + * Exit a parse tree produced by {@link SQFParser#code}. + * @param ctx the parse tree + */ + void exitCode(SQFParser.CodeContext ctx); + /** + * Enter a parse tree produced by {@link SQFParser#statement}. + * @param ctx the parse tree + */ + void enterStatement(SQFParser.StatementContext ctx); + /** + * Exit a parse tree produced by {@link SQFParser#statement}. + * @param ctx the parse tree + */ + void exitStatement(SQFParser.StatementContext ctx); + /** + * Enter a parse tree produced by {@link SQFParser#assignment}. + * @param ctx the parse tree + */ + void enterAssignment(SQFParser.AssignmentContext ctx); + /** + * Exit a parse tree produced by {@link SQFParser#assignment}. + * @param ctx the parse tree + */ + void exitAssignment(SQFParser.AssignmentContext ctx); + /** + * Enter a parse tree produced by {@link SQFParser#binaryExpression}. + * @param ctx the parse tree + */ + void enterBinaryExpression(SQFParser.BinaryExpressionContext ctx); + /** + * Exit a parse tree produced by {@link SQFParser#binaryExpression}. + * @param ctx the parse tree + */ + void exitBinaryExpression(SQFParser.BinaryExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code Array} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void enterArray(SQFParser.ArrayContext ctx); + /** + * Exit a parse tree produced by the {@code Array} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void exitArray(SQFParser.ArrayContext ctx); + /** + * Enter a parse tree produced by the {@code BooleanExpression} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void enterBooleanExpression(SQFParser.BooleanExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code BooleanExpression} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void exitBooleanExpression(SQFParser.BooleanExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code MacroExpression} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void enterMacroExpression(SQFParser.MacroExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code MacroExpression} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void exitMacroExpression(SQFParser.MacroExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code ElseExpression} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void enterElseExpression(SQFParser.ElseExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code ElseExpression} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void exitElseExpression(SQFParser.ElseExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code ModifyExpression} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void enterModifyExpression(SQFParser.ModifyExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code ModifyExpression} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void exitModifyExpression(SQFParser.ModifyExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code Binary} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void enterBinary(SQFParser.BinaryContext ctx); + /** + * Exit a parse tree produced by the {@code Binary} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void exitBinary(SQFParser.BinaryContext ctx); + /** + * Enter a parse tree produced by the {@code Parenthese} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void enterParenthese(SQFParser.ParentheseContext ctx); + /** + * Exit a parse tree produced by the {@code Parenthese} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void exitParenthese(SQFParser.ParentheseContext ctx); + /** + * Enter a parse tree produced by the {@code InlineCode} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void enterInlineCode(SQFParser.InlineCodeContext ctx); + /** + * Exit a parse tree produced by the {@code InlineCode} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void exitInlineCode(SQFParser.InlineCodeContext ctx); + /** + * Enter a parse tree produced by the {@code ArithmeticExpression} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void enterArithmeticExpression(SQFParser.ArithmeticExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code ArithmeticExpression} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void exitArithmeticExpression(SQFParser.ArithmeticExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code Unary} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void enterUnary(SQFParser.UnaryContext ctx); + /** + * Exit a parse tree produced by the {@code Unary} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + */ + void exitUnary(SQFParser.UnaryContext ctx); + /** + * Enter a parse tree produced by {@link SQFParser#unaryExpression}. + * @param ctx the parse tree + */ + void enterUnaryExpression(SQFParser.UnaryExpressionContext ctx); + /** + * Exit a parse tree produced by {@link SQFParser#unaryExpression}. + * @param ctx the parse tree + */ + void exitUnaryExpression(SQFParser.UnaryExpressionContext ctx); + /** + * Enter a parse tree produced by {@link SQFParser#nularExpression}. + * @param ctx the parse tree + */ + void enterNularExpression(SQFParser.NularExpressionContext ctx); + /** + * Exit a parse tree produced by {@link SQFParser#nularExpression}. + * @param ctx the parse tree + */ + void exitNularExpression(SQFParser.NularExpressionContext ctx); + /** + * Enter a parse tree produced by {@link SQFParser#macro}. + * @param ctx the parse tree + */ + void enterMacro(SQFParser.MacroContext ctx); + /** + * Exit a parse tree produced by {@link SQFParser#macro}. + * @param ctx the parse tree + */ + void exitMacro(SQFParser.MacroContext ctx); +} \ No newline at end of file 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 new file mode 100644 index 00000000..a535c9c6 --- /dev/null +++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFParseListener.java @@ -0,0 +1,148 @@ +package raven.sqdev.editors.sqfeditor.parsing; + +import java.util.ArrayList; +import java.util.List; + +import org.antlr.v4.runtime.CommonTokenStream; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.tree.TerminalNode; +import org.eclipse.core.runtime.Assert; +import org.eclipse.jface.text.Position; + +import raven.sqdev.editors.sqfeditor.SQF_Editor; +import raven.sqdev.editors.sqfeditor.Variable; +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.exceptions.SQDevEditorException; + +public class SQFParseListener extends SQFBaseListener { + /** + * The editor this listener should report to + */ + private SQF_Editor editor; + + /** + * A list of found localVariables + */ + private List localVariables; + /** + * A list of found global variables + */ + private List globalVariables; + /** + * The respective CommonTokenStream associated with the pasre + * tree this listener corresponds to + */ + private CommonTokenStream stream; + + /** + * Creates a new instance of this listener. + * + * @param editor + * The editor the created listener should be configured to + * @param stream + * The CommonTokenStream associated with the + * respective parse tree + */ + public SQFParseListener(SQF_Editor editor, CommonTokenStream stream) { + Assert.isNotNull(editor); + Assert.isNotNull(stream); + + this.editor = editor; + this.stream = stream; + + localVariables = new ArrayList(); + globalVariables = new ArrayList(); + } + + /** + * Gets the editor this listener is configured on + */ + public SQF_Editor getConfiguredEditor() { + return editor; + } + + @Override + public void exitAssignment(AssignmentContext ctx) { + String variableName = null; + + switch (ctx.getChildCount()) { + case 3: + variableName = ctx.getChild(0).getText(); + break; + + case 4: + variableName = ctx.getChild(1).getText(); + break; + + default: + try { + throw new SQDevEditorException("Unexpected child count in assignment"); + } catch (SQDevEditorException e) { + // TODO: log + e.printStackTrace(); + } + } + + Variable variable = new Variable(variableName); + + if (variable.isLocal()) { + if (!localVariables.contains(variable)) { + localVariables.add(variable); + } + } else { + if (!globalVariables.contains(variable)) { + globalVariables.add(variable); + } + } + } + + @Override + public void exitCode(CodeContext ctx) { + if (ctx.getParent() == null) { + // end of document has been reached + + // set editors variables + editor.setVariables(localVariables, globalVariables); + } + } + + @Override + public void exitInlineCode(InlineCodeContext ctx) { + int start = ctx.getStart().getStartIndex(); + int stop = ctx.getStop().getStopIndex(); + + ParserRuleContext parent = ctx.getParent(); + ParserRuleContext previous = ctx; + + while (!(parent instanceof CodeContext)) { + previous = parent; + parent = parent.getParent(); + } + + int offset = 0; + + if (parent.children.size() - 1 > parent.children.indexOf(previous)) { + // there is a trailing semicolon that has to be folded as well + offset = 1; + + // check for hidden tokens between bracket and semicolon + List hiddenTokens = stream.getHiddenTokensToRight( + ((TerminalNode) ctx.children.get(ctx.children.size() - 1)).getSymbol() + .getTokenIndex()); + + if (hiddenTokens != null) { + // include possible WS/comments/etc + for (Token currentToken : hiddenTokens) { + offset += currentToken.getText().length(); + } + } + } + + // add foldable area + editor.addFoldingArea( + new Position(start, stop - start + ctx.getStop().getText().length() + offset)); + } +} 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 new file mode 100644 index 00000000..f292f26e --- /dev/null +++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFParser.java @@ -0,0 +1,1184 @@ +// Generated from SQF.g4 by ANTLR 4.5.3 +package raven.sqdev.editors.sqfeditor.parsing; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class SQFParser 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 + COMMA=1, SEMICOLON=2, EQUALS=3, ELSE=4, OR=5, AND=6, NOT=7, EXP=8, COMPARATOR=9, + 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; + 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; + public static final String[] ruleNames = { + "code", "statement", "assignment", "binaryExpression", "expression", "unaryExpression", + "nularExpression", "macro" + }; + + private static final String[] _LITERAL_NAMES = { + null, "','", "';'", "'='", null, null, null, null, "'^'", null, "'>>'", + null, null, null, null, "'('", "')'", "'['", "']'", "'{'", "'}'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, "COMMA", "SEMICOLON", "EQUALS", "ELSE", "OR", "AND", "NOT", "EXP", + "COMPARATOR", "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", "BINARY_OPERATOR" + }; + 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 "SQF.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public SQFParser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + public static class CodeContext extends ParserRuleContext { + public List statement() { + return getRuleContexts(StatementContext.class); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.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 CodeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_code; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).enterCode(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).exitCode(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof SQFVisitor ) return ((SQFVisitor)visitor).visitCode(this); + else return visitor.visitChildren(this); + } + } + + public final CodeContext code() throws RecognitionException { + CodeContext _localctx = new CodeContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_code); + int _la; + try { + int _alt; + setState(28); + switch (_input.LA(1)) { + case NOT: + case ADDITION_OPERATOR: + case OPENING_ROUND_BRACKET: + case OPENING_SQUARE_BRACKET: + case OPENING_CURLY_BRACKET: + case NUMBER: + case STRING: + case ID: + case BINARY_OPERATOR: + enterOuterAlt(_localctx, 1); + { + setState(16); + statement(); + setState(21); + _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 ) { + { + { + setState(17); + match(SEMICOLON); + setState(18); + statement(); + } + } + } + setState(23); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,0,_ctx); + } + setState(25); + _la = _input.LA(1); + if (_la==SEMICOLON) { + { + setState(24); + match(SEMICOLON); + } + } + + } + break; + case EOF: + enterOuterAlt(_localctx, 2); + { + setState(27); + 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 StatementContext extends ParserRuleContext { + public AssignmentContext assignment() { + return getRuleContext(AssignmentContext.class,0); + } + public BinaryExpressionContext binaryExpression() { + return getRuleContext(BinaryExpressionContext.class,0); + } + public StatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).enterStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).exitStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof SQFVisitor ) return ((SQFVisitor)visitor).visitStatement(this); + else return visitor.visitChildren(this); + } + } + + public final StatementContext statement() throws RecognitionException { + StatementContext _localctx = new StatementContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_statement); + try { + setState(32); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,3,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(30); + assignment(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(31); + binaryExpression(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + 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 AssignmentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_assignment; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).enterAssignment(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).exitAssignment(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof SQFVisitor ) return ((SQFVisitor)visitor).visitAssignment(this); + else return visitor.visitChildren(this); + } + } + + public final AssignmentContext assignment() throws RecognitionException { + AssignmentContext _localctx = new AssignmentContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_assignment); + try { + enterOuterAlt(_localctx, 1); + { + setState(35); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) { + case 1: + { + setState(34); + match(ID); + } + break; + } + setState(39); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) { + case 1: + { + setState(37); + match(ID); + } + break; + case 2: + { + setState(38); + macro(); + } + break; + } + setState(41); + match(EQUALS); + setState(42); + binaryExpression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BinaryExpressionContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode BINARY_OPERATOR() { return getToken(SQFParser.BINARY_OPERATOR, 0); } + public BinaryExpressionContext binaryExpression() { + return getRuleContext(BinaryExpressionContext.class,0); + } + public BinaryExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_binaryExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).enterBinaryExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).exitBinaryExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof SQFVisitor ) return ((SQFVisitor)visitor).visitBinaryExpression(this); + else return visitor.visitChildren(this); + } + } + + public final BinaryExpressionContext binaryExpression() throws RecognitionException { + BinaryExpressionContext _localctx = new BinaryExpressionContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_binaryExpression); + try { + setState(49); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(44); + expression(0); + setState(45); + match(BINARY_OPERATOR); + setState(46); + binaryExpression(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(48); + expression(0); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionContext extends ParserRuleContext { + public ExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expression; } + + public ExpressionContext() { } + public void copyFrom(ExpressionContext ctx) { + super.copyFrom(ctx); + } + } + public static class ArrayContext extends ExpressionContext { + public TerminalNode OPENING_SQUARE_BRACKET() { return getToken(SQFParser.OPENING_SQUARE_BRACKET, 0); } + public TerminalNode CLOSING_SQUARE_BRACKET() { return getToken(SQFParser.CLOSING_SQUARE_BRACKET, 0); } + public List binaryExpression() { + return getRuleContexts(BinaryExpressionContext.class); + } + public BinaryExpressionContext binaryExpression(int i) { + return getRuleContext(BinaryExpressionContext.class,i); + } + public List COMMA() { return getTokens(SQFParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(SQFParser.COMMA, i); + } + public ArrayContext(ExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).enterArray(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).exitArray(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof SQFVisitor ) return ((SQFVisitor)visitor).visitArray(this); + else return visitor.visitChildren(this); + } + } + public static class BooleanExpressionContext extends ExpressionContext { + public TerminalNode NOT() { return getToken(SQFParser.NOT, 0); } + public BinaryExpressionContext binaryExpression() { + return getRuleContext(BinaryExpressionContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode COMPARATOR() { return getToken(SQFParser.COMPARATOR, 0); } + public TerminalNode CONFIG_OPERATOR() { return getToken(SQFParser.CONFIG_OPERATOR, 0); } + public TerminalNode AND() { return getToken(SQFParser.AND, 0); } + public TerminalNode OR() { return getToken(SQFParser.OR, 0); } + public BooleanExpressionContext(ExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).enterBooleanExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).exitBooleanExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof SQFVisitor ) return ((SQFVisitor)visitor).visitBooleanExpression(this); + else return visitor.visitChildren(this); + } + } + public static class MacroExpressionContext extends ExpressionContext { + public MacroContext macro() { + return getRuleContext(MacroContext.class,0); + } + public MacroExpressionContext(ExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).enterMacroExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).exitMacroExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof SQFVisitor ) return ((SQFVisitor)visitor).visitMacroExpression(this); + else return visitor.visitChildren(this); + } + } + public static class ElseExpressionContext extends ExpressionContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode ELSE() { return getToken(SQFParser.ELSE, 0); } + public BinaryExpressionContext binaryExpression() { + return getRuleContext(BinaryExpressionContext.class,0); + } + public ElseExpressionContext(ExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).enterElseExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).exitElseExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof SQFVisitor ) return ((SQFVisitor)visitor).visitElseExpression(this); + else return visitor.visitChildren(this); + } + } + public static class ModifyExpressionContext extends ExpressionContext { + public TerminalNode ADDITION_OPERATOR() { return getToken(SQFParser.ADDITION_OPERATOR, 0); } + public BinaryExpressionContext binaryExpression() { + return getRuleContext(BinaryExpressionContext.class,0); + } + public ModifyExpressionContext(ExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).enterModifyExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).exitModifyExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof SQFVisitor ) return ((SQFVisitor)visitor).visitModifyExpression(this); + else return visitor.visitChildren(this); + } + } + public static class BinaryContext extends ExpressionContext { + public NularExpressionContext nularExpression() { + return getRuleContext(NularExpressionContext.class,0); + } + public BinaryContext(ExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).enterBinary(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).exitBinary(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof SQFVisitor ) return ((SQFVisitor)visitor).visitBinary(this); + else return visitor.visitChildren(this); + } + } + public static class ParentheseContext extends ExpressionContext { + public TerminalNode OPENING_ROUND_BRACKET() { return getToken(SQFParser.OPENING_ROUND_BRACKET, 0); } + public BinaryExpressionContext binaryExpression() { + return getRuleContext(BinaryExpressionContext.class,0); + } + public TerminalNode CLOSING_ROUND_BRACKET() { return getToken(SQFParser.CLOSING_ROUND_BRACKET, 0); } + public ParentheseContext(ExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).enterParenthese(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).exitParenthese(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof SQFVisitor ) return ((SQFVisitor)visitor).visitParenthese(this); + else return visitor.visitChildren(this); + } + } + public static class InlineCodeContext extends ExpressionContext { + public TerminalNode OPENING_CURLY_BRACKET() { return getToken(SQFParser.OPENING_CURLY_BRACKET, 0); } + public TerminalNode CLOSING_CURLY_BRACKET() { return getToken(SQFParser.CLOSING_CURLY_BRACKET, 0); } + public CodeContext code() { + return getRuleContext(CodeContext.class,0); + } + public InlineCodeContext(ExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).enterInlineCode(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).exitInlineCode(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof SQFVisitor ) return ((SQFVisitor)visitor).visitInlineCode(this); + else return visitor.visitChildren(this); + } + } + public static class ArithmeticExpressionContext extends ExpressionContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode EXP() { return getToken(SQFParser.EXP, 0); } + public BinaryExpressionContext binaryExpression() { + return getRuleContext(BinaryExpressionContext.class,0); + } + public TerminalNode MULTIPLICATION_OPERATOR() { return getToken(SQFParser.MULTIPLICATION_OPERATOR, 0); } + public TerminalNode MODULO_OPERATOR() { return getToken(SQFParser.MODULO_OPERATOR, 0); } + public TerminalNode ADDITION_OPERATOR() { return getToken(SQFParser.ADDITION_OPERATOR, 0); } + public TerminalNode MIN_MAX_OPERATOR() { return getToken(SQFParser.MIN_MAX_OPERATOR, 0); } + public ArithmeticExpressionContext(ExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).enterArithmeticExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).exitArithmeticExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof SQFVisitor ) return ((SQFVisitor)visitor).visitArithmeticExpression(this); + else return visitor.visitChildren(this); + } + } + public static class UnaryContext extends ExpressionContext { + public UnaryExpressionContext unaryExpression() { + return getRuleContext(UnaryExpressionContext.class,0); + } + public UnaryContext(ExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).enterUnary(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).exitUnary(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof SQFVisitor ) return ((SQFVisitor)visitor).visitUnary(this); + else return visitor.visitChildren(this); + } + } + + public final ExpressionContext expression() throws RecognitionException { + return expression(0); + } + + private ExpressionContext expression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState); + ExpressionContext _prevctx = _localctx; + int _startState = 8; + enterRecursionRule(_localctx, 8, RULE_expression, _p); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(80); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) { + case 1: + { + _localctx = new UnaryContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + + setState(52); + unaryExpression(); + } + break; + case 2: + { + _localctx = new BinaryContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(53); + nularExpression(); + } + break; + case 3: + { + _localctx = new ParentheseContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(54); + match(OPENING_ROUND_BRACKET); + setState(55); + binaryExpression(); + setState(56); + match(CLOSING_ROUND_BRACKET); + } + break; + case 4: + { + _localctx = new InlineCodeContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(58); + match(OPENING_CURLY_BRACKET); + setState(60); + _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)) { + { + setState(59); + code(); + } + } + + setState(62); + match(CLOSING_CURLY_BRACKET); + } + break; + case 5: + { + _localctx = new ArrayContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(63); + match(OPENING_SQUARE_BRACKET); + setState(72); + _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)) { + { + setState(64); + binaryExpression(); + setState(69); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(65); + match(COMMA); + setState(66); + binaryExpression(); + } + } + setState(71); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + + setState(74); + match(CLOSING_SQUARE_BRACKET); + } + break; + case 6: + { + _localctx = new BooleanExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(75); + match(NOT); + setState(76); + binaryExpression(); + } + break; + case 7: + { + _localctx = new ModifyExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(77); + match(ADDITION_OPERATOR); + setState(78); + binaryExpression(); + } + break; + case 8: + { + _localctx = new MacroExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(79); + macro(); + } + break; + } + _ctx.stop = _input.LT(-1); + setState(105); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,12,_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); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,11,_ctx) ) { + case 1: + { + _localctx = new ArithmeticExpressionContext(new ExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(82); + if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)"); + setState(83); + match(EXP); + setState(84); + binaryExpression(); + } + break; + case 2: + { + _localctx = new ArithmeticExpressionContext(new ExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(85); + if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)"); + setState(86); + _la = _input.LA(1); + if ( !(_la==MULTIPLICATION_OPERATOR || _la==MODULO_OPERATOR) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(87); + binaryExpression(); + } + break; + case 3: + { + _localctx = new ArithmeticExpressionContext(new ExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(88); + if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); + setState(89); + _la = _input.LA(1); + if ( !(_la==ADDITION_OPERATOR || _la==MIN_MAX_OPERATOR) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(90); + binaryExpression(); + } + break; + case 4: + { + _localctx = new ElseExpressionContext(new ExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(91); + if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); + setState(92); + match(ELSE); + setState(93); + binaryExpression(); + } + break; + case 5: + { + _localctx = new BooleanExpressionContext(new ExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(94); + if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); + setState(95); + _la = _input.LA(1); + if ( !(_la==COMPARATOR || _la==CONFIG_OPERATOR) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(96); + binaryExpression(); + } + break; + case 6: + { + _localctx = new BooleanExpressionContext(new ExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(97); + if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); + setState(98); + match(AND); + setState(99); + binaryExpression(); + } + break; + case 7: + { + _localctx = new BooleanExpressionContext(new ExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(100); + if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); + setState(101); + match(OR); + setState(102); + binaryExpression(); + } + break; + } + } + } + setState(107); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,12,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class UnaryExpressionContext extends ParserRuleContext { + public TerminalNode ID() { return getToken(SQFParser.ID, 0); } + public BinaryExpressionContext binaryExpression() { + return getRuleContext(BinaryExpressionContext.class,0); + } + public TerminalNode BINARY_OPERATOR() { return getToken(SQFParser.BINARY_OPERATOR, 0); } + public UnaryExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_unaryExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).enterUnaryExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).exitUnaryExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof SQFVisitor ) return ((SQFVisitor)visitor).visitUnaryExpression(this); + else return visitor.visitChildren(this); + } + } + + public final UnaryExpressionContext unaryExpression() throws RecognitionException { + UnaryExpressionContext _localctx = new UnaryExpressionContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_unaryExpression); + try { + setState(112); + switch (_input.LA(1)) { + case ID: + enterOuterAlt(_localctx, 1); + { + setState(108); + match(ID); + setState(109); + binaryExpression(); + } + break; + case BINARY_OPERATOR: + enterOuterAlt(_localctx, 2); + { + setState(110); + match(BINARY_OPERATOR); + setState(111); + binaryExpression(); + } + 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 NularExpressionContext extends ParserRuleContext { + public TerminalNode ID() { return getToken(SQFParser.ID, 0); } + public TerminalNode NUMBER() { return getToken(SQFParser.NUMBER, 0); } + public TerminalNode STRING() { return getToken(SQFParser.STRING, 0); } + public NularExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_nularExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).enterNularExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).exitNularExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof SQFVisitor ) return ((SQFVisitor)visitor).visitNularExpression(this); + else return visitor.visitChildren(this); + } + } + + public final NularExpressionContext nularExpression() throws RecognitionException { + NularExpressionContext _localctx = new NularExpressionContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_nularExpression); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(114); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NUMBER) | (1L << STRING) | (1L << ID))) != 0)) ) { + _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 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 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 MacroContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_macro; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).enterMacro(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof SQFListener ) ((SQFListener)listener).exitMacro(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof SQFVisitor ) return ((SQFVisitor)visitor).visitMacro(this); + else return visitor.visitChildren(this); + } + } + + public final MacroContext macro() throws RecognitionException { + MacroContext _localctx = new MacroContext(_ctx, getState()); + enterRule(_localctx, 14, 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); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(119); + match(COMMA); + setState(120); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NUMBER) | (1L << STRING) | (1L << ID))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + setState(125); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(126); + match(CLOSING_ROUND_BRACKET); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @Override + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 4: + return expression_sempred((ExpressionContext)_localctx, predIndex); + } + return true; + } + private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 0: + return precpred(_ctx, 15); + case 1: + return precpred(_ctx, 14); + case 2: + return precpred(_ctx, 13); + case 3: + return precpred(_ctx, 12); + case 4: + return precpred(_ctx, 11); + case 5: + return precpred(_ctx, 10); + case 6: + return precpred(_ctx, 9); + } + return true; + } + + 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}"; + 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.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFVisitor.java b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFVisitor.java new file mode 100644 index 00000000..e42f58eb --- /dev/null +++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/parsing/SQFVisitor.java @@ -0,0 +1,125 @@ +// Generated from SQF.g4 by ANTLR 4.5.3 +package raven.sqdev.editors.sqfeditor.parsing; +import org.antlr.v4.runtime.tree.ParseTreeVisitor; + +/** + * This interface defines a complete generic visitor for a parse tree produced + * by {@link SQFParser}. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +public interface SQFVisitor extends ParseTreeVisitor { + /** + * Visit a parse tree produced by {@link SQFParser#code}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitCode(SQFParser.CodeContext ctx); + /** + * Visit a parse tree produced by {@link SQFParser#statement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitStatement(SQFParser.StatementContext ctx); + /** + * Visit a parse tree produced by {@link SQFParser#assignment}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAssignment(SQFParser.AssignmentContext ctx); + /** + * Visit a parse tree produced by {@link SQFParser#binaryExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitBinaryExpression(SQFParser.BinaryExpressionContext ctx); + /** + * Visit a parse tree produced by the {@code Array} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitArray(SQFParser.ArrayContext ctx); + /** + * Visit a parse tree produced by the {@code BooleanExpression} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitBooleanExpression(SQFParser.BooleanExpressionContext ctx); + /** + * Visit a parse tree produced by the {@code MacroExpression} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitMacroExpression(SQFParser.MacroExpressionContext ctx); + /** + * Visit a parse tree produced by the {@code ElseExpression} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitElseExpression(SQFParser.ElseExpressionContext ctx); + /** + * Visit a parse tree produced by the {@code ModifyExpression} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitModifyExpression(SQFParser.ModifyExpressionContext ctx); + /** + * Visit a parse tree produced by the {@code Binary} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitBinary(SQFParser.BinaryContext ctx); + /** + * Visit a parse tree produced by the {@code Parenthese} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitParenthese(SQFParser.ParentheseContext ctx); + /** + * Visit a parse tree produced by the {@code InlineCode} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitInlineCode(SQFParser.InlineCodeContext ctx); + /** + * Visit a parse tree produced by the {@code ArithmeticExpression} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitArithmeticExpression(SQFParser.ArithmeticExpressionContext ctx); + /** + * Visit a parse tree produced by the {@code Unary} + * labeled alternative in {@link SQFParser#expression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitUnary(SQFParser.UnaryContext ctx); + /** + * Visit a parse tree produced by {@link SQFParser#unaryExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitUnaryExpression(SQFParser.UnaryExpressionContext ctx); + /** + * Visit a parse tree produced by {@link SQFParser#nularExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitNularExpression(SQFParser.NularExpressionContext ctx); + /** + * Visit a parse tree produced by {@link SQFParser#macro}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitMacro(SQFParser.MacroContext ctx); +} \ No newline at end of file diff --git a/plugin/Raven.SQDev.UI/.classpath b/plugin/Raven.SQDev.UI/.classpath new file mode 100644 index 00000000..c690b9e7 --- /dev/null +++ b/plugin/Raven.SQDev.UI/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/plugin/Raven.SQDev.UI/.project b/plugin/Raven.SQDev.UI/.project new file mode 100644 index 00000000..1f4abb6c --- /dev/null +++ b/plugin/Raven.SQDev.UI/.project @@ -0,0 +1,28 @@ + + + Raven.SQDev.UI + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/plugin/Raven.SQDev.UI/.settings/org.eclipse.jdt.core.prefs b/plugin/Raven.SQDev.UI/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..0c68a61d --- /dev/null +++ b/plugin/Raven.SQDev.UI/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/plugin/Raven.SQDev.UI/Abedo/org.abego.treelayout.core-1.0.3.jar b/plugin/Raven.SQDev.UI/Abedo/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/Abedo/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 new file mode 100644 index 00000000..37a7414d --- /dev/null +++ b/plugin/Raven.SQDev.UI/META-INF/MANIFEST.MF @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: UI +Bundle-SymbolicName: raven.sqdev.ui;singleton:=true +Bundle-Version: 0.1.0 +Bundle-Activator: raven.sqdev.ui.Activator +Bundle-Vendor: Raven +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + raven.sqdev.editors, + org.eclipse.ui.ide, + 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, + . diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/Activator.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/Activator.class new file mode 100644 index 00000000..5035719c Binary files /dev/null and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/Activator.class differ diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/commands/ShowParseTreeHandler.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/commands/ShowParseTreeHandler.class new file mode 100644 index 00000000..7e432aca Binary files /dev/null and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/commands/ShowParseTreeHandler.class differ diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/GraphicsSupport$1.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/GraphicsSupport$1.class new file mode 100644 index 00000000..ff196027 Binary files /dev/null and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/GraphicsSupport$1.class differ diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/GraphicsSupport.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/GraphicsSupport.class new file mode 100644 index 00000000..5c5e2e8a Binary files /dev/null and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/GraphicsSupport.class differ diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/ITreeTextProvider.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/ITreeTextProvider.class new file mode 100644 index 00000000..eb60e3b1 Binary files /dev/null and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/ITreeTextProvider.class differ diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/JFileChooserConfirmOverwrite.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/JFileChooserConfirmOverwrite.class new file mode 100644 index 00000000..54f5fc05 Binary files /dev/null and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/JFileChooserConfirmOverwrite.class differ diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeLayoutAdaptor$AntlrTreeChildrenIterable$1.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeLayoutAdaptor$AntlrTreeChildrenIterable$1.class new file mode 100644 index 00000000..0daa541a Binary files /dev/null and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeLayoutAdaptor$AntlrTreeChildrenIterable$1.class differ diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeLayoutAdaptor$AntlrTreeChildrenIterable.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeLayoutAdaptor$AntlrTreeChildrenIterable.class new file mode 100644 index 00000000..b9c0ca20 Binary files /dev/null and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeLayoutAdaptor$AntlrTreeChildrenIterable.class differ diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeLayoutAdaptor$AntlrTreeChildrenReverseIterable$1.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeLayoutAdaptor$AntlrTreeChildrenReverseIterable$1.class new file mode 100644 index 00000000..82594a16 Binary files /dev/null and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeLayoutAdaptor$AntlrTreeChildrenReverseIterable$1.class differ diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeLayoutAdaptor$AntlrTreeChildrenReverseIterable.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeLayoutAdaptor$AntlrTreeChildrenReverseIterable.class new file mode 100644 index 00000000..f6f5f70e Binary files /dev/null and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeLayoutAdaptor$AntlrTreeChildrenReverseIterable.class differ diff --git a/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeLayoutAdaptor.class b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeLayoutAdaptor.class new file mode 100644 index 00000000..1872bf64 Binary files /dev/null and b/plugin/Raven.SQDev.UI/bin/raven/sqdev/ui/util/TreeLayoutAdaptor.class differ 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 new file mode 100644 index 00000000..7ebdaf62 Binary files /dev/null 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 new file mode 100644 index 00000000..0cd03e95 Binary files /dev/null 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 new file mode 100644 index 00000000..5c9530e4 Binary files /dev/null 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 new file mode 100644 index 00000000..951b3bc2 Binary files /dev/null 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 new file mode 100644 index 00000000..3317372a Binary files /dev/null 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 new file mode 100644 index 00000000..f2b12f66 Binary files /dev/null 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 new file mode 100644 index 00000000..a95e5db0 Binary files /dev/null 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 new file mode 100644 index 00000000..50250432 Binary files /dev/null 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 new file mode 100644 index 00000000..d9831616 Binary files /dev/null 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 new file mode 100644 index 00000000..84971a25 Binary files /dev/null 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 new file mode 100644 index 00000000..5214357c Binary files /dev/null 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 new file mode 100644 index 00000000..a7029010 --- /dev/null +++ b/plugin/Raven.SQDev.UI/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + Abedo/,\ + Abedo/org.abego.treelayout.core-1.0.3.jar +src.includes = Abedo/ diff --git a/plugin/Raven.SQDev.UI/plugin.xml b/plugin/Raven.SQDev.UI/plugin.xml new file mode 100644 index 00000000..d646aff0 --- /dev/null +++ b/plugin/Raven.SQDev.UI/plugin.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + diff --git a/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/Activator.java b/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/Activator.java new file mode 100644 index 00000000..75f6fb30 --- /dev/null +++ b/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/Activator.java @@ -0,0 +1,50 @@ +package raven.sqdev.ui; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "raven.sqdev.ui"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + +} diff --git a/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/commands/ShowParseTreeHandler.java b/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/commands/ShowParseTreeHandler.java new file mode 100644 index 00000000..5b4a3697 --- /dev/null +++ b/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/commands/ShowParseTreeHandler.java @@ -0,0 +1,36 @@ +package raven.sqdev.ui.commands; + +import java.util.List; + +import org.antlr.v4.runtime.tree.ParseTree; +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PlatformUI; + +import raven.sqdev.editors.BasicCodeEditor; +import raven.sqdev.ui.util.TreeViewer; + +public class ShowParseTreeHandler extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + IEditorPart active = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() + .getActiveEditor(); + + if (active != null && active instanceof BasicCodeEditor) { + BasicCodeEditor activeEditor = (BasicCodeEditor) active; + + ParseTree tree = activeEditor.getParseTree(); + List ruleNames = activeEditor.getParseRuleNames(); + + if (tree != null && ruleNames != null) { + TreeViewer viewer = new TreeViewer(ruleNames, tree); + viewer.open(); + } + } + return null; + } + +} diff --git a/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/util/GraphicsSupport.java b/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/util/GraphicsSupport.java new file mode 100644 index 00000000..cfd0d153 --- /dev/null +++ b/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/util/GraphicsSupport.java @@ -0,0 +1,133 @@ +/* + * [The "BSD license"] + * Copyright (c) 2012 Terence Parr + * Copyright (c) 2012 Sam Harwell + * 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. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + */ + +package raven.sqdev.ui.util; + +import javax.imageio.ImageIO; +import javax.print.DocFlavor; +import javax.print.DocPrintJob; +import javax.print.PrintException; +import javax.print.PrintService; +import javax.print.SimpleDoc; +import javax.print.StreamPrintServiceFactory; +import javax.print.attribute.HashPrintRequestAttributeSet; +import javax.print.attribute.PrintRequestAttributeSet; +import javax.swing.*; +import java.awt.*; +import java.awt.image.BufferedImage; +import java.awt.print.PageFormat; +import java.awt.print.Printable; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.Arrays; + +public class GraphicsSupport { + /** + * [The "BSD license"] Copyright (c) 2011 Cay Horstmann 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. The name of the + * author may not be used to endorse or promote products derived from this + * software without specific prior written permission. THIS SOFTWARE IS + * PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + */ + public static void saveImage(final JComponent comp, String fileName) + throws IOException, PrintException { + if (fileName.endsWith(".ps") || fileName.endsWith(".eps")) { + DocFlavor flavor = DocFlavor.SERVICE_FORMATTED.PRINTABLE; + String mimeType = "application/postscript"; + StreamPrintServiceFactory[] factories = StreamPrintServiceFactory + .lookupStreamPrintServiceFactories(flavor, mimeType); + System.out.println(Arrays.toString(factories)); + if (factories.length > 0) { + FileOutputStream out = new FileOutputStream(fileName); + PrintService service = factories[0].getPrintService(out); + SimpleDoc doc = new SimpleDoc(new Printable() { + @Override + public int print(Graphics g, PageFormat pf, int page) { + if (page >= 1) + return Printable.NO_SUCH_PAGE; + else { + Graphics2D g2 = (Graphics2D) g; + g2.translate((pf.getWidth() - pf.getImageableWidth()) / 2, + (pf.getHeight() - pf.getImageableHeight()) / 2); + if (comp.getWidth() > pf.getImageableWidth() + || comp.getHeight() > pf.getImageableHeight()) { + double sf1 = pf.getImageableWidth() / (comp.getWidth() + 1); + double sf2 = pf.getImageableHeight() / (comp.getHeight() + 1); + double s = Math.min(sf1, sf2); + g2.scale(s, s); + } + + comp.paint(g); + return Printable.PAGE_EXISTS; + } + } + }, flavor, null); + DocPrintJob job = service.createPrintJob(); + PrintRequestAttributeSet attributes = new HashPrintRequestAttributeSet(); + job.print(doc, attributes); + out.close(); + } + } else { + // parrt: works with [image/jpeg, image/png, image/x-png, + // image/vnd.wap.wbmp, image/bmp, image/gif] + Rectangle rect = comp.getBounds(); + BufferedImage image = new BufferedImage(rect.width, rect.height, + BufferedImage.TYPE_INT_RGB); + Graphics2D g = (Graphics2D) image.getGraphics(); + g.setColor(Color.WHITE); + g.fill(rect); + // g.setColor(Color.BLACK); + comp.paint(g); + String extension = fileName.substring(fileName.lastIndexOf('.') + 1); + boolean result = ImageIO.write(image, extension, new File(fileName)); + if (!result) { + System.err.println("Now imager for " + extension); + } + g.dispose(); + } + } +} + diff --git a/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/util/ITreeTextProvider.java b/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/util/ITreeTextProvider.java new file mode 100644 index 00000000..5748b555 --- /dev/null +++ b/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/util/ITreeTextProvider.java @@ -0,0 +1,7 @@ +package raven.sqdev.ui.util; + +import org.antlr.v4.runtime.tree.Tree; + +public interface ITreeTextProvider { + public String getText(Tree node); +} diff --git a/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/util/JFileChooserConfirmOverwrite.java b/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/util/JFileChooserConfirmOverwrite.java new file mode 100644 index 00000000..51369579 --- /dev/null +++ b/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/util/JFileChooserConfirmOverwrite.java @@ -0,0 +1,63 @@ +/* + * [The "BSD license"] + * Copyright (c) 2013 Terence Parr + * Copyright (c) 2013 Sam Harwell + * 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. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + */ +package raven.sqdev.ui.util; + +import javax.swing.*; +import java.io.File; + +/** + * + * @author Sam Harwell + */ +public class JFileChooserConfirmOverwrite extends JFileChooser { + + private static final long serialVersionUID = -7090263102975223429L; + + public JFileChooserConfirmOverwrite() { + setMultiSelectionEnabled(false); + } + + @Override + public void approveSelection() { + File selectedFile = getSelectedFile(); + + if (selectedFile.exists()) { + int answer = JOptionPane.showConfirmDialog(this, "Overwrite existing file?", + "Overwrite?", JOptionPane.YES_NO_OPTION); + if (answer != JOptionPane.YES_OPTION) { + // do not call super.approveSelection + return; + } + } + + super.approveSelection(); + } + +} diff --git a/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/util/TreeLayoutAdaptor.java b/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/util/TreeLayoutAdaptor.java new file mode 100644 index 00000000..4c7c4155 --- /dev/null +++ b/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/util/TreeLayoutAdaptor.java @@ -0,0 +1,148 @@ +/* + * [The "BSD license"] + * Copyright (c) 2012 Terence Parr + * Copyright (c) 2012 Sam Harwell + * 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. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + */ + +package raven.sqdev.ui.util; + +import org.abego.treelayout.TreeForTreeLayout; +import org.antlr.v4.runtime.tree.Tree; + +import java.util.Iterator; +import java.util.NoSuchElementException; + +/** Adaptor ANTLR trees to {@link TreeForTreeLayout}. */ +public class TreeLayoutAdaptor implements TreeForTreeLayout { + private static class AntlrTreeChildrenIterable implements Iterable { + private final Tree tree; + + public AntlrTreeChildrenIterable(Tree tree) { + this.tree = tree; + } + + @Override + public Iterator iterator() { + return new Iterator() { + private int i = 0; + + @Override + public boolean hasNext() { + return tree.getChildCount() > i; + } + + @Override + public Tree next() { + if (!hasNext()) + throw new NoSuchElementException(); + + return tree.getChild(i++); + } + + @Override + public void remove() { + throw new UnsupportedOperationException(); + } + }; + } + } + + private static class AntlrTreeChildrenReverseIterable implements Iterable { + private final Tree tree; + + public AntlrTreeChildrenReverseIterable(Tree tree) { + this.tree = tree; + } + + @Override + public Iterator iterator() { + return new Iterator() { + private int i = tree.getChildCount(); + + @Override + public boolean hasNext() { + return i > 0; + } + + @Override + public Tree next() { + if (!hasNext()) + throw new NoSuchElementException(); + + return tree.getChild(--i); + } + + @Override + public void remove() { + throw new UnsupportedOperationException(); + } + }; + } + } + + private Tree root; + + public TreeLayoutAdaptor(Tree root) { + this.root = root; + } + + @Override + public boolean isLeaf(Tree node) { + return node.getChildCount() == 0; + } + + @Override + public boolean isChildOfParent(Tree node, Tree parentNode) { + return node.getParent() == parentNode; + } + + @Override + public Tree getRoot() { + return root; + } + + @Override + public Tree getLastChild(Tree parentNode) { + return parentNode.getChild(parentNode.getChildCount() - 1); + } + + @Override + public Tree getFirstChild(Tree parentNode) { + return parentNode.getChild(0); + } + + @Override + public Iterable getChildrenReverse(Tree node) { + return new AntlrTreeChildrenReverseIterable(node); + } + + @Override + public Iterable getChildren(Tree node) { + return new AntlrTreeChildrenIterable(node); + } +} + 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 new file mode 100644 index 00000000..736ba8fb --- /dev/null +++ b/plugin/Raven.SQDev.UI/src/raven/sqdev/ui/util/TreeViewer.java @@ -0,0 +1,739 @@ +/* + * [The "BSD license"] + * Copyright (c) 2012 Terence Parr + * Copyright (c) 2012 Sam Harwell + * 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. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + */ + +package raven.sqdev.ui.util; + +import org.abego.treelayout.NodeExtentProvider; +import org.abego.treelayout.TreeForTreeLayout; +import org.abego.treelayout.TreeLayout; +import org.abego.treelayout.util.DefaultConfiguration; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.misc.Utils; +import org.antlr.v4.runtime.tree.ErrorNode; +import org.antlr.v4.runtime.tree.Tree; +import org.antlr.v4.runtime.tree.Trees; + +import javax.imageio.ImageIO; +import javax.print.PrintException; +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import javax.swing.event.TreeSelectionEvent; +import javax.swing.event.TreeSelectionListener; +import javax.swing.filechooser.FileFilter; +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.tree.TreePath; +import javax.swing.tree.TreeSelectionModel; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.awt.event.WindowListener; +import java.awt.geom.CubicCurve2D; +import java.awt.geom.Rectangle2D; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; +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 { + private static final long serialVersionUID = 6504496891534543581L; + + public static final Color LIGHT_RED = new Color(244, 213, 211); + + public static class DefaultTreeTextProvider implements ITreeTextProvider { + private final List ruleNames; + + public DefaultTreeTextProvider(List ruleNames) { + this.ruleNames = ruleNames; + } + + @Override + public String getText(Tree node) { + return String.valueOf(Trees.getNodeText(node, ruleNames)); + } + } + + public static class VariableExtentProvide implements NodeExtentProvider { + TreeViewer viewer; + + public VariableExtentProvide(TreeViewer viewer) { + this.viewer = viewer; + } + + @Override + public double getWidth(Tree tree) { + FontMetrics fontMetrics = viewer.getFontMetrics(viewer.font); + String s = viewer.getText(tree); + int w = fontMetrics.stringWidth(s) + viewer.nodeWidthPadding * 2; + return w; + } + + @Override + public double getHeight(Tree tree) { + FontMetrics fontMetrics = viewer.getFontMetrics(viewer.font); + int h = fontMetrics.getHeight() + viewer.nodeHeightPadding * 2; + String s = viewer.getText(tree); + String[] lines = s.split("\n"); + return h * lines.length; + } + } + + protected ITreeTextProvider treeTextProvider; + protected TreeLayout treeLayout; + protected java.util.List highlightedNodes; + + protected String fontName = "Helvetica"; // Font.SANS_SERIF; + protected int fontStyle = Font.PLAIN; + protected int fontSize = 11; + protected Font font = new Font(fontName, fontStyle, fontSize); + + protected double gapBetweenLevels = 17; + protected double gapBetweenNodes = 7; + protected int nodeWidthPadding = 2; // added to left/right + protected int nodeHeightPadding = 0; // added above/below + protected int arcSize = 0; // make an arc in node outline? + + protected double scale = 1.0; + + protected Color boxColor = null; // set to a color to make it draw + // background + + protected Color highlightedBoxColor = Color.lightGray; + protected Color borderColor = null; + protected Color textColor = Color.black; + + public TreeViewer(List ruleNames, Tree tree) { + setRuleNames(ruleNames); + if (tree != null) { + setTree(tree); + } + setFont(font); + } + + private void updatePreferredSize() { + setPreferredSize(getScaledTreeSize()); + invalidate(); + if (getParent() != null) { + getParent().validate(); + } + repaint(); + } + + // ---------------- PAINT ----------------------------------------------- + + private boolean useCurvedEdges = false; + + public boolean getUseCurvedEdges() { + return useCurvedEdges; + } + + public void setUseCurvedEdges(boolean useCurvedEdges) { + this.useCurvedEdges = useCurvedEdges; + } + + protected void paintEdges(Graphics g, Tree parent) { + if (!getTree().isLeaf(parent)) { + BasicStroke stroke = new BasicStroke(1.0f, BasicStroke.CAP_ROUND, + BasicStroke.JOIN_ROUND); + ((Graphics2D) g).setStroke(stroke); + + Rectangle2D.Double parentBounds = getBoundsOfNode(parent); + double x1 = parentBounds.getCenterX(); + double y1 = parentBounds.getMaxY(); + for (Tree child : getTree().getChildren(parent)) { + Rectangle2D.Double childBounds = getBoundsOfNode(child); + double x2 = childBounds.getCenterX(); + double y2 = childBounds.getMinY(); + if (getUseCurvedEdges()) { + CubicCurve2D c = new CubicCurve2D.Double(); + double ctrlx1 = x1; + double ctrly1 = (y1 + y2) / 2; + double ctrlx2 = x2; + double ctrly2 = y1; + c.setCurve(x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2); + ((Graphics2D) g).draw(c); + } else { + g.drawLine((int) x1, (int) y1, (int) x2, (int) y2); + } + paintEdges(g, child); + } + } + } + + protected void paintBox(Graphics g, Tree tree) { + Rectangle2D.Double box = getBoundsOfNode(tree); + // draw the box in the background + boolean ruleFailedAndMatchedNothing = false; + if (tree instanceof ParserRuleContext) { + ParserRuleContext ctx = (ParserRuleContext) tree; + ruleFailedAndMatchedNothing = ctx.exception != null && ctx.stop != null + && ctx.stop.getTokenIndex() < ctx.start.getTokenIndex(); + } + if (isHighlighted(tree) || boxColor != null || tree instanceof ErrorNode + || ruleFailedAndMatchedNothing) { + if (isHighlighted(tree)) + g.setColor(highlightedBoxColor); + else if (tree instanceof ErrorNode || ruleFailedAndMatchedNothing) + g.setColor(LIGHT_RED); + else + g.setColor(boxColor); + g.fillRoundRect((int) box.x, (int) box.y, (int) box.width - 1, (int) box.height - 1, + arcSize, arcSize); + } + if (borderColor != null) { + g.setColor(borderColor); + g.drawRoundRect((int) box.x, (int) box.y, (int) box.width - 1, (int) box.height - 1, + arcSize, arcSize); + } + + // draw the text on top of the box (possibly multiple lines) + g.setColor(textColor); + String s = getText(tree); + String[] lines = s.split("\n"); + FontMetrics m = getFontMetrics(font); + int x = (int) box.x + arcSize / 2 + nodeWidthPadding; + int y = (int) box.y + m.getAscent() + m.getLeading() + 1 + nodeHeightPadding; + for (int i = 0; i < lines.length; i++) { + text(g, lines[i], x, y); + y += m.getHeight(); + } + } + + public void text(Graphics g, String s, int x, int y) { + // System.out.println("drawing '"+s+"' @ "+x+","+y); + s = Utils.escapeWhitespace(s, true); + g.drawString(s, x, y); + } + + @Override + public void paint(Graphics g) { + super.paint(g); + + if (treeLayout == null) { + return; + } + + Graphics2D g2 = (Graphics2D) g; + // anti-alias the lines + g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + + // Anti-alias the text + g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, + RenderingHints.VALUE_TEXT_ANTIALIAS_ON); + + // AffineTransform at = g2.getTransform(); + // g2.scale( + // (double) this.getWidth() / 400, + // (double) this.getHeight() / 400); + // + // g2.setTransform(at); + + paintEdges(g, getTree().getRoot()); + + // paint the boxes + for (Tree Tree : treeLayout.getNodeBounds().keySet()) { + paintBox(g, Tree); + } + } + + @Override + protected Graphics getComponentGraphics(Graphics g) { + Graphics2D g2d = (Graphics2D) g; + g2d.scale(scale, scale); + return super.getComponentGraphics(g2d); + } + + // ---------------------------------------------------------------------- + + + private static final String DIALOG_WIDTH_PREFS_KEY = "dialog_width"; + private static final String DIALOG_HEIGHT_PREFS_KEY = "dialog_height"; + private static final String DIALOG_X_PREFS_KEY = "dialog_x"; + private static final String DIALOG_Y_PREFS_KEY = "dialog_y"; + private static final String DIALOG_DIVIDER_LOC_PREFS_KEY = "dialog_divider_location"; + private static final String DIALOG_VIEWER_SCALE_PREFS_KEY = "dialog_viewer_scale"; + + protected static JDialog showInDialog(final TreeViewer viewer) { + final JDialog dialog = new JDialog(); + dialog.setTitle("Parse Tree Inspector"); + + final Preferences prefs = Preferences.userNodeForPackage(TreeViewer.class); + + // Make new content panes + final Container mainPane = new JPanel(new BorderLayout(5, 5)); + final Container contentPane = new JPanel(new BorderLayout(0, 0)); + contentPane.setBackground(Color.white); + + // Wrap viewer in scroll pane + JScrollPane scrollPane = new JScrollPane(viewer); + // Make the scrollpane (containing the viewer) the center component + contentPane.add(scrollPane, BorderLayout.CENTER); + + JPanel wrapper = new JPanel(new FlowLayout()); + + // Add button to bottom + JPanel bottomPanel = new JPanel(new BorderLayout(0, 0)); + contentPane.add(bottomPanel, BorderLayout.SOUTH); + + JButton ok = new JButton("OK"); + ok.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + dialog.dispatchEvent(new WindowEvent(dialog, WindowEvent.WINDOW_CLOSING)); + } + }); + wrapper.add(ok); + + // Add an export-to-png button right of the "OK" button + JButton png = new JButton("Export as PNG"); + png.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + generatePNGFile(viewer, dialog); + } + }); + wrapper.add(png); + + bottomPanel.add(wrapper, BorderLayout.SOUTH); + + // Add scale slider + double lastKnownViewerScale = prefs.getDouble(DIALOG_VIEWER_SCALE_PREFS_KEY, + viewer.getScale()); + viewer.setScale(lastKnownViewerScale); + + int sliderValue = (int) ((lastKnownViewerScale - 1.0) * 1000); + final JSlider scaleSlider = new JSlider(JSlider.HORIZONTAL, -999, 1000, sliderValue); + + scaleSlider.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + int v = scaleSlider.getValue(); + viewer.setScale(v / 1000.0 + 1.0); + } + }); + bottomPanel.add(scaleSlider, BorderLayout.CENTER); + + // Add a JTree representing the parser tree of the input. + JPanel treePanel = new JPanel(new BorderLayout(5, 5)); + + // An "empty" icon that will be used for the JTree's nodes. + Icon empty = new EmptyIcon(); + + UIManager.put("Tree.closedIcon", empty); + UIManager.put("Tree.openIcon", empty); + UIManager.put("Tree.leafIcon", empty); + + Tree parseTreeRoot = viewer.getTree().getRoot(); + TreeNodeWrapper nodeRoot = new TreeNodeWrapper(parseTreeRoot, viewer); + fillTree(nodeRoot, parseTreeRoot, viewer); + final JTree tree = new JTree(nodeRoot); + tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); + + tree.addTreeSelectionListener(new TreeSelectionListener() { + @Override + public void valueChanged(TreeSelectionEvent e) { + + JTree selectedTree = (JTree) e.getSource(); + TreePath path = selectedTree.getSelectionPath(); + if (path != null) { + TreeNodeWrapper treeNode = (TreeNodeWrapper) path.getLastPathComponent(); + + // Set the clicked AST. + viewer.setTree((Tree) treeNode.getUserObject()); + } + } + }); + + treePanel.add(new JScrollPane(tree)); + + // Create the pane for both the JTree and the AST + final JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, treePanel, + contentPane); + + mainPane.add(splitPane, BorderLayout.CENTER); + + dialog.setContentPane(mainPane); + + // make viz + WindowListener exitListener = new WindowAdapter() { + public void windowClosing(WindowEvent e) { + prefs.putInt(DIALOG_WIDTH_PREFS_KEY, (int) dialog.getSize().getWidth()); + prefs.putInt(DIALOG_HEIGHT_PREFS_KEY, (int) dialog.getSize().getHeight()); + prefs.putDouble(DIALOG_X_PREFS_KEY, dialog.getLocationOnScreen().getX()); + prefs.putDouble(DIALOG_Y_PREFS_KEY, dialog.getLocationOnScreen().getY()); + prefs.putInt(DIALOG_DIVIDER_LOC_PREFS_KEY, splitPane.getDividerLocation()); + prefs.putDouble(DIALOG_VIEWER_SCALE_PREFS_KEY, viewer.getScale()); + + dialog.setVisible(false); + dialog.dispose(); + } + }; + dialog.addWindowListener(exitListener); + dialog.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + + int width = prefs.getInt(DIALOG_WIDTH_PREFS_KEY, 600); + int height = prefs.getInt(DIALOG_HEIGHT_PREFS_KEY, 500); + dialog.setPreferredSize(new Dimension(width, height)); + dialog.pack(); + + // After pack(): set the divider at 1/3 (200/600) of the frame. + int dividerLocation = prefs.getInt(DIALOG_DIVIDER_LOC_PREFS_KEY, 200); + splitPane.setDividerLocation(dividerLocation); + + if (prefs.getDouble(DIALOG_X_PREFS_KEY, -1) != -1) { + dialog.setLocation((int) prefs.getDouble(DIALOG_X_PREFS_KEY, 100), + (int) prefs.getDouble(DIALOG_Y_PREFS_KEY, 100)); + } else { + dialog.setLocationRelativeTo(null); + } + + dialog.setAutoRequestFocus(true); + dialog.setVisible(true); + return dialog; + } + + private static void generatePNGFile(TreeViewer viewer, JDialog dialog) { + BufferedImage bi = new BufferedImage(viewer.getSize().width, viewer.getSize().height, + BufferedImage.TYPE_INT_ARGB); + Graphics g = bi.createGraphics(); + viewer.paint(g); + g.dispose(); + + try { + File suggestedFile = generateNonExistingPngFile(); + JFileChooser fileChooser = new JFileChooserConfirmOverwrite(); + fileChooser.setCurrentDirectory(suggestedFile.getParentFile()); + fileChooser.setSelectedFile(suggestedFile); + FileFilter pngFilter = new FileFilter() { + + @Override + public boolean accept(File pathname) { + if (pathname.isFile()) { + return pathname.getName().toLowerCase().endsWith(".png"); + } + + return true; + } + + @Override + public String getDescription() { + return "PNG Files (*.png)"; + } + }; + + fileChooser.addChoosableFileFilter(pngFilter); + fileChooser.setFileFilter(pngFilter); + + int returnValue = fileChooser.showSaveDialog(dialog); + if (returnValue == JFileChooser.APPROVE_OPTION) { + File pngFile = fileChooser.getSelectedFile(); + ImageIO.write(bi, "png", pngFile); + + try { + // Try to open the parent folder using the OS' native file + // manager. + Desktop.getDesktop().open(pngFile.getParentFile()); + } catch (Exception ex) { + // We could not launch the file manager: just show a popup + // that we + // succeeded in saving the PNG file. + JOptionPane.showMessageDialog(dialog, + "Saved PNG to: " + pngFile.getAbsolutePath()); + ex.printStackTrace(); + } + } + } catch (Exception ex) { + JOptionPane.showMessageDialog(dialog, "Could not export to PNG: " + ex.getMessage(), + "Error", JOptionPane.ERROR_MESSAGE); + ex.printStackTrace(); + } + } + + private static File generateNonExistingPngFile() { + + final String parent = "."; + final String name = "antlr4_parse_tree"; + final String extension = ".png"; + + File pngFile = new File(parent, name + extension); + + int counter = 1; + + // Keep looping until we create a File that does not yet exist. + while (pngFile.exists()) { + pngFile = new File(parent, name + "_" + counter + extension); + counter++; + } + + return pngFile; + } + + private static void fillTree(TreeNodeWrapper node, Tree tree, TreeViewer viewer) { + + if (tree == null) { + return; + } + + for (int i = 0; i < tree.getChildCount(); i++) { + + Tree childTree = tree.getChild(i); + TreeNodeWrapper childNode = new TreeNodeWrapper(childTree, viewer); + + node.add(childNode); + + fillTree(childNode, childTree, viewer); + } + } + + private Dimension getScaledTreeSize() { + Dimension scaledTreeSize = treeLayout.getBounds().getBounds().getSize(); + scaledTreeSize = new Dimension((int) (scaledTreeSize.width * scale), + (int) (scaledTreeSize.height * scale)); + return scaledTreeSize; + } + + + public JDialog open() { + final TreeViewer viewer = this; + viewer.setScale(1.5); + + return showInDialog(viewer); + } + + public void save(String fileName) throws IOException, PrintException { + JDialog dialog = new JDialog(); + Container contentPane = dialog.getContentPane(); + ((JComponent) contentPane).setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + contentPane.add(this); + contentPane.setBackground(Color.white); + dialog.pack(); + dialog.setLocationRelativeTo(null); + dialog.dispose(); + GraphicsSupport.saveImage(this, fileName); + } + + // --------------------------------------------------- + + protected Rectangle2D.Double getBoundsOfNode(Tree node) { + return treeLayout.getNodeBounds().get(node); + } + + protected String getText(Tree tree) { + String s = treeTextProvider.getText(tree); + s = Utils.escapeWhitespace(s, true); + return s; + } + + public ITreeTextProvider getTreeTextProvider() { + return treeTextProvider; + } + + public void setTreeTextProvider(ITreeTextProvider treeTextProvider) { + this.treeTextProvider = treeTextProvider; + } + + public void setFontSize(int sz) { + fontSize = sz; + font = new Font(fontName, fontStyle, fontSize); + } + + public void setFontName(String name) { + fontName = name; + font = new Font(fontName, fontStyle, fontSize); + } + + /** Slow for big lists of highlighted nodes */ + public void addHighlightedNodes(Collection nodes) { + highlightedNodes = new ArrayList(); + highlightedNodes.addAll(nodes); + } + + public void removeHighlightedNodes(Collection nodes) { + if (highlightedNodes != null) { + // only remove exact objects defined by ==, not equals() + for (Tree t : nodes) { + int i = getHighlightedNodeIndex(t); + if (i >= 0) + highlightedNodes.remove(i); + } + } + } + + protected boolean isHighlighted(Tree node) { + return getHighlightedNodeIndex(node) >= 0; + } + + protected int getHighlightedNodeIndex(Tree node) { + if (highlightedNodes == null) + return -1; + for (int i = 0; i < highlightedNodes.size(); i++) { + Tree t = highlightedNodes.get(i); + if (t == node) + return i; + } + return -1; + } + + @Override + public Font getFont() { + return font; + } + + @Override + public void setFont(Font font) { + this.font = font; + } + + public int getArcSize() { + return arcSize; + } + + public void setArcSize(int arcSize) { + this.arcSize = arcSize; + } + + public Color getBoxColor() { + return boxColor; + } + + public void setBoxColor(Color boxColor) { + this.boxColor = boxColor; + } + + public Color getHighlightedBoxColor() { + return highlightedBoxColor; + } + + public void setHighlightedBoxColor(Color highlightedBoxColor) { + this.highlightedBoxColor = highlightedBoxColor; + } + + public Color getBorderColor() { + return borderColor; + } + + public void setBorderColor(Color borderColor) { + this.borderColor = borderColor; + } + + public Color getTextColor() { + return textColor; + } + + public void setTextColor(Color textColor) { + this.textColor = textColor; + } + + protected TreeForTreeLayout getTree() { + return treeLayout.getTree(); + } + + public void setTree(Tree root) { + if (root != null) { + boolean useIdentity = true; // compare node identity + this.treeLayout = new TreeLayout(getTreeLayoutAdaptor(root), + new TreeViewer.VariableExtentProvide(this), + new DefaultConfiguration(gapBetweenLevels, gapBetweenNodes), useIdentity); + // Let the UI display this new AST. + updatePreferredSize(); + } else { + this.treeLayout = null; + repaint(); + } + } + + /** + * Get an adaptor for root that indicates how to walk ANTLR trees. Override + * to change the adapter from the default of {@link TreeLayoutAdaptor} + */ + public TreeForTreeLayout getTreeLayoutAdaptor(Tree root) { + return new TreeLayoutAdaptor(root); + } + + public double getScale() { + return scale; + } + + public void setScale(double scale) { + if (scale <= 0) { + scale = 1; + } + this.scale = scale; + updatePreferredSize(); + } + + public void setRuleNames(List ruleNames) { + setTreeTextProvider(new DefaultTreeTextProvider(ruleNames)); + } + + private static class TreeNodeWrapper extends DefaultMutableTreeNode { + private static final long serialVersionUID = 1L; + + final TreeViewer viewer; + + TreeNodeWrapper(Tree tree, TreeViewer viewer) { + super(tree); + this.viewer = viewer; + } + + @Override + public String toString() { + return viewer.getText((Tree) this.getUserObject()); + } + } + + private static class EmptyIcon implements Icon { + + @Override + public int getIconWidth() { + return 0; + } + + @Override + public int getIconHeight() { + return 0; + } + + @Override + public void paintIcon(Component c, Graphics g, int x, int y) { + /* Do nothing. */ + } + } +} + diff --git a/plugin/Raven.SQDev.Util/META-INF/MANIFEST.MF b/plugin/Raven.SQDev.Util/META-INF/MANIFEST.MF index 2e6a67e2..0b23db82 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.5.3 +Bundle-Version: 0.6.0 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/activator/Activator.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/activator/Activator.class index 58dbdf2a..3641e348 100644 Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/activator/Activator.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/activator/Activator.class differ diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/miscellaneous/AdditionalKeywordProposalInformation.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/miscellaneous/AdditionalKeywordProposalInformation.class index 674a07f5..c36a2b56 100644 Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/miscellaneous/AdditionalKeywordProposalInformation.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/miscellaneous/AdditionalKeywordProposalInformation.class differ diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/ResourceManager.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/ResourceManager.class index 2028e4ef..45707a46 100644 Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/ResourceManager.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/ResourceManager.class differ diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/SQDevFile.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/SQDevFile.class index b83afd23..748fa8c6 100644 Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/SQDevFile.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/SQDevFile.class differ 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 57a2c24c..493a9489 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/ColorUtils.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/ColorUtils.class index f775fff3..c1896f38 100644 Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/ColorUtils.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/ColorUtils.class differ diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType$1.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType$1.class index 64ac1949..8ed7ddb4 100644 Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType$1.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType$1.class differ diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType$7.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType$7.class index 4e32574c..a3667b8e 100644 Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType$7.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType$7.class differ diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType$8$1.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType$8$1.class new file mode 100644 index 00000000..8d0e88de Binary files /dev/null and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType$8$1.class differ diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType$8.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType$8.class index 0a8b5deb..d8cbe9db 100644 Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType$8.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType$8.class differ diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType$9.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType$9.class new file mode 100644 index 00000000..53bc7061 Binary files /dev/null and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType$9.class differ diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType.class index ccfc1925..c44a7a23 100644 Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EFileType.class differ diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EditorUtil.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EditorUtil.class index 5370e7ae..413e827e 100644 Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EditorUtil.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EditorUtil.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 new file mode 100644 index 00000000..d7d3f17d Binary files /dev/null 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 a14dab87..2ce22170 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/SQDevPreferenceUtil.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevPreferenceUtil.class index 5f18d79a..376e206e 100644 Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevPreferenceUtil.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevPreferenceUtil.class differ diff --git a/plugin/Raven.SQDev.Util/resources/icons/SQFIcon.png b/plugin/Raven.SQDev.Util/resources/icons/SQFIcon.png new file mode 100644 index 00000000..24ca0f2a Binary files /dev/null and b/plugin/Raven.SQDev.Util/resources/icons/SQFIcon.png differ diff --git a/plugin/Raven.SQDev.Util/resources/icons/StringTableIcon.png b/plugin/Raven.SQDev.Util/resources/icons/StringTableIcon.png new file mode 100644 index 00000000..ec485b64 Binary files /dev/null and b/plugin/Raven.SQDev.Util/resources/icons/StringTableIcon.png differ diff --git a/plugin/Raven.SQDev.Util/resources/icons/minusIcon.png b/plugin/Raven.SQDev.Util/resources/icons/minusIcon.png new file mode 100644 index 00000000..39082c5c Binary files /dev/null and b/plugin/Raven.SQDev.Util/resources/icons/minusIcon.png differ diff --git a/plugin/Raven.SQDev.Util/resources/icons/plusIcon.png b/plugin/Raven.SQDev.Util/resources/icons/plusIcon.png new file mode 100644 index 00000000..788e099b Binary files /dev/null and b/plugin/Raven.SQDev.Util/resources/icons/plusIcon.png differ diff --git a/plugin/Raven.SQDev.Util/resources/icons/removeIcon.png b/plugin/Raven.SQDev.Util/resources/icons/removeIcon.png new file mode 100644 index 00000000..790f7345 Binary files /dev/null and b/plugin/Raven.SQDev.Util/resources/icons/removeIcon.png differ diff --git a/plugin/Raven.SQDev.Util/resources/sqf/SQFKeywords.txt b/plugin/Raven.SQDev.Util/resources/sqf/SQFKeywords.txt index a4ac0bf3..c6ee6ecf 100644 --- a/plugin/Raven.SQDev.Util/resources/sqf/SQFKeywords.txt +++ b/plugin/Raven.SQDev.Util/resources/sqf/SQFKeywords.txt @@ -11,6 +11,7 @@ WikiPageStart: https://community.bistudio.com/wiki/abs //WikiPageEnd// SyntaxStart: +abs Number //SyntaxEnd// RawSyntaxStart: abs n @@ -40,6 +41,7 @@ WikiPageStart: https://community.bistudio.com/wiki/accTime //WikiPageEnd// SyntaxStart: +accTime //SyntaxEnd// RawSyntaxStart: accTime @@ -70,6 +72,7 @@ WikiPageStart: https://community.bistudio.com/wiki/acos //WikiPageEnd// SyntaxStart: +acos Number //SyntaxEnd// RawSyntaxStart: acos x @@ -100,6 +103,7 @@ WikiPageStart: https://community.bistudio.com/wiki/action //WikiPageEnd// SyntaxStart: +Object action Array //SyntaxEnd// RawSyntaxStart: unit action actionArray @@ -130,7 +134,7 @@ actionKeys //KeywordEnd// DescriptionStart: Returns Array containing dikCodes of keys, buttons and combos assigned to the given user action. Action names could be found in config class ControllerSchemes or user action names or user profile, for example: -keyWatch = 24 ; +keyWatch [ ] = { 24 } ; To retrieve the value, use the property name without 'key': $Code$ actionKeys "Watch"; // 24$/Code$ In addition, some of the actions are also listed in here: inputAction/actions @@ -139,6 +143,7 @@ WikiPageStart: https://community.bistudio.com/wiki/actionKeys //WikiPageEnd// SyntaxStart: +actionKeys String //SyntaxEnd// RawSyntaxStart: actionKeys userAction @@ -150,6 +155,25 @@ LocalityStart: undefined / undefined //LocalityEnd// NoteStart: +(May 11, 2016) +If an action key is configured with a modifier (e.g. "Right Ctrl + M" for "MiniMapToggle"), the DIK code returned by this command has a weird value, equivalent to the following: +Left Ctrl + Key = 486539264 + DIK +Left Shift + Key = 704643072 + DIK +Left Alt + Key = 939524096 + DIK +Right Ctrl + Key = -1660944384 + DIK +Right Shift + Key = 905969664 + DIK +Right Alt + Key = -1207959552 + DIK +For example, to detect if actionKeys "NetworkPlayers" contain a match for "Right Ctrl + P", one must do the following: +$Code$ if (-1660944359 in actionKeys "NetworkPlayers") then$/Code$ +with -1660944359 being equal to -1660944384 + 25, and 25 being the DIK code for the "P" key. +This increases the difficulty of accurately comparing key codes to actionKeys in UI event handlers. Those strange numbers are probably due to bit flags being added to the DIK value by the game engine for easier storage in the ArmaProfile. +In case of mouse buttons, actionKeys will also return values that are different from those in "MouseButton" UI events: +LMB: MouseButton 0 = actionKeys 65536 +RMB: MouseButton 1 = actionKeys 65665 (65536 + 1 + 128) +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. //NoteEnd// ReturnValueStart: Array of Numbers @@ -167,6 +191,9 @@ WikiPageStart: https://community.bistudio.com/wiki/actionKeysImages //WikiPageEnd// SyntaxStart: +actionKeysImages String +%NextSyntax% +actionKeysImages Array //SyntaxEnd// RawSyntaxStart: actionKeysImages userAction @@ -199,6 +226,9 @@ WikiPageStart: https://community.bistudio.com/wiki/actionKeysNames //WikiPageEnd// SyntaxStart: +actionKeysNames String +%NextSyntax% +actionKeysNames Array //SyntaxEnd// RawSyntaxStart: actionKeysNames userAction @@ -237,6 +267,9 @@ WikiPageStart: https://community.bistudio.com/wiki/actionKeysNamesArray //WikiPageEnd// SyntaxStart: +actionKeysNamesArray String +%NextSyntax% +actionKeysNamesArray Array //SyntaxEnd// RawSyntaxStart: actionKeysNamesArray userAction @@ -273,6 +306,7 @@ WikiPageStart: https://community.bistudio.com/wiki/actionName //WikiPageEnd// SyntaxStart: +actionName String //SyntaxEnd// RawSyntaxStart: actionName action @@ -301,6 +335,7 @@ WikiPageStart: https://community.bistudio.com/wiki/activateAddons //WikiPageEnd// SyntaxStart: +activateAddons Array //SyntaxEnd// RawSyntaxStart: activateAddons [addon1,...] @@ -335,6 +370,7 @@ WikiPageStart: https://community.bistudio.com/wiki/activatedAddons //WikiPageEnd// SyntaxStart: +activatedAddons //SyntaxEnd// RawSyntaxStart: activatedAddons @@ -367,6 +403,7 @@ WikiPageStart: https://community.bistudio.com/wiki/activateKey //WikiPageEnd// SyntaxStart: +activateKey String //SyntaxEnd// RawSyntaxStart: activateKey keyname @@ -395,6 +432,7 @@ WikiPageStart: https://community.bistudio.com/wiki/add3DENConnection //WikiPageEnd// SyntaxStart: +add3DENConnection Array //SyntaxEnd// RawSyntaxStart: add3DENConnection [type, from, to] @@ -425,6 +463,7 @@ WikiPageStart: https://community.bistudio.com/wiki/add3DENEventHandler //WikiPageEnd// SyntaxStart: +add3DENEventHandler Array //SyntaxEnd// RawSyntaxStart: add3DENEventHandler [type,code] @@ -453,6 +492,7 @@ WikiPageStart: https://community.bistudio.com/wiki/add3DENLayer //WikiPageEnd// SyntaxStart: +Number add3DENLayer String //SyntaxEnd// RawSyntaxStart: parentLayerID add3DENLayer name @@ -485,6 +525,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addAction //WikiPageEnd// SyntaxStart: +Object addAction Array //SyntaxEnd// RawSyntaxStart: unit addAction [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, positionInModel, radius, radiusView, showIn3D, available, textDefault, textToolTip] @@ -610,6 +651,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addBackpack //WikiPageEnd// SyntaxStart: +Object addBackpack String //SyntaxEnd// RawSyntaxStart: unit addBackpack packClassName @@ -641,6 +683,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addBackpackCargo //WikiPageEnd// SyntaxStart: +Object addBackpackCargo Array //SyntaxEnd// RawSyntaxStart: vehicle addBackpackCargo [packClassName,count] @@ -671,6 +714,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addBackpackCargoGlobal //WikiPageEnd// SyntaxStart: +Object addBackpackCargoGlobal Array //SyntaxEnd// RawSyntaxStart: vehicle addBackpackCargoGlobal [packClassName, count] @@ -701,6 +745,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addBackpackGlobal //WikiPageEnd// SyntaxStart: +Object addBackpackGlobal String //SyntaxEnd// RawSyntaxStart: unit addBackpackGlobal backpack @@ -729,6 +774,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addCamShake //WikiPageEnd// SyntaxStart: +addCamShake Array //SyntaxEnd// RawSyntaxStart: addCamShake [power, duration, frequency] @@ -760,6 +806,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addCuratorAddons //WikiPageEnd// SyntaxStart: +Object addCuratorAddons Array //SyntaxEnd// RawSyntaxStart: curatorObj addCuratorAddons addons @@ -800,6 +847,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addCuratorCameraArea //WikiPageEnd// SyntaxStart: +Object addCuratorCameraArea Array //SyntaxEnd// RawSyntaxStart: curatorObj addCuratorCameraArea [cameraAreaID,position,radius] @@ -828,6 +876,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addCuratorEditableObjects //WikiPageEnd// SyntaxStart: +Object addCuratorEditableObjects Array //SyntaxEnd// RawSyntaxStart: curatorObj addCuratorEditableObjects [objects,addCrew] @@ -857,6 +906,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addCuratorEditingArea //WikiPageEnd// SyntaxStart: +Object addCuratorEditingArea Array //SyntaxEnd// RawSyntaxStart: curatorObj addCuratorEditingArea [editAreaID,position,radius] @@ -885,6 +935,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addCuratorPoints //WikiPageEnd// SyntaxStart: +Object addCuratorPoints Number //SyntaxEnd// RawSyntaxStart: curatorObj addCuratorPoints points @@ -913,6 +964,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addEditorObject //WikiPageEnd// SyntaxStart: +Control addEditorObject Array //SyntaxEnd// RawSyntaxStart: map addEditorObject [type,[name1,value1,...],subtype class] @@ -941,6 +993,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addEventHandler //WikiPageEnd// SyntaxStart: +Object addEventHandler Array //SyntaxEnd// RawSyntaxStart: object addEventHandler [type, command] @@ -977,6 +1030,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addGoggles //WikiPageEnd// SyntaxStart: +Object addGoggles String //SyntaxEnd// RawSyntaxStart: unit addGoggles type @@ -1007,6 +1061,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addGroupIcon //WikiPageEnd// SyntaxStart: +Group addGroupIcon Array //SyntaxEnd// RawSyntaxStart: group addGroupIcon properties @@ -1036,6 +1091,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addHandgunItem //WikiPageEnd// SyntaxStart: +Object addHandgunItem String //SyntaxEnd// RawSyntaxStart: unit addHandgunItem item @@ -1064,6 +1120,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addHeadgear //WikiPageEnd// SyntaxStart: +Object addHeadgear String //SyntaxEnd// RawSyntaxStart: unit addHeadgear item @@ -1092,6 +1149,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addItem //WikiPageEnd// SyntaxStart: +Object addItem String //SyntaxEnd// RawSyntaxStart: unit addItem item @@ -1125,6 +1183,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addItemCargo //WikiPageEnd// SyntaxStart: +Object addItemCargo Array //SyntaxEnd// RawSyntaxStart: unit addItemCargo [item, count] @@ -1153,6 +1212,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addItemCargoGlobal //WikiPageEnd// SyntaxStart: +Object addItemCargoGlobal Array //SyntaxEnd// RawSyntaxStart: unit addItemCargoGlobal [item, count] @@ -1181,6 +1241,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addItemPool //WikiPageEnd// SyntaxStart: +addItemPool Array //SyntaxEnd// RawSyntaxStart: addItemPool ["itemName", count] @@ -1209,6 +1270,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addItemToBackpack //WikiPageEnd// SyntaxStart: +Object addItemToBackpack String //SyntaxEnd// RawSyntaxStart: unit addItemToBackpack item @@ -1239,6 +1301,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addItemToUniform //WikiPageEnd// SyntaxStart: +Object addItemToUniform String //SyntaxEnd// RawSyntaxStart: unit addItemToUniform item @@ -1269,6 +1332,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addItemToVest //WikiPageEnd// SyntaxStart: +Object addItemToVest String //SyntaxEnd// RawSyntaxStart: unit addItemToVest item @@ -1299,6 +1363,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addLiveStats //WikiPageEnd// SyntaxStart: +Object addLiveStats Number //SyntaxEnd// RawSyntaxStart: unit addLiveStats score @@ -1329,6 +1394,9 @@ WikiPageStart: https://community.bistudio.com/wiki/addMagazine //WikiPageEnd// SyntaxStart: +Object addMagazine String +%NextSyntax% +Object addMagazine Array //SyntaxEnd// RawSyntaxStart: unitName addMagazine magazineName @@ -1372,6 +1440,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addMagazineAmmoCargo //WikiPageEnd// SyntaxStart: +Object addMagazineAmmoCargo Array //SyntaxEnd// RawSyntaxStart: cargospace addMagazineAmmoCargo [magazine, quantity, ammocount] @@ -1401,6 +1470,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addMagazineCargo //WikiPageEnd// SyntaxStart: +Object addMagazineCargo Array //SyntaxEnd// RawSyntaxStart: vehicleName addMagazineCargo [magazineName, count] @@ -1432,6 +1502,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addMagazineCargoGlobal //WikiPageEnd// SyntaxStart: +Object addMagazineCargoGlobal Array //SyntaxEnd// RawSyntaxStart: vehicleName addMagazineCargoGlobal [magazineName, count] @@ -1464,6 +1535,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addMagazineGlobal //WikiPageEnd// SyntaxStart: +Object addMagazineGlobal String //SyntaxEnd// RawSyntaxStart: unit addMagazineGlobal magazineName @@ -1492,6 +1564,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addMagazinePool //WikiPageEnd// SyntaxStart: +addMagazinePool Array //SyntaxEnd// RawSyntaxStart: addMagazinePool [magazineName, count] @@ -1520,6 +1593,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addMagazines //WikiPageEnd// SyntaxStart: +Object addMagazines Array //SyntaxEnd// RawSyntaxStart: unit addMagazines [magazineName, count] @@ -1549,6 +1623,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addMagazineTurret //WikiPageEnd// SyntaxStart: +Object addMagazineTurret Array //SyntaxEnd// RawSyntaxStart: vehicle addMagazineTurret [magazineName, turretPath, ammoCount] @@ -1579,6 +1654,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addMenu //WikiPageEnd// SyntaxStart: +Control addMenu Array //SyntaxEnd// RawSyntaxStart: map addMenu [text,priority] @@ -1607,6 +1683,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addMenuItem //WikiPageEnd// SyntaxStart: +Control addMenuItem Array //SyntaxEnd// RawSyntaxStart: map addMenuItem [menu or index,text,command,priority] @@ -1640,6 +1717,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addMissionEventHandler //WikiPageEnd// SyntaxStart: +addMissionEventHandler Array //SyntaxEnd// RawSyntaxStart: addMissionEventHandler [type, command] @@ -1669,6 +1747,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addMPEventHandler //WikiPageEnd// SyntaxStart: +Object addMPEventHandler Array //SyntaxEnd// RawSyntaxStart: unitName addMPEventHandler [type, command] @@ -1699,6 +1778,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addMusicEventHandler //WikiPageEnd// SyntaxStart: +addMusicEventHandler Array //SyntaxEnd// RawSyntaxStart: addMusicEventHandler [type, function] @@ -1734,6 +1814,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addPrimaryWeaponItem //WikiPageEnd// SyntaxStart: +Object addPrimaryWeaponItem String //SyntaxEnd// RawSyntaxStart: unit addPrimaryWeaponItem item @@ -1771,6 +1852,9 @@ WikiPageStart: https://community.bistudio.com/wiki/addPublicVariableEventHandler //WikiPageEnd// SyntaxStart: +String addPublicVariableEventHandler Code +%NextSyntax% +String addPublicVariableEventHandler Array //SyntaxEnd// RawSyntaxStart: varName addPublicVariableEventHandler code @@ -1842,6 +1926,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addRating //WikiPageEnd// SyntaxStart: +Object addRating Number //SyntaxEnd// RawSyntaxStart: unitName addRating rating @@ -1881,6 +1966,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addResources //WikiPageEnd// SyntaxStart: +TeamMember addResources Array //SyntaxEnd// RawSyntaxStart: teamMember addResources [resource1, resource2,...] @@ -1908,6 +1994,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addScore //WikiPageEnd// SyntaxStart: +Object addScore Number //SyntaxEnd// RawSyntaxStart: unit addScore score @@ -1937,6 +2024,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addScoreSide //WikiPageEnd// SyntaxStart: +Side addScoreSide Number //SyntaxEnd// RawSyntaxStart: side addScoreSide value @@ -1967,6 +2055,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addSecondaryWeaponItem //WikiPageEnd// SyntaxStart: +Object addSecondaryWeaponItem String //SyntaxEnd// RawSyntaxStart: unit addSecondaryWeaponItem item @@ -1994,6 +2083,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addSwitchableUnit //WikiPageEnd// SyntaxStart: +addSwitchableUnit Object //SyntaxEnd// RawSyntaxStart: addSwitchableUnit unitName @@ -2026,6 +2116,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addTeamMember //WikiPageEnd// SyntaxStart: +TeamMember addTeamMember //SyntaxEnd// RawSyntaxStart: team addTeamMember member @@ -2054,6 +2145,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addToRemainsCollector //WikiPageEnd// SyntaxStart: +addToRemainsCollector Array //SyntaxEnd// RawSyntaxStart: addToRemainsCollector remains @@ -2082,6 +2174,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addUniform //WikiPageEnd// SyntaxStart: +Object addUniform String //SyntaxEnd// RawSyntaxStart: unit addUniform type @@ -2111,6 +2204,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addVehicle //WikiPageEnd// SyntaxStart: +Group addVehicle Object //SyntaxEnd// RawSyntaxStart: groupName addVehicle vehicleName @@ -2146,6 +2240,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addVest //WikiPageEnd// SyntaxStart: +Object addVest String //SyntaxEnd// RawSyntaxStart: unit addVest type @@ -2176,6 +2271,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addWaypoint //WikiPageEnd// SyntaxStart: +Group addWaypoint Array //SyntaxEnd// RawSyntaxStart: groupName addWaypoint [center, radius, index, name] @@ -2218,6 +2314,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addWeapon //WikiPageEnd// SyntaxStart: +Object addWeapon String //SyntaxEnd// RawSyntaxStart: unit addWeapon weapon @@ -2256,6 +2353,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addWeaponCargo //WikiPageEnd// SyntaxStart: +Object addWeaponCargo Array //SyntaxEnd// RawSyntaxStart: vehicleName addWeaponCargo [weaponName, count] @@ -2290,6 +2388,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addWeaponCargoGlobal //WikiPageEnd// SyntaxStart: +Object addWeaponCargoGlobal Array //SyntaxEnd// RawSyntaxStart: vehicleName addWeaponCargoGlobal [weaponName, count] @@ -2322,6 +2421,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addWeaponGlobal //WikiPageEnd// SyntaxStart: +Object addWeaponGlobal String //SyntaxEnd// RawSyntaxStart: unit addWeaponGlobal weapon @@ -2362,6 +2462,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addWeaponItem //WikiPageEnd// SyntaxStart: +Object addWeaponItem Array //SyntaxEnd// RawSyntaxStart: unit addWeaponItem [weaponName, itemName] @@ -2394,6 +2495,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addWeaponPool //WikiPageEnd// SyntaxStart: +addWeaponPool Array //SyntaxEnd// RawSyntaxStart: addWeaponPool [weaponName, count] @@ -2422,6 +2524,7 @@ WikiPageStart: https://community.bistudio.com/wiki/addWeaponTurret //WikiPageEnd// SyntaxStart: +Object addWeaponTurret Array //SyntaxEnd// RawSyntaxStart: vehicle addWeaponTurret [weaponName, turretPath] @@ -2450,6 +2553,7 @@ WikiPageStart: https://community.bistudio.com/wiki/agent //WikiPageEnd// SyntaxStart: +agent TeamMember //SyntaxEnd// RawSyntaxStart: agent teamMember @@ -2477,6 +2581,7 @@ WikiPageStart: https://community.bistudio.com/wiki/agents //WikiPageEnd// SyntaxStart: +agents //SyntaxEnd// RawSyntaxStart: agents @@ -2511,6 +2616,7 @@ WikiPageStart: https://community.bistudio.com/wiki/AGLToASL //WikiPageEnd// SyntaxStart: +AGLToASL PositionAGL //SyntaxEnd// RawSyntaxStart: AGLToASL posAGL @@ -2541,6 +2647,7 @@ WikiPageStart: https://community.bistudio.com/wiki/aimedAtTarget //WikiPageEnd// SyntaxStart: +Object aimedAtTarget Array //SyntaxEnd// RawSyntaxStart: vehicle aimedAtTarget [target, weapon] @@ -2573,6 +2680,7 @@ WikiPageStart: https://community.bistudio.com/wiki/aimPos //WikiPageEnd// SyntaxStart: +aimPos Object //SyntaxEnd// RawSyntaxStart: aimPos object @@ -2603,6 +2711,7 @@ WikiPageStart: https://community.bistudio.com/wiki/airDensityRTD //WikiPageEnd// SyntaxStart: +airDensityRTD Number //SyntaxEnd// RawSyntaxStart: airDensityRTD altitude @@ -2638,6 +2747,7 @@ WikiPageStart: https://community.bistudio.com/wiki/airportSide //WikiPageEnd// SyntaxStart: +airportSide Number //SyntaxEnd// RawSyntaxStart: airportSide id @@ -2666,6 +2776,7 @@ WikiPageStart: https://community.bistudio.com/wiki/AISFinishHeal //WikiPageEnd// SyntaxStart: +AISFinishHeal Array //SyntaxEnd// RawSyntaxStart: AISFinishHeal [unit, healer, healercanheal] @@ -2694,6 +2805,7 @@ WikiPageStart: https://community.bistudio.com/wiki/alive //WikiPageEnd// SyntaxStart: +alive Object //SyntaxEnd// RawSyntaxStart: alive object @@ -2728,6 +2840,7 @@ WikiPageStart: https://community.bistudio.com/wiki/all3DENEntities //WikiPageEnd// SyntaxStart: +all3DENEntities //SyntaxEnd// RawSyntaxStart: all3DENEntities @@ -2764,6 +2877,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allControls //WikiPageEnd// SyntaxStart: +allControls Display //SyntaxEnd// RawSyntaxStart: allControls display @@ -2792,6 +2906,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allCurators //WikiPageEnd// SyntaxStart: +allCurators //SyntaxEnd// RawSyntaxStart: allCurators @@ -2822,6 +2937,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allCutLayers //WikiPageEnd// SyntaxStart: +allCutLayers //SyntaxEnd// RawSyntaxStart: allCutLayers @@ -2850,6 +2966,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allDead //WikiPageEnd// SyntaxStart: +allDead //SyntaxEnd// RawSyntaxStart: allDead @@ -2885,6 +3002,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allDeadMen //WikiPageEnd// SyntaxStart: +allDeadMen //SyntaxEnd// RawSyntaxStart: allDeadMen @@ -2917,6 +3035,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allDisplays //WikiPageEnd// SyntaxStart: +allDisplays //SyntaxEnd// RawSyntaxStart: allDisplays @@ -2945,6 +3064,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allGroups //WikiPageEnd// SyntaxStart: +allGroups //SyntaxEnd// RawSyntaxStart: allGroups @@ -2981,6 +3101,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allMapMarkers //WikiPageEnd// SyntaxStart: +allMapMarkers //SyntaxEnd// RawSyntaxStart: allMapMarkers @@ -3028,6 +3149,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allMines //WikiPageEnd// SyntaxStart: +allMines //SyntaxEnd// RawSyntaxStart: allMines @@ -3058,6 +3180,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allMissionObjects //WikiPageEnd// SyntaxStart: +allMissionObjects String //SyntaxEnd// RawSyntaxStart: allMissionObjects type @@ -3095,6 +3218,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allow3DMode //WikiPageEnd// SyntaxStart: +Control allow3DMode Boolean //SyntaxEnd// RawSyntaxStart: map allow3DMode bool @@ -3122,6 +3246,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allowCrewInImmobile //WikiPageEnd// SyntaxStart: +Object allowCrewInImmobile Boolean //SyntaxEnd// RawSyntaxStart: vehicle allowCrewInImmobile bool @@ -3161,6 +3286,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allowCuratorLogicIgnoreAreas //WikiPageEnd// SyntaxStart: +Object allowCuratorLogicIgnoreAreas Boolean //SyntaxEnd// RawSyntaxStart: curatorObj allowCuratorLogicIgnoreAreas allow @@ -3193,6 +3319,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allowDamage //WikiPageEnd// SyntaxStart: +Object allowDamage Boolean //SyntaxEnd// RawSyntaxStart: object allowDamage allow @@ -3230,6 +3357,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allowDammage //WikiPageEnd// SyntaxStart: +Object allowDammage Boolean //SyntaxEnd// RawSyntaxStart: object allowDammage allow @@ -3260,6 +3388,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allowFileOperations //WikiPageEnd// SyntaxStart: +Control allowFileOperations Boolean //SyntaxEnd// RawSyntaxStart: map allowFileOperations bool @@ -3289,6 +3418,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allowFleeing //WikiPageEnd// SyntaxStart: +Object/Group allowFleeing Number //SyntaxEnd// RawSyntaxStart: name allowFleeing cowardice @@ -3317,6 +3447,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allowGetIn //WikiPageEnd// SyntaxStart: +Array allowGetIn Boolean //SyntaxEnd// RawSyntaxStart: unitArray allowGetIn allow @@ -3383,6 +3514,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allowSprint //WikiPageEnd// SyntaxStart: +Object allowSprint Boolean //SyntaxEnd// RawSyntaxStart: unit allowSprint state @@ -3413,6 +3545,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allPlayers //WikiPageEnd// SyntaxStart: +allPlayers //SyntaxEnd// RawSyntaxStart: allPlayers @@ -3454,6 +3587,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allSites //WikiPageEnd// SyntaxStart: +allSites //SyntaxEnd// RawSyntaxStart: allSites @@ -3482,6 +3616,9 @@ WikiPageStart: https://community.bistudio.com/wiki/allTurrets //WikiPageEnd// SyntaxStart: +allTurrets Object +%NextSyntax% +allTurrets Array //SyntaxEnd// RawSyntaxStart: allTurrets vehicle @@ -3521,6 +3658,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allUnits //WikiPageEnd// SyntaxStart: +allUnits //SyntaxEnd// RawSyntaxStart: allUnits @@ -3551,6 +3689,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allUnitsUAV //WikiPageEnd// SyntaxStart: +allUnitsUAV //SyntaxEnd// RawSyntaxStart: allUnitsUAV @@ -3590,6 +3729,7 @@ WikiPageStart: https://community.bistudio.com/wiki/allVariables //WikiPageEnd// SyntaxStart: +allVariables Control/TeamMember/Namespace/Object/Group/Task/Location //SyntaxEnd// RawSyntaxStart: allVariables namespace @@ -3618,6 +3758,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ammo //WikiPageEnd// SyntaxStart: +Object ammo String //SyntaxEnd// RawSyntaxStart: unit ammo muzzle @@ -3652,6 +3793,9 @@ WikiPageStart: https://community.bistudio.com/wiki/and //WikiPageEnd// SyntaxStart: +Boolean and +%NextSyntax% +Boolean and Code //SyntaxEnd// RawSyntaxStart: a and b @@ -3684,9 +3828,9 @@ animate DescriptionStart: Activates given object animation. Animation is defined in CfgModels Animations class of model.cfg or another model config. To animate door of the house from example below: house animate ["Door_1_rot", 1]; class Animations - +{ class Door_1_rot - +{ type = rotation ; source = Door_1_source ; selection = Door_1 ; @@ -3695,10 +3839,10 @@ memory = 1 ; minValue = 0.1 ; maxValue = 1 ; angle0 = 0 ; -angle1 = rad 110 ; -; +angle1 = ( rad 110 ) ; +} ; class Door_Handle_1_rot_1 - +{ type = rotation ; source = Door_1_handle_source ; selection = Door_Handle_1 ; @@ -3707,9 +3851,9 @@ memory = 1 ; minValue = 0 ; maxValue = 0.1 ; angle0 = 0 ; -angle1 = rad - 50 ; -; -; +angle1 = ( rad - 50 ) ; +} ; +} ; Since model.cfg is not always available for reference, most animation names could also be obtained from animationNames command. Class names listed in CfgVehicles AnimationSources bound to "Proxy" controller can also be animated with animate command (see createVehicle/vehicles ): offroad animate ["HideBackpacks", 0]; It is recommended that animateSource command is used instead of animate whenever is possible, as it is more efficient and optimised for MP Mixing animateSource command with animate command to animate the same part may produce some undefined behaviour @@ -3718,6 +3862,7 @@ WikiPageStart: https://community.bistudio.com/wiki/animate //WikiPageEnd// SyntaxStart: +Object animate Array //SyntaxEnd// RawSyntaxStart: objectName animate [animationName, phase, instant] @@ -3775,25 +3920,26 @@ animateDoor DescriptionStart: Animates a door on a vehicle. Animation is defined in config file in CfgVehicles - AnimationSources. Wanted animation phase is set with phase param. This command works only on animation sources with "door" controller. Door_L in the example below can be animated with animateDoor but not CargoRamp_Open: heli animateDoor ["Door_L", 1]; class AnimationSources - +{ class CargoRamp_Open - +{ source = user ; animPeriod = 5 ; initPhase = 0 ; -; +} ; class Door_L - +{ source = door ; animPeriod = 1.6 ; -; -; +} ; +} ; To animate doors or other sources that have "user" controller, use animate command, or even better, animateSource (recommended). Sources with "hit" controller can be animated with setHitPointDamage command applied to the name contained in hitpoint property. For availability of animation sources and their controller types see: createVehicle/vehicles //DescriptionEnd// WikiPageStart: https://community.bistudio.com/wiki/animateDoor //WikiPageEnd// SyntaxStart: +Object animateDoor Array //SyntaxEnd// RawSyntaxStart: object animateDoor [doorname, phase, instant] @@ -3828,9 +3974,9 @@ house animateSource ["Door_1_source", 1]; // model.cfg .... class Animations - +{ class Door_1_rot - +{ type = rotation ; source = Door_1_source ; selection = Door_1 ; @@ -3839,10 +3985,10 @@ memory = 1 ; minValue = 0.1 ; maxValue = 1 ; angle0 = 0 ; -angle1 = rad 110 ; -; +angle1 = ( rad 110 ) ; +} ; class Door_Handle_1_rot - +{ type = rotation ; source = Door_1_source ; selection = Door_Handle_1 ; @@ -3851,22 +3997,21 @@ memory = 1 ; minValue = 0 ; maxValue = 0.1 ; angle0 = 0 ; -angle1 = rad - 50 ; -; -; +angle1 = ( rad - 50 ) ; +} ; +} ; ... - // config.cpp ... class AnimationSources - +{ class Door_1_source - +{ source = user ; animPeriod = 2 ; initPhase = 0 ; -; -; +} ; +} ; ... If you don't know much about model config you can use this page createVehicle/vehicles for reference. Some of the AnimationSources are listed with the class names of the available assets in Arma 3. If it says "user", the chances are it could work with animateSource (see example 2). It is recommended that animateSource command is used instead of animate whenever is possible, as it is more efficient and optimized for MP @@ -3876,6 +4021,7 @@ WikiPageStart: https://community.bistudio.com/wiki/animateSource //WikiPageEnd// SyntaxStart: +Object animateSource Array //SyntaxEnd// RawSyntaxStart: object animateSource [source, phase, instant] @@ -3921,6 +4067,7 @@ WikiPageStart: https://community.bistudio.com/wiki/animationNames //WikiPageEnd// SyntaxStart: +animationNames Object //SyntaxEnd// RawSyntaxStart: animationNames object @@ -3950,6 +4097,7 @@ WikiPageStart: https://community.bistudio.com/wiki/animationPhase //WikiPageEnd// SyntaxStart: +Object animationPhase String //SyntaxEnd// RawSyntaxStart: object animationPhase animationName @@ -3981,6 +4129,7 @@ WikiPageStart: https://community.bistudio.com/wiki/animationSourcePhase //WikiPageEnd// SyntaxStart: +Object animationSourcePhase String //SyntaxEnd// RawSyntaxStart: object animationSourcePhase source @@ -4009,6 +4158,7 @@ WikiPageStart: https://community.bistudio.com/wiki/animationState //WikiPageEnd// SyntaxStart: +animationState Object //SyntaxEnd// RawSyntaxStart: animationState unitName @@ -4044,6 +4194,7 @@ WikiPageStart: https://community.bistudio.com/wiki/append //WikiPageEnd// SyntaxStart: +Array append //SyntaxEnd// RawSyntaxStart: array1 append array2 @@ -4119,6 +4270,7 @@ WikiPageStart: https://community.bistudio.com/wiki/apply //WikiPageEnd// SyntaxStart: +Array apply Code //SyntaxEnd// RawSyntaxStart: array apply code @@ -4155,6 +4307,7 @@ WikiPageStart: https://community.bistudio.com/wiki/armoryPoints //WikiPageEnd// SyntaxStart: +armoryPoints //SyntaxEnd// RawSyntaxStart: armoryPoints @@ -4183,6 +4336,7 @@ WikiPageStart: https://community.bistudio.com/wiki/arrayIntersect //WikiPageEnd// SyntaxStart: +Array arrayIntersect //SyntaxEnd// RawSyntaxStart: array1 arrayIntersect array2 @@ -4222,6 +4376,7 @@ WikiPageStart: https://community.bistudio.com/wiki/asin //WikiPageEnd// SyntaxStart: +asin Number //SyntaxEnd// RawSyntaxStart: asin x @@ -4251,6 +4406,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ASLToAGL //WikiPageEnd// SyntaxStart: +ASLToAGL PositionASL //SyntaxEnd// RawSyntaxStart: ASLToAGL posASL @@ -4279,6 +4435,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ASLToATL //WikiPageEnd// SyntaxStart: +ASLToATL PositionASL //SyntaxEnd// RawSyntaxStart: ASLToATL pos @@ -4308,6 +4465,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assert //WikiPageEnd// SyntaxStart: +assert Boolean //SyntaxEnd// RawSyntaxStart: assert condition @@ -4353,6 +4511,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignAsCargo //WikiPageEnd// SyntaxStart: +Object assignAsCargo //SyntaxEnd// RawSyntaxStart: unitName assignAsCargo vehicleName @@ -4382,6 +4541,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignAsCargoIndex //WikiPageEnd// SyntaxStart: +Object assignAsCargoIndex Array //SyntaxEnd// RawSyntaxStart: character assignAsCargoIndex [vehicle, index] @@ -4410,6 +4570,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignAsCommander //WikiPageEnd// SyntaxStart: +Object assignAsCommander //SyntaxEnd// RawSyntaxStart: unitName assignAsCommander vehicleName @@ -4439,6 +4600,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignAsDriver //WikiPageEnd// SyntaxStart: +Object assignAsDriver //SyntaxEnd// RawSyntaxStart: unitName assignAsDriver vehicleName @@ -4468,6 +4630,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignAsGunner //WikiPageEnd// SyntaxStart: +Object assignAsGunner //SyntaxEnd// RawSyntaxStart: unitName assignAsGunner vehicleName @@ -4497,6 +4660,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignAsTurret //WikiPageEnd// SyntaxStart: +Object assignAsTurret Array //SyntaxEnd// RawSyntaxStart: unit assignAsTurret [vehicle, [turretPath]] @@ -4524,6 +4688,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignCurator //WikiPageEnd// SyntaxStart: +Object assignCurator //SyntaxEnd// RawSyntaxStart: player assignCurator curatorObj @@ -4553,6 +4718,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignedCargo //WikiPageEnd// SyntaxStart: +assignedCargo Object //SyntaxEnd// RawSyntaxStart: assignedCargo vehicle @@ -4581,6 +4747,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignedCommander //WikiPageEnd// SyntaxStart: +assignedCommander Object //SyntaxEnd// RawSyntaxStart: assignedCommander vehicle @@ -4609,6 +4776,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignedDriver //WikiPageEnd// SyntaxStart: +assignedDriver Object //SyntaxEnd// RawSyntaxStart: assignedDriver vehicle @@ -4637,6 +4805,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignedGunner //WikiPageEnd// SyntaxStart: +assignedGunner Object //SyntaxEnd// RawSyntaxStart: assignedGunner vehicle @@ -4664,6 +4833,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignedItems //WikiPageEnd// SyntaxStart: +assignedItems Object //SyntaxEnd// RawSyntaxStart: assignedItems unit @@ -4697,6 +4867,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignedTarget //WikiPageEnd// SyntaxStart: +assignedTarget Object //SyntaxEnd// RawSyntaxStart: assignedTarget vehicleName @@ -4731,6 +4902,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignedTeam //WikiPageEnd// SyntaxStart: +assignedTeam Object //SyntaxEnd// RawSyntaxStart: assignedTeam unitName @@ -4765,6 +4937,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignedVehicle //WikiPageEnd// SyntaxStart: +assignedVehicle Object //SyntaxEnd// RawSyntaxStart: assignedVehicle unit @@ -4799,6 +4972,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignedVehicleRole //WikiPageEnd// SyntaxStart: +assignedVehicleRole Object //SyntaxEnd// RawSyntaxStart: assignedVehicleRole unitName @@ -4838,6 +5012,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignItem //WikiPageEnd// SyntaxStart: +Object assignItem String //SyntaxEnd// RawSyntaxStart: unit assignItem item @@ -4881,6 +5056,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignTeam //WikiPageEnd// SyntaxStart: +Object assignTeam String //SyntaxEnd// RawSyntaxStart: unit assignTeam team @@ -4919,6 +5095,7 @@ WikiPageStart: https://community.bistudio.com/wiki/assignToAirport //WikiPageEnd// SyntaxStart: +Object assignToAirport Number //SyntaxEnd// RawSyntaxStart: plane assignToAirport id @@ -4947,6 +5124,7 @@ WikiPageStart: https://community.bistudio.com/wiki/atan //WikiPageEnd// SyntaxStart: +atan Number //SyntaxEnd// RawSyntaxStart: atan x @@ -4976,6 +5154,7 @@ WikiPageStart: https://community.bistudio.com/wiki/atan2 //WikiPageEnd// SyntaxStart: +Number atan2 //SyntaxEnd// RawSyntaxStart: x atan2 y @@ -5026,6 +5205,7 @@ WikiPageStart: https://community.bistudio.com/wiki/atg //WikiPageEnd// SyntaxStart: +atg Number //SyntaxEnd// RawSyntaxStart: atg x @@ -5053,6 +5233,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ATLToASL //WikiPageEnd// SyntaxStart: +ATLToASL PositionATL //SyntaxEnd// RawSyntaxStart: ATLToASL pos @@ -5083,6 +5264,7 @@ WikiPageStart: https://community.bistudio.com/wiki/attachedObject //WikiPageEnd// SyntaxStart: +attachedObject Location //SyntaxEnd// RawSyntaxStart: attachedObject location @@ -5111,6 +5293,7 @@ WikiPageStart: https://community.bistudio.com/wiki/attachedObjects //WikiPageEnd// SyntaxStart: +attachedObjects Object //SyntaxEnd// RawSyntaxStart: attachedObjects obj @@ -5146,6 +5329,7 @@ WikiPageStart: https://community.bistudio.com/wiki/attachedTo //WikiPageEnd// SyntaxStart: +attachedTo Object //SyntaxEnd// RawSyntaxStart: attachedTo object @@ -5176,6 +5360,7 @@ WikiPageStart: https://community.bistudio.com/wiki/attachObject //WikiPageEnd// SyntaxStart: +Location attachObject Object //SyntaxEnd// RawSyntaxStart: location attachObject object @@ -5204,6 +5389,7 @@ WikiPageStart: https://community.bistudio.com/wiki/attachTo //WikiPageEnd// SyntaxStart: +Object attachTo Array //SyntaxEnd// RawSyntaxStart: object1 attachTo [object2, offset, memPoint] @@ -5288,6 +5474,7 @@ WikiPageStart: https://community.bistudio.com/wiki/attackEnabled //WikiPageEnd// SyntaxStart: +attackEnabled Object/Group //SyntaxEnd// RawSyntaxStart: attackEnabled name @@ -5316,6 +5503,7 @@ WikiPageStart: https://community.bistudio.com/wiki/backpack //WikiPageEnd// SyntaxStart: +backpack Object //SyntaxEnd// RawSyntaxStart: backpack unit @@ -5344,6 +5532,7 @@ WikiPageStart: https://community.bistudio.com/wiki/backpackCargo //WikiPageEnd// SyntaxStart: +backpackCargo Object //SyntaxEnd// RawSyntaxStart: backpackCargo box @@ -5372,6 +5561,7 @@ WikiPageStart: https://community.bistudio.com/wiki/backpackContainer //WikiPageEnd// SyntaxStart: +backpackContainer Object //SyntaxEnd// RawSyntaxStart: backpackContainer unit @@ -5419,6 +5609,7 @@ WikiPageStart: https://community.bistudio.com/wiki/backpackItems //WikiPageEnd// SyntaxStart: +backpackItems Object //SyntaxEnd// RawSyntaxStart: backpackItems unit @@ -5450,6 +5641,7 @@ WikiPageStart: https://community.bistudio.com/wiki/backpackMagazines //WikiPageEnd// SyntaxStart: +backpackMagazines Object //SyntaxEnd// RawSyntaxStart: backpackMagazines unit @@ -5480,6 +5672,7 @@ WikiPageStart: https://community.bistudio.com/wiki/backpackSpaceFor //WikiPageEnd// SyntaxStart: +Object backpackSpaceFor String //SyntaxEnd// RawSyntaxStart: backpack backpackSpaceFor weaponName @@ -5508,6 +5701,7 @@ WikiPageStart: https://community.bistudio.com/wiki/behaviour //WikiPageEnd// SyntaxStart: +behaviour Object //SyntaxEnd// RawSyntaxStart: behaviour unitName @@ -5540,6 +5734,7 @@ WikiPageStart: https://community.bistudio.com/wiki/benchmark //WikiPageEnd// SyntaxStart: +benchmark //SyntaxEnd// RawSyntaxStart: benchmark @@ -5570,6 +5765,7 @@ WikiPageStart: https://community.bistudio.com/wiki/binocular //WikiPageEnd// SyntaxStart: +binocular Object //SyntaxEnd// RawSyntaxStart: binocular unit @@ -5599,6 +5795,7 @@ WikiPageStart: https://community.bistudio.com/wiki/blufor //WikiPageEnd// SyntaxStart: +blufor //SyntaxEnd// RawSyntaxStart: blufor @@ -5629,6 +5826,7 @@ WikiPageStart: https://community.bistudio.com/wiki/boundingBox //WikiPageEnd// SyntaxStart: +boundingBox Object //SyntaxEnd// RawSyntaxStart: boundingBox model @@ -5657,6 +5855,7 @@ WikiPageStart: https://community.bistudio.com/wiki/boundingBoxReal //WikiPageEnd// SyntaxStart: +boundingBoxReal Object //SyntaxEnd// RawSyntaxStart: boundingBoxReal obj @@ -5690,6 +5889,7 @@ WikiPageStart: https://community.bistudio.com/wiki/boundingCenter //WikiPageEnd// SyntaxStart: +boundingCenter Object //SyntaxEnd// RawSyntaxStart: boundingCenter object @@ -5719,6 +5919,9 @@ WikiPageStart: https://community.bistudio.com/wiki/breakOut //WikiPageEnd// SyntaxStart: +breakOut String +%NextSyntax% +Anything breakOut String //SyntaxEnd// RawSyntaxStart: breakOut name @@ -5799,6 +6002,7 @@ WikiPageStart: https://community.bistudio.com/wiki/breakTo //WikiPageEnd// SyntaxStart: +breakTo String //SyntaxEnd// RawSyntaxStart: breakTo name @@ -5837,6 +6041,7 @@ WikiPageStart: https://community.bistudio.com/wiki/briefingName //WikiPageEnd// SyntaxStart: +briefingName //SyntaxEnd// RawSyntaxStart: briefingName @@ -5865,6 +6070,7 @@ WikiPageStart: https://community.bistudio.com/wiki/buildingExit //WikiPageEnd// SyntaxStart: +Object buildingExit Number //SyntaxEnd// RawSyntaxStart: building buildingExit index @@ -5894,6 +6100,7 @@ WikiPageStart: https://community.bistudio.com/wiki/buildingPos //WikiPageEnd// SyntaxStart: +Object buildingPos Number //SyntaxEnd// RawSyntaxStart: building buildingPos index @@ -5942,6 +6149,9 @@ WikiPageStart: https://community.bistudio.com/wiki/buttonAction //WikiPageEnd// SyntaxStart: +buttonAction Number +%NextSyntax% +buttonAction Control //SyntaxEnd// RawSyntaxStart: buttonAction idc @@ -5974,6 +6184,9 @@ WikiPageStart: https://community.bistudio.com/wiki/buttonSetAction //WikiPageEnd// SyntaxStart: +buttonSetAction Array +%NextSyntax% +Control buttonSetAction String //SyntaxEnd// RawSyntaxStart: buttonSetAction [idc, action] @@ -6013,6 +6226,7 @@ WikiPageStart: https://community.bistudio.com/wiki/cadetMode //WikiPageEnd// SyntaxStart: +cadetMode //SyntaxEnd// RawSyntaxStart: cadetMode @@ -6047,6 +6261,7 @@ WikiPageStart: https://community.bistudio.com/wiki/call //WikiPageEnd// SyntaxStart: +Anything call Code //SyntaxEnd// RawSyntaxStart: argument call body @@ -6143,6 +6358,7 @@ WikiPageStart: https://community.bistudio.com/wiki/callExtension //WikiPageEnd// SyntaxStart: +String callExtension //SyntaxEnd// RawSyntaxStart: extension callExtension functionWithArguments @@ -6175,6 +6391,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camCommand //WikiPageEnd// SyntaxStart: +Object camCommand String //SyntaxEnd// RawSyntaxStart: camera camCommand command @@ -6203,6 +6420,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camCommit //WikiPageEnd// SyntaxStart: +Object camCommit Number //SyntaxEnd// RawSyntaxStart: camera camCommit time @@ -6253,6 +6471,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camCommitPrepared //WikiPageEnd// SyntaxStart: +Object camCommitPrepared Number //SyntaxEnd// RawSyntaxStart: camera camCommitPrepared time @@ -6290,6 +6509,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camCommitted //WikiPageEnd// SyntaxStart: +camCommitted Object //SyntaxEnd// RawSyntaxStart: camCommitted camera @@ -6328,6 +6548,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camConstuctionSetParams //WikiPageEnd// SyntaxStart: +Object camConstuctionSetParams Array //SyntaxEnd// RawSyntaxStart: camera camConstuctionSetParams [[x,y,z], radius, maxAboveLand] @@ -6356,6 +6577,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camCreate //WikiPageEnd// SyntaxStart: +String camCreate Array //SyntaxEnd// RawSyntaxStart: type camCreate position @@ -6391,6 +6613,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camDestroy //WikiPageEnd// SyntaxStart: +camDestroy Object //SyntaxEnd// RawSyntaxStart: camDestroy object @@ -6422,6 +6645,7 @@ WikiPageStart: https://community.bistudio.com/wiki/cameraEffect //WikiPageEnd// SyntaxStart: +Object cameraEffect Array //SyntaxEnd// RawSyntaxStart: camera cameraEffect [name, position, rtt] @@ -6456,6 +6680,7 @@ WikiPageStart: https://community.bistudio.com/wiki/cameraEffectEnableHUD //WikiPageEnd// SyntaxStart: +cameraEffectEnableHUD Boolean //SyntaxEnd// RawSyntaxStart: cameraEffectEnableHUD enable @@ -6486,6 +6711,7 @@ WikiPageStart: https://community.bistudio.com/wiki/cameraInterest //WikiPageEnd// SyntaxStart: +cameraInterest Object //SyntaxEnd// RawSyntaxStart: cameraInterest entity @@ -6514,6 +6740,7 @@ WikiPageStart: https://community.bistudio.com/wiki/cameraOn //WikiPageEnd// SyntaxStart: +cameraOn //SyntaxEnd// RawSyntaxStart: cameraOn @@ -6553,6 +6780,7 @@ WikiPageStart: https://community.bistudio.com/wiki/cameraView //WikiPageEnd// SyntaxStart: +cameraView //SyntaxEnd// RawSyntaxStart: cameraView @@ -6584,6 +6812,7 @@ WikiPageStart: https://community.bistudio.com/wiki/campaignConfigFile //WikiPageEnd// SyntaxStart: +campaignConfigFile //SyntaxEnd// RawSyntaxStart: campaignConfigFile @@ -6611,6 +6840,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camPreload //WikiPageEnd// SyntaxStart: +Object camPreload Number //SyntaxEnd// RawSyntaxStart: camera camPreload time @@ -6639,6 +6869,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camPreloaded //WikiPageEnd// SyntaxStart: +camPreloaded Object //SyntaxEnd// RawSyntaxStart: camPreloaded camera @@ -6667,6 +6898,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camPrepareBank //WikiPageEnd// SyntaxStart: +Object camPrepareBank Number //SyntaxEnd// RawSyntaxStart: camera camPrepareBank bank @@ -6695,6 +6927,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camPrepareDir //WikiPageEnd// SyntaxStart: +Object camPrepareDir Number //SyntaxEnd// RawSyntaxStart: camera camPrepareDir direction @@ -6723,6 +6956,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camPrepareDive //WikiPageEnd// SyntaxStart: +Object camPrepareDive Number //SyntaxEnd// RawSyntaxStart: camera camPrepareDive dive @@ -6752,6 +6986,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camPrepareFocus //WikiPageEnd// SyntaxStart: +Object camPrepareFocus Array //SyntaxEnd// RawSyntaxStart: camera camPrepareFocus focusRange @@ -6780,6 +7015,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camPrepareFov //WikiPageEnd// SyntaxStart: +Object camPrepareFov Number //SyntaxEnd// RawSyntaxStart: camera camPrepareFov fieldOfView @@ -6808,6 +7044,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camPrepareFovRange //WikiPageEnd// SyntaxStart: +Object camPrepareFovRange Array //SyntaxEnd// RawSyntaxStart: camera camPrepareFovRange fovRange @@ -6836,6 +7073,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camPreparePos //WikiPageEnd// SyntaxStart: +Object camPreparePos Array //SyntaxEnd// RawSyntaxStart: camera camPreparePos position @@ -6864,6 +7102,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camPrepareRelPos //WikiPageEnd// SyntaxStart: +Object camPrepareRelPos Array //SyntaxEnd// RawSyntaxStart: camera camPrepareRelPos position @@ -6892,6 +7131,9 @@ WikiPageStart: https://community.bistudio.com/wiki/camPrepareTarget //WikiPageEnd// SyntaxStart: +Object camPrepareTarget Array +%NextSyntax% +Object camPrepareTarget //SyntaxEnd// RawSyntaxStart: camera camPrepareTarget position @@ -6925,6 +7167,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camSetBank //WikiPageEnd// SyntaxStart: +Object camSetBank Number //SyntaxEnd// RawSyntaxStart: camera camSetBank bank @@ -6949,32 +7192,38 @@ KeywordStart: camSetDir //KeywordEnd// DescriptionStart: -Set the direction of the given camera. Needs the call of camCommit to be conducted. -This command is completely broken +Sets the orientation of the given camera in the direction of the given vector. Needs camCommit. //DescriptionEnd// WikiPageStart: https://community.bistudio.com/wiki/camSetDir //WikiPageEnd// SyntaxStart: +Object camSetDir Array //SyntaxEnd// RawSyntaxStart: camera camSetDir direction //RawSyntaxEnd// ExampleStart: -$Code$_cam camSetDir 90$/Code$ +$Code$pos1 = player modelToWorld [0,5,5]; +cam = "camera" camCreate pos1; +cam cameraEffect ["INTERNAL", "BACK"]; +pos2 = player modelToWorld [0,50,50]; +cam camSetPos pos2; +cam camSetDir (pos2 vectorFromTo pos1); +cam camCommit 5; +0 = [] spawn +{ +waitUntil { camCommitted cam}; +cam camSetPos pos1; +cam camCommit 5; +};$/Code$ //ExampleEnd// LocalityStart: local / local //LocalityEnd// NoteStart: -(June 11, 2007) -This command does NOT work on cameras (in ArmA 1.05 at least), use SetDir instead. -%NextNote% -(June 11, 2013) -This command (with new syntax) is also broken in the Arma 3 Alpha, see this feedback tracker report -%NextNote% -(March 1, 2016) -Yep, still broken. +(May 9, 2016) +cameraEffect "INTERNAL" works better than "EXTERNAL" with this command. //NoteEnd// ReturnValueStart: Nothing @@ -6993,6 +7242,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camSetDive //WikiPageEnd// SyntaxStart: +Object camSetDive Number //SyntaxEnd// RawSyntaxStart: camera camSetDive dive @@ -7023,6 +7273,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camSetFocus //WikiPageEnd// SyntaxStart: +Object camSetFocus Array //SyntaxEnd// RawSyntaxStart: camera camSetFocus focusRange @@ -7048,12 +7299,12 @@ DescriptionStart: Set the zoom level ( F ield O f V iew) of the given camera. The zoom level is from 0.01 for the nearest and 2 for the furthest zoom value, with a default zoom level of 0.7 The angle of the field of view is atan(FOV)*2 radians when in 4:3 aspect ratio. -Needs the call of camCommit to be conducted. //DescriptionEnd// WikiPageStart: https://community.bistudio.com/wiki/camSetFov //WikiPageEnd// SyntaxStart: +Object camSetFov Number //SyntaxEnd// RawSyntaxStart: camera camSetFov level @@ -7065,8 +7316,6 @@ LocalityStart: local / local //LocalityEnd// NoteStart: -(October 11, 2010) -This command requires the camera to have a target (see camSetTarget ). //NoteEnd// ReturnValueStart: Nothing @@ -7080,12 +7329,12 @@ camSetFovRange DescriptionStart: Set the zoom level ( F ield O f V iew) start and end values for automatical zooming. The default zoom level is 0.7 where 0 is the nearest and 1 is the most far zoom value. -Needs the call of camCommit to be conducted. //DescriptionEnd// WikiPageStart: https://community.bistudio.com/wiki/camSetFovRange //WikiPageEnd// SyntaxStart: +Object camSetFovRange Array //SyntaxEnd// RawSyntaxStart: camera camSetFovRange fovRange @@ -7114,6 +7363,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camSetPos //WikiPageEnd// SyntaxStart: +Object camSetPos Array //SyntaxEnd// RawSyntaxStart: camera camSetPos position @@ -7142,6 +7392,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camSetRelPos //WikiPageEnd// SyntaxStart: +Object camSetRelPos Array //SyntaxEnd// RawSyntaxStart: camera camSetRelPos position @@ -7173,6 +7424,9 @@ WikiPageStart: https://community.bistudio.com/wiki/camSetTarget //WikiPageEnd// SyntaxStart: +Object camSetTarget +%NextSyntax% +Object camSetTarget Array //SyntaxEnd// RawSyntaxStart: camera camSetTarget target @@ -7212,6 +7466,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camTarget //WikiPageEnd// SyntaxStart: +camTarget Object //SyntaxEnd// RawSyntaxStart: camTarget camera @@ -7239,6 +7494,7 @@ WikiPageStart: https://community.bistudio.com/wiki/camUseNVG //WikiPageEnd// SyntaxStart: +camUseNVG Boolean //SyntaxEnd// RawSyntaxStart: camUseNVG set @@ -7275,6 +7531,9 @@ WikiPageStart: https://community.bistudio.com/wiki/canAdd //WikiPageEnd// SyntaxStart: +Object canAdd String +%NextSyntax% +Object canAdd Array //SyntaxEnd// RawSyntaxStart: object canAdd item @@ -7327,6 +7586,9 @@ WikiPageStart: https://community.bistudio.com/wiki/canAddItemToBackpack //WikiPageEnd// SyntaxStart: +Object canAddItemToBackpack String +%NextSyntax% +Object canAddItemToBackpack Array //SyntaxEnd// RawSyntaxStart: unit canAddItemToBackpack item @@ -7363,6 +7625,9 @@ WikiPageStart: https://community.bistudio.com/wiki/canAddItemToUniform //WikiPageEnd// SyntaxStart: +Object canAddItemToUniform String +%NextSyntax% +Object canAddItemToUniform Array //SyntaxEnd// RawSyntaxStart: unit canAddItemToUniform item @@ -7399,6 +7664,9 @@ WikiPageStart: https://community.bistudio.com/wiki/canAddItemToVest //WikiPageEnd// SyntaxStart: +Object canAddItemToVest String +%NextSyntax% +Object canAddItemToVest Array //SyntaxEnd// RawSyntaxStart: unit canAddItemToVest item @@ -7435,6 +7703,7 @@ WikiPageStart: https://community.bistudio.com/wiki/cancelSimpleTaskDestination //WikiPageEnd// SyntaxStart: +cancelSimpleTaskDestination Task //SyntaxEnd// RawSyntaxStart: cancelSimpleTaskDestination task @@ -7463,6 +7732,7 @@ WikiPageStart: https://community.bistudio.com/wiki/canFire //WikiPageEnd// SyntaxStart: +canFire Object //SyntaxEnd// RawSyntaxStart: canFire unitName @@ -7504,6 +7774,7 @@ WikiPageStart: https://community.bistudio.com/wiki/canMove //WikiPageEnd// SyntaxStart: +canMove Object //SyntaxEnd// RawSyntaxStart: canMove unitName @@ -7538,6 +7809,7 @@ WikiPageStart: https://community.bistudio.com/wiki/canSlingLoad //WikiPageEnd// SyntaxStart: +Object canSlingLoad //SyntaxEnd// RawSyntaxStart: vehicle canSlingLoad cargo @@ -7568,6 +7840,7 @@ WikiPageStart: https://community.bistudio.com/wiki/canStand //WikiPageEnd// SyntaxStart: +canStand Object //SyntaxEnd// RawSyntaxStart: canStand unitName @@ -7604,6 +7877,7 @@ WikiPageStart: https://community.bistudio.com/wiki/canSuspend //WikiPageEnd// SyntaxStart: +canSuspend //SyntaxEnd// RawSyntaxStart: canSuspend @@ -7646,6 +7920,7 @@ WikiPageStart: https://community.bistudio.com/wiki/canUnloadInCombat //WikiPageEnd// SyntaxStart: +canUnloadInCombat Object //SyntaxEnd// RawSyntaxStart: canUnloadInCombat vehicle @@ -7674,6 +7949,7 @@ WikiPageStart: https://community.bistudio.com/wiki/captive //WikiPageEnd// SyntaxStart: +captive Object //SyntaxEnd// RawSyntaxStart: captive object @@ -7706,6 +7982,7 @@ WikiPageStart: https://community.bistudio.com/wiki/captiveNum //WikiPageEnd// SyntaxStart: +captiveNum Object //SyntaxEnd// RawSyntaxStart: captiveNum unit @@ -7737,6 +8014,21 @@ See switch do WikiPageStart: https://community.bistudio.com/wiki/case //WikiPageEnd// +SyntaxStart: +case rigthConstruct +//SyntaxEnd// +RawSyntaxStart: +//RawSyntaxEnd// +ExampleStart: +//ExampleEnd// +LocalityStart: +undefined / undefined +//LocalityEnd// +NoteStart: +//NoteEnd// +ReturnValueStart: +Nothing +//ReturnValueEnd// %NextListItem% @@ -7750,6 +8042,7 @@ WikiPageStart: https://community.bistudio.com/wiki/catch //WikiPageEnd// SyntaxStart: +Exception catch Code //SyntaxEnd// RawSyntaxStart: try-block catch code @@ -7777,6 +8070,7 @@ WikiPageStart: https://community.bistudio.com/wiki/cbChecked //WikiPageEnd// SyntaxStart: +cbChecked Control //SyntaxEnd// RawSyntaxStart: cbChecked control @@ -7805,6 +8099,7 @@ WikiPageStart: https://community.bistudio.com/wiki/cbSetChecked //WikiPageEnd// SyntaxStart: +Control cbSetChecked Boolean //SyntaxEnd// RawSyntaxStart: control cbSetChecked state @@ -7833,6 +8128,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ceil //WikiPageEnd// SyntaxStart: +ceil Number //SyntaxEnd// RawSyntaxStart: ceil x @@ -7873,6 +8169,7 @@ WikiPageStart: https://community.bistudio.com/wiki/channelEnabled //WikiPageEnd// SyntaxStart: +channelEnabled Number //SyntaxEnd// RawSyntaxStart: channelEnabled channel @@ -7903,6 +8200,7 @@ WikiPageStart: https://community.bistudio.com/wiki/cheatsEnabled //WikiPageEnd// SyntaxStart: +cheatsEnabled //SyntaxEnd// RawSyntaxStart: cheatsEnabled @@ -7931,6 +8229,7 @@ WikiPageStart: https://community.bistudio.com/wiki/checkAIFeature //WikiPageEnd// SyntaxStart: +checkAIFeature String //SyntaxEnd// RawSyntaxStart: checkAIFeature feature @@ -7959,6 +8258,7 @@ WikiPageStart: https://community.bistudio.com/wiki/checkVisibility //WikiPageEnd// SyntaxStart: +Array checkVisibility //SyntaxEnd// RawSyntaxStart: [ignore, LOD] checkVisibility [beg, end] @@ -7988,6 +8288,7 @@ WikiPageStart: https://community.bistudio.com/wiki/civilian //WikiPageEnd// SyntaxStart: +civilian //SyntaxEnd// RawSyntaxStart: civilian @@ -8023,6 +8324,7 @@ WikiPageStart: https://community.bistudio.com/wiki/className //WikiPageEnd// SyntaxStart: +className Location //SyntaxEnd// RawSyntaxStart: className loc @@ -8050,6 +8352,7 @@ WikiPageStart: https://community.bistudio.com/wiki/clearAllItemsFromBackpack //WikiPageEnd// SyntaxStart: +clearAllItemsFromBackpack Object //SyntaxEnd// RawSyntaxStart: clearAllItemsFromBackpack unit @@ -8077,6 +8380,7 @@ WikiPageStart: https://community.bistudio.com/wiki/clearBackpackCargo //WikiPageEnd// SyntaxStart: +clearBackpackCargo Object //SyntaxEnd// RawSyntaxStart: clearBackpackCargo box @@ -8105,6 +8409,7 @@ WikiPageStart: https://community.bistudio.com/wiki/clearBackpackCargoGlobal //WikiPageEnd// SyntaxStart: +clearBackpackCargoGlobal Object //SyntaxEnd// RawSyntaxStart: clearBackpackCargoGlobal unit @@ -8133,6 +8438,7 @@ WikiPageStart: https://community.bistudio.com/wiki/clearGroupIcons //WikiPageEnd// SyntaxStart: +clearGroupIcons Group //SyntaxEnd// RawSyntaxStart: clearGroupIcons group @@ -8160,6 +8466,7 @@ WikiPageStart: https://community.bistudio.com/wiki/clearItemCargo //WikiPageEnd// SyntaxStart: +clearItemCargo Object //SyntaxEnd// RawSyntaxStart: clearItemCargo box @@ -8188,6 +8495,7 @@ WikiPageStart: https://community.bistudio.com/wiki/clearItemCargoGlobal //WikiPageEnd// SyntaxStart: +clearItemCargoGlobal Object //SyntaxEnd// RawSyntaxStart: clearItemCargoGlobal box @@ -8215,6 +8523,7 @@ WikiPageStart: https://community.bistudio.com/wiki/clearItemPool //WikiPageEnd// SyntaxStart: +clearItemPool Object //SyntaxEnd// RawSyntaxStart: clearItemPool box @@ -8243,6 +8552,7 @@ WikiPageStart: https://community.bistudio.com/wiki/clearMagazineCargo //WikiPageEnd// SyntaxStart: +clearMagazineCargo Object //SyntaxEnd// RawSyntaxStart: clearMagazineCargo vehicleName @@ -8273,6 +8583,7 @@ WikiPageStart: https://community.bistudio.com/wiki/clearMagazineCargoGlobal //WikiPageEnd// SyntaxStart: +clearMagazineCargoGlobal Object //SyntaxEnd// RawSyntaxStart: clearMagazineCargoGlobal unit @@ -8301,6 +8612,7 @@ WikiPageStart: https://community.bistudio.com/wiki/clearMagazinePool //WikiPageEnd// SyntaxStart: +clearMagazinePool //SyntaxEnd// RawSyntaxStart: clearMagazinePool @@ -8328,6 +8640,7 @@ WikiPageStart: https://community.bistudio.com/wiki/clearOverlay //WikiPageEnd// SyntaxStart: +clearOverlay Control //SyntaxEnd// RawSyntaxStart: clearOverlay map @@ -8356,6 +8669,7 @@ WikiPageStart: https://community.bistudio.com/wiki/clearRadio //WikiPageEnd// SyntaxStart: +clearRadio //SyntaxEnd// RawSyntaxStart: clearRadio @@ -8385,6 +8699,7 @@ WikiPageStart: https://community.bistudio.com/wiki/clearWeaponCargo //WikiPageEnd// SyntaxStart: +clearWeaponCargo Object //SyntaxEnd// RawSyntaxStart: clearWeaponCargo vehicleName @@ -8415,6 +8730,7 @@ WikiPageStart: https://community.bistudio.com/wiki/clearWeaponCargoGlobal //WikiPageEnd// SyntaxStart: +clearWeaponCargoGlobal Object //SyntaxEnd// RawSyntaxStart: clearWeaponCargoGlobal unit @@ -8443,6 +8759,7 @@ WikiPageStart: https://community.bistudio.com/wiki/clearWeaponPool //WikiPageEnd// SyntaxStart: +clearWeaponPool //SyntaxEnd// RawSyntaxStart: clearWeaponPool @@ -8470,6 +8787,7 @@ WikiPageStart: https://community.bistudio.com/wiki/clientOwner //WikiPageEnd// SyntaxStart: +clientOwner //SyntaxEnd// RawSyntaxStart: clientOwner @@ -8502,6 +8820,7 @@ WikiPageStart: https://community.bistudio.com/wiki/closeDialog //WikiPageEnd// SyntaxStart: +closeDialog Number //SyntaxEnd// RawSyntaxStart: closeDialog idc @@ -8535,6 +8854,7 @@ WikiPageStart: https://community.bistudio.com/wiki/closeDisplay //WikiPageEnd// SyntaxStart: +Display closeDisplay Number //SyntaxEnd// RawSyntaxStart: display closeDisplay exitcode @@ -8568,6 +8888,7 @@ WikiPageStart: https://community.bistudio.com/wiki/closeOverlay //WikiPageEnd// SyntaxStart: +closeOverlay Control //SyntaxEnd// RawSyntaxStart: closeOverlay map @@ -8595,6 +8916,7 @@ WikiPageStart: https://community.bistudio.com/wiki/collapseObjectTree //WikiPageEnd// SyntaxStart: +collapseObjectTree Control //SyntaxEnd// RawSyntaxStart: collapseObjectTree map @@ -8623,6 +8945,7 @@ WikiPageStart: https://community.bistudio.com/wiki/collect3DENHistory //WikiPageEnd// SyntaxStart: +collect3DENHistory Code //SyntaxEnd// RawSyntaxStart: collect3DENHistory code @@ -8655,6 +8978,7 @@ WikiPageStart: https://community.bistudio.com/wiki/combatMode //WikiPageEnd// SyntaxStart: +combatMode Object/Group //SyntaxEnd// RawSyntaxStart: combatMode grp @@ -8688,6 +9012,7 @@ WikiPageStart: https://community.bistudio.com/wiki/commandArtilleryFire //WikiPageEnd// SyntaxStart: +Object commandArtilleryFire Array //SyntaxEnd// RawSyntaxStart: unit commandArtilleryFire [position, type, rounds] @@ -8716,6 +9041,9 @@ WikiPageStart: https://community.bistudio.com/wiki/commandChat //WikiPageEnd// SyntaxStart: +Object/Array commandChat String +%NextSyntax% +Array commandChat String //SyntaxEnd// RawSyntaxStart: unit commandChat chatText @@ -8756,12 +9084,16 @@ WikiPageStart: https://community.bistudio.com/wiki/commander //WikiPageEnd// SyntaxStart: +commander Object //SyntaxEnd// RawSyntaxStart: commander vehicleName //RawSyntaxEnd// ExampleStart: -$Code$(commander _tank) action [ getout,_tank]$/Code$ +$Code$moveOut commander _tank;$/Code$ +%NextExample% +$Code$// Detect if player is in commander turret of a vehicle: +_isVehicleCommander = player isEqualTo commander objectParent player ;$/Code$ //ExampleEnd// LocalityStart: global / undefined @@ -8778,7 +9110,7 @@ Take very care about this : if you give a vehiculeVarName to one crew, so his re ((crew tank)select 0) SetVehicleVarName Tankcrew0 //NoteEnd// ReturnValueStart: -Object - +Object - The unit sitting in the commander place is returned. If vehicle is not a vehicle but a person, the person is returned. //ReturnValueEnd// %NextListItem% @@ -8794,6 +9126,7 @@ WikiPageStart: https://community.bistudio.com/wiki/commandFire //WikiPageEnd// SyntaxStart: +Object/Array commandFire Object //SyntaxEnd// RawSyntaxStart: unitName commandFire target @@ -8822,6 +9155,7 @@ WikiPageStart: https://community.bistudio.com/wiki/commandFollow //WikiPageEnd// SyntaxStart: +Object/Array commandFollow Object //SyntaxEnd// RawSyntaxStart: unitName commandFollow followedunit @@ -8850,6 +9184,7 @@ WikiPageStart: https://community.bistudio.com/wiki/commandFSM //WikiPageEnd// SyntaxStart: +Object/Array commandFSM Array //SyntaxEnd// RawSyntaxStart: unitName commandFSM [fsm name, position, target] @@ -8878,6 +9213,7 @@ WikiPageStart: https://community.bistudio.com/wiki/commandGetOut //WikiPageEnd// SyntaxStart: +commandGetOut Object/Array //SyntaxEnd// RawSyntaxStart: commandGetOut unitName @@ -8906,6 +9242,7 @@ WikiPageStart: https://community.bistudio.com/wiki/commandingMenu //WikiPageEnd// SyntaxStart: +commandingMenu //SyntaxEnd// RawSyntaxStart: commandingMenu @@ -8956,6 +9293,7 @@ WikiPageStart: https://community.bistudio.com/wiki/commandMove //WikiPageEnd// SyntaxStart: +Object/Array commandMove Array //SyntaxEnd// RawSyntaxStart: unitName commandMove position @@ -8984,6 +9322,7 @@ WikiPageStart: https://community.bistudio.com/wiki/commandRadio //WikiPageEnd// SyntaxStart: +Object/Array commandRadio String //SyntaxEnd// RawSyntaxStart: unit commandRadio radioName @@ -9015,6 +9354,7 @@ WikiPageStart: https://community.bistudio.com/wiki/commandStop //WikiPageEnd// SyntaxStart: +commandStop Object/Array //SyntaxEnd// RawSyntaxStart: commandStop unitName @@ -9048,6 +9388,7 @@ WikiPageStart: https://community.bistudio.com/wiki/commandTarget //WikiPageEnd// SyntaxStart: +Object commandTarget //SyntaxEnd// RawSyntaxStart: unitName commandTarget target @@ -9078,6 +9419,9 @@ WikiPageStart: https://community.bistudio.com/wiki/commandWatch //WikiPageEnd// SyntaxStart: +Object/Array commandWatch Array +%NextSyntax% +Object/Array commandWatch Object //SyntaxEnd// RawSyntaxStart: unitName commandWatch position @@ -9111,6 +9455,7 @@ WikiPageStart: https://community.bistudio.com/wiki/comment //WikiPageEnd// SyntaxStart: +comment String //SyntaxEnd// RawSyntaxStart: comment commentMsg @@ -9148,6 +9493,7 @@ WikiPageStart: https://community.bistudio.com/wiki/commitOverlay //WikiPageEnd// SyntaxStart: +commitOverlay Control //SyntaxEnd// RawSyntaxStart: commitOverlay map @@ -9176,6 +9522,7 @@ WikiPageStart: https://community.bistudio.com/wiki/compile //WikiPageEnd// SyntaxStart: +compile String //SyntaxEnd// RawSyntaxStart: compile expression @@ -9212,6 +9559,7 @@ WikiPageStart: https://community.bistudio.com/wiki/compileFinal //WikiPageEnd// SyntaxStart: +compileFinal String //SyntaxEnd// RawSyntaxStart: compileFinal expression @@ -9249,6 +9597,7 @@ WikiPageStart: https://community.bistudio.com/wiki/completedFSM //WikiPageEnd// SyntaxStart: +completedFSM Number //SyntaxEnd// RawSyntaxStart: completedFSM fsmHandle @@ -9277,6 +9626,7 @@ WikiPageStart: https://community.bistudio.com/wiki/composeText //WikiPageEnd// SyntaxStart: +composeText Array //SyntaxEnd// RawSyntaxStart: composeText [text1, text2,...] @@ -9306,6 +9656,7 @@ WikiPageStart: https://community.bistudio.com/wiki/configClasses //WikiPageEnd// SyntaxStart: +String configClasses Config //SyntaxEnd// RawSyntaxStart: condition configClasses config @@ -9388,6 +9739,7 @@ WikiPageStart: https://community.bistudio.com/wiki/configFile //WikiPageEnd// SyntaxStart: +configFile //SyntaxEnd// RawSyntaxStart: configFile @@ -9439,6 +9791,7 @@ WikiPageStart: https://community.bistudio.com/wiki/configHierarchy //WikiPageEnd// SyntaxStart: +configHierarchy Config //SyntaxEnd// RawSyntaxStart: configHierarchy configClass @@ -9468,6 +9821,7 @@ WikiPageStart: https://community.bistudio.com/wiki/configName //WikiPageEnd// SyntaxStart: +configName Config //SyntaxEnd// RawSyntaxStart: configName config @@ -9500,6 +9854,7 @@ WikiPageStart: https://community.bistudio.com/wiki/configNull //WikiPageEnd// SyntaxStart: +configNull //SyntaxEnd// RawSyntaxStart: configNull @@ -9531,6 +9886,7 @@ WikiPageStart: https://community.bistudio.com/wiki/configProperties //WikiPageEnd// SyntaxStart: +configProperties Array //SyntaxEnd// RawSyntaxStart: configProperties [config, condition, inherit] @@ -9570,6 +9926,7 @@ WikiPageStart: https://community.bistudio.com/wiki/configSourceMod //WikiPageEnd// SyntaxStart: +configSourceMod Config //SyntaxEnd// RawSyntaxStart: configSourceMod config @@ -9600,6 +9957,7 @@ WikiPageStart: https://community.bistudio.com/wiki/configSourceModList //WikiPageEnd// SyntaxStart: +configSourceModList Config //SyntaxEnd// RawSyntaxStart: configSourceModList config @@ -9629,6 +9987,7 @@ WikiPageStart: https://community.bistudio.com/wiki/connectTerminalToUAV //WikiPageEnd// SyntaxStart: +Object connectTerminalToUAV //SyntaxEnd// RawSyntaxStart: person connectTerminalToUAV uav @@ -9662,6 +10021,7 @@ WikiPageStart: https://community.bistudio.com/wiki/controlNull //WikiPageEnd// SyntaxStart: +controlNull //SyntaxEnd// RawSyntaxStart: controlNull @@ -9692,6 +10052,7 @@ WikiPageStart: https://community.bistudio.com/wiki/controlsGroupCtrl //WikiPageEnd// SyntaxStart: +Control controlsGroupCtrl Number //SyntaxEnd// RawSyntaxStart: ctrlgrp controlsGroupCtrl idc @@ -9720,6 +10081,7 @@ WikiPageStart: https://community.bistudio.com/wiki/copyFromClipboard //WikiPageEnd// SyntaxStart: +copyFromClipboard //SyntaxEnd// RawSyntaxStart: copyFromClipboard @@ -9749,6 +10111,7 @@ WikiPageStart: https://community.bistudio.com/wiki/copyToClipboard //WikiPageEnd// SyntaxStart: +copyToClipboard String //SyntaxEnd// RawSyntaxStart: copyToClipboard text @@ -9787,6 +10150,7 @@ WikiPageStart: https://community.bistudio.com/wiki/copyWaypoints //WikiPageEnd// SyntaxStart: +Group copyWaypoints //SyntaxEnd// RawSyntaxStart: groupTo copyWaypoints groupFrom @@ -9815,6 +10179,7 @@ WikiPageStart: https://community.bistudio.com/wiki/cos //WikiPageEnd// SyntaxStart: +cos Number //SyntaxEnd// RawSyntaxStart: cos x @@ -9854,6 +10219,13 @@ WikiPageStart: https://community.bistudio.com/wiki/count //WikiPageEnd// SyntaxStart: +count Array +%NextSyntax% +Code count Array +%NextSyntax% +count Config +%NextSyntax% +count String //SyntaxEnd// RawSyntaxStart: count array @@ -9934,6 +10306,7 @@ WikiPageStart: https://community.bistudio.com/wiki/countEnemy //WikiPageEnd// SyntaxStart: +Object countEnemy Array //SyntaxEnd// RawSyntaxStart: unitName countEnemy arrayName @@ -9968,6 +10341,7 @@ WikiPageStart: https://community.bistudio.com/wiki/countFriendly //WikiPageEnd// SyntaxStart: +Object countFriendly Array //SyntaxEnd// RawSyntaxStart: unitName countFriendly arrayName @@ -9993,12 +10367,13 @@ KeywordStart: countSide //KeywordEnd// DescriptionStart: -Count how many units in the array belong to given side. +Count how many units in the given array belong to given side. If the object in passed array is a Group, the leader of the group will be counted. //DescriptionEnd// WikiPageStart: https://community.bistudio.com/wiki/countSide //WikiPageEnd// SyntaxStart: +Side countSide Array //SyntaxEnd// RawSyntaxStart: side countSide arrayName @@ -10028,18 +10403,21 @@ KeywordStart: countType //KeywordEnd// DescriptionStart: -Count how many units in the array are of given type. Other than typeOf this command also works with parent classes like "Air", "Tank" and "Car". For a full class reference see Classes. +Count how many objects in the array are of given type. This command also works with parent classes like "Air", "Tank", and "Car". For a full class reference see Classes. //DescriptionEnd// WikiPageStart: https://community.bistudio.com/wiki/countType //WikiPageEnd// SyntaxStart: +String countType Array //SyntaxEnd// RawSyntaxStart: -type countType arrayName +type countType objects //RawSyntaxEnd// ExampleStart: $Code$_count = "Tank" countType list _triggerOne;$/Code$ +%NextExample% +$Code$_count = "B_medic_F" countType units player ;$/Code$ //ExampleEnd// LocalityStart: global / undefined @@ -10047,6 +10425,10 @@ global / undefined NoteStart: (April 23, 2007) This command can be used on the whole hierarchical class tree (i.e. when checking a HMMWV, one could test for "HMMWV50", "Car", "LandVehicle", etc.) +%NextNote% +(May 4, 2016) +To complement Kronzky's note, if one needs to count exact types, countType is not suitable for this, use count instead: +$Code$_count = { typeOf _x == "B_medic_F"} count units player ;$/Code$ //NoteEnd// ReturnValueStart: Number @@ -10064,6 +10446,7 @@ WikiPageStart: https://community.bistudio.com/wiki/countUnknown //WikiPageEnd// SyntaxStart: +Object countUnknown Array //SyntaxEnd// RawSyntaxStart: unitName countUnknown arrayName @@ -10092,6 +10475,7 @@ WikiPageStart: https://community.bistudio.com/wiki/create3DENComposition //WikiPageEnd// SyntaxStart: +create3DENComposition Array //SyntaxEnd// RawSyntaxStart: create3DENComposition [configPath, position] @@ -10124,6 +10508,9 @@ WikiPageStart: https://community.bistudio.com/wiki/create3DENEntity //WikiPageEnd// SyntaxStart: +create3DENEntity Array +%NextSyntax% +Group create3DENEntity Array //SyntaxEnd// RawSyntaxStart: create3DENEntity [mode, class, position, ] @@ -10164,6 +10551,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createAgent //WikiPageEnd// SyntaxStart: +createAgent Array //SyntaxEnd// RawSyntaxStart: createAgent [type, position, markers, placement, special] @@ -10222,6 +10610,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createCenter //WikiPageEnd// SyntaxStart: +createCenter Side //SyntaxEnd// RawSyntaxStart: createCenter side @@ -10252,6 +10641,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createDialog //WikiPageEnd// SyntaxStart: +createDialog String //SyntaxEnd// RawSyntaxStart: createDialog dialogName @@ -10281,6 +10671,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createDiaryLink //WikiPageEnd// SyntaxStart: +createDiaryLink Array //SyntaxEnd// RawSyntaxStart: createDiaryLink [subject,object,text] @@ -10357,6 +10748,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createDiaryRecord //WikiPageEnd// SyntaxStart: +Object createDiaryRecord Array //SyntaxEnd// RawSyntaxStart: unitName createDiaryRecord [subject, text, task, state] @@ -10392,6 +10784,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createDiarySubject //WikiPageEnd// SyntaxStart: +Object createDiarySubject Array //SyntaxEnd// RawSyntaxStart: person createDiarySubject [subject, displayName, picture] @@ -10421,6 +10814,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createDisplay //WikiPageEnd// SyntaxStart: +Display createDisplay String //SyntaxEnd// RawSyntaxStart: parent createDisplay resourceName @@ -10450,37 +10844,6 @@ 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: -//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// @@ -10493,6 +10856,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createGroup //WikiPageEnd// SyntaxStart: +createGroup Side //SyntaxEnd// RawSyntaxStart: createGroup side @@ -10532,6 +10896,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createGuardedPoint //WikiPageEnd// SyntaxStart: +createGuardedPoint Array //SyntaxEnd// RawSyntaxStart: createGuardedPoint [side, position, idStatic, vehicle] @@ -10560,6 +10925,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createLocation //WikiPageEnd// SyntaxStart: +createLocation Array //SyntaxEnd// RawSyntaxStart: createLocation [className, position, sizeX, sizeY] @@ -10594,6 +10960,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createMarker //WikiPageEnd// SyntaxStart: +createMarker Array //SyntaxEnd// RawSyntaxStart: createMarker [name, position] @@ -10634,6 +11001,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createMarkerLocal //WikiPageEnd// SyntaxStart: +createMarkerLocal Array //SyntaxEnd// RawSyntaxStart: createMarkerLocal [name, position] @@ -10666,6 +11034,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createMenu //WikiPageEnd// SyntaxStart: +Control createMenu Number //SyntaxEnd// RawSyntaxStart: map createMenu index @@ -10693,6 +11062,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createMine //WikiPageEnd// SyntaxStart: +createMine Array //SyntaxEnd// RawSyntaxStart: createMine [type, position, markers, placement] @@ -10721,6 +11091,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createMissionDisplay //WikiPageEnd// SyntaxStart: +Display createMissionDisplay String //SyntaxEnd// RawSyntaxStart: display createMissionDisplay string @@ -10752,6 +11123,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createSimpleTask //WikiPageEnd// SyntaxStart: +Object createSimpleTask Array //SyntaxEnd// RawSyntaxStart: person createSimpleTask [name, parentTask ] @@ -10832,6 +11204,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createSite //WikiPageEnd// SyntaxStart: +String createSite Position //SyntaxEnd// RawSyntaxStart: type createSite pos @@ -10862,6 +11235,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createSoundSource //WikiPageEnd// SyntaxStart: +createSoundSource Array //SyntaxEnd// RawSyntaxStart: createSoundSource [type, position, markers, placement] @@ -10896,6 +11270,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createTask //WikiPageEnd// SyntaxStart: +TeamMember createTask Array //SyntaxEnd// RawSyntaxStart: teamMember createTask [[type, parentTask], priority, name1, value1...nameN, valueN] @@ -10923,6 +11298,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createTeam //WikiPageEnd// SyntaxStart: +createTeam Array //SyntaxEnd// RawSyntaxStart: createTeam [type, name] @@ -10971,6 +11347,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createTrigger //WikiPageEnd// SyntaxStart: +createTrigger Array //SyntaxEnd// RawSyntaxStart: createTrigger [type, position, makeGlobal ] @@ -11005,6 +11382,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createUnit //WikiPageEnd// SyntaxStart: +String createUnit Array //SyntaxEnd// RawSyntaxStart: type createUnit [ position, group, init, skill, rank] @@ -11061,6 +11439,9 @@ WikiPageStart: https://community.bistudio.com/wiki/createVehicle //WikiPageEnd// SyntaxStart: +String createVehicle Position +%NextSyntax% +createVehicle Array //SyntaxEnd// RawSyntaxStart: type createVehicle position @@ -11173,6 +11554,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createVehicleCrew //WikiPageEnd// SyntaxStart: +createVehicleCrew Object //SyntaxEnd// RawSyntaxStart: createVehicleCrew vehicle @@ -11219,6 +11601,7 @@ WikiPageStart: https://community.bistudio.com/wiki/createVehicleLocal //WikiPageEnd// SyntaxStart: +String createVehicleLocal Position //SyntaxEnd// RawSyntaxStart: type createVehicleLocal position @@ -11252,6 +11635,7 @@ WikiPageStart: https://community.bistudio.com/wiki/crew //WikiPageEnd// SyntaxStart: +crew Object //SyntaxEnd// RawSyntaxStart: crew vehicleName @@ -11285,6 +11669,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlActivate //WikiPageEnd// SyntaxStart: +ctrlActivate Control //SyntaxEnd// RawSyntaxStart: ctrlActivate controlName @@ -11314,6 +11699,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlAddEventHandler //WikiPageEnd// SyntaxStart: +Control ctrlAddEventHandler Array //SyntaxEnd// RawSyntaxStart: control ctrlAddEventHandler [handler,function] @@ -11346,6 +11732,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlAngle //WikiPageEnd// SyntaxStart: +ctrlAngle Control //SyntaxEnd// RawSyntaxStart: ctrlAngle control @@ -11373,6 +11760,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlAutoScrollDelay //WikiPageEnd// SyntaxStart: +ctrlAutoScrollDelay Control //SyntaxEnd// RawSyntaxStart: ctrlAutoScrollDelay control @@ -11400,6 +11788,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlAutoScrollRewind //WikiPageEnd// SyntaxStart: +ctrlAutoScrollRewind Control //SyntaxEnd// RawSyntaxStart: ctrlAutoScrollRewind control @@ -11427,6 +11816,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlAutoScrollSpeed //WikiPageEnd// SyntaxStart: +ctrlAutoScrollSpeed Control //SyntaxEnd// RawSyntaxStart: ctrlAutoScrollSpeed control @@ -11454,6 +11844,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlChecked //WikiPageEnd// SyntaxStart: +ctrlChecked Control //SyntaxEnd// RawSyntaxStart: ctrlChecked control @@ -11481,6 +11872,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlClassName //WikiPageEnd// SyntaxStart: +ctrlClassName Control //SyntaxEnd// RawSyntaxStart: ctrlClassName control @@ -11519,6 +11911,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlCommit //WikiPageEnd// SyntaxStart: +Control ctrlCommit Number //SyntaxEnd// RawSyntaxStart: controlName ctrlCommit time @@ -11549,6 +11942,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlCommitted //WikiPageEnd// SyntaxStart: +ctrlCommitted Control //SyntaxEnd// RawSyntaxStart: ctrlCommitted controlName @@ -11577,6 +11971,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlCreate //WikiPageEnd// SyntaxStart: +Display ctrlCreate Array //SyntaxEnd// RawSyntaxStart: display ctrlCreate [class, idc, controlsGroup] @@ -11615,6 +12010,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlDelete //WikiPageEnd// SyntaxStart: +ctrlDelete Control //SyntaxEnd// RawSyntaxStart: ctrlDelete control @@ -11646,6 +12042,9 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlEnable //WikiPageEnd// SyntaxStart: +ctrlEnable Array +%NextSyntax% +Control ctrlEnable Boolean //SyntaxEnd// RawSyntaxStart: ctrlEnable [idc, enable] @@ -11679,6 +12078,9 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlEnabled //WikiPageEnd// SyntaxStart: +ctrlEnabled Number +%NextSyntax% +ctrlEnabled Control //SyntaxEnd// RawSyntaxStart: ctrlEnabled idc @@ -11714,6 +12116,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlFade //WikiPageEnd// SyntaxStart: +ctrlFade Control //SyntaxEnd// RawSyntaxStart: ctrlFade controlName @@ -11742,6 +12145,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlHTMLLoaded //WikiPageEnd// SyntaxStart: +ctrlHTMLLoaded Control //SyntaxEnd// RawSyntaxStart: ctrlHTMLLoaded control @@ -11773,6 +12177,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlIDC //WikiPageEnd// SyntaxStart: +ctrlIDC Control //SyntaxEnd// RawSyntaxStart: ctrlIDC control @@ -11800,6 +12205,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlIDD //WikiPageEnd// SyntaxStart: +ctrlIDD Display //SyntaxEnd// RawSyntaxStart: ctrlIDD display @@ -11828,6 +12234,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlMapAnimAdd //WikiPageEnd// SyntaxStart: +Control ctrlMapAnimAdd Array //SyntaxEnd// RawSyntaxStart: map ctrlMapAnimAdd [time, zoom, position] @@ -11863,6 +12270,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlMapAnimClear //WikiPageEnd// SyntaxStart: +ctrlMapAnimClear Control //SyntaxEnd// RawSyntaxStart: ctrlMapAnimClear controlName @@ -11890,6 +12298,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlMapAnimCommit //WikiPageEnd// SyntaxStart: +ctrlMapAnimCommit Control //SyntaxEnd// RawSyntaxStart: ctrlMapAnimCommit controlName @@ -11920,6 +12329,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlMapAnimDone //WikiPageEnd// SyntaxStart: +ctrlMapAnimDone Control //SyntaxEnd// RawSyntaxStart: ctrlMapAnimDone controlName @@ -11966,6 +12376,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlMapCursor //WikiPageEnd// SyntaxStart: +Control ctrlMapCursor Array //SyntaxEnd// RawSyntaxStart: control ctrlMapCursor [defaultCursor, newCursor] @@ -12033,6 +12444,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlMapMouseOver //WikiPageEnd// SyntaxStart: +ctrlMapMouseOver Control //SyntaxEnd// RawSyntaxStart: ctrlMapMouseOver control @@ -12079,6 +12491,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlMapScale //WikiPageEnd// SyntaxStart: +ctrlMapScale Control //SyntaxEnd// RawSyntaxStart: ctrlMapScale ctrl @@ -12108,6 +12521,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlMapScreenToWorld //WikiPageEnd// SyntaxStart: +Control ctrlMapScreenToWorld Array //SyntaxEnd// RawSyntaxStart: map ctrlMapScreenToWorld [x, y] @@ -12150,6 +12564,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlMapWorldToScreen //WikiPageEnd// SyntaxStart: +Control ctrlMapWorldToScreen Position //SyntaxEnd// RawSyntaxStart: control ctrlMapWorldToScreen position @@ -12184,6 +12599,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlModel //WikiPageEnd// SyntaxStart: +ctrlModel Control //SyntaxEnd// RawSyntaxStart: ctrlModel control @@ -12212,6 +12628,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlModelDirAndUp //WikiPageEnd// SyntaxStart: +ctrlModelDirAndUp Control //SyntaxEnd// RawSyntaxStart: ctrlModelDirAndUp control @@ -12240,6 +12657,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlModelScale //WikiPageEnd// SyntaxStart: +ctrlModelScale Control //SyntaxEnd// RawSyntaxStart: ctrlModelScale control @@ -12268,6 +12686,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlParent //WikiPageEnd// SyntaxStart: +ctrlParent Control //SyntaxEnd// RawSyntaxStart: ctrlParent controlName @@ -12296,6 +12715,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlPosition //WikiPageEnd// SyntaxStart: +ctrlPosition Control //SyntaxEnd// RawSyntaxStart: ctrlPosition controlName @@ -12324,6 +12744,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlRemoveAllEventHandlers //WikiPageEnd// SyntaxStart: +Control ctrlRemoveAllEventHandlers String //SyntaxEnd// RawSyntaxStart: control ctrlRemoveAllEventHandlers handlerName @@ -12351,6 +12772,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlRemoveEventHandler //WikiPageEnd// SyntaxStart: +Control ctrlRemoveEventHandler Array //SyntaxEnd// RawSyntaxStart: control ctrlRemoveEventHandler [handler name,id] @@ -12379,6 +12801,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlScale //WikiPageEnd// SyntaxStart: +ctrlScale Control //SyntaxEnd// RawSyntaxStart: ctrlScale controlName @@ -12407,6 +12830,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetActiveColor //WikiPageEnd// SyntaxStart: +Control ctrlSetActiveColor Array //SyntaxEnd// RawSyntaxStart: display ctrlSetActiveColor color @@ -12435,6 +12859,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetAutoScrollDelay //WikiPageEnd// SyntaxStart: +Control ctrlSetAutoScrollDelay Number //SyntaxEnd// RawSyntaxStart: control ctrlSetAutoScrollDelay delay @@ -12462,6 +12887,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetAutoScrollRewind //WikiPageEnd// SyntaxStart: +Control ctrlSetAutoScrollRewind Boolean //SyntaxEnd// RawSyntaxStart: control ctrlSetAutoScrollRewind delay @@ -12489,6 +12915,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetAutoScrollSpeed //WikiPageEnd// SyntaxStart: +Control ctrlSetAutoScrollSpeed Number //SyntaxEnd// RawSyntaxStart: control ctrlSetAutoScrollSpeed speed @@ -12516,6 +12943,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetBackgroundColor //WikiPageEnd// SyntaxStart: +Control ctrlSetBackgroundColor Array //SyntaxEnd// RawSyntaxStart: display ctrlSetBackgroundColor color @@ -12544,6 +12972,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetChecked //WikiPageEnd// SyntaxStart: +Control ctrlSetChecked Boolean //SyntaxEnd// RawSyntaxStart: control ctrlSetChecked bool @@ -12574,6 +13003,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetEventHandler //WikiPageEnd// SyntaxStart: +Control ctrlSetEventHandler Array //SyntaxEnd// RawSyntaxStart: controlName ctrlSetEventHandler [handlerName, function] @@ -12609,6 +13039,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFade //WikiPageEnd// SyntaxStart: +Control ctrlSetFade Number //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFade fade @@ -12645,6 +13076,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFocus //WikiPageEnd// SyntaxStart: +ctrlSetFocus Control //SyntaxEnd// RawSyntaxStart: ctrlSetFocus controlName @@ -12673,6 +13105,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFont //WikiPageEnd// SyntaxStart: +Control ctrlSetFont String //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFont fontName @@ -12701,6 +13134,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontH1 //WikiPageEnd// SyntaxStart: +Control ctrlSetFontH1 String //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontH1 fontName @@ -12729,6 +13163,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontH1B //WikiPageEnd// SyntaxStart: +Control ctrlSetFontH1B String //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontH1B fontName @@ -12757,6 +13192,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontH2 //WikiPageEnd// SyntaxStart: +Control ctrlSetFontH2 String //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontH2 fontName @@ -12785,6 +13221,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontH2B //WikiPageEnd// SyntaxStart: +Control ctrlSetFontH2B String //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontH2B fontName @@ -12813,6 +13250,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontH3 //WikiPageEnd// SyntaxStart: +Control ctrlSetFontH3 String //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontH3 fontName @@ -12841,6 +13279,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontH3B //WikiPageEnd// SyntaxStart: +Control ctrlSetFontH3B String //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontH3B fontName @@ -12869,6 +13308,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontH4 //WikiPageEnd// SyntaxStart: +Control ctrlSetFontH4 String //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontH4 fontName @@ -12897,6 +13337,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontH4B //WikiPageEnd// SyntaxStart: +Control ctrlSetFontH4B String //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontH4B fontName @@ -12925,6 +13366,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontH5 //WikiPageEnd// SyntaxStart: +Control ctrlSetFontH5 String //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontH5 fontName @@ -12953,6 +13395,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontH5B //WikiPageEnd// SyntaxStart: +Control ctrlSetFontH5B String //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontH5B fontName @@ -12981,6 +13424,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontH6 //WikiPageEnd// SyntaxStart: +Control ctrlSetFontH6 String //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontH6 fontName @@ -13009,6 +13453,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontH6B //WikiPageEnd// SyntaxStart: +Control ctrlSetFontH6B String //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontH6B fontName @@ -13037,6 +13482,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontHeight //WikiPageEnd// SyntaxStart: +Control ctrlSetFontHeight Number //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontHeight height @@ -13065,6 +13511,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontHeightH1 //WikiPageEnd// SyntaxStart: +Control ctrlSetFontHeightH1 Number //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontHeightH1 height @@ -13093,6 +13540,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontHeightH2 //WikiPageEnd// SyntaxStart: +Control ctrlSetFontHeightH2 Number //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontHeightH2 height @@ -13121,6 +13569,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontHeightH3 //WikiPageEnd// SyntaxStart: +Control ctrlSetFontHeightH3 Number //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontHeightH3 height @@ -13149,6 +13598,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontHeightH4 //WikiPageEnd// SyntaxStart: +Control ctrlSetFontHeightH4 Number //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontHeightH4 height @@ -13177,6 +13627,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontHeightH5 //WikiPageEnd// SyntaxStart: +Control ctrlSetFontHeightH5 Number //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontHeightH5 height @@ -13205,6 +13656,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontHeightH6 //WikiPageEnd// SyntaxStart: +Control ctrlSetFontHeightH6 Number //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontHeightH6 height @@ -13233,6 +13685,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontP //WikiPageEnd// SyntaxStart: +Control ctrlSetFontP String/Number //SyntaxEnd// RawSyntaxStart: control ctrlSetFontP fontOrSize @@ -13263,6 +13716,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetFontPB //WikiPageEnd// SyntaxStart: +Control ctrlSetFontPB String //SyntaxEnd// RawSyntaxStart: controlName ctrlSetFontPB fontName @@ -13291,6 +13745,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetForegroundColor //WikiPageEnd// SyntaxStart: +Control ctrlSetForegroundColor Array //SyntaxEnd// RawSyntaxStart: control ctrlSetForegroundColor color @@ -13319,6 +13774,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetModel //WikiPageEnd// SyntaxStart: +Control ctrlSetModel String //SyntaxEnd// RawSyntaxStart: control ctrlSetModel model @@ -13347,6 +13803,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetModelDirAndUp //WikiPageEnd// SyntaxStart: +Control ctrlSetModelDirAndUp Array //SyntaxEnd// RawSyntaxStart: control ctrlSetModelDirAndUp [dir, up] @@ -13375,6 +13832,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetModelScale //WikiPageEnd// SyntaxStart: +Control ctrlSetModelScale Number //SyntaxEnd// RawSyntaxStart: control ctrlSetModelScale scale @@ -13403,6 +13861,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetPosition //WikiPageEnd// SyntaxStart: +Control ctrlSetPosition Array //SyntaxEnd// RawSyntaxStart: controlName ctrlSetPosition [x, y] @@ -13446,6 +13905,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetScale //WikiPageEnd// SyntaxStart: +Control ctrlSetScale Number //SyntaxEnd// RawSyntaxStart: control ctrlSetScale scale @@ -13475,6 +13935,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetStructuredText //WikiPageEnd// SyntaxStart: +Control ctrlSetStructuredText StructuredText //SyntaxEnd// RawSyntaxStart: control ctrlSetStructuredText structuredText @@ -13513,6 +13974,9 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetText //WikiPageEnd// SyntaxStart: +ctrlSetText Array +%NextSyntax% +Control ctrlSetText String //SyntaxEnd// RawSyntaxStart: ctrlSetText [idc, text] @@ -13547,6 +14011,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetTextColor //WikiPageEnd// SyntaxStart: +Control ctrlSetTextColor Array //SyntaxEnd// RawSyntaxStart: display ctrlSetTextColor color @@ -13577,6 +14042,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetTooltip //WikiPageEnd// SyntaxStart: +Control ctrlSetTooltip String //SyntaxEnd// RawSyntaxStart: control ctrlSetTooltip text @@ -13607,6 +14073,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetTooltipColorBox //WikiPageEnd// SyntaxStart: +Control ctrlSetTooltipColorBox Array //SyntaxEnd// RawSyntaxStart: display ctrlSetTooltipColorBox color @@ -13635,6 +14102,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetTooltipColorShade //WikiPageEnd// SyntaxStart: +Control ctrlSetTooltipColorShade Array //SyntaxEnd// RawSyntaxStart: display ctrlSetTooltipColorShade color @@ -13663,6 +14131,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlSetTooltipColorText //WikiPageEnd// SyntaxStart: +Control ctrlSetTooltipColorText Array //SyntaxEnd// RawSyntaxStart: display ctrlSetTooltipColorText color @@ -13692,6 +14161,9 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlShow //WikiPageEnd// SyntaxStart: +ctrlShow Array +%NextSyntax% +Control ctrlShow Boolean //SyntaxEnd// RawSyntaxStart: ctrlShow [idc, show] @@ -13724,6 +14196,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlShown //WikiPageEnd// SyntaxStart: +ctrlShown Control //SyntaxEnd// RawSyntaxStart: ctrlShown controlName @@ -13753,6 +14226,9 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlText //WikiPageEnd// SyntaxStart: +ctrlText Number +%NextSyntax% +ctrlText Control //SyntaxEnd// RawSyntaxStart: ctrlText idc @@ -13788,6 +14264,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlTextHeight //WikiPageEnd// SyntaxStart: +ctrlTextHeight Control //SyntaxEnd// RawSyntaxStart: ctrlTextHeight control @@ -13816,6 +14293,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlType //WikiPageEnd// SyntaxStart: +ctrlType Control //SyntaxEnd// RawSyntaxStart: ctrlType control @@ -13844,6 +14322,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ctrlVisible //WikiPageEnd// SyntaxStart: +ctrlVisible Number //SyntaxEnd// RawSyntaxStart: ctrlVisible idc @@ -13872,6 +14351,7 @@ WikiPageStart: https://community.bistudio.com/wiki/curatorAddons //WikiPageEnd// SyntaxStart: +curatorAddons Object //SyntaxEnd// RawSyntaxStart: curatorAddons curatorObj @@ -13900,6 +14380,7 @@ WikiPageStart: https://community.bistudio.com/wiki/curatorCamera //WikiPageEnd// SyntaxStart: +curatorCamera //SyntaxEnd// RawSyntaxStart: curatorCamera @@ -13927,6 +14408,7 @@ WikiPageStart: https://community.bistudio.com/wiki/curatorCameraArea //WikiPageEnd// SyntaxStart: +curatorCameraArea Object //SyntaxEnd// RawSyntaxStart: curatorCameraArea curatorObj @@ -13955,6 +14437,7 @@ WikiPageStart: https://community.bistudio.com/wiki/curatorCameraAreaCeiling //WikiPageEnd// SyntaxStart: +curatorCameraAreaCeiling Object //SyntaxEnd// RawSyntaxStart: curatorCameraAreaCeiling curatorObj @@ -13983,6 +14466,7 @@ WikiPageStart: https://community.bistudio.com/wiki/curatorCoef //WikiPageEnd// SyntaxStart: +Object curatorCoef String //SyntaxEnd// RawSyntaxStart: curatorObj curatorCoef action @@ -14011,6 +14495,7 @@ WikiPageStart: https://community.bistudio.com/wiki/curatorEditableObjects //WikiPageEnd// SyntaxStart: +curatorEditableObjects Object //SyntaxEnd// RawSyntaxStart: curatorEditableObjects curatorObj @@ -14040,6 +14525,7 @@ WikiPageStart: https://community.bistudio.com/wiki/curatorEditingArea //WikiPageEnd// SyntaxStart: +curatorEditingArea Object //SyntaxEnd// RawSyntaxStart: curatorEditingArea curatorObj @@ -14068,6 +14554,7 @@ WikiPageStart: https://community.bistudio.com/wiki/curatorEditingAreaType //WikiPageEnd// SyntaxStart: +curatorEditingAreaType Object //SyntaxEnd// RawSyntaxStart: curatorEditingAreaType obj @@ -14098,6 +14585,7 @@ WikiPageStart: https://community.bistudio.com/wiki/curatorMouseOver //WikiPageEnd// SyntaxStart: +curatorMouseOver //SyntaxEnd// RawSyntaxStart: curatorMouseOver @@ -14130,6 +14618,7 @@ WikiPageStart: https://community.bistudio.com/wiki/curatorPoints //WikiPageEnd// SyntaxStart: +curatorPoints Object //SyntaxEnd// RawSyntaxStart: curatorPoints curatorObj @@ -14158,6 +14647,7 @@ WikiPageStart: https://community.bistudio.com/wiki/curatorRegisteredObjects //WikiPageEnd// SyntaxStart: +curatorRegisteredObjects Object //SyntaxEnd// RawSyntaxStart: curatorRegisteredObjects curatorObj @@ -14185,6 +14675,7 @@ WikiPageStart: https://community.bistudio.com/wiki/curatorSelected //WikiPageEnd// SyntaxStart: +curatorSelected //SyntaxEnd// RawSyntaxStart: curatorSelected @@ -14213,6 +14704,7 @@ WikiPageStart: https://community.bistudio.com/wiki/curatorWaypointCost //WikiPageEnd// SyntaxStart: +curatorWaypointCost Object //SyntaxEnd// RawSyntaxStart: curatorWaypointCost curatorObj @@ -14240,6 +14732,7 @@ WikiPageStart: https://community.bistudio.com/wiki/current3DENOperation //WikiPageEnd// SyntaxStart: +current3DENOperation //SyntaxEnd// RawSyntaxStart: current3DENOperation @@ -14275,6 +14768,7 @@ WikiPageStart: https://community.bistudio.com/wiki/currentChannel //WikiPageEnd// SyntaxStart: +currentChannel //SyntaxEnd// RawSyntaxStart: currentChannel @@ -14304,6 +14798,7 @@ WikiPageStart: https://community.bistudio.com/wiki/currentCommand //WikiPageEnd// SyntaxStart: +currentCommand Object //SyntaxEnd// RawSyntaxStart: currentCommand vehicleName @@ -14331,6 +14826,7 @@ WikiPageStart: https://community.bistudio.com/wiki/currentMagazine //WikiPageEnd// SyntaxStart: +currentMagazine Object //SyntaxEnd// RawSyntaxStart: currentMagazine vehicle @@ -14361,6 +14857,7 @@ WikiPageStart: https://community.bistudio.com/wiki/currentMagazineDetail //WikiPageEnd// SyntaxStart: +currentMagazineDetail Object //SyntaxEnd// RawSyntaxStart: currentMagazineDetail vehicle @@ -14394,6 +14891,7 @@ WikiPageStart: https://community.bistudio.com/wiki/currentMagazineDetailTurret //WikiPageEnd// SyntaxStart: +Object currentMagazineDetailTurret Array //SyntaxEnd// RawSyntaxStart: vehicle currentMagazineDetailTurret [turret path] @@ -14422,6 +14920,7 @@ WikiPageStart: https://community.bistudio.com/wiki/currentMagazineTurret //WikiPageEnd// SyntaxStart: +Object currentMagazineTurret Array //SyntaxEnd// RawSyntaxStart: vehicle currentMagazineTurret [turret path] @@ -14450,6 +14949,7 @@ WikiPageStart: https://community.bistudio.com/wiki/currentMuzzle //WikiPageEnd// SyntaxStart: +currentMuzzle Object //SyntaxEnd// RawSyntaxStart: currentMuzzle gunner @@ -14485,6 +14985,7 @@ WikiPageStart: https://community.bistudio.com/wiki/currentNamespace //WikiPageEnd// SyntaxStart: +currentNamespace //SyntaxEnd// RawSyntaxStart: currentNamespace @@ -14513,6 +15014,7 @@ WikiPageStart: https://community.bistudio.com/wiki/currentTask //WikiPageEnd// SyntaxStart: +currentTask Object //SyntaxEnd// RawSyntaxStart: currentTask person @@ -14540,6 +15042,7 @@ WikiPageStart: https://community.bistudio.com/wiki/currentTasks //WikiPageEnd// SyntaxStart: +currentTasks TeamMember //SyntaxEnd// RawSyntaxStart: currentTasks member @@ -14569,6 +15072,7 @@ WikiPageStart: https://community.bistudio.com/wiki/currentThrowable //WikiPageEnd// SyntaxStart: +currentThrowable Object //SyntaxEnd// RawSyntaxStart: currentThrowable player @@ -14597,12 +15101,13 @@ DescriptionStart: Returns current vision mode of unit's weapon. 0 - daytime 1 - night vision -2 - FLIR +2 - thermal vision //DescriptionEnd// WikiPageStart: https://community.bistudio.com/wiki/currentVisionMode //WikiPageEnd// SyntaxStart: +currentVisionMode Object //SyntaxEnd// RawSyntaxStart: currentVisionMode unit @@ -14619,6 +15124,8 @@ LocalityStart: global / undefined //LocalityEnd// NoteStart: +(April 29, 2016) +The return value is somewhat erratic for UAVs. For example, if you are connected to a UAV, with the turret set to thermal vision and PIP feed enabled, "currentVisionMode gunner _uav" returns 2 when controlling the turret, but returns 0 after releasing control, even thought the PIP feed is still in thermal mode. WIth nightvision, it will return 1 whether or not you are controlling the turret, but if you switch from 1st to 3rd person before releasing control, then it returns 0 afterwards... //NoteEnd// ReturnValueStart: Number @@ -14640,6 +15147,7 @@ WikiPageStart: https://community.bistudio.com/wiki/currentWaypoint //WikiPageEnd// SyntaxStart: +currentWaypoint Group //SyntaxEnd// RawSyntaxStart: currentWaypoint groupName @@ -14668,6 +15176,7 @@ WikiPageStart: https://community.bistudio.com/wiki/currentWeapon //WikiPageEnd// SyntaxStart: +currentWeapon Object //SyntaxEnd// RawSyntaxStart: currentWeapon vehicle @@ -14706,6 +15215,7 @@ WikiPageStart: https://community.bistudio.com/wiki/currentWeaponMode //WikiPageEnd// SyntaxStart: +currentWeaponMode Object //SyntaxEnd// RawSyntaxStart: currentWeaponMode gunner @@ -14743,6 +15253,7 @@ WikiPageStart: https://community.bistudio.com/wiki/currentWeaponTurret //WikiPageEnd// SyntaxStart: +Object currentWeaponTurret Array //SyntaxEnd// RawSyntaxStart: vehicle currentWeaponTurret [turret path] @@ -14771,6 +15282,7 @@ WikiPageStart: https://community.bistudio.com/wiki/currentZeroing //WikiPageEnd// SyntaxStart: +currentZeroing Object //SyntaxEnd// RawSyntaxStart: currentZeroing gunner @@ -14799,6 +15311,7 @@ WikiPageStart: https://community.bistudio.com/wiki/cursorObject //WikiPageEnd// SyntaxStart: +cursorObject //SyntaxEnd// RawSyntaxStart: cursorObject @@ -14831,6 +15344,7 @@ WikiPageStart: https://community.bistudio.com/wiki/cursorTarget //WikiPageEnd// SyntaxStart: +cursorTarget //SyntaxEnd// RawSyntaxStart: cursorTarget @@ -14884,6 +15398,7 @@ WikiPageStart: https://community.bistudio.com/wiki/customChat //WikiPageEnd// SyntaxStart: +Object customChat Array //SyntaxEnd// RawSyntaxStart: unit customChat [channel, message] @@ -14920,6 +15435,7 @@ WikiPageStart: https://community.bistudio.com/wiki/customRadio //WikiPageEnd// SyntaxStart: +Object customRadio Array //SyntaxEnd// RawSyntaxStart: unit customRadio [channel, message] @@ -14949,6 +15465,9 @@ WikiPageStart: https://community.bistudio.com/wiki/cutFadeOut //WikiPageEnd// SyntaxStart: +Number cutFadeOut +%NextSyntax% +String cutFadeOut Number //SyntaxEnd// RawSyntaxStart: layer cutFadeOut duration @@ -14982,6 +15501,11 @@ WikiPageStart: https://community.bistudio.com/wiki/cutObj //WikiPageEnd// SyntaxStart: +cutObj Array +%NextSyntax% +Number cutObj Array +%NextSyntax% +String cutObj Array //SyntaxEnd// RawSyntaxStart: cutObj [class, type, speed, showOnMap] @@ -15020,6 +15544,11 @@ WikiPageStart: https://community.bistudio.com/wiki/cutRsc //WikiPageEnd// SyntaxStart: +cutRsc Array +%NextSyntax% +Number cutRsc Array +%NextSyntax% +String cutRsc Array //SyntaxEnd// RawSyntaxStart: cutRsc [class, type, speed, showOnMap] @@ -15049,15 +15578,15 @@ using the 'Direct communication' chat channel messages will not interfere with t (17 Oct, 2013) Regarding removing current resource with cutRsc ["Default", "PLAIN"]. If it does't work and it gives you error message that "Default" is not found, add it by yourself to RscTitles in description.ext so it looks like this: class RscTitles - +{ class Default - +{ idd = - 1 ; fadein = 0 ; fadeout = 0 ; duration = 0 ; -; -; +} ; +} ; Alternatively, you can use cutText, yes cutText command to cancel your resources. As Karel Moricky explains: "All 'cut' commands are in the same layer, the same as all 'title' commands are in another one." So to remove cutRsc resource execute cutText on the same layer: $Code$ cutRsc ["myRsc", "PLAIN"]; //show cutText ["", "PLAIN"]; //remove$/Code$ @@ -15085,6 +15614,11 @@ WikiPageStart: https://community.bistudio.com/wiki/cutText //WikiPageEnd// SyntaxStart: +cutText Array +%NextSyntax% +Number cutText Array +%NextSyntax% +String cutText Array //SyntaxEnd// RawSyntaxStart: cutText [text, type, speed, showOnMap] @@ -15125,6 +15659,7 @@ WikiPageStart: https://community.bistudio.com/wiki/damage //WikiPageEnd// SyntaxStart: +damage Object //SyntaxEnd// RawSyntaxStart: damage object @@ -15159,6 +15694,7 @@ WikiPageStart: https://community.bistudio.com/wiki/date //WikiPageEnd// SyntaxStart: +date //SyntaxEnd// RawSyntaxStart: date @@ -15198,6 +15734,7 @@ WikiPageStart: https://community.bistudio.com/wiki/dateToNumber //WikiPageEnd// SyntaxStart: +dateToNumber Array //SyntaxEnd// RawSyntaxStart: dateToNumber date @@ -15241,6 +15778,7 @@ WikiPageStart: https://community.bistudio.com/wiki/daytime //WikiPageEnd// SyntaxStart: +daytime //SyntaxEnd// RawSyntaxStart: daytime @@ -15281,6 +15819,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deActivateKey //WikiPageEnd// SyntaxStart: +deActivateKey String //SyntaxEnd// RawSyntaxStart: deActivateKey keyname @@ -15309,6 +15848,7 @@ WikiPageStart: https://community.bistudio.com/wiki/debriefingText //WikiPageEnd// SyntaxStart: +debriefingText String //SyntaxEnd// RawSyntaxStart: debriefingText end @@ -15338,6 +15878,7 @@ WikiPageStart: https://community.bistudio.com/wiki/debugFSM //WikiPageEnd// SyntaxStart: +Number debugFSM Boolean //SyntaxEnd// RawSyntaxStart: FSMhandle debugFSM true @@ -15366,6 +15907,7 @@ WikiPageStart: https://community.bistudio.com/wiki/debugLog //WikiPageEnd// SyntaxStart: +debugLog Anything //SyntaxEnd// RawSyntaxStart: debugLog anything @@ -15393,6 +15935,21 @@ See switch do. WikiPageStart: https://community.bistudio.com/wiki/default //WikiPageEnd// +SyntaxStart: +default rigthConstruct +//SyntaxEnd// +RawSyntaxStart: +//RawSyntaxEnd// +ExampleStart: +//ExampleEnd// +LocalityStart: +undefined / undefined +//LocalityEnd// +NoteStart: +//NoteEnd// +ReturnValueStart: +Nothing +//ReturnValueEnd// %NextListItem% @@ -15406,6 +15963,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deg //WikiPageEnd// SyntaxStart: +deg Number //SyntaxEnd// RawSyntaxStart: deg x @@ -15435,6 +15993,7 @@ WikiPageStart: https://community.bistudio.com/wiki/delete3DENEntities //WikiPageEnd// SyntaxStart: +delete3DENEntities Array //SyntaxEnd// RawSyntaxStart: delete3DENEntities entities @@ -15464,6 +16023,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deleteAt //WikiPageEnd// SyntaxStart: +Array deleteAt Number //SyntaxEnd// RawSyntaxStart: array deleteAt index @@ -15519,6 +16079,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deleteCenter //WikiPageEnd// SyntaxStart: +deleteCenter Side //SyntaxEnd// RawSyntaxStart: deleteCenter side @@ -15548,6 +16109,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deleteCollection //WikiPageEnd// SyntaxStart: +deleteCollection Object //SyntaxEnd// RawSyntaxStart: deleteCollection object @@ -15578,6 +16140,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deleteEditorObject //WikiPageEnd// SyntaxStart: +Control deleteEditorObject String //SyntaxEnd// RawSyntaxStart: map deleteEditorObject object @@ -15607,6 +16170,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deleteGroup //WikiPageEnd// SyntaxStart: +deleteGroup Group //SyntaxEnd// RawSyntaxStart: deleteGroup group @@ -15643,6 +16207,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deleteIdentity //WikiPageEnd// SyntaxStart: +deleteIdentity String //SyntaxEnd// RawSyntaxStart: deleteIdentity identityName @@ -15671,6 +16236,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deleteLocation //WikiPageEnd// SyntaxStart: +deleteLocation Location //SyntaxEnd// RawSyntaxStart: deleteLocation location @@ -15699,6 +16265,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deleteMarker //WikiPageEnd// SyntaxStart: +deleteMarker String //SyntaxEnd// RawSyntaxStart: deleteMarker name @@ -15727,6 +16294,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deleteMarkerLocal //WikiPageEnd// SyntaxStart: +deleteMarkerLocal String //SyntaxEnd// RawSyntaxStart: deleteMarkerLocal markerName @@ -15757,6 +16325,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deleteRange //WikiPageEnd// SyntaxStart: +Array deleteRange //SyntaxEnd// RawSyntaxStart: array deleteRange [from, count] @@ -15787,6 +16356,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deleteResources //WikiPageEnd// SyntaxStart: +TeamMember deleteResources Array //SyntaxEnd// RawSyntaxStart: teamMember deleteResources [resource1, resource2,...] @@ -15816,6 +16386,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deleteSite //WikiPageEnd// SyntaxStart: +deleteSite Object //SyntaxEnd// RawSyntaxStart: deleteSite site @@ -15843,6 +16414,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deleteStatus //WikiPageEnd// SyntaxStart: +deleteStatus String //SyntaxEnd// RawSyntaxStart: deleteStatus statusName @@ -15871,6 +16443,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deleteTeam //WikiPageEnd// SyntaxStart: +deleteTeam TeamMember //SyntaxEnd// RawSyntaxStart: deleteTeam team @@ -15901,6 +16474,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deleteVehicle //WikiPageEnd// SyntaxStart: +deleteVehicle Object //SyntaxEnd// RawSyntaxStart: deleteVehicle object @@ -15959,6 +16533,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deleteVehicleCrew //WikiPageEnd// SyntaxStart: +Object deleteVehicleCrew //SyntaxEnd// RawSyntaxStart: vehicle deleteVehicleCrew unit @@ -15993,6 +16568,7 @@ WikiPageStart: https://community.bistudio.com/wiki/deleteWaypoint //WikiPageEnd// SyntaxStart: +deleteWaypoint Array //SyntaxEnd// RawSyntaxStart: deleteWaypoint [group, index] @@ -16022,10 +16598,6 @@ while {( count ( waypoints _group)) 0} do { deleteWaypoint (( waypoints _group) select 0); };$/Code$ -%NextNote% -(13 Mar, 2012) -You can also remove all waypoints with -$Code$ deleteWaypoint [_group, all];$/Code$ //NoteEnd// ReturnValueStart: Nothing @@ -16043,6 +16615,7 @@ WikiPageStart: https://community.bistudio.com/wiki/detach //WikiPageEnd// SyntaxStart: +detach Object //SyntaxEnd// RawSyntaxStart: detach object @@ -16072,6 +16645,7 @@ WikiPageStart: https://community.bistudio.com/wiki/detectedMines //WikiPageEnd// SyntaxStart: +detectedMines side //SyntaxEnd// RawSyntaxStart: detectedMines side @@ -16102,6 +16676,7 @@ WikiPageStart: https://community.bistudio.com/wiki/diag_activeMissionFSMs //WikiPageEnd// SyntaxStart: +diag_activeMissionFSMs //SyntaxEnd// RawSyntaxStart: diag_activeMissionFSMs @@ -16130,6 +16705,7 @@ WikiPageStart: https://community.bistudio.com/wiki/diag_activeSQFScripts //WikiPageEnd// SyntaxStart: +diag_activeSQFScripts //SyntaxEnd// RawSyntaxStart: diag_activeSQFScripts @@ -16166,6 +16742,7 @@ WikiPageStart: https://community.bistudio.com/wiki/diag_activeSQSScripts //WikiPageEnd// SyntaxStart: +diag_activeSQSScripts //SyntaxEnd// RawSyntaxStart: diag_activeSQSScripts @@ -16195,6 +16772,7 @@ WikiPageStart: https://community.bistudio.com/wiki/diag_captureFrame //WikiPageEnd// SyntaxStart: +diag_captureFrame Number //SyntaxEnd// RawSyntaxStart: diag_captureFrame frame @@ -16235,6 +16813,7 @@ WikiPageStart: https://community.bistudio.com/wiki/diag_captureSlowFrame //WikiPageEnd// SyntaxStart: +diag_captureSlowFrame Array //SyntaxEnd// RawSyntaxStart: diag_captureSlowFrame [section, threshold] @@ -16265,6 +16844,7 @@ WikiPageStart: https://community.bistudio.com/wiki/diag_codePerformance //WikiPageEnd// SyntaxStart: +diag_codePerformance Array //SyntaxEnd// RawSyntaxStart: diag_codePerformance [code, arguments, cycles] @@ -16276,6 +16856,8 @@ LocalityStart: undefined / undefined //LocalityEnd// NoteStart: +(May 5, 2016) +In MP this command execution is limited to 1 cycle only for security reasons. For the same reason it is not possible to execute command inside itself: diag_codePerformance [{diag_codePerformance [{}]}] //NoteEnd// ReturnValueStart: Array - format [duration, cycles], where: @@ -16293,6 +16875,7 @@ WikiPageStart: https://community.bistudio.com/wiki/diag_fps //WikiPageEnd// SyntaxStart: +diag_fps //SyntaxEnd// RawSyntaxStart: diag_fps @@ -16323,6 +16906,7 @@ WikiPageStart: https://community.bistudio.com/wiki/diag_fpsMin //WikiPageEnd// SyntaxStart: +diag_fpsMin //SyntaxEnd// RawSyntaxStart: diag_fpsMin @@ -16351,6 +16935,7 @@ WikiPageStart: https://community.bistudio.com/wiki/diag_frameNo //WikiPageEnd// SyntaxStart: +diag_frameNo //SyntaxEnd// RawSyntaxStart: diag_frameNo @@ -16381,6 +16966,7 @@ WikiPageStart: https://community.bistudio.com/wiki/diag_log //WikiPageEnd// SyntaxStart: +diag_log Anything //SyntaxEnd// RawSyntaxStart: diag_log anything @@ -16439,6 +17025,7 @@ WikiPageStart: https://community.bistudio.com/wiki/diag_logSlowFrame //WikiPageEnd// SyntaxStart: +diag_logSlowFrame Array //SyntaxEnd// RawSyntaxStart: diag_logSlowFrame [section, threshold] @@ -16467,6 +17054,7 @@ WikiPageStart: https://community.bistudio.com/wiki/diag_tickTime //WikiPageEnd// SyntaxStart: +diag_tickTime //SyntaxEnd// RawSyntaxStart: diag_tickTime @@ -16503,6 +17091,7 @@ WikiPageStart: https://community.bistudio.com/wiki/dialog //WikiPageEnd// SyntaxStart: +dialog //SyntaxEnd// RawSyntaxStart: dialog @@ -16531,6 +17120,7 @@ WikiPageStart: https://community.bistudio.com/wiki/diarySubjectExists //WikiPageEnd// SyntaxStart: +Object diarySubjectExists String //SyntaxEnd// RawSyntaxStart: person diarySubjectExists name @@ -16558,6 +17148,7 @@ WikiPageStart: https://community.bistudio.com/wiki/didJIP //WikiPageEnd// SyntaxStart: +didJIP //SyntaxEnd// RawSyntaxStart: didJIP @@ -16588,6 +17179,7 @@ WikiPageStart: https://community.bistudio.com/wiki/didJIPOwner //WikiPageEnd// SyntaxStart: +didJIPOwner Object //SyntaxEnd// RawSyntaxStart: didJIPOwner object @@ -16618,6 +17210,7 @@ WikiPageStart: https://community.bistudio.com/wiki/difficulty //WikiPageEnd// SyntaxStart: +difficulty //SyntaxEnd// RawSyntaxStart: difficulty @@ -16657,6 +17250,7 @@ WikiPageStart: https://community.bistudio.com/wiki/difficultyEnabled //WikiPageEnd// SyntaxStart: +difficultyEnabled String //SyntaxEnd// RawSyntaxStart: difficultyEnabled flagName @@ -16762,6 +17356,7 @@ WikiPageStart: https://community.bistudio.com/wiki/difficultyEnabledRTD //WikiPageEnd// SyntaxStart: +difficultyEnabledRTD //SyntaxEnd// RawSyntaxStart: difficultyEnabledRTD @@ -16792,6 +17387,7 @@ WikiPageStart: https://community.bistudio.com/wiki/difficultyOption //WikiPageEnd// SyntaxStart: +difficultyOption String //SyntaxEnd// RawSyntaxStart: difficultyOption optionName @@ -16842,6 +17438,7 @@ WikiPageStart: https://community.bistudio.com/wiki/direction //WikiPageEnd// SyntaxStart: +direction Object/Location //SyntaxEnd// RawSyntaxStart: direction object @@ -16871,6 +17468,7 @@ WikiPageStart: https://community.bistudio.com/wiki/directSay //WikiPageEnd// SyntaxStart: +Object directSay String //SyntaxEnd// RawSyntaxStart: unit directSay radioName @@ -16905,6 +17503,7 @@ Possible values are: "CHECKVISIBLE" - disables visibility raycasts Available only since Arma 3 v1.54. "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// @@ -16912,6 +17511,7 @@ WikiPageStart: https://community.bistudio.com/wiki/disableAI //WikiPageEnd// SyntaxStart: +Object disableAI String //SyntaxEnd// RawSyntaxStart: unitName disableAI section @@ -16963,6 +17563,7 @@ WikiPageStart: https://community.bistudio.com/wiki/disableCollisionWith //WikiPageEnd// SyntaxStart: +Object disableCollisionWith //SyntaxEnd// RawSyntaxStart: vehicle disableCollisionWith vehicle @@ -16999,6 +17600,7 @@ WikiPageStart: https://community.bistudio.com/wiki/disableConversation //WikiPageEnd// SyntaxStart: +Object disableConversation Boolean //SyntaxEnd// RawSyntaxStart: unitName disableConversation disable @@ -17038,6 +17640,7 @@ WikiPageStart: https://community.bistudio.com/wiki/disableDebriefingStats //WikiPageEnd// SyntaxStart: +disableDebriefingStats //SyntaxEnd// RawSyntaxStart: disableDebriefingStats @@ -17066,6 +17669,7 @@ WikiPageStart: https://community.bistudio.com/wiki/disableNVGEquipment //WikiPageEnd// SyntaxStart: +Object disableNVGEquipment Boolean //SyntaxEnd// RawSyntaxStart: vehicle disableNVGEquipment state @@ -17095,6 +17699,7 @@ WikiPageStart: https://community.bistudio.com/wiki/disableRemoteSensors //WikiPageEnd// SyntaxStart: +disableRemoteSensors Boolean //SyntaxEnd// RawSyntaxStart: disableRemoteSensors state @@ -17123,6 +17728,7 @@ WikiPageStart: https://community.bistudio.com/wiki/disableSerialization //WikiPageEnd// SyntaxStart: +disableSerialization //SyntaxEnd// RawSyntaxStart: disableSerialization @@ -17167,6 +17773,7 @@ WikiPageStart: https://community.bistudio.com/wiki/disableTIEquipment //WikiPageEnd// SyntaxStart: +Object disableTIEquipment Boolean //SyntaxEnd// RawSyntaxStart: vehicle disableTIEquipment state @@ -17197,6 +17804,7 @@ WikiPageStart: https://community.bistudio.com/wiki/disableUAVConnectability //WikiPageEnd// SyntaxStart: +Object disableUAVConnectability Array //SyntaxEnd// RawSyntaxStart: object disableUAVConnectability [uav, checkAllItems] @@ -17226,6 +17834,7 @@ WikiPageStart: https://community.bistudio.com/wiki/disableUserInput //WikiPageEnd// SyntaxStart: +disableUserInput Boolean //SyntaxEnd// RawSyntaxStart: disableUserInput state @@ -17268,6 +17877,7 @@ WikiPageStart: https://community.bistudio.com/wiki/displayAddEventHandler //WikiPageEnd// SyntaxStart: +Display displayAddEventHandler Array //SyntaxEnd// RawSyntaxStart: display displayAddEventHandler [eventName, code] @@ -17315,6 +17925,7 @@ WikiPageStart: https://community.bistudio.com/wiki/displayCtrl //WikiPageEnd// SyntaxStart: +Display displayCtrl Number //SyntaxEnd// RawSyntaxStart: display displayCtrl idc @@ -17346,6 +17957,7 @@ WikiPageStart: https://community.bistudio.com/wiki/displayNull //WikiPageEnd// SyntaxStart: +displayNull //SyntaxEnd// RawSyntaxStart: displayNull @@ -17376,6 +17988,7 @@ WikiPageStart: https://community.bistudio.com/wiki/displayParent //WikiPageEnd// SyntaxStart: +displayParent Display //SyntaxEnd// RawSyntaxStart: displayParent display @@ -17404,6 +18017,7 @@ WikiPageStart: https://community.bistudio.com/wiki/displayRemoveAllEventHandlers //WikiPageEnd// SyntaxStart: +Display displayRemoveAllEventHandlers String //SyntaxEnd// RawSyntaxStart: display displayRemoveAllEventHandlers handlerName @@ -17431,6 +18045,7 @@ WikiPageStart: https://community.bistudio.com/wiki/displayRemoveEventHandler //WikiPageEnd// SyntaxStart: +Display displayRemoveEventHandler Array //SyntaxEnd// RawSyntaxStart: display displayRemoveEventHandler [handler name,id] @@ -17466,6 +18081,7 @@ WikiPageStart: https://community.bistudio.com/wiki/displaySetEventHandler //WikiPageEnd// SyntaxStart: +Display displaySetEventHandler Array //SyntaxEnd// RawSyntaxStart: display displaySetEventHandler [handlerName, function] @@ -17514,6 +18130,7 @@ WikiPageStart: https://community.bistudio.com/wiki/dissolveTeam //WikiPageEnd// SyntaxStart: +dissolveTeam String //SyntaxEnd// RawSyntaxStart: dissolveTeam teamColor @@ -17543,6 +18160,9 @@ WikiPageStart: https://community.bistudio.com/wiki/distance //WikiPageEnd// SyntaxStart: +Object/Array distance +%NextSyntax% +Location/Array distance //SyntaxEnd// RawSyntaxStart: param1 distance param2 @@ -17595,6 +18215,7 @@ WikiPageStart: https://community.bistudio.com/wiki/distance2D //WikiPageEnd// SyntaxStart: +Object/Array distance2D //SyntaxEnd// RawSyntaxStart: param1 distance2D param2 @@ -17623,6 +18244,7 @@ WikiPageStart: https://community.bistudio.com/wiki/distanceSqr //WikiPageEnd// SyntaxStart: +Object/Position distanceSqr //SyntaxEnd// RawSyntaxStart: var1 distanceSqr var2 @@ -17660,6 +18282,7 @@ WikiPageStart: https://community.bistudio.com/wiki/distributionRegion //WikiPageEnd// SyntaxStart: +distributionRegion //SyntaxEnd// RawSyntaxStart: distributionRegion @@ -17687,6 +18310,21 @@ Executes code. Used as part of construct, such as while, with, for and switch. T WikiPageStart: https://community.bistudio.com/wiki/do //WikiPageEnd// +SyntaxStart: +leftConstruct do rigthConstruct +//SyntaxEnd// +RawSyntaxStart: +//RawSyntaxEnd// +ExampleStart: +//ExampleEnd// +LocalityStart: +undefined / undefined +//LocalityEnd// +NoteStart: +//NoteEnd// +ReturnValueStart: +Nothing +//ReturnValueEnd// %NextListItem% @@ -17701,6 +18339,7 @@ WikiPageStart: https://community.bistudio.com/wiki/do3DENAction //WikiPageEnd// SyntaxStart: +do3DENAction String //SyntaxEnd// RawSyntaxStart: do3DENAction action @@ -17729,6 +18368,7 @@ WikiPageStart: https://community.bistudio.com/wiki/doArtilleryFire //WikiPageEnd// SyntaxStart: +Object doArtilleryFire Array //SyntaxEnd// RawSyntaxStart: unit doArtilleryFire [position, type, rounds] @@ -17759,6 +18399,7 @@ WikiPageStart: https://community.bistudio.com/wiki/doFire //WikiPageEnd// SyntaxStart: +Object/Array doFire Object //SyntaxEnd// RawSyntaxStart: unitName doFire target @@ -17799,6 +18440,7 @@ WikiPageStart: https://community.bistudio.com/wiki/doFollow //WikiPageEnd// SyntaxStart: +Object/Array doFollow Object //SyntaxEnd// RawSyntaxStart: unitName doFollow unitName2 @@ -17837,6 +18479,7 @@ WikiPageStart: https://community.bistudio.com/wiki/doFSM //WikiPageEnd// SyntaxStart: +Object/Array doFSM Array //SyntaxEnd// RawSyntaxStart: unit doFSM [fsmName, position, target] @@ -17872,6 +18515,7 @@ WikiPageStart: https://community.bistudio.com/wiki/doGetOut //WikiPageEnd// SyntaxStart: +doGetOut Object/Array //SyntaxEnd// RawSyntaxStart: doGetOut unit @@ -17900,6 +18544,7 @@ WikiPageStart: https://community.bistudio.com/wiki/doMove //WikiPageEnd// SyntaxStart: +Object/Array doMove Array //SyntaxEnd// RawSyntaxStart: unit doMove position @@ -17936,6 +18581,7 @@ WikiPageStart: https://community.bistudio.com/wiki/doorPhase //WikiPageEnd// SyntaxStart: +Object doorPhase String //SyntaxEnd// RawSyntaxStart: object doorPhase door @@ -17965,6 +18611,7 @@ WikiPageStart: https://community.bistudio.com/wiki/doStop //WikiPageEnd// SyntaxStart: +doStop Object/Array //SyntaxEnd// RawSyntaxStart: doStop unit @@ -18004,6 +18651,7 @@ WikiPageStart: https://community.bistudio.com/wiki/doTarget //WikiPageEnd// SyntaxStart: +Object/Array doTarget Object //SyntaxEnd// RawSyntaxStart: unit doTarget target @@ -18036,6 +18684,9 @@ WikiPageStart: https://community.bistudio.com/wiki/doWatch //WikiPageEnd// SyntaxStart: +Object/Array doWatch Array +%NextSyntax% +Object/Array doWatch Object //SyntaxEnd// RawSyntaxStart: unit doWatch position @@ -18072,6 +18723,7 @@ WikiPageStart: https://community.bistudio.com/wiki/drawArrow //WikiPageEnd// SyntaxStart: +Control drawArrow Array //SyntaxEnd// RawSyntaxStart: map drawArrow [from, to, color] @@ -18107,6 +18759,7 @@ WikiPageStart: https://community.bistudio.com/wiki/drawEllipse //WikiPageEnd// SyntaxStart: +Control drawEllipse Array //SyntaxEnd// RawSyntaxStart: map drawEllipse [c, a, b, angle, color, fill] @@ -18148,6 +18801,7 @@ WikiPageStart: https://community.bistudio.com/wiki/drawIcon //WikiPageEnd// SyntaxStart: +Control drawIcon Array //SyntaxEnd// RawSyntaxStart: map drawIcon [texture, color, position, width, height, angle, text, shadow, textSize, font, align] @@ -18209,6 +18863,7 @@ WikiPageStart: https://community.bistudio.com/wiki/drawIcon3D //WikiPageEnd// SyntaxStart: +drawIcon3D Array //SyntaxEnd// RawSyntaxStart: drawIcon3D [texture, color, pos, width, height, angle, text, shadow, textSize, font, textAlign, drawSideArrows] @@ -18316,6 +18971,7 @@ WikiPageStart: https://community.bistudio.com/wiki/drawLine //WikiPageEnd// SyntaxStart: +Control drawLine Array //SyntaxEnd// RawSyntaxStart: map drawLine [position1, position2, color] @@ -18352,6 +19008,7 @@ WikiPageStart: https://community.bistudio.com/wiki/drawLine3D //WikiPageEnd// SyntaxStart: +drawLine3D Array //SyntaxEnd// RawSyntaxStart: drawLine3D [start, end, color] @@ -18390,6 +19047,7 @@ WikiPageStart: https://community.bistudio.com/wiki/drawLink //WikiPageEnd// SyntaxStart: +Control drawLink Array //SyntaxEnd// RawSyntaxStart: map drawLink [from,to,param type,line type,color] @@ -18417,6 +19075,7 @@ WikiPageStart: https://community.bistudio.com/wiki/drawLocation //WikiPageEnd// SyntaxStart: +Control drawLocation Location //SyntaxEnd// RawSyntaxStart: control drawLocation location @@ -18444,6 +19103,7 @@ WikiPageStart: https://community.bistudio.com/wiki/drawPolygon //WikiPageEnd// SyntaxStart: +Control drawPolygon Array //SyntaxEnd// RawSyntaxStart: map drawPolygon [polygon, color] @@ -18480,6 +19140,7 @@ WikiPageStart: https://community.bistudio.com/wiki/drawRectangle //WikiPageEnd// SyntaxStart: +Control drawRectangle Array //SyntaxEnd// RawSyntaxStart: map drawRectangle [c, a, b, angle, color, fill] @@ -18536,6 +19197,7 @@ WikiPageStart: https://community.bistudio.com/wiki/driver //WikiPageEnd// SyntaxStart: +driver Object //SyntaxEnd// RawSyntaxStart: driver vehicle @@ -18571,6 +19233,7 @@ WikiPageStart: https://community.bistudio.com/wiki/drop //WikiPageEnd// SyntaxStart: +drop Array //SyntaxEnd// RawSyntaxStart: drop array @@ -18602,6 +19265,7 @@ WikiPageStart: https://community.bistudio.com/wiki/east //WikiPageEnd// SyntaxStart: +east //SyntaxEnd// RawSyntaxStart: east @@ -18638,6 +19302,7 @@ WikiPageStart: https://community.bistudio.com/wiki/echo //WikiPageEnd// SyntaxStart: +echo String //SyntaxEnd// RawSyntaxStart: echo text @@ -18666,6 +19331,7 @@ WikiPageStart: https://community.bistudio.com/wiki/edit3DENMissionAttributes //WikiPageEnd// SyntaxStart: +edit3DENMissionAttributes String //SyntaxEnd// RawSyntaxStart: edit3DENMissionAttributes section @@ -18694,6 +19360,7 @@ WikiPageStart: https://community.bistudio.com/wiki/editObject //WikiPageEnd// SyntaxStart: +Control editObject String //SyntaxEnd// RawSyntaxStart: map editObject object @@ -18721,6 +19388,7 @@ WikiPageStart: https://community.bistudio.com/wiki/editorSetEventHandler //WikiPageEnd// SyntaxStart: +Control editorSetEventHandler Array //SyntaxEnd// RawSyntaxStart: map editorSetEventHandler [handler name,function] @@ -18749,6 +19417,7 @@ WikiPageStart: https://community.bistudio.com/wiki/effectiveCommander //WikiPageEnd// SyntaxStart: +effectiveCommander Object //SyntaxEnd// RawSyntaxStart: effectiveCommander vehicle @@ -18776,6 +19445,21 @@ Executes else code when if condition returns false WikiPageStart: https://community.bistudio.com/wiki/else //WikiPageEnd// +SyntaxStart: +leftConstruct else rigthConstruct +//SyntaxEnd// +RawSyntaxStart: +//RawSyntaxEnd// +ExampleStart: +//ExampleEnd// +LocalityStart: +undefined / undefined +//LocalityEnd// +NoteStart: +//NoteEnd// +ReturnValueStart: +Nothing +//ReturnValueEnd// %NextListItem% @@ -18790,6 +19474,7 @@ WikiPageStart: https://community.bistudio.com/wiki/emptyPositions //WikiPageEnd// SyntaxStart: +Object emptyPositions String //SyntaxEnd// RawSyntaxStart: vehicle emptyPositions position @@ -18818,6 +19503,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableAI //WikiPageEnd// SyntaxStart: +Object enableAI String //SyntaxEnd// RawSyntaxStart: unit enableAI skilltype @@ -18847,6 +19533,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableAIFeature //WikiPageEnd// SyntaxStart: +String enableAIFeature Boolean //SyntaxEnd// RawSyntaxStart: feature enableAIFeature enabled @@ -18875,6 +19562,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableAttack //WikiPageEnd// SyntaxStart: +Object/Group enableAttack Boolean //SyntaxEnd// RawSyntaxStart: group enableAttack enable @@ -18904,6 +19592,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableCamShake //WikiPageEnd// SyntaxStart: +enableCamShake Boolean //SyntaxEnd// RawSyntaxStart: enableCamShake value @@ -18932,6 +19621,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableCaustics //WikiPageEnd// SyntaxStart: +enableCaustics Boolean //SyntaxEnd// RawSyntaxStart: enableCaustics bool @@ -18972,11 +19662,14 @@ WikiPageStart: https://community.bistudio.com/wiki/enableChannel //WikiPageEnd// SyntaxStart: +Number enableChannel Boolean +%NextSyntax% +Number enableChannel Array //SyntaxEnd// RawSyntaxStart: channel enableChannel enable %NextRawSyntax% -channel enableChannel [chat, VoN] since Arma 3 v1.59.135661 +channel enableChannel [chat, VoN] //RawSyntaxEnd// ExampleStart: $Code$0 enableChannel false ; // Disable user ability to send voice and text on global channel$/Code$ @@ -19004,6 +19697,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableCollisionWith //WikiPageEnd// SyntaxStart: +Object enableCollisionWith //SyntaxEnd// RawSyntaxStart: vehicle enableCollisionWith vehicle @@ -19040,6 +19734,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableCopilot //WikiPageEnd// SyntaxStart: +Object enableCopilot Boolean //SyntaxEnd// RawSyntaxStart: vehicle enableCopilot enable @@ -19074,6 +19769,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableDebriefingStats //WikiPageEnd// SyntaxStart: +enableDebriefingStats Array //SyntaxEnd// RawSyntaxStart: enableDebriefingStats [left, top, width, height] @@ -19102,6 +19798,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableDiagLegend //WikiPageEnd// SyntaxStart: +enableDiagLegend Bool //SyntaxEnd// RawSyntaxStart: enableDiagLegend Bool @@ -19130,6 +19827,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableEndDialog //WikiPageEnd// SyntaxStart: +enableEndDialog //SyntaxEnd// RawSyntaxStart: enableEndDialog @@ -19157,6 +19855,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableEngineArtillery //WikiPageEnd// SyntaxStart: +enableEngineArtillery Boolean //SyntaxEnd// RawSyntaxStart: enableEngineArtillery enabled @@ -19185,6 +19884,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableEnvironment //WikiPageEnd// SyntaxStart: +enableEnvironment Boolean //SyntaxEnd// RawSyntaxStart: enableEnvironment enabled @@ -19218,6 +19918,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableFatigue //WikiPageEnd// SyntaxStart: +Object enableFatigue Boolean //SyntaxEnd// RawSyntaxStart: unit enableFatigue enable @@ -19253,6 +19954,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableGunLights //WikiPageEnd// SyntaxStart: +Object/Group enableGunLights Boolean //SyntaxEnd// RawSyntaxStart: thing enableGunLights value @@ -19288,6 +19990,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableIRLasers //WikiPageEnd// SyntaxStart: +Object/Group enableIRLasers Boolean //SyntaxEnd// RawSyntaxStart: thing enableIRLasers value @@ -19316,6 +20019,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableMimics //WikiPageEnd// SyntaxStart: +Object enableMimics Boolean //SyntaxEnd// RawSyntaxStart: unit enableMimics enabled @@ -19344,6 +20048,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enablePersonTurret //WikiPageEnd// SyntaxStart: +Object enablePersonTurret Array //SyntaxEnd// RawSyntaxStart: vehicle enablePersonTurret [turretPath, enable] @@ -19372,6 +20077,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableRadio //WikiPageEnd// SyntaxStart: +enableRadio Boolean //SyntaxEnd// RawSyntaxStart: enableRadio state @@ -19405,6 +20111,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableReload //WikiPageEnd// SyntaxStart: +Object enableReload Boolean //SyntaxEnd// RawSyntaxStart: object enableReload enable @@ -19433,6 +20140,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableRopeAttach //WikiPageEnd// SyntaxStart: +Object enableRopeAttach Boolean //SyntaxEnd// RawSyntaxStart: vehicle enableRopeAttach enable @@ -19463,6 +20171,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableSatNormalOnDetail //WikiPageEnd// SyntaxStart: +enableSatNormalOnDetail Boolean //SyntaxEnd// RawSyntaxStart: enableSatNormalOnDetail state @@ -19492,6 +20201,9 @@ WikiPageStart: https://community.bistudio.com/wiki/enableSaving //WikiPageEnd// SyntaxStart: +enableSaving Boolean +%NextSyntax% +enableSaving Array //SyntaxEnd// RawSyntaxStart: enableSaving enable @@ -19527,6 +20239,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableSentences //WikiPageEnd// SyntaxStart: +enableSentences Boolean //SyntaxEnd// RawSyntaxStart: enableSentences enable @@ -19555,6 +20268,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableSimulation //WikiPageEnd// SyntaxStart: +Object enableSimulation Boolean //SyntaxEnd// RawSyntaxStart: entity enableSimulation state @@ -19620,6 +20334,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableSimulationGlobal //WikiPageEnd// SyntaxStart: +Object enableSimulationGlobal Boolean //SyntaxEnd// RawSyntaxStart: entity enableSimulationGlobal enable @@ -19652,6 +20367,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableStamina //WikiPageEnd// SyntaxStart: +Object enableStamina Boolean //SyntaxEnd// RawSyntaxStart: unit enableStamina enabled @@ -19680,6 +20396,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableTeamSwitch //WikiPageEnd// SyntaxStart: +enableTeamSwitch Boolean //SyntaxEnd// RawSyntaxStart: enableTeamSwitch enable @@ -19707,6 +20424,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableUAVConnectability //WikiPageEnd// SyntaxStart: +Object enableUAVConnectability Array //SyntaxEnd// RawSyntaxStart: object enableUAVConnectability [uav, checkAllItems] @@ -19735,6 +20453,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enableUAVWaypoints //WikiPageEnd// SyntaxStart: +Object enableUAVWaypoints Boolean //SyntaxEnd// RawSyntaxStart: uav enableUAVWaypoints enable @@ -19764,6 +20483,7 @@ WikiPageStart: https://community.bistudio.com/wiki/endLoadingScreen //WikiPageEnd// SyntaxStart: +endLoadingScreen //SyntaxEnd// RawSyntaxStart: endLoadingScreen @@ -19812,6 +20532,7 @@ WikiPageStart: https://community.bistudio.com/wiki/endMission //WikiPageEnd// SyntaxStart: +endMission String //SyntaxEnd// RawSyntaxStart: endMission endType @@ -19841,6 +20562,7 @@ WikiPageStart: https://community.bistudio.com/wiki/engineOn //WikiPageEnd// SyntaxStart: +Object engineOn Boolean //SyntaxEnd// RawSyntaxStart: vehicle engineOn state @@ -19883,6 +20605,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enginesIsOnRTD //WikiPageEnd// SyntaxStart: +enginesIsOnRTD Object //SyntaxEnd// RawSyntaxStart: enginesIsOnRTD RTD_helicopter @@ -19911,6 +20634,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enginesRpmRTD //WikiPageEnd// SyntaxStart: +enginesRpmRTD Object //SyntaxEnd// RawSyntaxStart: enginesRpmRTD RTD_helicopter @@ -19940,6 +20664,7 @@ WikiPageStart: https://community.bistudio.com/wiki/enginesTorqueRTD //WikiPageEnd// SyntaxStart: +enginesTorqueRTD Object //SyntaxEnd// RawSyntaxStart: enginesTorqueRTD RTD_helicopter @@ -19969,6 +20694,7 @@ WikiPageStart: https://community.bistudio.com/wiki/entities //WikiPageEnd// SyntaxStart: +entities String //SyntaxEnd// RawSyntaxStart: entities type @@ -19999,6 +20725,7 @@ WikiPageStart: https://community.bistudio.com/wiki/estimatedEndServerTime //WikiPageEnd// SyntaxStart: +estimatedEndServerTime //SyntaxEnd// RawSyntaxStart: estimatedEndServerTime @@ -20028,6 +20755,7 @@ WikiPageStart: https://community.bistudio.com/wiki/estimatedTimeLeft //WikiPageEnd// SyntaxStart: +estimatedTimeLeft Number //SyntaxEnd// RawSyntaxStart: estimatedTimeLeft seconds @@ -20060,6 +20788,7 @@ WikiPageStart: https://community.bistudio.com/wiki/evalObjectArgument //WikiPageEnd// SyntaxStart: +Control evalObjectArgument Array //SyntaxEnd// RawSyntaxStart: map evalObjectArgument [object, argument] @@ -20091,6 +20820,7 @@ WikiPageStart: https://community.bistudio.com/wiki/everyBackpack //WikiPageEnd// SyntaxStart: +everyBackpack Object //SyntaxEnd// RawSyntaxStart: everyBackpack box @@ -20155,6 +20885,7 @@ WikiPageStart: https://community.bistudio.com/wiki/everyContainer //WikiPageEnd// SyntaxStart: +everyContainer Object //SyntaxEnd// RawSyntaxStart: everyContainer box @@ -20189,6 +20920,7 @@ WikiPageStart: https://community.bistudio.com/wiki/exec //WikiPageEnd// SyntaxStart: +Anything exec String //SyntaxEnd// RawSyntaxStart: argument exec script @@ -20217,6 +20949,7 @@ WikiPageStart: https://community.bistudio.com/wiki/execEditorScript //WikiPageEnd// SyntaxStart: +Control execEditorScript Array //SyntaxEnd// RawSyntaxStart: map execEditorScript [object,script] @@ -20247,6 +20980,9 @@ WikiPageStart: https://community.bistudio.com/wiki/execFSM //WikiPageEnd// SyntaxStart: +Anything execFSM String +%NextSyntax% +execFSM String //SyntaxEnd// RawSyntaxStart: argument execFSM filename @@ -20281,6 +21017,9 @@ WikiPageStart: https://community.bistudio.com/wiki/execVM //WikiPageEnd// SyntaxStart: +Anything execVM String +%NextSyntax% +execVM String //SyntaxEnd// RawSyntaxStart: argument execVM filename @@ -20331,6 +21070,7 @@ WikiPageStart: https://community.bistudio.com/wiki/exit //WikiPageEnd// SyntaxStart: +exit //SyntaxEnd// RawSyntaxStart: exit @@ -20359,6 +21099,7 @@ WikiPageStart: https://community.bistudio.com/wiki/exitWith //WikiPageEnd// SyntaxStart: +IfType exitWith Code //SyntaxEnd// RawSyntaxStart: if exitWith code @@ -20376,15 +21117,17 @@ player sideChat "Complete"; // Only the "for" loop will exit when the exitWith condition has been fulfilled (not the whole script). Execution will continue after the end of the loop (player sideChat "Complete").$/Code$ %NextExample% $Code$// Most loops will also terminate when their scope exited. To exit and terminate scopes which are called every frame such as onEachFrame and waitUntil use the following examples: -onEachFrame -if (! alive player ) exitWith -onEachFrame - - +onEachFrame { +if (! alive player ) exitWith { +onEachFrame {} +} +} _time = time + 10; -waitUntil -if ( time _time) exitWith -true$/Code$ +waitUntil { +if ( time _time) exitWith { +true +} +}$/Code$ //ExampleEnd// LocalityStart: undefined / undefined @@ -20431,6 +21174,7 @@ WikiPageStart: https://community.bistudio.com/wiki/exp //WikiPageEnd// SyntaxStart: +exp Number //SyntaxEnd// RawSyntaxStart: exp x @@ -20461,6 +21205,7 @@ WikiPageStart: https://community.bistudio.com/wiki/expectedDestination //WikiPageEnd// SyntaxStart: +expectedDestination Object //SyntaxEnd// RawSyntaxStart: expectedDestination person @@ -20490,6 +21235,7 @@ WikiPageStart: https://community.bistudio.com/wiki/exportJIPMessages //WikiPageEnd// SyntaxStart: +exportJIPMessages String //SyntaxEnd// RawSyntaxStart: exportJIPMessages fileName @@ -20518,6 +21264,7 @@ WikiPageStart: https://community.bistudio.com/wiki/eyeDirection //WikiPageEnd// SyntaxStart: +eyeDirection Object //SyntaxEnd// RawSyntaxStart: eyeDirection unit @@ -20567,6 +21314,7 @@ WikiPageStart: https://community.bistudio.com/wiki/eyePos //WikiPageEnd// SyntaxStart: +eyePos Object //SyntaxEnd// RawSyntaxStart: eyePos object @@ -20595,6 +21343,7 @@ WikiPageStart: https://community.bistudio.com/wiki/face //WikiPageEnd// SyntaxStart: +face Object //SyntaxEnd// RawSyntaxStart: face person @@ -20643,6 +21392,7 @@ WikiPageStart: https://community.bistudio.com/wiki/faction //WikiPageEnd// SyntaxStart: +faction Object //SyntaxEnd// RawSyntaxStart: faction unitName @@ -20672,6 +21422,7 @@ WikiPageStart: https://community.bistudio.com/wiki/fadeMusic //WikiPageEnd// SyntaxStart: +Number fadeMusic //SyntaxEnd// RawSyntaxStart: time fadeMusic volume @@ -20700,6 +21451,7 @@ WikiPageStart: https://community.bistudio.com/wiki/fadeRadio //WikiPageEnd// SyntaxStart: +Number fadeRadio //SyntaxEnd// RawSyntaxStart: time fadeRadio volume @@ -20730,6 +21482,7 @@ WikiPageStart: https://community.bistudio.com/wiki/fadeSound //WikiPageEnd// SyntaxStart: +Number fadeSound //SyntaxEnd// RawSyntaxStart: time fadeSound volume @@ -20760,6 +21513,7 @@ WikiPageStart: https://community.bistudio.com/wiki/fadeSpeech //WikiPageEnd// SyntaxStart: +Number fadeSpeech //SyntaxEnd// RawSyntaxStart: time fadeSpeech volume @@ -20800,6 +21554,7 @@ WikiPageStart: https://community.bistudio.com/wiki/failMission //WikiPageEnd// SyntaxStart: +failMission String //SyntaxEnd// RawSyntaxStart: failMission endtype @@ -20828,6 +21583,7 @@ WikiPageStart: https://community.bistudio.com/wiki/false //WikiPageEnd// SyntaxStart: +false //SyntaxEnd// RawSyntaxStart: false @@ -20857,6 +21613,7 @@ WikiPageStart: https://community.bistudio.com/wiki/fillWeaponsFromPool //WikiPageEnd// SyntaxStart: +fillWeaponsFromPool Object //SyntaxEnd// RawSyntaxStart: fillWeaponsFromPool unitName @@ -20885,6 +21642,9 @@ WikiPageStart: https://community.bistudio.com/wiki/find //WikiPageEnd// SyntaxStart: +Array find Anything +%NextSyntax% +String find //SyntaxEnd// RawSyntaxStart: array find x @@ -20913,6 +21673,15 @@ hintSilent str ( isNil "_result"); //true$/Code$ %NextNote% (April 10, 2015) Find doesn't work with multidimensional arrays in OFP/CWA. It will always returns -1. +%NextNote% +(May 17, 2016) +This command is unreliable/broken when it comes to some non-ASCII characters (as of Arma 3 1.58): +$Code$"abcßdef" find "c" +- 2 +"abcßdef" find "ß" +- 3 +"abcßdef" find "d" +- 5$/Code$ //NoteEnd// ReturnValueStart: Number - 0 based position of the first array element that matches x, -1 if not found @@ -20931,6 +21700,7 @@ WikiPageStart: https://community.bistudio.com/wiki/findCover //WikiPageEnd// SyntaxStart: +Object findCover Array //SyntaxEnd// RawSyntaxStart: object findCover [position, hidePosition, maxDist, minDist, visibilityPosition, ignoreObject] @@ -20974,6 +21744,7 @@ WikiPageStart: https://community.bistudio.com/wiki/findDisplay //WikiPageEnd// SyntaxStart: +findDisplay Number //SyntaxEnd// RawSyntaxStart: findDisplay idd @@ -21021,6 +21792,7 @@ WikiPageStart: https://community.bistudio.com/wiki/findEditorObject //WikiPageEnd// SyntaxStart: +Control findEditorObject Any //SyntaxEnd// RawSyntaxStart: map findEditorObject value @@ -21049,6 +21821,7 @@ WikiPageStart: https://community.bistudio.com/wiki/findEmptyPosition //WikiPageEnd// SyntaxStart: +Array findEmptyPosition //SyntaxEnd// RawSyntaxStart: center findEmptyPosition [minDistance, maxDistance, vehicleType] @@ -21098,6 +21871,7 @@ WikiPageStart: https://community.bistudio.com/wiki/findEmptyPositionReady //WikiPageEnd// SyntaxStart: +Array findEmptyPositionReady //SyntaxEnd// RawSyntaxStart: center findEmptyPositionReady [radius,maxDistance] @@ -21125,6 +21899,7 @@ WikiPageStart: https://community.bistudio.com/wiki/findNearestEnemy //WikiPageEnd// SyntaxStart: +Object findNearestEnemy Object/Array //SyntaxEnd// RawSyntaxStart: object findNearestEnemy position @@ -21155,6 +21930,7 @@ WikiPageStart: https://community.bistudio.com/wiki/finishMissionInit //WikiPageEnd// SyntaxStart: +finishMissionInit //SyntaxEnd// RawSyntaxStart: finishMissionInit @@ -21182,6 +21958,7 @@ WikiPageStart: https://community.bistudio.com/wiki/finite //WikiPageEnd// SyntaxStart: +finite Number //SyntaxEnd// RawSyntaxStart: finite x @@ -21220,6 +21997,9 @@ WikiPageStart: https://community.bistudio.com/wiki/fire //WikiPageEnd// SyntaxStart: +Object fire String +%NextSyntax% +Object fire Array //SyntaxEnd// RawSyntaxStart: unit fire weaponName @@ -21300,6 +22080,7 @@ WikiPageStart: https://community.bistudio.com/wiki/fireAtTarget //WikiPageEnd// SyntaxStart: +Object fireAtTarget Array //SyntaxEnd// RawSyntaxStart: sourceVehicle fireAtTarget [targetVehicle, weaponMuzzleName] @@ -21407,6 +22188,7 @@ WikiPageStart: https://community.bistudio.com/wiki/firstBackpack //WikiPageEnd// SyntaxStart: +firstBackpack Object //SyntaxEnd// RawSyntaxStart: firstBackpack box @@ -21435,6 +22217,7 @@ WikiPageStart: https://community.bistudio.com/wiki/flag //WikiPageEnd// SyntaxStart: +flag Object //SyntaxEnd// RawSyntaxStart: flag unit @@ -21463,6 +22246,7 @@ WikiPageStart: https://community.bistudio.com/wiki/flagOwner //WikiPageEnd// SyntaxStart: +flagOwner Object //SyntaxEnd// RawSyntaxStart: flagOwner flag @@ -21491,6 +22275,7 @@ WikiPageStart: https://community.bistudio.com/wiki/flagSide //WikiPageEnd// SyntaxStart: +flagSide Object //SyntaxEnd// RawSyntaxStart: flagSide flag @@ -21519,6 +22304,7 @@ WikiPageStart: https://community.bistudio.com/wiki/flagTexture //WikiPageEnd// SyntaxStart: +flagTexture Object //SyntaxEnd// RawSyntaxStart: flagTexture flagCarrier @@ -21547,6 +22333,7 @@ WikiPageStart: https://community.bistudio.com/wiki/fleeing //WikiPageEnd// SyntaxStart: +fleeing Object //SyntaxEnd// RawSyntaxStart: fleeing unitName @@ -21575,6 +22362,7 @@ WikiPageStart: https://community.bistudio.com/wiki/floor //WikiPageEnd// SyntaxStart: +floor Number //SyntaxEnd// RawSyntaxStart: floor x @@ -21607,6 +22395,7 @@ WikiPageStart: https://community.bistudio.com/wiki/flyInHeight //WikiPageEnd// SyntaxStart: +Object flyInHeight Number //SyntaxEnd// RawSyntaxStart: aircraft flyInHeight altitude @@ -21647,6 +22436,7 @@ WikiPageStart: https://community.bistudio.com/wiki/fog //WikiPageEnd// SyntaxStart: +fog //SyntaxEnd// RawSyntaxStart: fog @@ -21675,6 +22465,7 @@ WikiPageStart: https://community.bistudio.com/wiki/fogForecast //WikiPageEnd// SyntaxStart: +fogForecast //SyntaxEnd// RawSyntaxStart: fogForecast @@ -21703,6 +22494,7 @@ WikiPageStart: https://community.bistudio.com/wiki/fogParams //WikiPageEnd// SyntaxStart: +fogParams //SyntaxEnd// RawSyntaxStart: fogParams @@ -21731,6 +22523,21 @@ In Arma 3 use private keyword when defining any variables for the scope, see exa WikiPageStart: https://community.bistudio.com/wiki/for_forspec //WikiPageEnd// +SyntaxStart: +for rigthConstruct +//SyntaxEnd// +RawSyntaxStart: +//RawSyntaxEnd// +ExampleStart: +//ExampleEnd// +LocalityStart: +undefined / undefined +//LocalityEnd// +NoteStart: +//NoteEnd// +ReturnValueStart: +Nothing +//ReturnValueEnd// %NextListItem% @@ -21744,6 +22551,7 @@ WikiPageStart: https://community.bistudio.com/wiki/forceAddUniform //WikiPageEnd// SyntaxStart: +Object forceAddUniform String //SyntaxEnd// RawSyntaxStart: unit forceAddUniform type @@ -21773,6 +22581,7 @@ WikiPageStart: https://community.bistudio.com/wiki/forceEnd //WikiPageEnd// SyntaxStart: +forceEnd //SyntaxEnd// RawSyntaxStart: forceEnd @@ -21801,6 +22610,7 @@ WikiPageStart: https://community.bistudio.com/wiki/forceMap //WikiPageEnd// SyntaxStart: +forceMap Boolean //SyntaxEnd// RawSyntaxStart: forceMap show @@ -21832,6 +22642,7 @@ WikiPageStart: https://community.bistudio.com/wiki/forceRespawn //WikiPageEnd// SyntaxStart: +forceRespawn Object //SyntaxEnd// RawSyntaxStart: forceRespawn unit @@ -21860,6 +22671,7 @@ WikiPageStart: https://community.bistudio.com/wiki/forceSpeed //WikiPageEnd// SyntaxStart: +Object forceSpeed Number //SyntaxEnd// RawSyntaxStart: object forceSpeed speed @@ -21895,6 +22707,7 @@ WikiPageStart: https://community.bistudio.com/wiki/forceWalk //WikiPageEnd// SyntaxStart: +Object forceWalk Boolean //SyntaxEnd// RawSyntaxStart: unit forceWalk value @@ -21923,6 +22736,7 @@ WikiPageStart: https://community.bistudio.com/wiki/forceWeaponFire //WikiPageEnd// SyntaxStart: +Object forceWeaponFire Array //SyntaxEnd// RawSyntaxStart: unit forceWeaponFire [muzzle, firemode] @@ -21989,6 +22803,7 @@ WikiPageStart: https://community.bistudio.com/wiki/forceWeatherChange //WikiPageEnd// SyntaxStart: +forceWeatherChange //SyntaxEnd// RawSyntaxStart: forceWeatherChange @@ -22022,6 +22837,7 @@ WikiPageStart: https://community.bistudio.com/wiki/forEach //WikiPageEnd// SyntaxStart: +String/Code forEach Array //SyntaxEnd// RawSyntaxStart: script forEach array @@ -22100,6 +22916,7 @@ WikiPageStart: https://community.bistudio.com/wiki/forEachMember //WikiPageEnd// SyntaxStart: +Code forEachMember TeamMember //SyntaxEnd// RawSyntaxStart: command forEachMember team @@ -22127,6 +22944,7 @@ WikiPageStart: https://community.bistudio.com/wiki/forEachMemberAgent //WikiPageEnd// SyntaxStart: +Code forEachMemberAgent TeamMember //SyntaxEnd// RawSyntaxStart: command forEachMemberAgent team @@ -22154,6 +22972,7 @@ WikiPageStart: https://community.bistudio.com/wiki/forEachMemberTeam //WikiPageEnd// SyntaxStart: +Code forEachMemberTeam TeamMember //SyntaxEnd// RawSyntaxStart: command forEachMemberTeam team @@ -22183,6 +23002,7 @@ WikiPageStart: https://community.bistudio.com/wiki/format //WikiPageEnd// SyntaxStart: +format Array //SyntaxEnd// RawSyntaxStart: format [formatString, var1, var2...] @@ -22228,6 +23048,7 @@ WikiPageStart: https://community.bistudio.com/wiki/formation //WikiPageEnd// SyntaxStart: +formation Object/Group //SyntaxEnd// RawSyntaxStart: formation grp @@ -22258,6 +23079,7 @@ WikiPageStart: https://community.bistudio.com/wiki/formationDirection //WikiPageEnd// SyntaxStart: +formationDirection Object //SyntaxEnd// RawSyntaxStart: formationDirection unitName @@ -22286,6 +23108,7 @@ WikiPageStart: https://community.bistudio.com/wiki/formationLeader //WikiPageEnd// SyntaxStart: +formationLeader Object //SyntaxEnd// RawSyntaxStart: formationLeader unitName @@ -22317,6 +23140,7 @@ WikiPageStart: https://community.bistudio.com/wiki/formationMembers //WikiPageEnd// SyntaxStart: +formationMembers Object //SyntaxEnd// RawSyntaxStart: formationMembers person @@ -22345,6 +23169,7 @@ WikiPageStart: https://community.bistudio.com/wiki/formationPosition //WikiPageEnd// SyntaxStart: +formationPosition Object //SyntaxEnd// RawSyntaxStart: formationPosition person @@ -22374,6 +23199,7 @@ WikiPageStart: https://community.bistudio.com/wiki/formationTask //WikiPageEnd// SyntaxStart: +formationTask Object //SyntaxEnd// RawSyntaxStart: formationTask person @@ -22402,6 +23228,7 @@ WikiPageStart: https://community.bistudio.com/wiki/formatText //WikiPageEnd// SyntaxStart: +formatText Array //SyntaxEnd// RawSyntaxStart: formatText [format, arg1, arg2,...] @@ -22430,6 +23257,7 @@ WikiPageStart: https://community.bistudio.com/wiki/formLeader //WikiPageEnd// SyntaxStart: +formLeader Object //SyntaxEnd// RawSyntaxStart: formLeader unitName @@ -22460,6 +23288,7 @@ WikiPageStart: https://community.bistudio.com/wiki/freeLook //WikiPageEnd// SyntaxStart: +freeLook //SyntaxEnd// RawSyntaxStart: freeLook @@ -22487,6 +23316,21 @@ Continue sequence of for var command. WikiPageStart: https://community.bistudio.com/wiki/from //WikiPageEnd// +SyntaxStart: +from rigthConstruct +//SyntaxEnd// +RawSyntaxStart: +//RawSyntaxEnd// +ExampleStart: +//ExampleEnd// +LocalityStart: +undefined / undefined +//LocalityEnd// +NoteStart: +//NoteEnd// +ReturnValueStart: +Nothing +//ReturnValueEnd// %NextListItem% @@ -22500,6 +23344,7 @@ WikiPageStart: https://community.bistudio.com/wiki/fromEditor //WikiPageEnd// SyntaxStart: +fromEditor TeamMember //SyntaxEnd// RawSyntaxStart: fromEditor teamMember @@ -22528,6 +23373,7 @@ WikiPageStart: https://community.bistudio.com/wiki/fuel //WikiPageEnd// SyntaxStart: +fuel Object //SyntaxEnd// RawSyntaxStart: fuel vehicle @@ -22557,6 +23403,9 @@ WikiPageStart: https://community.bistudio.com/wiki/fullCrew //WikiPageEnd// SyntaxStart: +fullCrew Object +%NextSyntax% +fullCrew Array //SyntaxEnd// RawSyntaxStart: fullCrew vehicle @@ -22593,6 +23442,7 @@ WikiPageStart: https://community.bistudio.com/wiki/gearSlotAmmoCount //WikiPageEnd// SyntaxStart: +gearSlotAmmoCount Control //SyntaxEnd// RawSyntaxStart: gearSlotAmmoCount control @@ -22621,6 +23471,7 @@ WikiPageStart: https://community.bistudio.com/wiki/gearSlotData //WikiPageEnd// SyntaxStart: +gearSlotData Control //SyntaxEnd// RawSyntaxStart: gearSlotData control @@ -22676,6 +23527,7 @@ WikiPageStart: https://community.bistudio.com/wiki/get3DENActionState //WikiPageEnd// SyntaxStart: +get3DENActionState String //SyntaxEnd// RawSyntaxStart: get3DENActionState action @@ -22707,6 +23559,7 @@ WikiPageStart: https://community.bistudio.com/wiki/get3DENAttribute //WikiPageEnd// SyntaxStart: +Eden get3DENAttribute String //SyntaxEnd// RawSyntaxStart: entity get3DENAttribute attribute @@ -22736,6 +23589,7 @@ WikiPageStart: https://community.bistudio.com/wiki/get3DENCamera //WikiPageEnd// SyntaxStart: +get3DENCamera //SyntaxEnd// RawSyntaxStart: get3DENCamera @@ -22780,6 +23634,7 @@ WikiPageStart: https://community.bistudio.com/wiki/get3DENConnections //WikiPageEnd// SyntaxStart: +get3DENConnections Eden //SyntaxEnd// RawSyntaxStart: get3DENConnections entity @@ -22807,6 +23662,7 @@ WikiPageStart: https://community.bistudio.com/wiki/get3DENEntity //WikiPageEnd// SyntaxStart: +get3DENEntity Number //SyntaxEnd// RawSyntaxStart: get3DENEntity id @@ -22835,6 +23691,7 @@ WikiPageStart: https://community.bistudio.com/wiki/get3DENEntityID //WikiPageEnd// SyntaxStart: +get3DENEntityID Eden //SyntaxEnd// RawSyntaxStart: get3DENEntityID entity @@ -22867,6 +23724,7 @@ WikiPageStart: https://community.bistudio.com/wiki/get3DENGrid //WikiPageEnd// SyntaxStart: +get3DENGrid String //SyntaxEnd// RawSyntaxStart: get3DENGrid type @@ -22895,6 +23753,7 @@ WikiPageStart: https://community.bistudio.com/wiki/get3DENIconsVisible //WikiPageEnd// SyntaxStart: +get3DENIconsVisible //SyntaxEnd// RawSyntaxStart: get3DENIconsVisible @@ -22923,6 +23782,7 @@ WikiPageStart: https://community.bistudio.com/wiki/get3DENLayerEntities //WikiPageEnd// SyntaxStart: +get3DENLayerEntities Number //SyntaxEnd// RawSyntaxStart: get3DENLayerEntities layerID @@ -22953,6 +23813,7 @@ WikiPageStart: https://community.bistudio.com/wiki/get3DENLinesVisible //WikiPageEnd// SyntaxStart: +get3DENLinesVisible //SyntaxEnd// RawSyntaxStart: get3DENLinesVisible @@ -22983,6 +23844,7 @@ WikiPageStart: https://community.bistudio.com/wiki/get3DENMissionAttribute //WikiPageEnd// SyntaxStart: +String get3DENMissionAttribute //SyntaxEnd// RawSyntaxStart: section get3DENMissionAttribute class @@ -23021,6 +23883,7 @@ WikiPageStart: https://community.bistudio.com/wiki/get3DENMouseOver //WikiPageEnd// SyntaxStart: +get3DENMouseOver //SyntaxEnd// RawSyntaxStart: get3DENMouseOver @@ -23049,6 +23912,7 @@ WikiPageStart: https://community.bistudio.com/wiki/get3DENSelected //WikiPageEnd// SyntaxStart: +get3DENSelected String //SyntaxEnd// RawSyntaxStart: get3DENSelected type @@ -23090,6 +23954,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getAllHitPointsDamage //WikiPageEnd// SyntaxStart: +getAllHitPointsDamage Object //SyntaxEnd// RawSyntaxStart: getAllHitPointsDamage entity @@ -23123,6 +23988,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getAmmoCargo //WikiPageEnd// SyntaxStart: +getAmmoCargo Object //SyntaxEnd// RawSyntaxStart: getAmmoCargo vehicle @@ -23154,6 +24020,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getAnimAimPrecision //WikiPageEnd// SyntaxStart: +getAnimAimPrecision Object //SyntaxEnd// RawSyntaxStart: getAnimAimPrecision unit @@ -23182,6 +24049,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getAnimSpeedCoef //WikiPageEnd// SyntaxStart: +getAnimSpeedCoef Object //SyntaxEnd// RawSyntaxStart: getAnimSpeedCoef unit @@ -23210,6 +24078,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getArray //WikiPageEnd// SyntaxStart: +getArray Config //SyntaxEnd// RawSyntaxStart: getArray config @@ -23259,6 +24128,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getArtilleryAmmo //WikiPageEnd// SyntaxStart: +getArtilleryAmmo Array //SyntaxEnd// RawSyntaxStart: getArtilleryAmmo [unit1, unit2, unit3....] @@ -23294,6 +24164,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getArtilleryComputerSettings //WikiPageEnd// SyntaxStart: +getArtilleryComputerSettings //SyntaxEnd// RawSyntaxStart: getArtilleryComputerSettings @@ -23322,6 +24193,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getArtilleryETA //WikiPageEnd// SyntaxStart: +Object getArtilleryETA Array //SyntaxEnd// RawSyntaxStart: unit getArtilleryETA [targetPosition, magazineType] @@ -23354,6 +24226,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getAssignedCuratorLogic //WikiPageEnd// SyntaxStart: +getAssignedCuratorLogic Object //SyntaxEnd// RawSyntaxStart: getAssignedCuratorLogic player @@ -23384,6 +24257,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getAssignedCuratorUnit //WikiPageEnd// SyntaxStart: +getAssignedCuratorUnit Object //SyntaxEnd// RawSyntaxStart: getAssignedCuratorUnit curatorObj @@ -23415,6 +24289,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getBackpackCargo //WikiPageEnd// SyntaxStart: +getBackpackCargo Object //SyntaxEnd// RawSyntaxStart: getBackpackCargo object @@ -23445,6 +24320,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getBleedingRemaining //WikiPageEnd// SyntaxStart: +getBleedingRemaining Object //SyntaxEnd// RawSyntaxStart: getBleedingRemaining unit @@ -23473,6 +24349,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getBurningValue //WikiPageEnd// SyntaxStart: +getBurningValue Object //SyntaxEnd// RawSyntaxStart: getBurningValue unit @@ -23500,6 +24377,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getCameraViewDirection //WikiPageEnd// SyntaxStart: +getCameraViewDirection Object //SyntaxEnd// RawSyntaxStart: getCameraViewDirection unit @@ -23540,6 +24418,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getCargoIndex //WikiPageEnd// SyntaxStart: +Object getCargoIndex //SyntaxEnd// RawSyntaxStart: vehicle getCargoIndex unit @@ -23569,6 +24448,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getCenterOfMass //WikiPageEnd// SyntaxStart: +getCenterOfMass Object //SyntaxEnd// RawSyntaxStart: getCenterOfMass object @@ -23638,6 +24518,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getClientState //WikiPageEnd// SyntaxStart: +getClientState //SyntaxEnd// RawSyntaxStart: getClientState @@ -23709,6 +24590,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getClientStateNumber //WikiPageEnd// SyntaxStart: +getClientStateNumber //SyntaxEnd// RawSyntaxStart: getClientStateNumber @@ -23739,6 +24621,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getConnectedUAV //WikiPageEnd// SyntaxStart: +getConnectedUAV Object //SyntaxEnd// RawSyntaxStart: getConnectedUAV unit @@ -23766,6 +24649,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getDammage //WikiPageEnd// SyntaxStart: +getDammage Object //SyntaxEnd// RawSyntaxStart: getDammage object @@ -23801,6 +24685,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getDescription //WikiPageEnd// SyntaxStart: +getDescription Object //SyntaxEnd// RawSyntaxStart: getDescription unit @@ -23834,11 +24719,14 @@ WikiPageStart: https://community.bistudio.com/wiki/getDir //WikiPageEnd// SyntaxStart: +getDir Object +%NextSyntax% +Object/Position2D/Position3D getDir //SyntaxEnd// RawSyntaxStart: getDir object %NextRawSyntax% -pos1 getDir pos2 Since Arma 3 v1.55.133361 +pos1 getDir pos2 //RawSyntaxEnd// ExampleStart: $Code$_azimuth = getDir player ;$/Code$ @@ -23870,6 +24758,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getDirVisual //WikiPageEnd// SyntaxStart: +getDirVisual Object //SyntaxEnd// RawSyntaxStart: getDirVisual object @@ -23901,6 +24790,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getDLCs //WikiPageEnd// SyntaxStart: +getDLCs Number //SyntaxEnd// RawSyntaxStart: getDLCs filter @@ -23948,6 +24838,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getEditorCamera //WikiPageEnd// SyntaxStart: +getEditorCamera Control //SyntaxEnd// RawSyntaxStart: getEditorCamera map @@ -23975,6 +24866,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getEditorMode //WikiPageEnd// SyntaxStart: +getEditorMode Control //SyntaxEnd// RawSyntaxStart: getEditorMode map @@ -24002,6 +24894,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getEditorObjectScope //WikiPageEnd// SyntaxStart: +Control getEditorObjectScope String //SyntaxEnd// RawSyntaxStart: map getEditorObjectScope object @@ -24030,6 +24923,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getElevationOffset //WikiPageEnd// SyntaxStart: +getElevationOffset //SyntaxEnd// RawSyntaxStart: getElevationOffset @@ -24058,6 +24952,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getFatigue //WikiPageEnd// SyntaxStart: +getFatigue Object //SyntaxEnd// RawSyntaxStart: getFatigue unit @@ -24089,6 +24984,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getFriend //WikiPageEnd// SyntaxStart: +Side getFriend //SyntaxEnd// RawSyntaxStart: side1 getFriend side2 @@ -24119,6 +25015,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getFSMVariable //WikiPageEnd// SyntaxStart: +Number getFSMVariable String //SyntaxEnd// RawSyntaxStart: FSMhandle getFSMVariable name @@ -24147,6 +25044,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getFuelCargo //WikiPageEnd// SyntaxStart: +getFuelCargo Object //SyntaxEnd// RawSyntaxStart: getFuelCargo vehicle @@ -24178,6 +25076,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getGroupIcon //WikiPageEnd// SyntaxStart: +Group getGroupIcon Number //SyntaxEnd// RawSyntaxStart: group getGroupIcon ID @@ -24207,6 +25106,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getGroupIconParams //WikiPageEnd// SyntaxStart: +getGroupIconParams Group //SyntaxEnd// RawSyntaxStart: getGroupIconParams group @@ -24241,6 +25141,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getGroupIcons //WikiPageEnd// SyntaxStart: +getGroupIcons Group //SyntaxEnd// RawSyntaxStart: getGroupIcons group @@ -24268,6 +25169,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getHideFrom //WikiPageEnd// SyntaxStart: +Object getHideFrom //SyntaxEnd// RawSyntaxStart: object getHideFrom enemy @@ -24297,6 +25199,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getHit //WikiPageEnd// SyntaxStart: +Object getHit String //SyntaxEnd// RawSyntaxStart: vehicle getHit selection @@ -24329,6 +25232,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getHitIndex //WikiPageEnd// SyntaxStart: +Object getHitIndex Number //SyntaxEnd// RawSyntaxStart: vehicle getHitIndex hitPartIndex @@ -24359,6 +25263,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getHitPointDamage //WikiPageEnd// SyntaxStart: +Object getHitPointDamage String //SyntaxEnd// RawSyntaxStart: vehicle getHitPointDamage hitPointName @@ -24370,6 +25275,38 @@ LocalityStart: global / undefined //LocalityEnd// NoteStart: +Common ObjectRTD TKOH Hit Points: +HitEngine (engine #1) +HitEngine2 (engine #2) +HitEngine3 (engine #3) +HitHRotor (main rotor) +HitVRotor (tail rotor) +HitBatteries (electrical systems) +HitLight (landing light) +HitHydraulics (entire hydraulics system) +HitTransmission (engine transmission) +HitGear (landing gear) +HitFuel (all fuel tanks) +HitHStabilizerL1 (first left horizontal stabilizer) +HitHStabilizerR1 (first right horizontal stabilizer) +HitVStabilizer1 (first vertical stabilizer) +HitTail (tail boom) +HitPitotTube (all pitot tubes) +HitStaticPort (all static ports) +HitStarter1 (starter for engine #1) +HitStarter2 (starter for engine #2) +HitStarter3 (starter for engine #3) +HitAvionics +HitHull +HitMissiles +HitRGlass +HitLGlass +HitGlass1 +HitGlass2 +HitGlass3 +HitGlass4 +HitGlass5 +HitGlass6 //NoteEnd// ReturnValueStart: Number or Nothing when invalid input is given @@ -24387,6 +25324,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getItemCargo //WikiPageEnd// SyntaxStart: +getItemCargo Object //SyntaxEnd// RawSyntaxStart: getItemCargo box @@ -24415,6 +25353,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getMagazineCargo //WikiPageEnd// SyntaxStart: +getMagazineCargo Object //SyntaxEnd// RawSyntaxStart: getMagazineCargo object @@ -24447,6 +25386,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getMarkerColor //WikiPageEnd// SyntaxStart: +getMarkerColor String //SyntaxEnd// RawSyntaxStart: getMarkerColor markerName @@ -24479,6 +25419,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getMarkerPos //WikiPageEnd// SyntaxStart: +getMarkerPos String //SyntaxEnd// RawSyntaxStart: getMarkerPos markerName @@ -24509,6 +25450,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getMarkerSize //WikiPageEnd// SyntaxStart: +getMarkerSize String //SyntaxEnd// RawSyntaxStart: getMarkerSize markerName @@ -24539,6 +25481,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getMarkerType //WikiPageEnd// SyntaxStart: +getMarkerType String //SyntaxEnd// RawSyntaxStart: getMarkerType markerName @@ -24569,6 +25512,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getMass //WikiPageEnd// SyntaxStart: +getMass Object //SyntaxEnd// RawSyntaxStart: getMass object @@ -24603,6 +25547,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getMissionConfig //WikiPageEnd// SyntaxStart: +getMissionConfig class //SyntaxEnd// RawSyntaxStart: getMissionConfig class @@ -24635,6 +25580,9 @@ WikiPageStart: https://community.bistudio.com/wiki/getMissionConfigValue //WikiPageEnd// SyntaxStart: +getMissionConfigValue String +%NextSyntax% +getMissionConfigValue Array //SyntaxEnd// RawSyntaxStart: getMissionConfigValue attribute @@ -24666,6 +25614,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getModelInfo //WikiPageEnd// SyntaxStart: +getModelInfo Object //SyntaxEnd// RawSyntaxStart: getModelInfo object @@ -24696,6 +25645,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getMousePosition //WikiPageEnd// SyntaxStart: +getMousePosition //SyntaxEnd// RawSyntaxStart: getMousePosition @@ -24724,6 +25674,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getNumber //WikiPageEnd// SyntaxStart: +getNumber Config //SyntaxEnd// RawSyntaxStart: getNumber config @@ -24787,6 +25738,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getObjectArgument //WikiPageEnd// SyntaxStart: +Control getObjectArgument Array //SyntaxEnd// RawSyntaxStart: map getObjectArgument [object, argument] @@ -24818,6 +25770,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getObjectChildren //WikiPageEnd// SyntaxStart: +Control getObjectChildren String //SyntaxEnd// RawSyntaxStart: map getObjectChildren object @@ -24845,6 +25798,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getObjectDLC //WikiPageEnd// SyntaxStart: +getObjectDLC Object //SyntaxEnd// RawSyntaxStart: getObjectDLC obj @@ -24878,6 +25832,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getObjectMaterials //WikiPageEnd// SyntaxStart: +getObjectMaterials Object //SyntaxEnd// RawSyntaxStart: getObjectMaterials obj @@ -24906,6 +25861,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getObjectProxy //WikiPageEnd// SyntaxStart: +Control getObjectProxy String //SyntaxEnd// RawSyntaxStart: map getObjectProxy object @@ -24936,6 +25892,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getObjectTextures //WikiPageEnd// SyntaxStart: +getObjectTextures Object //SyntaxEnd// RawSyntaxStart: getObjectTextures obj @@ -24970,6 +25927,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getObjectType //WikiPageEnd// SyntaxStart: +getObjectType Object //SyntaxEnd// RawSyntaxStart: getObjectType object @@ -25000,6 +25958,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getObjectViewDistance //WikiPageEnd// SyntaxStart: +getObjectViewDistance //SyntaxEnd// RawSyntaxStart: getObjectViewDistance @@ -25028,6 +25987,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getOxygenRemaining //WikiPageEnd// SyntaxStart: +getOxygenRemaining Object //SyntaxEnd// RawSyntaxStart: getOxygenRemaining unit @@ -25059,6 +26019,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getPersonUsedDLCs //WikiPageEnd// SyntaxStart: +getPersonUsedDLCs Object //SyntaxEnd// RawSyntaxStart: getPersonUsedDLCs unit @@ -25098,6 +26059,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getPlayerChannel //WikiPageEnd// SyntaxStart: +getPlayerChannel Object //SyntaxEnd// RawSyntaxStart: getPlayerChannel player @@ -25126,6 +26088,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getPlayerScores //WikiPageEnd// SyntaxStart: +getPlayerScores Object //SyntaxEnd// RawSyntaxStart: getPlayerScores unitName @@ -25155,6 +26118,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getPlayerUID //WikiPageEnd// SyntaxStart: +getPlayerUID Object //SyntaxEnd// RawSyntaxStart: getPlayerUID unit @@ -25186,11 +26150,14 @@ WikiPageStart: https://community.bistudio.com/wiki/getPos //WikiPageEnd// SyntaxStart: +getPos Object/Location +%NextSyntax% +Object/Position2D/Position3D getPos Array //SyntaxEnd// RawSyntaxStart: getPos object %NextRawSyntax% -origin getPos [distance, heading] Since Arma 3 v1.55.133361 +origin getPos [distance, heading] //RawSyntaxEnd// ExampleStart: $Code$hintSilent str getPos player ;$/Code$ @@ -25253,6 +26220,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getPosASL //WikiPageEnd// SyntaxStart: +getPosASL Object //SyntaxEnd// RawSyntaxStart: getPosASL object @@ -25290,6 +26258,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getPosASLVisual //WikiPageEnd// SyntaxStart: +getPosASLVisual Object: //SyntaxEnd// RawSyntaxStart: getPosASLVisual object @@ -25318,6 +26287,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getPosASLW //WikiPageEnd// SyntaxStart: +getPosASLW Object //SyntaxEnd// RawSyntaxStart: getPosASLW obj @@ -25346,12 +26316,13 @@ WikiPageStart: https://community.bistudio.com/wiki/getPosATL //WikiPageEnd// SyntaxStart: +getPosATL Object //SyntaxEnd// RawSyntaxStart: getPosATL object //RawSyntaxEnd// ExampleStart: -$Code$_objPosition getPosATL player$/Code$ +$Code$_objPosition = getPosATL player$/Code$ //ExampleEnd// LocalityStart: global / undefined @@ -25376,6 +26347,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getPosATLVisual //WikiPageEnd// SyntaxStart: +getPosATLVisual Object: //SyntaxEnd// RawSyntaxStart: getPosATLVisual object @@ -25404,6 +26376,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getPosVisual //WikiPageEnd// SyntaxStart: +getPosVisual Object: //SyntaxEnd// RawSyntaxStart: getPosVisual object @@ -25432,6 +26405,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getPosWorld //WikiPageEnd// SyntaxStart: +getPosWorld Object //SyntaxEnd// RawSyntaxStart: getPosWorld object @@ -25465,6 +26439,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getRelDir //WikiPageEnd// SyntaxStart: +Object getRelDir Object/Position2D/Position3D //SyntaxEnd// RawSyntaxStart: object getRelDir position @@ -25493,6 +26468,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getRelPos //WikiPageEnd// SyntaxStart: +Object getRelPos Array //SyntaxEnd// RawSyntaxStart: object getRelPos [distance, direction] @@ -25525,6 +26501,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getRemoteSensorsDisabled //WikiPageEnd// SyntaxStart: +getRemoteSensorsDisabled //SyntaxEnd// RawSyntaxStart: getRemoteSensorsDisabled @@ -25553,6 +26530,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getRepairCargo //WikiPageEnd// SyntaxStart: +getRepairCargo Object //SyntaxEnd// RawSyntaxStart: getRepairCargo vehicle @@ -25586,6 +26564,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getResolution //WikiPageEnd// SyntaxStart: +getResolution //SyntaxEnd// RawSyntaxStart: getResolution @@ -25641,6 +26620,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getShadowDistance //WikiPageEnd// SyntaxStart: +getShadowDistance //SyntaxEnd// RawSyntaxStart: getShadowDistance @@ -25671,6 +26651,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getSlingLoad //WikiPageEnd// SyntaxStart: +getSlingLoad Object //SyntaxEnd// RawSyntaxStart: getSlingLoad vehicle @@ -25706,6 +26687,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getSpeed //WikiPageEnd// SyntaxStart: +Object getSpeed String //SyntaxEnd// RawSyntaxStart: object getSpeed speedMode @@ -25734,6 +26716,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getStamina //WikiPageEnd// SyntaxStart: +getStamina unit; //SyntaxEnd// RawSyntaxStart: getStamina unit; @@ -25762,6 +26745,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getSuppression //WikiPageEnd// SyntaxStart: +getSuppression Object //SyntaxEnd// RawSyntaxStart: getSuppression unit @@ -25790,6 +26774,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getTerrainHeightASL //WikiPageEnd// SyntaxStart: +getTerrainHeightASL Position2D/Position3D //SyntaxEnd// RawSyntaxStart: getTerrainHeightASL position @@ -25820,6 +26805,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getText //WikiPageEnd// SyntaxStart: +getText Config //SyntaxEnd// RawSyntaxStart: getText config @@ -25888,6 +26874,9 @@ WikiPageStart: https://community.bistudio.com/wiki/getVariable //WikiPageEnd// SyntaxStart: +Namespace/Object/Display/Control/Group/Location/Task/TeamMember getVariable String +%NextSyntax% +Namespace/Object/Display/Control/Group/TeamMember getVariable Array //SyntaxEnd// RawSyntaxStart: varspace getVariable name @@ -25942,6 +26931,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getWeaponCargo //WikiPageEnd// SyntaxStart: +getWeaponCargo Object //SyntaxEnd// RawSyntaxStart: getWeaponCargo object @@ -25974,6 +26964,7 @@ WikiPageStart: https://community.bistudio.com/wiki/getWPPos //WikiPageEnd// SyntaxStart: +getWPPos Array //SyntaxEnd// RawSyntaxStart: getWPPos [group, index] @@ -26004,6 +26995,7 @@ WikiPageStart: https://community.bistudio.com/wiki/glanceAt //WikiPageEnd// SyntaxStart: +Object/Array glanceAt //SyntaxEnd// RawSyntaxStart: unit glanceAt position @@ -26034,6 +27026,7 @@ WikiPageStart: https://community.bistudio.com/wiki/globalChat //WikiPageEnd// SyntaxStart: +Object globalChat String //SyntaxEnd// RawSyntaxStart: unit globalChat chatText @@ -26071,6 +27064,7 @@ WikiPageStart: https://community.bistudio.com/wiki/globalRadio //WikiPageEnd// SyntaxStart: +Object globalRadio String //SyntaxEnd// RawSyntaxStart: unit globalRadio radioName @@ -26099,6 +27093,7 @@ WikiPageStart: https://community.bistudio.com/wiki/goggles //WikiPageEnd// SyntaxStart: +goggles Object //SyntaxEnd// RawSyntaxStart: goggles unit @@ -26131,6 +27126,7 @@ WikiPageStart: https://community.bistudio.com/wiki/goto //WikiPageEnd// SyntaxStart: +goto String //SyntaxEnd// RawSyntaxStart: goto label @@ -26177,6 +27173,7 @@ WikiPageStart: https://community.bistudio.com/wiki/group //WikiPageEnd// SyntaxStart: +group Object //SyntaxEnd// RawSyntaxStart: group object @@ -26209,6 +27206,7 @@ WikiPageStart: https://community.bistudio.com/wiki/groupChat //WikiPageEnd// SyntaxStart: +Object groupChat String //SyntaxEnd// RawSyntaxStart: unit groupChat chatText @@ -26245,6 +27243,7 @@ WikiPageStart: https://community.bistudio.com/wiki/groupFromNetId //WikiPageEnd// SyntaxStart: +groupFromNetId String //SyntaxEnd// RawSyntaxStart: groupFromNetId id @@ -26273,6 +27272,7 @@ WikiPageStart: https://community.bistudio.com/wiki/groupIconSelectable //WikiPageEnd// SyntaxStart: +groupIconSelectable //SyntaxEnd// RawSyntaxStart: groupIconSelectable @@ -26300,6 +27300,7 @@ WikiPageStart: https://community.bistudio.com/wiki/groupIconsVisible //WikiPageEnd// SyntaxStart: +groupIconsVisible //SyntaxEnd// RawSyntaxStart: groupIconsVisible @@ -26330,6 +27331,7 @@ WikiPageStart: https://community.bistudio.com/wiki/groupId //WikiPageEnd// SyntaxStart: +groupId Group //SyntaxEnd// RawSyntaxStart: groupId group @@ -26358,6 +27360,7 @@ WikiPageStart: https://community.bistudio.com/wiki/groupOwner //WikiPageEnd// SyntaxStart: +groupOwner Group //SyntaxEnd// RawSyntaxStart: groupOwner group @@ -26387,6 +27390,7 @@ WikiPageStart: https://community.bistudio.com/wiki/groupRadio //WikiPageEnd// SyntaxStart: +Object groupRadio String //SyntaxEnd// RawSyntaxStart: unit groupRadio radioName @@ -26415,6 +27419,7 @@ WikiPageStart: https://community.bistudio.com/wiki/groupSelectedUnits //WikiPageEnd// SyntaxStart: +groupSelectedUnits Object //SyntaxEnd// RawSyntaxStart: groupSelectedUnits unit @@ -26443,6 +27448,7 @@ WikiPageStart: https://community.bistudio.com/wiki/groupSelectUnit //WikiPageEnd// SyntaxStart: +Object groupSelectUnit Array //SyntaxEnd// RawSyntaxStart: player groupSelectUnit [unit, select] @@ -26485,6 +27491,7 @@ WikiPageStart: https://community.bistudio.com/wiki/grpNull //WikiPageEnd// SyntaxStart: +grpNull //SyntaxEnd// RawSyntaxStart: grpNull @@ -26515,6 +27522,7 @@ WikiPageStart: https://community.bistudio.com/wiki/gunner //WikiPageEnd// SyntaxStart: +gunner Object //SyntaxEnd// RawSyntaxStart: gunner vehicle @@ -26546,6 +27554,7 @@ WikiPageStart: https://community.bistudio.com/wiki/gusts //WikiPageEnd// SyntaxStart: +gusts //SyntaxEnd// RawSyntaxStart: gusts @@ -26574,6 +27583,7 @@ WikiPageStart: https://community.bistudio.com/wiki/halt //WikiPageEnd// SyntaxStart: +halt //SyntaxEnd// RawSyntaxStart: halt @@ -26602,6 +27612,7 @@ WikiPageStart: https://community.bistudio.com/wiki/handgunItems //WikiPageEnd// SyntaxStart: +handgunItems Object //SyntaxEnd// RawSyntaxStart: handgunItems unit @@ -26637,6 +27648,7 @@ WikiPageStart: https://community.bistudio.com/wiki/handgunMagazine //WikiPageEnd// SyntaxStart: +handgunMagazine Object //SyntaxEnd// RawSyntaxStart: handgunMagazine unit @@ -26676,6 +27688,7 @@ WikiPageStart: https://community.bistudio.com/wiki/handgunWeapon //WikiPageEnd// SyntaxStart: +handgunWeapon Object //SyntaxEnd// RawSyntaxStart: handgunWeapon unit @@ -26704,6 +27717,7 @@ WikiPageStart: https://community.bistudio.com/wiki/handsHit //WikiPageEnd// SyntaxStart: +handsHit Object //SyntaxEnd// RawSyntaxStart: handsHit unitName @@ -26732,6 +27746,7 @@ WikiPageStart: https://community.bistudio.com/wiki/hasInterface //WikiPageEnd// SyntaxStart: +hasInterface //SyntaxEnd// RawSyntaxStart: hasInterface @@ -26784,6 +27799,7 @@ WikiPageStart: https://community.bistudio.com/wiki/hasWeapon //WikiPageEnd// SyntaxStart: +Object hasWeapon String //SyntaxEnd// RawSyntaxStart: unitName hasWeapon weaponName @@ -26816,6 +27832,7 @@ WikiPageStart: https://community.bistudio.com/wiki/hcAllGroups //WikiPageEnd// SyntaxStart: +hcAllGroups Object //SyntaxEnd// RawSyntaxStart: hcAllGroups unit @@ -26844,6 +27861,7 @@ WikiPageStart: https://community.bistudio.com/wiki/hcGroupParams //WikiPageEnd// SyntaxStart: +Object hcGroupParams Group //SyntaxEnd// RawSyntaxStart: unit hcGroupParams group @@ -26871,6 +27889,7 @@ WikiPageStart: https://community.bistudio.com/wiki/hcLeader //WikiPageEnd// SyntaxStart: +hcLeader Group //SyntaxEnd// RawSyntaxStart: hcLeader group @@ -26901,6 +27920,7 @@ WikiPageStart: https://community.bistudio.com/wiki/hcRemoveAllGroups //WikiPageEnd// SyntaxStart: +hcRemoveAllGroups Object //SyntaxEnd// RawSyntaxStart: hcRemoveAllGroups unit @@ -26928,6 +27948,7 @@ WikiPageStart: https://community.bistudio.com/wiki/hcRemoveGroup //WikiPageEnd// SyntaxStart: +Object hcRemoveGroup Group //SyntaxEnd// RawSyntaxStart: unit hcRemoveGroup group @@ -26955,6 +27976,7 @@ WikiPageStart: https://community.bistudio.com/wiki/hcSelected //WikiPageEnd// SyntaxStart: +hcSelected Object //SyntaxEnd// RawSyntaxStart: hcSelected unit @@ -26983,6 +28005,7 @@ WikiPageStart: https://community.bistudio.com/wiki/hcSelectGroup //WikiPageEnd// SyntaxStart: +Object hcSelectGroup Array //SyntaxEnd// RawSyntaxStart: unit hcSelectGroup array @@ -27012,6 +28035,7 @@ WikiPageStart: https://community.bistudio.com/wiki/hcSetGroup //WikiPageEnd// SyntaxStart: +Object hcSetGroup Array //SyntaxEnd// RawSyntaxStart: unit hcSetGroup array @@ -27043,6 +28067,7 @@ WikiPageStart: https://community.bistudio.com/wiki/hcShowBar //WikiPageEnd// SyntaxStart: +hcShowBar Boolean //SyntaxEnd// RawSyntaxStart: hcShowBar bool @@ -27073,6 +28098,7 @@ WikiPageStart: https://community.bistudio.com/wiki/hcShownBar //WikiPageEnd// SyntaxStart: +hcShownBar //SyntaxEnd// RawSyntaxStart: hcShownBar @@ -27101,6 +28127,7 @@ WikiPageStart: https://community.bistudio.com/wiki/headgear //WikiPageEnd// SyntaxStart: +headgear Object //SyntaxEnd// RawSyntaxStart: headgear unit @@ -27129,6 +28156,7 @@ WikiPageStart: https://community.bistudio.com/wiki/hideBody //WikiPageEnd// SyntaxStart: +hideBody Object //SyntaxEnd// RawSyntaxStart: hideBody person @@ -27157,6 +28185,9 @@ WikiPageStart: https://community.bistudio.com/wiki/hideObject //WikiPageEnd// SyntaxStart: +hideObject Object +%NextSyntax% +Object hideObject Boolean //SyntaxEnd// RawSyntaxStart: hideObject object @@ -27216,6 +28247,9 @@ WikiPageStart: https://community.bistudio.com/wiki/hideObjectGlobal //WikiPageEnd// SyntaxStart: +hideObjectGlobal Object +%NextSyntax% +Object hideObjectGlobal Boolean //SyntaxEnd// RawSyntaxStart: hideObjectGlobal object @@ -27254,6 +28288,7 @@ WikiPageStart: https://community.bistudio.com/wiki/hint //WikiPageEnd// SyntaxStart: +hint String/StructuredText //SyntaxEnd// RawSyntaxStart: hint text @@ -27323,6 +28358,13 @@ WikiPageStart: https://community.bistudio.com/wiki/hintC //WikiPageEnd// SyntaxStart: +hintC String +%NextSyntax% +String hintC Array +%NextSyntax% +String hintC StructuredText +%NextSyntax% +String hintC //SyntaxEnd// RawSyntaxStart: hintC content @@ -27401,6 +28443,7 @@ WikiPageStart: https://community.bistudio.com/wiki/hintCadet //WikiPageEnd// SyntaxStart: +hintCadet String //SyntaxEnd// RawSyntaxStart: hintCadet text @@ -27431,6 +28474,7 @@ WikiPageStart: https://community.bistudio.com/wiki/hintSilent //WikiPageEnd// SyntaxStart: +hintSilent String/StructuredText //SyntaxEnd// RawSyntaxStart: hintSilent text @@ -27459,6 +28503,7 @@ WikiPageStart: https://community.bistudio.com/wiki/hmd //WikiPageEnd// SyntaxStart: +hmd Object //SyntaxEnd// RawSyntaxStart: hmd unit @@ -27489,6 +28534,7 @@ WikiPageStart: https://community.bistudio.com/wiki/hostMission //WikiPageEnd// SyntaxStart: +hostMission Array //SyntaxEnd// RawSyntaxStart: hostMission [pConfig, pDisplay] @@ -27527,6 +28573,7 @@ WikiPageStart: https://community.bistudio.com/wiki/htmlLoad //WikiPageEnd// SyntaxStart: +Control htmlLoad String //SyntaxEnd// RawSyntaxStart: control htmlLoad filename @@ -27587,6 +28634,7 @@ WikiPageStart: https://community.bistudio.com/wiki/HUDMovementLevels //WikiPageEnd// SyntaxStart: +HUDMovementLevels //SyntaxEnd// RawSyntaxStart: HUDMovementLevels @@ -27615,6 +28663,7 @@ WikiPageStart: https://community.bistudio.com/wiki/humidity //WikiPageEnd// SyntaxStart: +humidity //SyntaxEnd// RawSyntaxStart: humidity @@ -27657,6 +28706,21 @@ Result of the Code executed is returned as the result to this command (which may WikiPageStart: https://community.bistudio.com/wiki/if //WikiPageEnd// +SyntaxStart: +if rigthConstruct +//SyntaxEnd// +RawSyntaxStart: +//RawSyntaxEnd// +ExampleStart: +//ExampleEnd// +LocalityStart: +undefined / undefined +//LocalityEnd// +NoteStart: +//NoteEnd// +ReturnValueStart: +Nothing +//ReturnValueEnd// %NextListItem% @@ -27670,6 +28734,7 @@ WikiPageStart: https://community.bistudio.com/wiki/image //WikiPageEnd// SyntaxStart: +image String //SyntaxEnd// RawSyntaxStart: image filename @@ -27701,6 +28766,7 @@ WikiPageStart: https://community.bistudio.com/wiki/importAllGroups //WikiPageEnd// SyntaxStart: +importAllGroups Control //SyntaxEnd// RawSyntaxStart: importAllGroups map @@ -27728,6 +28794,7 @@ WikiPageStart: https://community.bistudio.com/wiki/importance //WikiPageEnd// SyntaxStart: +importance Location //SyntaxEnd// RawSyntaxStart: importance location @@ -27756,6 +28823,11 @@ WikiPageStart: https://community.bistudio.com/wiki/in //WikiPageEnd// SyntaxStart: +Anyth in g in Array +%NextSyntax% +Object in +%NextSyntax% +Array in Location //SyntaxEnd// RawSyntaxStart: value in array @@ -27810,6 +28882,13 @@ WikiPageStart: https://community.bistudio.com/wiki/inArea //WikiPageEnd// SyntaxStart: +Array/Object inArea Object +%NextSyntax% +Array/Object inArea String +%NextSyntax% +Array/Object inArea Location +%NextSyntax% +Array/Object inArea Array //SyntaxEnd// RawSyntaxStart: position inArea trigger @@ -27846,6 +28925,7 @@ WikiPageStart: https://community.bistudio.com/wiki/incapacitatedState //WikiPageEnd// SyntaxStart: +incapacitatedState Object //SyntaxEnd// RawSyntaxStart: incapacitatedState person @@ -27875,6 +28955,7 @@ WikiPageStart: https://community.bistudio.com/wiki/independent //WikiPageEnd// SyntaxStart: +independent //SyntaxEnd// RawSyntaxStart: independent @@ -27906,6 +28987,7 @@ WikiPageStart: https://community.bistudio.com/wiki/inflame //WikiPageEnd// SyntaxStart: +Object inflame Boolean //SyntaxEnd// RawSyntaxStart: fireplace inflame burn @@ -27934,6 +29016,7 @@ WikiPageStart: https://community.bistudio.com/wiki/inflamed //WikiPageEnd// SyntaxStart: +inflamed Object //SyntaxEnd// RawSyntaxStart: inflamed fireplace @@ -27978,6 +29061,7 @@ WikiPageStart: https://community.bistudio.com/wiki/inGameUISetEventHandler //WikiPageEnd// SyntaxStart: +inGameUISetEventHandler Array //SyntaxEnd// RawSyntaxStart: inGameUISetEventHandler [handlerName, function] @@ -28023,6 +29107,8 @@ LocalityStart: 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. //NoteEnd// ReturnValueStart: Nothing @@ -28040,6 +29126,7 @@ WikiPageStart: https://community.bistudio.com/wiki/inheritsFrom //WikiPageEnd// SyntaxStart: +inheritsFrom Config //SyntaxEnd// RawSyntaxStart: inheritsFrom config @@ -28080,6 +29167,7 @@ WikiPageStart: https://community.bistudio.com/wiki/initAmbientLife //WikiPageEnd// SyntaxStart: +initAmbientLife //SyntaxEnd// RawSyntaxStart: initAmbientLife @@ -28107,6 +29195,7 @@ WikiPageStart: https://community.bistudio.com/wiki/inPolygon //WikiPageEnd// SyntaxStart: +Array inPolygon //SyntaxEnd// RawSyntaxStart: position inPolygon polygon @@ -28138,6 +29227,7 @@ WikiPageStart: https://community.bistudio.com/wiki/inputAction //WikiPageEnd// SyntaxStart: +inputAction String //SyntaxEnd// RawSyntaxStart: inputAction name @@ -28181,6 +29271,7 @@ WikiPageStart: https://community.bistudio.com/wiki/inRangeOfArtillery //WikiPageEnd// SyntaxStart: +Position inRangeOfArtillery Array //SyntaxEnd// RawSyntaxStart: pos inRangeOfArtillery [[unit], magazineType] @@ -28211,6 +29302,7 @@ WikiPageStart: https://community.bistudio.com/wiki/insertEditorObject //WikiPageEnd// SyntaxStart: +Control insertEditorObject Array //SyntaxEnd// RawSyntaxStart: map insertEditorObject [type,value,[name1,value1,...],subtype class] @@ -28244,6 +29336,7 @@ WikiPageStart: https://community.bistudio.com/wiki/intersect //WikiPageEnd// SyntaxStart: +Array intersect //SyntaxEnd// RawSyntaxStart: [object, lodName] intersect [begPos, endPos] @@ -28309,6 +29402,7 @@ WikiPageStart: https://community.bistudio.com/wiki/is3DEN //WikiPageEnd// SyntaxStart: +is3DEN //SyntaxEnd// RawSyntaxStart: is3DEN @@ -28337,6 +29431,7 @@ WikiPageStart: https://community.bistudio.com/wiki/is3DENMultiplayer //WikiPageEnd// SyntaxStart: +is3DENMultiplayer //SyntaxEnd// RawSyntaxStart: is3DENMultiplayer @@ -28365,6 +29460,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isAbleToBreathe //WikiPageEnd// SyntaxStart: +isAbleToBreathe Object //SyntaxEnd// RawSyntaxStart: isAbleToBreathe unit @@ -28392,6 +29488,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isAgent //WikiPageEnd// SyntaxStart: +isAgent TeamMember //SyntaxEnd// RawSyntaxStart: isAgent teamMember @@ -28419,6 +29516,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isArray //WikiPageEnd// SyntaxStart: +isArray Config //SyntaxEnd// RawSyntaxStart: isArray config @@ -28448,6 +29546,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isAutoHoverOn //WikiPageEnd// SyntaxStart: +isAutoHoverOn Object //SyntaxEnd// RawSyntaxStart: isAutoHoverOn vehicle @@ -28476,6 +29575,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isAutonomous //WikiPageEnd// SyntaxStart: +isAutonomous Object //SyntaxEnd// RawSyntaxStart: isAutonomous uav @@ -28504,6 +29604,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isAutotest //WikiPageEnd// SyntaxStart: +isAutotest //SyntaxEnd// RawSyntaxStart: isAutotest @@ -28532,6 +29633,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isBleeding //WikiPageEnd// SyntaxStart: +isBleeding Object //SyntaxEnd// RawSyntaxStart: isBleeding unit @@ -28560,6 +29662,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isBurning //WikiPageEnd// SyntaxStart: +isBurning Object //SyntaxEnd// RawSyntaxStart: isBurning unit @@ -28588,6 +29691,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isClass //WikiPageEnd// SyntaxStart: +isClass Config //SyntaxEnd// RawSyntaxStart: isClass config @@ -28627,6 +29731,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isCollisionLightOn //WikiPageEnd// SyntaxStart: +isCollisionLightOn Object //SyntaxEnd// RawSyntaxStart: isCollisionLightOn vehicle @@ -28663,6 +29768,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isCopilotEnabled //WikiPageEnd// SyntaxStart: +isCopilotEnabled Object //SyntaxEnd// RawSyntaxStart: isCopilotEnabled vehicle @@ -28696,6 +29802,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isDedicated //WikiPageEnd// SyntaxStart: +isDedicated //SyntaxEnd// RawSyntaxStart: isDedicated @@ -28746,6 +29853,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isDLCAvailable //WikiPageEnd// SyntaxStart: +isDLCAvailable Number //SyntaxEnd// RawSyntaxStart: isDLCAvailable appid @@ -28780,6 +29888,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isEngineOn //WikiPageEnd// SyntaxStart: +isEngineOn Object //SyntaxEnd// RawSyntaxStart: isEngineOn vehicle @@ -28825,6 +29934,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isEqualTo //WikiPageEnd// SyntaxStart: +Anything isEqualTo //SyntaxEnd// RawSyntaxStart: var1 isEqualTo var2 @@ -28845,7 +29955,7 @@ NoteStart: The behavior of "var1 isEqualTo var2" is pretty much equivalent to "var1 in [var2]", plus the ability to compare arrays, and slightly better performance. %NextNote% (December 3, 2014) -Simply put, "isEqualTo" is a binary comparison. Therefor it is very fast but only accepts 100% identical matches. In some other languages this is known as " " instead of " ". +Simply put, "isEqualTo" is a binary comparison. Therefor it is very fast but only accepts 100% identical matches. In some other languages this is known as "===" instead of "==". %NextNote% (May 21, 2015) A faster, case-sensitive alternative to BIS_fnc_areEqual using isEqualTo : @@ -28885,6 +29995,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isEqualType //WikiPageEnd// SyntaxStart: +Anything isEqualType //SyntaxEnd// RawSyntaxStart: val1 isEqualType val2 @@ -28915,6 +30026,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isEqualTypeAll //WikiPageEnd// SyntaxStart: +Array isEqualTypeAll Anything //SyntaxEnd// RawSyntaxStart: arr isEqualTypeAll val @@ -28950,6 +30062,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isEqualTypeAny //WikiPageEnd// SyntaxStart: +Anything isEqualTypeAny Array //SyntaxEnd// RawSyntaxStart: val isEqualTypeAny types @@ -28980,6 +30093,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isEqualTypeArray //WikiPageEnd// SyntaxStart: +Array isEqualTypeArray //SyntaxEnd// RawSyntaxStart: arr1 isEqualTypeArray arr2 @@ -29013,6 +30127,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isEqualTypeParams //WikiPageEnd// SyntaxStart: +Anything isEqualTypeParams Array //SyntaxEnd// RawSyntaxStart: input isEqualTypeParams template @@ -29046,6 +30161,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isFilePatchingEnabled //WikiPageEnd// SyntaxStart: +isFilePatchingEnabled //SyntaxEnd// RawSyntaxStart: isFilePatchingEnabled @@ -29073,12 +30189,13 @@ WikiPageStart: https://community.bistudio.com/wiki/isFlashlightOn //WikiPageEnd// SyntaxStart: +Object isFlashlightOn String //SyntaxEnd// RawSyntaxStart: unit isFlashlightOn weapon //RawSyntaxEnd// ExampleStart: -$Code$player isFlashlightOn (currentWeapon player);$/Code$ +$Code$player isFlashlightOn ( currentWeapon player );$/Code$ //ExampleEnd// LocalityStart: undefined / undefined @@ -29105,14 +30222,16 @@ Objects accounted for proximity check seem to be static objects. Nearby vehicles Given position will be magically transferred into given position + getTerrainHeightASL value The second element must be -1 ( = 0 really) at all times, otherwise command becomes unusable The command might be a bit heavy on computations so avoid frequent and large area checks +See also: BIS_fnc_findSafePos //DescriptionEnd// WikiPageStart: https://community.bistudio.com/wiki/isFlatEmpty //WikiPageEnd// SyntaxStart: +Array isFlatEmpty //SyntaxEnd// RawSyntaxStart: -position isFlatEmpty [minDistance, -1, maxGradient, maxGradientRadius, overLandOrWater, shoreLine, ignoreObject] +position isFlatEmpty [minDistance, mode, maxGradient, maxGradientRadius, overLandOrWater, shoreLine, ignoreObject] //RawSyntaxEnd// ExampleStart: $Code$// Check if player position is over land: @@ -29182,6 +30301,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isForcedWalk //WikiPageEnd// SyntaxStart: +isForcedWalk Object //SyntaxEnd// RawSyntaxStart: isForcedWalk unitName @@ -29210,6 +30330,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isFormationLeader //WikiPageEnd// SyntaxStart: +isFormationLeader Object //SyntaxEnd// RawSyntaxStart: isFormationLeader unit @@ -29238,6 +30359,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isHidden //WikiPageEnd// SyntaxStart: +isHidden Object //SyntaxEnd// RawSyntaxStart: isHidden person @@ -29265,6 +30387,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isInRemainsCollector //WikiPageEnd// SyntaxStart: +isInRemainsCollector Object //SyntaxEnd// RawSyntaxStart: isInRemainsCollector remain @@ -29293,6 +30416,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isInstructorFigureEnabled //WikiPageEnd// SyntaxStart: +isInstructorFigureEnabled //SyntaxEnd// RawSyntaxStart: isInstructorFigureEnabled @@ -29320,6 +30444,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isIRLaserOn //WikiPageEnd// SyntaxStart: +Object isIRLaserOn String //SyntaxEnd// RawSyntaxStart: unit isIRLaserOn weapon @@ -29349,6 +30474,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isKeyActive //WikiPageEnd// SyntaxStart: +isKeyActive String //SyntaxEnd// RawSyntaxStart: isKeyActive keyName @@ -29377,6 +30503,11 @@ WikiPageStart: https://community.bistudio.com/wiki/isKindOf //WikiPageEnd// SyntaxStart: +Object isKindOf String +%NextSyntax% +String isKindOf +%NextSyntax% +String isKindOf Array //SyntaxEnd// RawSyntaxStart: object isKindOf typeName @@ -29434,6 +30565,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isLightOn //WikiPageEnd// SyntaxStart: +isLightOn Object //SyntaxEnd// RawSyntaxStart: isLightOn vehicle @@ -29464,6 +30596,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isLocalized //WikiPageEnd// SyntaxStart: +isLocalized String //SyntaxEnd// RawSyntaxStart: isLocalized stringName @@ -29498,6 +30631,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isManualFire //WikiPageEnd// SyntaxStart: +isManualFire Object //SyntaxEnd// RawSyntaxStart: isManualFire vehicleName @@ -29526,6 +30660,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isMarkedForCollection //WikiPageEnd// SyntaxStart: +isMarkedForCollection Object //SyntaxEnd// RawSyntaxStart: isMarkedForCollection object @@ -29554,6 +30689,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isMultiplayer //WikiPageEnd// SyntaxStart: +isMultiplayer //SyntaxEnd// RawSyntaxStart: isMultiplayer @@ -29585,6 +30721,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isNil //WikiPageEnd// SyntaxStart: +isNil String/Code //SyntaxEnd// RawSyntaxStart: isNil variable @@ -29661,6 +30798,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isNull //WikiPageEnd// SyntaxStart: +isNull Object/Control/Display/Group //SyntaxEnd// RawSyntaxStart: isNull entity @@ -29699,6 +30837,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isNumber //WikiPageEnd// SyntaxStart: +isNumber Config //SyntaxEnd// RawSyntaxStart: isNumber config @@ -29728,6 +30867,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isObjectHidden //WikiPageEnd// SyntaxStart: +isObjectHidden Object //SyntaxEnd// RawSyntaxStart: isObjectHidden object @@ -29756,6 +30896,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isObjectRTD //WikiPageEnd// SyntaxStart: +isObjectRTD Object //SyntaxEnd// RawSyntaxStart: isObjectRTD helicopter @@ -29784,6 +30925,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isOnRoad //WikiPageEnd// SyntaxStart: +isOnRoad Object/Array //SyntaxEnd// RawSyntaxStart: isOnRoad position @@ -29814,6 +30956,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isPipEnabled //WikiPageEnd// SyntaxStart: +isPipEnabled //SyntaxEnd// RawSyntaxStart: isPipEnabled @@ -29842,6 +30985,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isPlayer //WikiPageEnd// SyntaxStart: +isPlayer Object //SyntaxEnd// RawSyntaxStart: isPlayer person @@ -29876,6 +31020,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isRealTime //WikiPageEnd// SyntaxStart: +isRealTime Control //SyntaxEnd// RawSyntaxStart: isRealTime map @@ -29904,6 +31049,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isServer //WikiPageEnd// SyntaxStart: +isServer //SyntaxEnd// RawSyntaxStart: isServer @@ -29957,6 +31103,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isShowing3DIcons //WikiPageEnd// SyntaxStart: +isShowing3DIcons Control //SyntaxEnd// RawSyntaxStart: isShowing3DIcons map @@ -29984,6 +31131,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isSprintAllowed //WikiPageEnd// SyntaxStart: +isSprintAllowed Object //SyntaxEnd// RawSyntaxStart: isSprintAllowed unit @@ -30012,6 +31160,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isStaminaEnabled //WikiPageEnd// SyntaxStart: +isStaminaEnabled unit; //SyntaxEnd// RawSyntaxStart: isStaminaEnabled unit; @@ -30040,6 +31189,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isSteamMission //WikiPageEnd// SyntaxStart: +isSteamMission //SyntaxEnd// RawSyntaxStart: isSteamMission @@ -30075,6 +31225,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isStreamFriendlyUIEnabled //WikiPageEnd// SyntaxStart: +isStreamFriendlyUIEnabled //SyntaxEnd// RawSyntaxStart: isStreamFriendlyUIEnabled @@ -30102,6 +31253,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isText //WikiPageEnd// SyntaxStart: +isText Config //SyntaxEnd// RawSyntaxStart: isText config @@ -30131,6 +31283,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isTouchingGround //WikiPageEnd// SyntaxStart: +isTouchingGround Object //SyntaxEnd// RawSyntaxStart: isTouchingGround object @@ -30161,6 +31314,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isTurnedOut //WikiPageEnd// SyntaxStart: +isTurnedOut Object //SyntaxEnd// RawSyntaxStart: isTurnedOut unit @@ -30189,6 +31343,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isTutHintsEnabled //WikiPageEnd// SyntaxStart: +isTutHintsEnabled //SyntaxEnd// RawSyntaxStart: isTutHintsEnabled @@ -30216,6 +31371,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isUAVConnectable //WikiPageEnd// SyntaxStart: +Object isUAVConnectable Array //SyntaxEnd// RawSyntaxStart: object isUAVConnectable [uav, checkAllItems] @@ -30244,6 +31400,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isUAVConnected //WikiPageEnd// SyntaxStart: +isUAVConnected Object //SyntaxEnd// RawSyntaxStart: isUAVConnected uav @@ -30272,6 +31429,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isUniformAllowed //WikiPageEnd// SyntaxStart: +Object isUniformAllowed String //SyntaxEnd// RawSyntaxStart: unit isUniformAllowed type @@ -30300,6 +31458,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isWalking //WikiPageEnd// SyntaxStart: +isWalking Object //SyntaxEnd// RawSyntaxStart: isWalking unitName @@ -30330,6 +31489,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isWeaponDeployed //WikiPageEnd// SyntaxStart: +isWeaponDeployed Object //SyntaxEnd// RawSyntaxStart: isWeaponDeployed unit @@ -30361,6 +31521,7 @@ WikiPageStart: https://community.bistudio.com/wiki/isWeaponRested //WikiPageEnd// SyntaxStart: +isWeaponRested Object //SyntaxEnd// RawSyntaxStart: isWeaponRested unit @@ -30395,6 +31556,7 @@ WikiPageStart: https://community.bistudio.com/wiki/itemCargo //WikiPageEnd// SyntaxStart: +itemCargo Object //SyntaxEnd// RawSyntaxStart: itemCargo box @@ -30423,6 +31585,7 @@ WikiPageStart: https://community.bistudio.com/wiki/items //WikiPageEnd// SyntaxStart: +items Object //SyntaxEnd// RawSyntaxStart: items unit @@ -30455,6 +31618,7 @@ WikiPageStart: https://community.bistudio.com/wiki/itemsWithMagazines //WikiPageEnd// SyntaxStart: +itemsWithMagazines Object //SyntaxEnd// RawSyntaxStart: itemsWithMagazines unit @@ -30500,6 +31664,7 @@ WikiPageStart: https://community.bistudio.com/wiki/join //WikiPageEnd// SyntaxStart: +Array join Group/Object //SyntaxEnd// RawSyntaxStart: unitArray join group @@ -30530,6 +31695,7 @@ WikiPageStart: https://community.bistudio.com/wiki/joinAs //WikiPageEnd// SyntaxStart: +Object joinAs Array //SyntaxEnd// RawSyntaxStart: unit joinAs [group, id] @@ -30571,6 +31737,7 @@ WikiPageStart: https://community.bistudio.com/wiki/joinAsSilent //WikiPageEnd// SyntaxStart: +Object joinAsSilent Array //SyntaxEnd// RawSyntaxStart: unit joinAsSilent [group, id] @@ -30613,6 +31780,7 @@ WikiPageStart: https://community.bistudio.com/wiki/joinSilent //WikiPageEnd// SyntaxStart: +Array joinSilent Object/Group //SyntaxEnd// RawSyntaxStart: unitArray joinSilent group @@ -30645,6 +31813,7 @@ WikiPageStart: https://community.bistudio.com/wiki/joinString //WikiPageEnd// SyntaxStart: +Array joinString String //SyntaxEnd// RawSyntaxStart: array joinString separator @@ -30685,6 +31854,7 @@ WikiPageStart: https://community.bistudio.com/wiki/kbAddDatabase //WikiPageEnd// SyntaxStart: +Object kbAddDatabase String //SyntaxEnd// RawSyntaxStart: person kbAddDatabase filename @@ -30713,6 +31883,7 @@ WikiPageStart: https://community.bistudio.com/wiki/kbAddDatabaseTargets //WikiPageEnd// SyntaxStart: +Object kbAddDatabaseTargets String //SyntaxEnd// RawSyntaxStart: person kbAddDatabaseTargets filename @@ -30741,6 +31912,7 @@ WikiPageStart: https://community.bistudio.com/wiki/kbAddTopic //WikiPageEnd// SyntaxStart: +Object kbAddTopic Array //SyntaxEnd// RawSyntaxStart: person kbAddTopic [TopicName, filename.bikb, filename.fsm, event_handler] @@ -30772,6 +31944,7 @@ WikiPageStart: https://community.bistudio.com/wiki/kbHasTopic //WikiPageEnd// SyntaxStart: +Object kbHasTopic String //SyntaxEnd// RawSyntaxStart: person kbHasTopic TopicName @@ -30799,6 +31972,7 @@ WikiPageStart: https://community.bistudio.com/wiki/kbReact //WikiPageEnd// SyntaxStart: +Object kbReact Array //SyntaxEnd// RawSyntaxStart: person kbReact [receiver,topic,sentenceID,[argumentName,argumentValue,argumentText,argumentSpeech],...] @@ -30826,6 +32000,7 @@ WikiPageStart: https://community.bistudio.com/wiki/kbRemoveTopic //WikiPageEnd// SyntaxStart: +Object kbRemoveTopic String //SyntaxEnd// RawSyntaxStart: person kbRemoveTopic TopicName @@ -30853,6 +32028,7 @@ WikiPageStart: https://community.bistudio.com/wiki/kbTell //WikiPageEnd// SyntaxStart: +Object kbTell Array //SyntaxEnd// RawSyntaxStart: person kbTell [receiver, TopicName, SentenceClass, [argumentName, argumentValue, argumentText, argumentSpeech],...,forceRadio] @@ -30920,6 +32096,7 @@ WikiPageStart: https://community.bistudio.com/wiki/kbWasSaid //WikiPageEnd// SyntaxStart: +Object kbWasSaid Array //SyntaxEnd// RawSyntaxStart: person kbWasSaid [receiver, topic, sentenceID, maxAge] @@ -30948,6 +32125,7 @@ WikiPageStart: https://community.bistudio.com/wiki/keyImage //WikiPageEnd// SyntaxStart: +keyImage Number //SyntaxEnd// RawSyntaxStart: keyImage dikCode @@ -30976,6 +32154,7 @@ WikiPageStart: https://community.bistudio.com/wiki/keyName //WikiPageEnd// SyntaxStart: +keyName Number //SyntaxEnd// RawSyntaxStart: keyName dikCode @@ -31004,6 +32183,9 @@ WikiPageStart: https://community.bistudio.com/wiki/knowsAbout //WikiPageEnd// SyntaxStart: +Object/Group knowsAbout Object +%NextSyntax% +Side knowsAbout Object //SyntaxEnd// RawSyntaxStart: who knowsAbout target @@ -31139,6 +32321,7 @@ WikiPageStart: https://community.bistudio.com/wiki/land //WikiPageEnd// SyntaxStart: +Object land String //SyntaxEnd// RawSyntaxStart: helicopter land mode @@ -31183,6 +32366,7 @@ WikiPageStart: https://community.bistudio.com/wiki/landAt //WikiPageEnd// SyntaxStart: +Object landAt Number //SyntaxEnd// RawSyntaxStart: plane landAt id @@ -31243,6 +32427,7 @@ WikiPageStart: https://community.bistudio.com/wiki/landResult //WikiPageEnd// SyntaxStart: +landResult Object //SyntaxEnd// RawSyntaxStart: landResult helicopter @@ -31270,6 +32455,7 @@ WikiPageStart: https://community.bistudio.com/wiki/language //WikiPageEnd// SyntaxStart: +language //SyntaxEnd// RawSyntaxStart: language @@ -31297,6 +32483,7 @@ WikiPageStart: https://community.bistudio.com/wiki/laserTarget //WikiPageEnd// SyntaxStart: +laserTarget Object //SyntaxEnd// RawSyntaxStart: laserTarget unitName @@ -31333,6 +32520,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbAdd //WikiPageEnd// SyntaxStart: +lbAdd Array +%NextSyntax% +Control lbAdd String //SyntaxEnd// RawSyntaxStart: lbAdd [idc, text] @@ -31375,6 +32565,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbClear //WikiPageEnd// SyntaxStart: +lbClear Number +%NextSyntax% +lbClear Control //SyntaxEnd// RawSyntaxStart: lbClear idc @@ -31409,6 +32602,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbColor //WikiPageEnd// SyntaxStart: +lbColor Array +%NextSyntax% +Control lbColor Number //SyntaxEnd// RawSyntaxStart: lbColor [idc, index] @@ -31442,6 +32638,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbCurSel //WikiPageEnd// SyntaxStart: +lbCurSel Number +%NextSyntax% +lbCurSel Control //SyntaxEnd// RawSyntaxStart: lbCurSel idc @@ -31478,6 +32677,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbData //WikiPageEnd// SyntaxStart: +lbData Array +%NextSyntax% +Control lbData Number //SyntaxEnd// RawSyntaxStart: lbData [idc, index] @@ -31511,6 +32713,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbDelete //WikiPageEnd// SyntaxStart: +lbDelete Array +%NextSyntax% +Control lbDelete Number //SyntaxEnd// RawSyntaxStart: lbDelete [idc, index] @@ -31544,6 +32749,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lbIsSelected //WikiPageEnd// SyntaxStart: +Control lbIsSelected Number //SyntaxEnd// RawSyntaxStart: control lbIsSelected index @@ -31573,6 +32779,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbPicture //WikiPageEnd// SyntaxStart: +lbPicture Array +%NextSyntax% +Control lbPicture Number //SyntaxEnd// RawSyntaxStart: lbPicture [idc, index] @@ -31606,6 +32815,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lbSelection //WikiPageEnd// SyntaxStart: +lbSelection Control //SyntaxEnd// RawSyntaxStart: lbSelection control @@ -31637,6 +32847,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbSetColor //WikiPageEnd// SyntaxStart: +lbSetColor Array +%NextSyntax% +Control lbSetColor Array //SyntaxEnd// RawSyntaxStart: lbSetColor [idc, index, color] @@ -31671,6 +32884,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbSetCurSel //WikiPageEnd// SyntaxStart: +lbSetCurSel Array +%NextSyntax% +Control lbSetCurSel Number //SyntaxEnd// RawSyntaxStart: lbSetCurSel [idc, index] @@ -31710,6 +32926,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbSetData //WikiPageEnd// SyntaxStart: +lbSetData Array +%NextSyntax% +Control lbSetData Array //SyntaxEnd// RawSyntaxStart: lbSetData [idc, index, data] @@ -31744,6 +32963,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbSetPicture //WikiPageEnd// SyntaxStart: +lbSetPicture Array +%NextSyntax% +Control lbSetPicture Array //SyntaxEnd// RawSyntaxStart: lbSetPicture [idc, index, name] @@ -31780,6 +33002,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbSetPictureColor //WikiPageEnd// SyntaxStart: +lbSetPictureColor Array +%NextSyntax% +Control lbSetPictureColor Array //SyntaxEnd// RawSyntaxStart: lbSetPictureColor [idc, index, color] @@ -31817,6 +33042,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbSetPictureColorDisabled //WikiPageEnd// SyntaxStart: +lbSetPictureColorDisabled Array +%NextSyntax% +Control lbSetPictureColorDisabled Array //SyntaxEnd// RawSyntaxStart: lbSetPictureColorDisabled [idc, index, color] @@ -31850,6 +33078,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbSetPictureColorSelected //WikiPageEnd// SyntaxStart: +lbSetPictureColorSelected Array +%NextSyntax% +Control lbSetPictureColorSelected Array //SyntaxEnd// RawSyntaxStart: lbSetPictureColorSelected [idc, index, color] @@ -31884,6 +33115,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbSetSelectColor //WikiPageEnd// SyntaxStart: +lbSetSelectColor Array +%NextSyntax% +Control lbSetSelectColor Array //SyntaxEnd// RawSyntaxStart: lbSetSelectColor [idc, index, color] @@ -31918,6 +33152,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbSetSelectColorRight //WikiPageEnd// SyntaxStart: +lbSetSelectColorRight Array +%NextSyntax% +Control lbSetSelectColorRight Array //SyntaxEnd// RawSyntaxStart: lbSetSelectColorRight [idc, index, color] @@ -31951,6 +33188,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lbSetSelected //WikiPageEnd// SyntaxStart: +Control lbSetSelected Array //SyntaxEnd// RawSyntaxStart: control lbSetSelected [index, selected] @@ -31981,6 +33219,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbSetTooltip //WikiPageEnd// SyntaxStart: +lbSetTooltip Array +%NextSyntax% +Control lbSetTooltip Array //SyntaxEnd// RawSyntaxStart: lbSetTooltip [idc, index, tooltip] @@ -32014,6 +33255,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbSetValue //WikiPageEnd// SyntaxStart: +lbSetValue Array +%NextSyntax% +Control lbSetValue Array //SyntaxEnd// RawSyntaxStart: lbSetValue [idc, index, value] @@ -32053,6 +33297,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbSize //WikiPageEnd// SyntaxStart: +lbSize Number +%NextSyntax% +lbSize Control //SyntaxEnd// RawSyntaxStart: lbSize idc @@ -32090,6 +33337,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbSort //WikiPageEnd// SyntaxStart: +lbSort Control +%NextSyntax% +lbSort Array //SyntaxEnd// RawSyntaxStart: lbSort control @@ -32125,6 +33375,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lbSortByValue //WikiPageEnd// SyntaxStart: +lbSortByValue Control //SyntaxEnd// RawSyntaxStart: lbSortByValue control @@ -32157,6 +33408,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbText //WikiPageEnd// SyntaxStart: +lbText Array +%NextSyntax% +Control lbText Number //SyntaxEnd// RawSyntaxStart: lbText [idc, index] @@ -32190,6 +33444,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lbValue //WikiPageEnd// SyntaxStart: +lbValue Array +%NextSyntax% +Control lbValue Number //SyntaxEnd// RawSyntaxStart: lbValue [idc, index] @@ -32223,6 +33480,7 @@ WikiPageStart: https://community.bistudio.com/wiki/leader //WikiPageEnd// SyntaxStart: +leader Object/Group //SyntaxEnd// RawSyntaxStart: leader unitName @@ -32255,6 +33513,7 @@ WikiPageStart: https://community.bistudio.com/wiki/leaderboardDeInit //WikiPageEnd// SyntaxStart: +leaderboardDeInit String //SyntaxEnd// RawSyntaxStart: leaderboardDeInit boardName @@ -32283,6 +33542,7 @@ WikiPageStart: https://community.bistudio.com/wiki/leaderboardGetRows //WikiPageEnd// SyntaxStart: +leaderboardGetRows String //SyntaxEnd// RawSyntaxStart: leaderboardGetRows boardName @@ -32311,6 +33571,7 @@ WikiPageStart: https://community.bistudio.com/wiki/leaderboardInit //WikiPageEnd// SyntaxStart: +leaderboardInit String //SyntaxEnd// RawSyntaxStart: leaderboardInit boardName @@ -32341,6 +33602,7 @@ WikiPageStart: https://community.bistudio.com/wiki/leaveVehicle //WikiPageEnd// SyntaxStart: +Group/Object/in leaveVehicle Object //SyntaxEnd// RawSyntaxStart: group leaveVehicle vehicle @@ -32373,6 +33635,7 @@ WikiPageStart: https://community.bistudio.com/wiki/libraryCredits //WikiPageEnd// SyntaxStart: +libraryCredits //SyntaxEnd// RawSyntaxStart: libraryCredits @@ -32457,6 +33720,7 @@ WikiPageStart: https://community.bistudio.com/wiki/libraryDisclaimers //WikiPageEnd// SyntaxStart: +libraryDisclaimers //SyntaxEnd// RawSyntaxStart: libraryDisclaimers @@ -32501,6 +33765,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lifeState //WikiPageEnd// SyntaxStart: +lifeState Object //SyntaxEnd// RawSyntaxStart: lifeState unit @@ -32529,6 +33794,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lightAttachObject //WikiPageEnd// SyntaxStart: +Object lightAttachObject Array //SyntaxEnd// RawSyntaxStart: light lightAttachObject [object, position] @@ -32569,6 +33835,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lightDetachObject //WikiPageEnd// SyntaxStart: +lightDetachObject Object //SyntaxEnd// RawSyntaxStart: lightDetachObject light @@ -32601,6 +33868,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lightIsOn //WikiPageEnd// SyntaxStart: +lightIsOn Object //SyntaxEnd// RawSyntaxStart: lightIsOn lamppost @@ -32640,6 +33908,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lightnings //WikiPageEnd// SyntaxStart: +lightnings //SyntaxEnd// RawSyntaxStart: lightnings @@ -32669,6 +33938,7 @@ WikiPageStart: https://community.bistudio.com/wiki/limitSpeed //WikiPageEnd// SyntaxStart: +Object limitSpeed Number //SyntaxEnd// RawSyntaxStart: objectName limitSpeed speed @@ -32713,6 +33983,7 @@ WikiPageStart: https://community.bistudio.com/wiki/linearConversion //WikiPageEnd// SyntaxStart: +linearConversion Array //SyntaxEnd// RawSyntaxStart: linearConversion [minFrom, maxFrom, value, minTo, maxTo, clip] @@ -32761,6 +34032,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lineBreak //WikiPageEnd// SyntaxStart: +lineBreak //SyntaxEnd// RawSyntaxStart: lineBreak @@ -32790,6 +34062,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lineIntersects //WikiPageEnd// SyntaxStart: +lineIntersects Array //SyntaxEnd// RawSyntaxStart: lineIntersects [begPos, endPos, objIgnore1, objIgnore2] @@ -32826,6 +34099,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lineIntersectsObjs //WikiPageEnd// SyntaxStart: +lineIntersectsObjs Array //SyntaxEnd// RawSyntaxStart: lineIntersectsObjs [begPos, endPos, withObj, ignoreObj, sortByDistance, flags] @@ -32882,6 +34156,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lineIntersectsSurfaces //WikiPageEnd// SyntaxStart: +lineIntersectsSurfaces Array //SyntaxEnd// RawSyntaxStart: lineIntersectsSurfaces [begPosASL, endPosASL, ignoreObj1, ignoreObj2, sortMode, maxResults, LOD1, LOD2] @@ -32974,6 +34249,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lineIntersectsWith //WikiPageEnd// SyntaxStart: +lineIntersectsWith Array //SyntaxEnd// RawSyntaxStart: lineIntersectsWith [begPos, endPos, objIgnore1, objIgnore2, sortByDistance] @@ -33016,6 +34292,7 @@ WikiPageStart: https://community.bistudio.com/wiki/linkItem //WikiPageEnd// SyntaxStart: +Object linkItem String //SyntaxEnd// RawSyntaxStart: unit linkItem item @@ -33050,6 +34327,7 @@ WikiPageStart: https://community.bistudio.com/wiki/list //WikiPageEnd// SyntaxStart: +list Object //SyntaxEnd// RawSyntaxStart: list trigger @@ -33082,6 +34360,7 @@ WikiPageStart: https://community.bistudio.com/wiki/listObjects //WikiPageEnd// SyntaxStart: +Control listObjects String //SyntaxEnd// RawSyntaxStart: map listObjects type @@ -33109,6 +34388,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ln //WikiPageEnd// SyntaxStart: +ln Number //SyntaxEnd// RawSyntaxStart: ln x @@ -33138,9 +34418,10 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbAddArray //WikiPageEnd// SyntaxStart: +lnbAddArray Array //SyntaxEnd// RawSyntaxStart: -lnbAddArray [IDC,[[[text,text],[value,..],[data,..]],[[text,text],[value,..],[data,..]],]] +lnbAddArray [idc, [[[text,text],[value,..],[data,..]],[[text,text],[value,..],[data,..]],]] //RawSyntaxEnd// ExampleStart: $Code$lnbAddArray [102,[[["#1"],[1],["#1"]]]];$/Code$ @@ -33166,11 +34447,14 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbAddColumn //WikiPageEnd// SyntaxStart: +Control lnbAddColumn Number +%NextSyntax% +lnbAddColumn Array //SyntaxEnd// RawSyntaxStart: _ctrl lnbAddColumn position %NextRawSyntax% -lnbAddColumn [idc] +lnbAddColumn [idc or Control,position] //RawSyntaxEnd// ExampleStart: $Code$_ctrl lnbAddColumn 0.8;$/Code$ @@ -33199,6 +34483,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbAddRow //WikiPageEnd// SyntaxStart: +lnbAddRow Array +%NextSyntax% +Control lnbAddRow Array //SyntaxEnd// RawSyntaxStart: lnbAddRow [IDC,[ String, String... ]] @@ -33266,6 +34553,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbClear //WikiPageEnd// SyntaxStart: +lnbClear Number +%NextSyntax% +lnbClear Control //SyntaxEnd// RawSyntaxStart: lnbClear idc @@ -33331,6 +34621,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbColor //WikiPageEnd// SyntaxStart: +lnbColor Array +%NextSyntax% +Control lnbColor Array //SyntaxEnd// RawSyntaxStart: lnbColor [idc, [row, column]] @@ -33396,6 +34689,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbCurSelRow //WikiPageEnd// SyntaxStart: +lnbCurSelRow Number +%NextSyntax% +lnbCurSelRow Control //SyntaxEnd// RawSyntaxStart: lnbCurSelRow idc @@ -33461,11 +34757,14 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbData //WikiPageEnd// SyntaxStart: +lnbData Array +%NextSyntax% +Control lnbData Array //SyntaxEnd// RawSyntaxStart: -lnbData [idc] ] +lnbData [idc, [row, column]] %NextRawSyntax% -_ctrl lnbData [row] +ctrl lnbData [row, column] //RawSyntaxEnd// ExampleStart: $Code$_ctrl lnbData [ lnbCurSelRow _ctrl,0]; //"#1"$/Code$ @@ -33526,6 +34825,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbDeleteColumn //WikiPageEnd// SyntaxStart: +lnbDeleteColumn Array +%NextSyntax% +Control lnbDeleteColumn Number //SyntaxEnd// RawSyntaxStart: lnbDeleteColumn [idc,index] @@ -33591,6 +34893,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbDeleteRow //WikiPageEnd// SyntaxStart: +Control lnbDeleteRow Number //SyntaxEnd// RawSyntaxStart: _ctrl lnbDeleteRow row @@ -33654,6 +34957,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbGetColumnsPosition //WikiPageEnd// SyntaxStart: +lnbGetColumnsPosition Control //SyntaxEnd// RawSyntaxStart: lnbGetColumnsPosition _ctrl @@ -33717,6 +35021,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbPicture //WikiPageEnd// SyntaxStart: +lnbPicture Array +%NextSyntax% +Control lnbPicture Array //SyntaxEnd// RawSyntaxStart: lnbPicture [IDC, [row, column]] @@ -33749,6 +35056,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbSetColor //WikiPageEnd// SyntaxStart: +lnbSetColor Array +%NextSyntax% +Control lnbSetColor Array //SyntaxEnd// RawSyntaxStart: lnbSetColor [idc,[row,column],color] @@ -33814,6 +35124,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbSetColumnsPos //WikiPageEnd// SyntaxStart: +lnbSetColumnsPos Array +%NextSyntax% +Control lnbSetColumnsPos Array //SyntaxEnd// RawSyntaxStart: lnbSetColumnsPos [idc, positions] @@ -33848,6 +35161,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbSetCurSelRow //WikiPageEnd// SyntaxStart: +lnbSetCurSelRow Array +%NextSyntax% +Control lnbSetCurSelRow Number //SyntaxEnd// RawSyntaxStart: lnbSetCurSelRow [idc, index] @@ -33915,11 +35231,14 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbSetData //WikiPageEnd// SyntaxStart: +lnbSetData Array +%NextSyntax% +Control lnbSetData Array //SyntaxEnd// RawSyntaxStart: -lnbSetData [idc] +lnbSetData [idc, [row, column], data] %NextRawSyntax% -_ctrl lnbSetData [ [row] +ctrl lnbSetData [[row, column], data] //RawSyntaxEnd// ExampleStart: $Code$_ctrl lnbSetData [ [0,0],"#1"];$/Code$ @@ -33982,11 +35301,14 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbSetPicture //WikiPageEnd// SyntaxStart: +lnbSetPicture Array +%NextSyntax% +Control lnbSetPicture Array //SyntaxEnd// RawSyntaxStart: lnbSetPicture [IDC, [Row, Column], PicturePathOrPictureName] %NextRawSyntax% -_ctrl lnbSetPicture [ [Row] +_ctrl lnbSetPicture [ [Row, Column], PicturePathOrPictureName] //RawSyntaxEnd// ExampleStart: $Code$lnbSetPicture [1, [0, 0], "Picture"];$/Code$ @@ -34049,6 +35371,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbSetText //WikiPageEnd// SyntaxStart: +lnbSetText Array +%NextSyntax% +Control lnbSetText Array //SyntaxEnd// RawSyntaxStart: lnbSetText [idc,[row,column],data] @@ -34116,6 +35441,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbSetValue //WikiPageEnd// SyntaxStart: +lnbSetValue Array +%NextSyntax% +Control lnbSetValue Array //SyntaxEnd// RawSyntaxStart: lnbSetValue [idc, [row, column], value] @@ -34181,6 +35509,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbSize //WikiPageEnd// SyntaxStart: +lnbSize Control //SyntaxEnd// RawSyntaxStart: lnbSize _ctrl @@ -34209,6 +35538,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbText //WikiPageEnd// SyntaxStart: +Control lnbText Array //SyntaxEnd// RawSyntaxStart: control lnbText [row,column] @@ -34272,6 +35602,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lnbValue //WikiPageEnd// SyntaxStart: +lnbValue Array +%NextSyntax% +Control lnbValue Array //SyntaxEnd// RawSyntaxStart: lnbValue [idc,[row, column]] @@ -34337,6 +35670,7 @@ WikiPageStart: https://community.bistudio.com/wiki/load //WikiPageEnd// SyntaxStart: +load Object //SyntaxEnd// RawSyntaxStart: load unit @@ -34364,6 +35698,7 @@ WikiPageStart: https://community.bistudio.com/wiki/loadAbs //WikiPageEnd// SyntaxStart: +loadAbs Object //SyntaxEnd// RawSyntaxStart: loadAbs unit @@ -34391,6 +35726,7 @@ WikiPageStart: https://community.bistudio.com/wiki/loadBackpack //WikiPageEnd// SyntaxStart: +loadBackpack Object //SyntaxEnd// RawSyntaxStart: loadBackpack unit @@ -34419,6 +35755,7 @@ WikiPageStart: https://community.bistudio.com/wiki/loadFile //WikiPageEnd// SyntaxStart: +loadFile String //SyntaxEnd// RawSyntaxStart: loadFile filename @@ -34457,6 +35794,7 @@ WikiPageStart: https://community.bistudio.com/wiki/loadGame //WikiPageEnd// SyntaxStart: +loadGame //SyntaxEnd// RawSyntaxStart: loadGame @@ -34485,6 +35823,7 @@ WikiPageStart: https://community.bistudio.com/wiki/loadIdentity //WikiPageEnd// SyntaxStart: +Object loadIdentity String //SyntaxEnd// RawSyntaxStart: person loadIdentity name @@ -34514,6 +35853,7 @@ WikiPageStart: https://community.bistudio.com/wiki/loadMagazine //WikiPageEnd// SyntaxStart: +Object loadMagazine Array //SyntaxEnd// RawSyntaxStart: transport loadMagazine [turretPath, weaponName, magazineName] @@ -34542,6 +35882,7 @@ WikiPageStart: https://community.bistudio.com/wiki/loadOverlay //WikiPageEnd// SyntaxStart: +Control loadOverlay Config //SyntaxEnd// RawSyntaxStart: map loadOverlay config @@ -34569,6 +35910,7 @@ WikiPageStart: https://community.bistudio.com/wiki/loadStatus //WikiPageEnd// SyntaxStart: +Object loadStatus String //SyntaxEnd// RawSyntaxStart: obj loadStatus entryName @@ -34597,6 +35939,7 @@ WikiPageStart: https://community.bistudio.com/wiki/loadUniform //WikiPageEnd// SyntaxStart: +loadUniform Object //SyntaxEnd// RawSyntaxStart: loadUniform unit @@ -34624,6 +35967,7 @@ WikiPageStart: https://community.bistudio.com/wiki/loadVest //WikiPageEnd// SyntaxStart: +loadVest Object //SyntaxEnd// RawSyntaxStart: loadVest unit @@ -34654,6 +35998,7 @@ WikiPageStart: https://community.bistudio.com/wiki/local //WikiPageEnd// SyntaxStart: +local Object/Group //SyntaxEnd// RawSyntaxStart: local object @@ -34693,6 +36038,7 @@ WikiPageStart: https://community.bistudio.com/wiki/localize //WikiPageEnd// SyntaxStart: +localize String //SyntaxEnd// RawSyntaxStart: localize stringName @@ -34740,6 +36086,7 @@ WikiPageStart: https://community.bistudio.com/wiki/locationNull //WikiPageEnd// SyntaxStart: +locationNull //SyntaxEnd// RawSyntaxStart: locationNull @@ -34770,6 +36117,7 @@ WikiPageStart: https://community.bistudio.com/wiki/locationPosition //WikiPageEnd// SyntaxStart: +locationPosition Location //SyntaxEnd// RawSyntaxStart: locationPosition location @@ -34803,6 +36151,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lock //WikiPageEnd// SyntaxStart: +Object lock Boolean +%NextSyntax% +Object lock Number //SyntaxEnd// RawSyntaxStart: vehicleName lock locked @@ -34855,6 +36206,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lockCameraTo //WikiPageEnd// SyntaxStart: +Object/Position lockCameraTo Array //SyntaxEnd// RawSyntaxStart: vehicle lockCameraTo [object,turretPath] @@ -34885,6 +36237,9 @@ WikiPageStart: https://community.bistudio.com/wiki/lockCargo //WikiPageEnd// SyntaxStart: +Object lockCargo Boolean +%NextSyntax% +Object lockCargo Array //SyntaxEnd// RawSyntaxStart: vehicle lockCargo lock @@ -34917,6 +36272,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lockDriver //WikiPageEnd// SyntaxStart: +Object lockDriver Boolean //SyntaxEnd// RawSyntaxStart: vehicle lockDriver lock @@ -34945,6 +36301,7 @@ WikiPageStart: https://community.bistudio.com/wiki/locked //WikiPageEnd// SyntaxStart: +locked Object //SyntaxEnd// RawSyntaxStart: locked vehicle @@ -34980,6 +36337,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lockedCargo //WikiPageEnd// SyntaxStart: +Object lockedCargo Number //SyntaxEnd// RawSyntaxStart: vehicle lockedCargo cargoIndex @@ -34991,6 +36349,8 @@ LocalityStart: undefined / undefined //LocalityEnd// NoteStart: +(May 4, 2016) +For some vehicles, the command returns nothing if the cargo index is invalid (i.e. -1) //NoteEnd// ReturnValueStart: Boolean @@ -35008,6 +36368,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lockedDriver //WikiPageEnd// SyntaxStart: +lockedDriver Object //SyntaxEnd// RawSyntaxStart: lockedDriver vehicle @@ -35035,6 +36396,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lockedTurret //WikiPageEnd// SyntaxStart: +Object lockedTurret Array //SyntaxEnd// RawSyntaxStart: vehicle lockedTurret turretPath @@ -35063,6 +36425,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lockIdentity //WikiPageEnd// SyntaxStart: +lockIdentity Object //SyntaxEnd// RawSyntaxStart: lockIdentity unit @@ -35091,6 +36454,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lockTurret //WikiPageEnd// SyntaxStart: +Object lockTurret Array //SyntaxEnd// RawSyntaxStart: vehicle lockTurret [turret path,lock] @@ -35121,6 +36485,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lockWP //WikiPageEnd// SyntaxStart: +Object/Group lockWP Boolean //SyntaxEnd// RawSyntaxStart: groupName lockWP lock @@ -35153,6 +36518,7 @@ WikiPageStart: https://community.bistudio.com/wiki/log //WikiPageEnd// SyntaxStart: +log Number //SyntaxEnd// RawSyntaxStart: log x @@ -35198,6 +36564,7 @@ WikiPageStart: https://community.bistudio.com/wiki/logEntities //WikiPageEnd// SyntaxStart: +logEntities //SyntaxEnd// RawSyntaxStart: logEntities @@ -35277,6 +36644,7 @@ WikiPageStart: https://community.bistudio.com/wiki/logNetwork //WikiPageEnd// SyntaxStart: +logNetwork String //SyntaxEnd// RawSyntaxStart: logNetwork logFile @@ -35311,6 +36679,7 @@ WikiPageStart: https://community.bistudio.com/wiki/logNetworkTerminate //WikiPageEnd// SyntaxStart: +logNetworkTerminate Number //SyntaxEnd// RawSyntaxStart: logNetworkTerminate handle @@ -35338,6 +36707,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lookAt //WikiPageEnd// SyntaxStart: +Object/Array lookAt //SyntaxEnd// RawSyntaxStart: unit lookAt position @@ -35368,6 +36738,7 @@ WikiPageStart: https://community.bistudio.com/wiki/lookAtPos //WikiPageEnd// SyntaxStart: +Control lookAtPos Array //SyntaxEnd// RawSyntaxStart: map lookAtPos position @@ -35396,6 +36767,7 @@ WikiPageStart: https://community.bistudio.com/wiki/magazineCargo //WikiPageEnd// SyntaxStart: +magazineCargo Object //SyntaxEnd// RawSyntaxStart: magazineCargo box @@ -35425,6 +36797,7 @@ WikiPageStart: https://community.bistudio.com/wiki/magazines //WikiPageEnd// SyntaxStart: +magazines Object //SyntaxEnd// RawSyntaxStart: magazines vehicle @@ -35457,6 +36830,7 @@ WikiPageStart: https://community.bistudio.com/wiki/magazinesAllTurrets //WikiPageEnd// SyntaxStart: +magazinesAllTurrets Object //SyntaxEnd// RawSyntaxStart: magazinesAllTurrets vehicle @@ -35490,6 +36864,7 @@ WikiPageStart: https://community.bistudio.com/wiki/magazinesAmmo //WikiPageEnd// SyntaxStart: +magazinesAmmo Object //SyntaxEnd// RawSyntaxStart: magazinesAmmo vehicle @@ -35542,6 +36917,7 @@ WikiPageStart: https://community.bistudio.com/wiki/magazinesAmmoCargo //WikiPageEnd// SyntaxStart: +magazinesAmmoCargo Object //SyntaxEnd// RawSyntaxStart: magazinesAmmoCargo vehicle @@ -35584,6 +36960,7 @@ WikiPageStart: https://community.bistudio.com/wiki/magazinesAmmoFull //WikiPageEnd// SyntaxStart: +magazinesAmmoFull Object //SyntaxEnd// RawSyntaxStart: magazinesAmmoFull vehicle @@ -35646,6 +37023,7 @@ WikiPageStart: https://community.bistudio.com/wiki/magazinesDetail //WikiPageEnd// SyntaxStart: +magazinesDetail Object //SyntaxEnd// RawSyntaxStart: magazinesDetail vehicle @@ -35694,6 +37072,7 @@ WikiPageStart: https://community.bistudio.com/wiki/magazinesDetailBackpack //WikiPageEnd// SyntaxStart: +magazinesDetailBackpack Object //SyntaxEnd// RawSyntaxStart: magazinesDetailBackpack unit @@ -35722,6 +37101,7 @@ WikiPageStart: https://community.bistudio.com/wiki/magazinesDetailUniform //WikiPageEnd// SyntaxStart: +magazinesDetailUniform Object //SyntaxEnd// RawSyntaxStart: magazinesDetailUniform unit @@ -35750,6 +37130,7 @@ WikiPageStart: https://community.bistudio.com/wiki/magazinesDetailVest //WikiPageEnd// SyntaxStart: +magazinesDetailVest Object //SyntaxEnd// RawSyntaxStart: magazinesDetailVest unit @@ -35778,6 +37159,7 @@ WikiPageStart: https://community.bistudio.com/wiki/magazinesTurret //WikiPageEnd// SyntaxStart: +Object magazinesTurret Array //SyntaxEnd// RawSyntaxStart: vehicle magazinesTurret turretPath @@ -35809,6 +37191,7 @@ WikiPageStart: https://community.bistudio.com/wiki/magazineTurretAmmo //WikiPageEnd// SyntaxStart: +Object magazineTurretAmmo Array //SyntaxEnd// RawSyntaxStart: vehicle magazineTurretAmmo [magazineClass, turretPath] @@ -35837,6 +37220,7 @@ WikiPageStart: https://community.bistudio.com/wiki/mapAnimAdd //WikiPageEnd// SyntaxStart: +mapAnimAdd Array //SyntaxEnd// RawSyntaxStart: mapAnimAdd [time, zoom, position] @@ -35871,6 +37255,7 @@ WikiPageStart: https://community.bistudio.com/wiki/mapAnimClear //WikiPageEnd// SyntaxStart: +mapAnimClear //SyntaxEnd// RawSyntaxStart: mapAnimClear @@ -35899,6 +37284,7 @@ WikiPageStart: https://community.bistudio.com/wiki/mapAnimCommit //WikiPageEnd// SyntaxStart: +mapAnimCommit //SyntaxEnd// RawSyntaxStart: mapAnimCommit @@ -35927,6 +37313,7 @@ WikiPageStart: https://community.bistudio.com/wiki/mapAnimDone //WikiPageEnd// SyntaxStart: +mapAnimDone //SyntaxEnd// RawSyntaxStart: mapAnimDone @@ -35956,6 +37343,9 @@ WikiPageStart: https://community.bistudio.com/wiki/mapCenterOnCamera //WikiPageEnd// SyntaxStart: +Control mapCenterOnCamera Boolean +%NextSyntax% +mapCenterOnCamera Control //SyntaxEnd// RawSyntaxStart: mainmap mapCenterOnCamera enable @@ -35987,6 +37377,7 @@ WikiPageStart: https://community.bistudio.com/wiki/mapGridPosition //WikiPageEnd// SyntaxStart: +mapGridPosition Object/Position //SyntaxEnd// RawSyntaxStart: mapGridPosition param @@ -36017,6 +37408,7 @@ WikiPageStart: https://community.bistudio.com/wiki/markAsFinishedOnSteam //WikiPageEnd// SyntaxStart: +markAsFinishedOnSteam //SyntaxEnd// RawSyntaxStart: markAsFinishedOnSteam @@ -36046,6 +37438,7 @@ WikiPageStart: https://community.bistudio.com/wiki/markerAlpha //WikiPageEnd// SyntaxStart: +markerAlpha String //SyntaxEnd// RawSyntaxStart: markerAlpha markerName @@ -36074,6 +37467,7 @@ WikiPageStart: https://community.bistudio.com/wiki/markerBrush //WikiPageEnd// SyntaxStart: +markerBrush String //SyntaxEnd// RawSyntaxStart: markerBrush name @@ -36102,6 +37496,7 @@ WikiPageStart: https://community.bistudio.com/wiki/markerColor //WikiPageEnd// SyntaxStart: +markerColor String //SyntaxEnd// RawSyntaxStart: markerColor markerName @@ -36130,6 +37525,7 @@ WikiPageStart: https://community.bistudio.com/wiki/markerDir //WikiPageEnd// SyntaxStart: +markerDir String //SyntaxEnd// RawSyntaxStart: markerDir markerName @@ -36160,6 +37556,7 @@ WikiPageStart: https://community.bistudio.com/wiki/markerPos //WikiPageEnd// SyntaxStart: +markerPos String //SyntaxEnd// RawSyntaxStart: markerPos markerName @@ -36190,6 +37587,7 @@ WikiPageStart: https://community.bistudio.com/wiki/markerShape //WikiPageEnd// SyntaxStart: +markerShape String //SyntaxEnd// RawSyntaxStart: markerShape name @@ -36218,6 +37616,7 @@ WikiPageStart: https://community.bistudio.com/wiki/markerSize //WikiPageEnd// SyntaxStart: +markerSize String //SyntaxEnd// RawSyntaxStart: markerSize markerName @@ -36246,6 +37645,7 @@ WikiPageStart: https://community.bistudio.com/wiki/markerText //WikiPageEnd// SyntaxStart: +markerText String //SyntaxEnd// RawSyntaxStart: markerText markerName @@ -36274,6 +37674,7 @@ WikiPageStart: https://community.bistudio.com/wiki/markerType //WikiPageEnd// SyntaxStart: +markerType String //SyntaxEnd// RawSyntaxStart: markerType markerName @@ -36304,6 +37705,7 @@ WikiPageStart: https://community.bistudio.com/wiki/max //WikiPageEnd// SyntaxStart: +Number max //SyntaxEnd// RawSyntaxStart: a max b @@ -36333,6 +37735,7 @@ WikiPageStart: https://community.bistudio.com/wiki/members //WikiPageEnd// SyntaxStart: +members TeamMember //SyntaxEnd// RawSyntaxStart: members team @@ -36361,6 +37764,7 @@ WikiPageStart: https://community.bistudio.com/wiki/min //WikiPageEnd// SyntaxStart: +Number min //SyntaxEnd// RawSyntaxStart: a min b @@ -36390,6 +37794,7 @@ WikiPageStart: https://community.bistudio.com/wiki/mineActive //WikiPageEnd// SyntaxStart: +mineActive Object //SyntaxEnd// RawSyntaxStart: mineActive obj @@ -36418,6 +37823,7 @@ WikiPageStart: https://community.bistudio.com/wiki/mineDetectedBy //WikiPageEnd// SyntaxStart: +Object mineDetectedBy Side //SyntaxEnd// RawSyntaxStart: mine mineDetectedBy faction @@ -36450,6 +37856,7 @@ WikiPageStart: https://community.bistudio.com/wiki/missionConfigFile //WikiPageEnd// SyntaxStart: +missionConfigFile //SyntaxEnd// RawSyntaxStart: missionConfigFile @@ -36509,6 +37916,7 @@ WikiPageStart: https://community.bistudio.com/wiki/missionName //WikiPageEnd// SyntaxStart: +missionName //SyntaxEnd// RawSyntaxStart: missionName @@ -36541,6 +37949,7 @@ WikiPageStart: https://community.bistudio.com/wiki/missionNamespace //WikiPageEnd// SyntaxStart: +missionNamespace //SyntaxEnd// RawSyntaxStart: missionNamespace @@ -36565,13 +37974,14 @@ missionStart //KeywordEnd// DescriptionStart: Returns date and time when mission started in format [year, month, day, hour, minute, second]. -Works only in multiplayer, in singleplayer all values are equal to zero [0,0,0,0,0,0] +Works only in multiplayer, in singleplayer all values are equal to zero ? [0,0,0,0,0,0] NOTE : Because missionStart contains the time of the actual start of the mission, it might not be available in pre-init or init, but is guaranteed to be available in post-init when time 0. //DescriptionEnd// WikiPageStart: https://community.bistudio.com/wiki/missionStart //WikiPageEnd// SyntaxStart: +missionStart //SyntaxEnd// RawSyntaxStart: missionStart @@ -36617,6 +38027,7 @@ WikiPageStart: https://community.bistudio.com/wiki/missionVersion //WikiPageEnd// SyntaxStart: +missionVersion //SyntaxEnd// RawSyntaxStart: missionVersion @@ -36645,6 +38056,7 @@ WikiPageStart: https://community.bistudio.com/wiki/mod //WikiPageEnd// SyntaxStart: +Number mod //SyntaxEnd// RawSyntaxStart: a mod b @@ -36682,6 +38094,7 @@ WikiPageStart: https://community.bistudio.com/wiki/modelToWorld //WikiPageEnd// SyntaxStart: +Object modelToWorld PositionRelative //SyntaxEnd// RawSyntaxStart: object modelToWorld modelPos @@ -36731,6 +38144,7 @@ WikiPageStart: https://community.bistudio.com/wiki/modelToWorldVisual //WikiPageEnd// SyntaxStart: +Object modelToWorldVisual Array //SyntaxEnd// RawSyntaxStart: object modelToWorldVisual modelPos @@ -36759,6 +38173,7 @@ WikiPageStart: https://community.bistudio.com/wiki/moonIntensity //WikiPageEnd// SyntaxStart: +moonIntensity //SyntaxEnd// RawSyntaxStart: moonIntensity @@ -36787,6 +38202,7 @@ WikiPageStart: https://community.bistudio.com/wiki/moonPhase //WikiPageEnd// SyntaxStart: +moonPhase Array //SyntaxEnd// RawSyntaxStart: moonPhase date @@ -36848,6 +38264,7 @@ WikiPageStart: https://community.bistudio.com/wiki/morale //WikiPageEnd// SyntaxStart: +morale Object //SyntaxEnd// RawSyntaxStart: morale unit @@ -36876,6 +38293,7 @@ WikiPageStart: https://community.bistudio.com/wiki/move //WikiPageEnd// SyntaxStart: +Object/Group move Array //SyntaxEnd// RawSyntaxStart: group move position @@ -36905,6 +38323,7 @@ WikiPageStart: https://community.bistudio.com/wiki/move3DENCamera //WikiPageEnd// SyntaxStart: +move3DENCamera Array //SyntaxEnd// RawSyntaxStart: move3DENCamera [position,useOffset] @@ -36935,6 +38354,7 @@ WikiPageStart: https://community.bistudio.com/wiki/moveInAny //WikiPageEnd// SyntaxStart: +Object moveInAny //SyntaxEnd// RawSyntaxStart: unit moveInAny vehicle @@ -36963,6 +38383,9 @@ WikiPageStart: https://community.bistudio.com/wiki/moveInCargo //WikiPageEnd// SyntaxStart: +Object moveInCargo +%NextSyntax% +Object moveInCargo Array //SyntaxEnd// RawSyntaxStart: unitName moveInCargo vehicle @@ -37009,6 +38432,7 @@ WikiPageStart: https://community.bistudio.com/wiki/moveInCommander //WikiPageEnd// SyntaxStart: +Object moveInCommander //SyntaxEnd// RawSyntaxStart: unitName moveInCommander vehicle @@ -37042,6 +38466,7 @@ WikiPageStart: https://community.bistudio.com/wiki/moveInDriver //WikiPageEnd// SyntaxStart: +Object moveInDriver //SyntaxEnd// RawSyntaxStart: unitName moveInDriver vehicle @@ -37075,6 +38500,7 @@ WikiPageStart: https://community.bistudio.com/wiki/moveInGunner //WikiPageEnd// SyntaxStart: +Object moveInGunner //SyntaxEnd// RawSyntaxStart: unitName moveInGunner vehicle @@ -37115,6 +38541,7 @@ WikiPageStart: https://community.bistudio.com/wiki/moveInTurret //WikiPageEnd// SyntaxStart: +Object moveInTurret Array //SyntaxEnd// RawSyntaxStart: unitName moveInTurret [vehicle, turretPath] @@ -37187,6 +38614,7 @@ WikiPageStart: https://community.bistudio.com/wiki/moveObjectToEnd //WikiPageEnd// SyntaxStart: +Control moveObjectToEnd String //SyntaxEnd// RawSyntaxStart: map moveObjectToEnd object @@ -37214,6 +38642,7 @@ WikiPageStart: https://community.bistudio.com/wiki/moveOut //WikiPageEnd// SyntaxStart: +moveOut Object //SyntaxEnd// RawSyntaxStart: moveOut soldier @@ -37259,6 +38688,7 @@ WikiPageStart: https://community.bistudio.com/wiki/moveTime //WikiPageEnd// SyntaxStart: +moveTime Object //SyntaxEnd// RawSyntaxStart: moveTime soldier @@ -37287,6 +38717,7 @@ WikiPageStart: https://community.bistudio.com/wiki/moveTo //WikiPageEnd// SyntaxStart: +Object moveTo PositionATL //SyntaxEnd// RawSyntaxStart: person moveTo position @@ -37316,6 +38747,7 @@ WikiPageStart: https://community.bistudio.com/wiki/moveToCompleted //WikiPageEnd// SyntaxStart: +moveToCompleted Object //SyntaxEnd// RawSyntaxStart: moveToCompleted person @@ -37343,6 +38775,7 @@ WikiPageStart: https://community.bistudio.com/wiki/moveToFailed //WikiPageEnd// SyntaxStart: +moveToFailed Object //SyntaxEnd// RawSyntaxStart: moveToFailed person @@ -37370,6 +38803,7 @@ WikiPageStart: https://community.bistudio.com/wiki/musicVolume //WikiPageEnd// SyntaxStart: +musicVolume //SyntaxEnd// RawSyntaxStart: musicVolume @@ -37398,6 +38832,7 @@ WikiPageStart: https://community.bistudio.com/wiki/name //WikiPageEnd// SyntaxStart: +name Object //SyntaxEnd// RawSyntaxStart: name param @@ -37428,41 +38863,6 @@ String %NextListItem% -KeywordStart: -name_location -//KeywordEnd// -DescriptionStart: -Returns the location's name. -//DescriptionEnd// -WikiPageStart: -https://community.bistudio.com/wiki/name_location -//WikiPageEnd// -SyntaxStart: -//SyntaxEnd// -RawSyntaxStart: -name location -//RawSyntaxEnd// -ExampleStart: -$Code$_locationName = name myLocation;$/Code$ -%NextExample% -$Code$name nearestLocation [ position player, "Hill"]; //"" -text nearestLocation [ position player, "Hill"]; //"Lesnoy Khrebet"$/Code$ -//ExampleEnd// -LocalityStart: -undefined / undefined -//LocalityEnd// -NoteStart: -Appears to be only for the 3d editor. -%NextNote% -(May 17, 2015) -To return the textual name of a location use text command instead -//NoteEnd// -ReturnValueStart: -String -//ReturnValueEnd// - -%NextListItem% - KeywordStart: nameSound //KeywordEnd// @@ -37473,6 +38873,7 @@ WikiPageStart: https://community.bistudio.com/wiki/nameSound //WikiPageEnd// SyntaxStart: +nameSound Object //SyntaxEnd// RawSyntaxStart: nameSound person @@ -37502,6 +38903,9 @@ WikiPageStart: https://community.bistudio.com/wiki/nearEntities //WikiPageEnd// SyntaxStart: +Object/Array nearEntities Number +%NextSyntax% +Object/Array nearEntities Array //SyntaxEnd// RawSyntaxStart: position nearEntities radius @@ -37539,6 +38943,7 @@ WikiPageStart: https://community.bistudio.com/wiki/nearestBuilding //WikiPageEnd// SyntaxStart: +nearestBuilding Object/Array //SyntaxEnd// RawSyntaxStart: nearestBuilding position @@ -37572,6 +38977,7 @@ WikiPageStart: https://community.bistudio.com/wiki/nearestLocation //WikiPageEnd// SyntaxStart: +nearestLocation Array //SyntaxEnd// RawSyntaxStart: nearestLocation [position, locationClass] @@ -37602,6 +39008,7 @@ WikiPageStart: https://community.bistudio.com/wiki/nearestLocations //WikiPageEnd// SyntaxStart: +nearestLocations Array //SyntaxEnd// RawSyntaxStart: nearestLocations [position, [locationType,...], radius, sortPosition] @@ -37644,6 +39051,7 @@ WikiPageStart: https://community.bistudio.com/wiki/nearestLocationWithDubbing //WikiPageEnd// SyntaxStart: +nearestLocationWithDubbing Object/Array //SyntaxEnd// RawSyntaxStart: nearestLocationWithDubbing position @@ -37672,6 +39080,13 @@ WikiPageStart: https://community.bistudio.com/wiki/nearestObject //WikiPageEnd// SyntaxStart: +nearestObject Array +%NextSyntax% +nearestObject Position3D/Position2D/Object +%NextSyntax% +Position3D/Position2D nearestObject String +%NextSyntax% +Position3D/Position2D nearestObject Number //SyntaxEnd// RawSyntaxStart: nearestObject [position, type] @@ -37728,6 +39143,7 @@ WikiPageStart: https://community.bistudio.com/wiki/nearestObjects //WikiPageEnd// SyntaxStart: +nearestObjects Array //SyntaxEnd// RawSyntaxStart: nearestObjects [position, types, radius] @@ -37812,14 +39228,16 @@ or To use it without any type filter: [object or position, [], radius] Possible type names: "TREE", "SMALL TREE", "BUSH", "BUILDING", "HOUSE", "FOREST BORDER", "FOREST TRIANGLE", "FOREST SQUARE", "CHURCH", "CHAPEL", "CROSS", "ROCK", "BUNKER", "FORTRESS", "FOUNTAIN", "VIEW-TOWER", "LIGHTHOUSE", "QUAY", "FUELSTATION", "HOSPITAL", "FENCE", "WALL", "HIDE", "BUSSTOP", "ROAD", "FOREST", "TRANSMITTER", "STACK", "RUIN", "TOURISM", "WATERTOWER", "TRACK", "MAIN ROAD", "ROCKS", "POWER LINES", "RAILWAY", "POWERSOLAR", "POWERWAVE", "POWERWIND", "SHIPWRECK", "TRAIL" +Since Arma 3 v1.61.136035 it is possible to switch the sorting algorithm off by providing optional param, which significantly increases the performance of this command, especially if the search is performed with large radius. //DescriptionEnd// WikiPageStart: https://community.bistudio.com/wiki/nearestTerrainObjects //WikiPageEnd// SyntaxStart: +nearestTerrainObjects Array //SyntaxEnd// RawSyntaxStart: -nearestTerrainObjects [position, types, radius] +nearestTerrainObjects [position, types, radius, sort] //RawSyntaxEnd// ExampleStart: $Code$nearestTerrainObjects [ player, ["Tree","Bush"], 200];$/Code$ @@ -37828,8 +39246,11 @@ $Code$nearestTerrainObjects [ player, ["House"], 200];$/Code$ %NextExample% $Code$nearestTerrainObjects [[2716,2949,0], ["Chapel","Fuelstation"], 100];$/Code$ %NextExample% -$Code$// Return every terrain object in 50 metres radius around player: +$Code$// Return every terrain object in 50 metres radius around player sorted, closest first: nearestTerrainObjects [ player, [], 50]$/Code$ +%NextExample% +$Code$// Return every terrain object in 50 metres radius around player unsorted: +nearestTerrainObjects [ player, [], 50, false ]$/Code$ //ExampleEnd// LocalityStart: undefined / undefined @@ -37852,6 +39273,9 @@ WikiPageStart: https://community.bistudio.com/wiki/nearObjects //WikiPageEnd// SyntaxStart: +Position/Position2D/Object nearObjects Number +%NextSyntax% +PositionAGL/Position2D/Object nearObjects Array //SyntaxEnd// RawSyntaxStart: position nearObjects radius @@ -37894,6 +39318,7 @@ WikiPageStart: https://community.bistudio.com/wiki/nearObjectsReady //WikiPageEnd// SyntaxStart: +Object/Array nearObjectsReady Number //SyntaxEnd// RawSyntaxStart: position nearObjectsReady radius @@ -37922,6 +39347,7 @@ WikiPageStart: https://community.bistudio.com/wiki/nearRoads //WikiPageEnd// SyntaxStart: +Object/Array nearRoads Number //SyntaxEnd// RawSyntaxStart: pos nearRoads radius @@ -37958,6 +39384,7 @@ WikiPageStart: https://community.bistudio.com/wiki/nearSupplies //WikiPageEnd// SyntaxStart: +Object/Array nearSupplies Number //SyntaxEnd// RawSyntaxStart: origin nearSupplies radius @@ -37987,6 +39414,7 @@ WikiPageStart: https://community.bistudio.com/wiki/nearTargets //WikiPageEnd// SyntaxStart: +Object nearTargets Number //SyntaxEnd// RawSyntaxStart: unit nearTargets range @@ -38055,6 +39483,7 @@ WikiPageStart: https://community.bistudio.com/wiki/needReload //WikiPageEnd// SyntaxStart: +needReload Object //SyntaxEnd// RawSyntaxStart: needReload vehicle @@ -38085,6 +39514,7 @@ WikiPageStart: https://community.bistudio.com/wiki/netId //WikiPageEnd// SyntaxStart: +netId Object/Group //SyntaxEnd// RawSyntaxStart: netId var @@ -38113,6 +39543,7 @@ WikiPageStart: https://community.bistudio.com/wiki/netObjNull //WikiPageEnd// SyntaxStart: +netObjNull //SyntaxEnd// RawSyntaxStart: netObjNull @@ -38141,6 +39572,7 @@ WikiPageStart: https://community.bistudio.com/wiki/newOverlay //WikiPageEnd// SyntaxStart: +Control newOverlay Config //SyntaxEnd// RawSyntaxStart: map newOverlay config @@ -38168,6 +39600,7 @@ WikiPageStart: https://community.bistudio.com/wiki/nextMenuItemIndex //WikiPageEnd// SyntaxStart: +nextMenuItemIndex Control //SyntaxEnd// RawSyntaxStart: nextMenuItemIndex map @@ -38196,6 +39629,7 @@ WikiPageStart: https://community.bistudio.com/wiki/nextWeatherChange //WikiPageEnd// SyntaxStart: +nextWeatherChange //SyntaxEnd// RawSyntaxStart: nextWeatherChange @@ -38224,6 +39658,7 @@ WikiPageStart: https://community.bistudio.com/wiki/nil //WikiPageEnd// SyntaxStart: +nil //SyntaxEnd// RawSyntaxStart: nil @@ -38266,6 +39701,9 @@ WikiPageStart: https://community.bistudio.com/wiki/nMenuItems //WikiPageEnd// SyntaxStart: +Control nMenuItems String +%NextSyntax% +Control nMenuItems Number //SyntaxEnd// RawSyntaxStart: map nMenuItems menuName @@ -38296,6 +39734,7 @@ WikiPageStart: https://community.bistudio.com/wiki/not //WikiPageEnd// SyntaxStart: +not Number //SyntaxEnd// RawSyntaxStart: not a @@ -38325,6 +39764,7 @@ WikiPageStart: https://community.bistudio.com/wiki/numberToDate //WikiPageEnd// SyntaxStart: +numberToDate Array //SyntaxEnd// RawSyntaxStart: numberToDate [year,time] @@ -38353,6 +39793,7 @@ WikiPageStart: https://community.bistudio.com/wiki/objectCurators //WikiPageEnd// SyntaxStart: +objectCurators Object //SyntaxEnd// RawSyntaxStart: objectCurators obj @@ -38380,6 +39821,7 @@ WikiPageStart: https://community.bistudio.com/wiki/objectFromNetId //WikiPageEnd// SyntaxStart: +objectFromNetId String //SyntaxEnd// RawSyntaxStart: objectFromNetId id @@ -38408,6 +39850,7 @@ WikiPageStart: https://community.bistudio.com/wiki/objectParent //WikiPageEnd// SyntaxStart: +objectParent Object //SyntaxEnd// RawSyntaxStart: objectParent object @@ -38422,6 +39865,9 @@ _weaponHolder setPos ( player modelToWorld [0,5,0]);$/Code$ %NextExample% $Code$// Check if player is on foot: _isOnFoot = isNull objectParent player ;$/Code$ +%NextExample% +$Code$// Detect if player is in commander turret of a vehicle: +_isVehicleCommander = player isEqualTo commander objectParent player ;$/Code$ //ExampleEnd// LocalityStart: undefined / undefined @@ -38447,6 +39893,7 @@ WikiPageStart: https://community.bistudio.com/wiki/objNull //WikiPageEnd// SyntaxStart: +objNull //SyntaxEnd// RawSyntaxStart: objNull @@ -38485,6 +39932,7 @@ WikiPageStart: https://community.bistudio.com/wiki/objStatus //WikiPageEnd// SyntaxStart: +String objStatus //SyntaxEnd// RawSyntaxStart: objectivenumber objStatus status @@ -38514,6 +39962,7 @@ WikiPageStart: https://community.bistudio.com/wiki/onBriefingGroup //WikiPageEnd// SyntaxStart: +onBriefingGroup String //SyntaxEnd// RawSyntaxStart: onBriefingGroup soundName @@ -38542,6 +39991,7 @@ WikiPageStart: https://community.bistudio.com/wiki/onBriefingNotes //WikiPageEnd// SyntaxStart: +onBriefingNotes String //SyntaxEnd// RawSyntaxStart: onBriefingNotes soundName @@ -38572,6 +40022,7 @@ WikiPageStart: https://community.bistudio.com/wiki/onBriefingPlan //WikiPageEnd// SyntaxStart: +onBriefingPlan String //SyntaxEnd// RawSyntaxStart: onBriefingPlan soundName @@ -38602,6 +40053,7 @@ WikiPageStart: https://community.bistudio.com/wiki/onBriefingTeamSwitch //WikiPageEnd// SyntaxStart: +onBriefingTeamSwitch String //SyntaxEnd// RawSyntaxStart: onBriefingTeamSwitch soundName @@ -38632,6 +40084,7 @@ WikiPageStart: https://community.bistudio.com/wiki/onCommandModeChanged //WikiPageEnd// SyntaxStart: +onCommandModeChanged Code/String //SyntaxEnd// RawSyntaxStart: onCommandModeChanged code @@ -38663,6 +40116,7 @@ WikiPageStart: https://community.bistudio.com/wiki/onDoubleClick //WikiPageEnd// SyntaxStart: +Control onDoubleClick String //SyntaxEnd// RawSyntaxStart: map onDoubleClick command @@ -38693,6 +40147,7 @@ WikiPageStart: https://community.bistudio.com/wiki/onEachFrame //WikiPageEnd// SyntaxStart: +onEachFrame String/Code //SyntaxEnd// RawSyntaxStart: onEachFrame statement @@ -38741,6 +40196,7 @@ WikiPageStart: https://community.bistudio.com/wiki/onGroupIconClick //WikiPageEnd// SyntaxStart: +onGroupIconClick String/Code //SyntaxEnd// RawSyntaxStart: onGroupIconClick command @@ -38786,6 +40242,7 @@ WikiPageStart: https://community.bistudio.com/wiki/onGroupIconOverEnter //WikiPageEnd// SyntaxStart: +onGroupIconOverEnter String/Code //SyntaxEnd// RawSyntaxStart: onGroupIconOverEnter command @@ -38830,6 +40287,7 @@ WikiPageStart: https://community.bistudio.com/wiki/onGroupIconOverLeave //WikiPageEnd// SyntaxStart: +onGroupIconOverLeave String/Code //SyntaxEnd// RawSyntaxStart: onGroupIconOverLeave command @@ -38880,6 +40338,7 @@ WikiPageStart: https://community.bistudio.com/wiki/onHCGroupSelectionChanged //WikiPageEnd// SyntaxStart: +onHCGroupSelectionChanged String/Code //SyntaxEnd// RawSyntaxStart: onHCGroupSelectionChanged command @@ -38929,6 +40388,9 @@ WikiPageStart: https://community.bistudio.com/wiki/onMapSingleClick //WikiPageEnd// SyntaxStart: +onMapSingleClick String/Code +%NextSyntax% +Anything onMapSingleClick String/Code //SyntaxEnd// RawSyntaxStart: onMapSingleClick command @@ -38976,10 +40438,10 @@ onPlayerConnected DescriptionStart: This command will execute attached code whenever a player is connected to a MP session. The code will receive a number of special variables: _id : Number - is the unique DirectPlay ID. Quite useless as the number is too big for in-built string representation and gets rounded. It is also the same id used for user placed markers. -_name : String - is profileName of the joining player. _uid : String - is getPlayerUID of the joining player. In Arma 3 it is also the same as Steam ID. -_owner : ( since Arma 3 v1.49 ) Number - is owner id of the joining player. Can be used for kick or ban purposes or just for publicVariableClient. +_name : String - is profileName of the joining player. _jip : ( since Arma 3 v1.49 ) Boolean - is a flag that indicates whether or not the player joined after the mission has started ( J oined I n P rogress). true - when the player is JIP, otherwise false. +_owner : ( since Arma 3 v1.49 ) Number - is owner id of the joining player. Can be used for kick or ban purposes or just for publicVariableClient. i Since Arma 3 v1.57 a stackable version of this EH is available: PlayerConnected In order to keep compatibility between official and community content the functions BIS_fnc_addStackedEventHandler and BIS_fnc_removeStackedEventHandler should be used instead. @@ -38988,6 +40450,7 @@ WikiPageStart: https://community.bistudio.com/wiki/onPlayerConnected //WikiPageEnd// SyntaxStart: +onPlayerConnected String/Code //SyntaxEnd// RawSyntaxStart: onPlayerConnected code @@ -39027,10 +40490,10 @@ onPlayerDisconnected DescriptionStart: This command will execute attached code whenever a player is leaving an MP session. The code will receive a number of special variables: _id : Number - is the unique DirectPlay ID. Quite useless as the number is too big for in-built string representation and gets rounded. It is also the same id used for user placed markers. -_name : String - is profileName of the leaving player. _uid : String - is getPlayerUID of the leaving player. In Arma 3 it is also the same as Steam ID. -_owner : ( since Arma 3 v1.49 ) Number - is owner id of the leaving player. Can be used for kick or ban purposes or just for publicVariableClient. +_name : String - is profileName of the leaving player. _jip : ( since Arma 3 v1.49 ) Boolean - is a flag that indicated whether or not the player joined after the mission has started ( J oined I n P rogress). true - if the player was JIP, otherwise false. +_owner : ( since Arma 3 v1.49 ) Number - is owner id of the leaving player. Can be used for kick or ban purposes or just for publicVariableClient. i Since Arma 3 v1.57 a stackable version of this EH is available: PlayerDisconnected In order to keep compatibility between official and community content the functions BIS_fnc_addStackedEventHandler and BIS_fnc_removeStackedEventHandler should be used instead. @@ -39039,6 +40502,7 @@ WikiPageStart: https://community.bistudio.com/wiki/onPlayerDisconnected //WikiPageEnd// SyntaxStart: +onPlayerDisconnected String/Code //SyntaxEnd// RawSyntaxStart: onPlayerDisconnected code @@ -39080,6 +40544,7 @@ WikiPageStart: https://community.bistudio.com/wiki/onPreloadFinished //WikiPageEnd// SyntaxStart: +onPreloadFinished String/Code //SyntaxEnd// RawSyntaxStart: onPreloadFinished command @@ -39120,6 +40585,7 @@ WikiPageStart: https://community.bistudio.com/wiki/onPreloadStarted //WikiPageEnd// SyntaxStart: +onPreloadStarted String/Code //SyntaxEnd// RawSyntaxStart: onPreloadStarted command @@ -39148,6 +40614,7 @@ WikiPageStart: https://community.bistudio.com/wiki/onShowNewObject //WikiPageEnd// SyntaxStart: +Control onShowNewObject String //SyntaxEnd// RawSyntaxStart: map onShowNewObject command @@ -39177,6 +40644,7 @@ WikiPageStart: https://community.bistudio.com/wiki/onTeamSwitch //WikiPageEnd// SyntaxStart: +onTeamSwitch String/Code //SyntaxEnd// RawSyntaxStart: onTeamSwitch commandset @@ -39205,6 +40673,7 @@ WikiPageStart: https://community.bistudio.com/wiki/openCuratorInterface //WikiPageEnd// SyntaxStart: +openCuratorInterface //SyntaxEnd// RawSyntaxStart: openCuratorInterface @@ -39245,6 +40714,9 @@ WikiPageStart: https://community.bistudio.com/wiki/openMap //WikiPageEnd// SyntaxStart: +openMap Boolean +%NextSyntax% +openMap Array //SyntaxEnd// RawSyntaxStart: openMap show @@ -39277,6 +40749,7 @@ WikiPageStart: https://community.bistudio.com/wiki/openYoutubeVideo //WikiPageEnd// SyntaxStart: +openYoutubeVideo String //SyntaxEnd// RawSyntaxStart: openYoutubeVideo youTubeUrl @@ -39307,6 +40780,7 @@ WikiPageStart: https://community.bistudio.com/wiki/opfor //WikiPageEnd// SyntaxStart: +opfor //SyntaxEnd// RawSyntaxStart: opfor @@ -39338,6 +40812,9 @@ WikiPageStart: https://community.bistudio.com/wiki/or //WikiPageEnd// SyntaxStart: +Boolean or +%NextSyntax% +Boolean or Code //SyntaxEnd// RawSyntaxStart: a or b @@ -39373,6 +40850,7 @@ WikiPageStart: https://community.bistudio.com/wiki/orderGetIn //WikiPageEnd// SyntaxStart: +Array orderGetIn Boolean //SyntaxEnd// RawSyntaxStart: unitArray orderGetIn order @@ -39441,6 +40919,7 @@ WikiPageStart: https://community.bistudio.com/wiki/overcast //WikiPageEnd// SyntaxStart: +overcast //SyntaxEnd// RawSyntaxStart: overcast @@ -39469,6 +40948,7 @@ WikiPageStart: https://community.bistudio.com/wiki/overcastForecast //WikiPageEnd// SyntaxStart: +overcastForecast //SyntaxEnd// RawSyntaxStart: overcastForecast @@ -39496,6 +40976,7 @@ WikiPageStart: https://community.bistudio.com/wiki/owner //WikiPageEnd// SyntaxStart: +owner Object //SyntaxEnd// RawSyntaxStart: owner object @@ -39526,6 +41007,9 @@ WikiPageStart: https://community.bistudio.com/wiki/param //WikiPageEnd// SyntaxStart: +param Array +%NextSyntax% +Anything param Array //SyntaxEnd// RawSyntaxStart: param [index, defaultValue, expectedDataTypes, expectedArrayCount] @@ -39588,6 +41072,9 @@ WikiPageStart: https://community.bistudio.com/wiki/params //WikiPageEnd// SyntaxStart: +params Array +%NextSyntax% +Anything params Array //SyntaxEnd// RawSyntaxStart: params [element1, element2,...elementN] @@ -39711,6 +41198,9 @@ WikiPageStart: https://community.bistudio.com/wiki/parseNumber //WikiPageEnd// SyntaxStart: +parseNumber String +%NextSyntax% +parseNumber Boolean //SyntaxEnd// RawSyntaxStart: parseNumber string @@ -39751,6 +41241,7 @@ WikiPageStart: https://community.bistudio.com/wiki/parseText //WikiPageEnd// SyntaxStart: +parseText String //SyntaxEnd// RawSyntaxStart: parseText text @@ -39812,6 +41303,7 @@ WikiPageStart: https://community.bistudio.com/wiki/parsingNamespace //WikiPageEnd// SyntaxStart: +parsingNamespace //SyntaxEnd// RawSyntaxStart: parsingNamespace @@ -39852,6 +41344,7 @@ WikiPageStart: https://community.bistudio.com/wiki/particlesQuality //WikiPageEnd// SyntaxStart: +particlesQuality //SyntaxEnd// RawSyntaxStart: particlesQuality @@ -39880,6 +41373,7 @@ WikiPageStart: https://community.bistudio.com/wiki/pi //WikiPageEnd// SyntaxStart: +pi //SyntaxEnd// RawSyntaxStart: pi @@ -39909,6 +41403,7 @@ WikiPageStart: https://community.bistudio.com/wiki/pickWeaponPool //WikiPageEnd// SyntaxStart: +pickWeaponPool Object //SyntaxEnd// RawSyntaxStart: pickWeaponPool object @@ -39936,6 +41431,7 @@ WikiPageStart: https://community.bistudio.com/wiki/pitch //WikiPageEnd// SyntaxStart: +pitch Object //SyntaxEnd// RawSyntaxStart: pitch person @@ -39964,6 +41460,7 @@ WikiPageStart: https://community.bistudio.com/wiki/playableSlotsNumber //WikiPageEnd// SyntaxStart: +playableSlotsNumber Side //SyntaxEnd// RawSyntaxStart: playableSlotsNumber side @@ -39992,6 +41489,7 @@ WikiPageStart: https://community.bistudio.com/wiki/playableUnits //WikiPageEnd// SyntaxStart: +playableUnits //SyntaxEnd// RawSyntaxStart: playableUnits @@ -40047,6 +41545,7 @@ WikiPageStart: https://community.bistudio.com/wiki/playAction //WikiPageEnd// SyntaxStart: +Object playAction String //SyntaxEnd// RawSyntaxStart: soldier playAction action @@ -40076,6 +41575,7 @@ WikiPageStart: https://community.bistudio.com/wiki/playActionNow //WikiPageEnd// SyntaxStart: +Object playActionNow String //SyntaxEnd// RawSyntaxStart: soldier playActionNow action @@ -40127,6 +41627,7 @@ WikiPageStart: https://community.bistudio.com/wiki/player //WikiPageEnd// SyntaxStart: +player //SyntaxEnd// RawSyntaxStart: player @@ -40175,6 +41676,7 @@ WikiPageStart: https://community.bistudio.com/wiki/playerRespawnTime //WikiPageEnd// SyntaxStart: +playerRespawnTime //SyntaxEnd// RawSyntaxStart: playerRespawnTime @@ -40208,6 +41710,7 @@ WikiPageStart: https://community.bistudio.com/wiki/playerSide //WikiPageEnd// SyntaxStart: +playerSide //SyntaxEnd// RawSyntaxStart: playerSide @@ -40254,6 +41757,7 @@ WikiPageStart: https://community.bistudio.com/wiki/playersNumber //WikiPageEnd// SyntaxStart: +playersNumber Side //SyntaxEnd// RawSyntaxStart: playersNumber side @@ -40289,6 +41793,7 @@ WikiPageStart: https://community.bistudio.com/wiki/playGesture //WikiPageEnd// SyntaxStart: +Object playGesture String //SyntaxEnd// RawSyntaxStart: soldier playGesture moveName @@ -40319,6 +41824,7 @@ WikiPageStart: https://community.bistudio.com/wiki/playMission //WikiPageEnd// SyntaxStart: +playMission Array //SyntaxEnd// RawSyntaxStart: playMission [campaign, mission, skipBriefing] @@ -40348,6 +41854,7 @@ WikiPageStart: https://community.bistudio.com/wiki/playMove //WikiPageEnd// SyntaxStart: +Object playMove String //SyntaxEnd// RawSyntaxStart: unitName playMove moveName @@ -40378,6 +41885,7 @@ WikiPageStart: https://community.bistudio.com/wiki/playMoveNow //WikiPageEnd// SyntaxStart: +Object playMoveNow String //SyntaxEnd// RawSyntaxStart: soldier playMoveNow moveName @@ -40407,6 +41915,9 @@ WikiPageStart: https://community.bistudio.com/wiki/playMusic //WikiPageEnd// SyntaxStart: +playMusic String +%NextSyntax% +playMusic Array //SyntaxEnd// RawSyntaxStart: playMusic name @@ -40448,6 +41959,7 @@ WikiPageStart: https://community.bistudio.com/wiki/playScriptedMission //WikiPageEnd// SyntaxStart: +playScriptedMission Array //SyntaxEnd// RawSyntaxStart: playScriptedMission [world,expression,config,ignoreChildWindow] @@ -40513,6 +42025,9 @@ WikiPageStart: https://community.bistudio.com/wiki/playSound //WikiPageEnd// SyntaxStart: +playSound String +%NextSyntax% +playSound Array //SyntaxEnd// RawSyntaxStart: playSound soundName @@ -40577,6 +42092,7 @@ WikiPageStart: https://community.bistudio.com/wiki/playSound3D //WikiPageEnd// SyntaxStart: +playSound3D Array //SyntaxEnd// RawSyntaxStart: playSound3D [filename, soundSource, isInside, soundPosition, volume, soundPitch, distance] @@ -40626,6 +42142,7 @@ WikiPageStart: https://community.bistudio.com/wiki/position //WikiPageEnd// SyntaxStart: +position Object/Location //SyntaxEnd// RawSyntaxStart: position object @@ -40655,6 +42172,7 @@ WikiPageStart: https://community.bistudio.com/wiki/positionCameraToWorld //WikiPageEnd// SyntaxStart: +positionCameraToWorld PositionRelative //SyntaxEnd// RawSyntaxStart: positionCameraToWorld cameraPos @@ -40698,6 +42216,7 @@ WikiPageStart: https://community.bistudio.com/wiki/posScreenToWorld //WikiPageEnd// SyntaxStart: +Control posScreenToWorld Array //SyntaxEnd// RawSyntaxStart: map posScreenToWorld [x, y] @@ -40734,6 +42253,7 @@ WikiPageStart: https://community.bistudio.com/wiki/posWorldToScreen //WikiPageEnd// SyntaxStart: +Control posWorldToScreen Array //SyntaxEnd// RawSyntaxStart: map posWorldToScreen position @@ -40761,6 +42281,9 @@ WikiPageStart: https://community.bistudio.com/wiki/ppEffectAdjust //WikiPageEnd// SyntaxStart: +String ppEffectAdjust Array +%NextSyntax% +Number ppEffectAdjust Array //SyntaxEnd// RawSyntaxStart: effect ppEffectAdjust settings @@ -40794,6 +42317,11 @@ WikiPageStart: https://community.bistudio.com/wiki/ppEffectCommit //WikiPageEnd// SyntaxStart: +String ppEffectCommit Number +%NextSyntax% +Number ppEffectCommit +%NextSyntax% +Array ppEffectCommit Number //SyntaxEnd// RawSyntaxStart: effect ppEffectCommit commit @@ -40830,6 +42358,9 @@ WikiPageStart: https://community.bistudio.com/wiki/ppEffectCommitted //WikiPageEnd// SyntaxStart: +ppEffectCommitted String +%NextSyntax% +ppEffectCommitted Number //SyntaxEnd// RawSyntaxStart: ppEffectCommitted effect @@ -40871,6 +42402,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ppEffectCreate //WikiPageEnd// SyntaxStart: +ppEffectCreate Array //SyntaxEnd// RawSyntaxStart: ppEffectCreate [name, priority] @@ -40903,6 +42435,9 @@ WikiPageStart: https://community.bistudio.com/wiki/ppEffectDestroy //WikiPageEnd// SyntaxStart: +ppEffectDestroy Number +%NextSyntax% +ppEffectDestroy Array //SyntaxEnd// RawSyntaxStart: ppEffectDestroy effect @@ -40935,6 +42470,11 @@ WikiPageStart: https://community.bistudio.com/wiki/ppEffectEnable //WikiPageEnd// SyntaxStart: +String ppEffectEnable Boolean +%NextSyntax% +Number ppEffectEnable Boolean +%NextSyntax% +Array ppEffectEnable Boolean //SyntaxEnd// RawSyntaxStart: effect ppEffectEnable enable @@ -40971,6 +42511,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ppEffectEnabled //WikiPageEnd// SyntaxStart: +ppEffectEnabled Number //SyntaxEnd// RawSyntaxStart: ppEffectEnabled effect @@ -40999,6 +42540,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ppEffectForceInNVG //WikiPageEnd// SyntaxStart: +Number ppEffectForceInNVG Boolean //SyntaxEnd// RawSyntaxStart: number ppEffectForceInNVG bool @@ -41027,6 +42569,7 @@ WikiPageStart: https://community.bistudio.com/wiki/precision //WikiPageEnd// SyntaxStart: +precision Object //SyntaxEnd// RawSyntaxStart: precision entity @@ -41058,6 +42601,7 @@ WikiPageStart: https://community.bistudio.com/wiki/preloadCamera //WikiPageEnd// SyntaxStart: +preloadCamera Array //SyntaxEnd// RawSyntaxStart: preloadCamera position @@ -41087,6 +42631,7 @@ WikiPageStart: https://community.bistudio.com/wiki/preloadObject //WikiPageEnd// SyntaxStart: +Number preloadObject Object/String //SyntaxEnd// RawSyntaxStart: distance preloadObject object @@ -41117,6 +42662,7 @@ WikiPageStart: https://community.bistudio.com/wiki/preloadSound //WikiPageEnd// SyntaxStart: +preloadSound String //SyntaxEnd// RawSyntaxStart: preloadSound soundName @@ -41147,6 +42693,7 @@ WikiPageStart: https://community.bistudio.com/wiki/preloadTitleObj //WikiPageEnd// SyntaxStart: +preloadTitleObj Array //SyntaxEnd// RawSyntaxStart: preloadTitleObj [name, type] @@ -41178,6 +42725,7 @@ WikiPageStart: https://community.bistudio.com/wiki/preloadTitleRsc //WikiPageEnd// SyntaxStart: +preloadTitleRsc Array //SyntaxEnd// RawSyntaxStart: preloadTitleRsc [name, type] @@ -41208,6 +42756,7 @@ WikiPageStart: https://community.bistudio.com/wiki/preprocessFile //WikiPageEnd// SyntaxStart: +preprocessFile String //SyntaxEnd// RawSyntaxStart: preprocessFile fileName @@ -41261,6 +42810,7 @@ WikiPageStart: https://community.bistudio.com/wiki/preprocessFileLineNumbers //WikiPageEnd// SyntaxStart: +preprocessFileLineNumbers String //SyntaxEnd// RawSyntaxStart: preprocessFileLineNumbers fileName @@ -41292,6 +42842,7 @@ WikiPageStart: https://community.bistudio.com/wiki/primaryWeapon //WikiPageEnd// SyntaxStart: +primaryWeapon Object //SyntaxEnd// RawSyntaxStart: primaryWeapon unit @@ -41327,6 +42878,7 @@ WikiPageStart: https://community.bistudio.com/wiki/primaryWeaponItems //WikiPageEnd// SyntaxStart: +primaryWeaponItems Object //SyntaxEnd// RawSyntaxStart: primaryWeaponItems unit @@ -41365,6 +42917,7 @@ WikiPageStart: https://community.bistudio.com/wiki/primaryWeaponMagazine //WikiPageEnd// SyntaxStart: +primaryWeaponMagazine Object //SyntaxEnd// RawSyntaxStart: primaryWeaponMagazine unit @@ -41410,6 +42963,7 @@ WikiPageStart: https://community.bistudio.com/wiki/priority //WikiPageEnd// SyntaxStart: +priority Task //SyntaxEnd// RawSyntaxStart: priority task @@ -41439,13 +42993,18 @@ WikiPageStart: https://community.bistudio.com/wiki/private //WikiPageEnd// SyntaxStart: +private String +%NextSyntax% +private Array +%NextSyntax% +private Assignment //SyntaxEnd// RawSyntaxStart: private variableName %NextRawSyntax% private variableNameList %NextRawSyntax% -value +private assignment //RawSyntaxEnd// ExampleStart: $Code$private "_varname";$/Code$ @@ -41532,6 +43091,7 @@ WikiPageStart: https://community.bistudio.com/wiki/processDiaryLink //WikiPageEnd// SyntaxStart: +processDiaryLink String //SyntaxEnd// RawSyntaxStart: processDiaryLink link @@ -41559,6 +43119,7 @@ WikiPageStart: https://community.bistudio.com/wiki/productVersion //WikiPageEnd// SyntaxStart: +productVersion //SyntaxEnd// RawSyntaxStart: productVersion @@ -41589,6 +43150,7 @@ WikiPageStart: https://community.bistudio.com/wiki/profileName //WikiPageEnd// SyntaxStart: +profileName //SyntaxEnd// RawSyntaxStart: profileName @@ -41619,6 +43181,7 @@ WikiPageStart: https://community.bistudio.com/wiki/profileNamespace //WikiPageEnd// SyntaxStart: +profileNamespace //SyntaxEnd// RawSyntaxStart: profileNamespace @@ -41651,6 +43214,7 @@ WikiPageStart: https://community.bistudio.com/wiki/profileNameSteam //WikiPageEnd// SyntaxStart: +profileNameSteam //SyntaxEnd// RawSyntaxStart: profileNameSteam @@ -41679,6 +43243,7 @@ WikiPageStart: https://community.bistudio.com/wiki/progressLoadingScreen //WikiPageEnd// SyntaxStart: +progressLoadingScreen Number //SyntaxEnd// RawSyntaxStart: progressLoadingScreen progress @@ -41715,6 +43280,7 @@ WikiPageStart: https://community.bistudio.com/wiki/progressPosition //WikiPageEnd// SyntaxStart: +progressPosition Control //SyntaxEnd// RawSyntaxStart: progressPosition control @@ -41743,6 +43309,7 @@ WikiPageStart: https://community.bistudio.com/wiki/progressSetPosition //WikiPageEnd// SyntaxStart: +Control progressSetPosition Number //SyntaxEnd// RawSyntaxStart: control progressSetPosition pos @@ -41794,6 +43361,7 @@ WikiPageStart: https://community.bistudio.com/wiki/publicVariable //WikiPageEnd// SyntaxStart: +publicVariable String //SyntaxEnd// RawSyntaxStart: publicVariable varName @@ -41862,6 +43430,7 @@ WikiPageStart: https://community.bistudio.com/wiki/publicVariableClient //WikiPageEnd// SyntaxStart: +Number publicVariableClient String //SyntaxEnd// RawSyntaxStart: clientID publicVariableClient varName @@ -41912,6 +43481,7 @@ WikiPageStart: https://community.bistudio.com/wiki/publicVariableServer //WikiPageEnd// SyntaxStart: +publicVariableServer String //SyntaxEnd// RawSyntaxStart: publicVariableServer varName @@ -41944,6 +43514,7 @@ WikiPageStart: https://community.bistudio.com/wiki/pushBack //WikiPageEnd// SyntaxStart: +Array pushBack Anything //SyntaxEnd// RawSyntaxStart: array pushBack element @@ -42005,6 +43576,7 @@ WikiPageStart: https://community.bistudio.com/wiki/pushBackUnique //WikiPageEnd// SyntaxStart: +Array pushBackUnique Anything //SyntaxEnd// RawSyntaxStart: array pushBackUnique element @@ -42039,6 +43611,7 @@ WikiPageStart: https://community.bistudio.com/wiki/putWeaponPool //WikiPageEnd// SyntaxStart: +putWeaponPool Object //SyntaxEnd// RawSyntaxStart: putWeaponPool object @@ -42066,6 +43639,7 @@ WikiPageStart: https://community.bistudio.com/wiki/queryItemsPool //WikiPageEnd// SyntaxStart: +queryItemsPool String //SyntaxEnd// RawSyntaxStart: queryItemsPool name @@ -42093,6 +43667,7 @@ WikiPageStart: https://community.bistudio.com/wiki/queryMagazinePool //WikiPageEnd// SyntaxStart: +queryMagazinePool String //SyntaxEnd// RawSyntaxStart: queryMagazinePool name @@ -42121,6 +43696,7 @@ WikiPageStart: https://community.bistudio.com/wiki/queryWeaponPool //WikiPageEnd// SyntaxStart: +queryWeaponPool String //SyntaxEnd// RawSyntaxStart: queryWeaponPool name @@ -42149,6 +43725,7 @@ WikiPageStart: https://community.bistudio.com/wiki/rad //WikiPageEnd// SyntaxStart: +rad Number //SyntaxEnd// RawSyntaxStart: rad x @@ -42178,6 +43755,7 @@ WikiPageStart: https://community.bistudio.com/wiki/radioChannelAdd //WikiPageEnd// SyntaxStart: +Number radioChannelAdd Array //SyntaxEnd// RawSyntaxStart: index radioChannelAdd units @@ -42206,6 +43784,7 @@ WikiPageStart: https://community.bistudio.com/wiki/radioChannelCreate //WikiPageEnd// SyntaxStart: +radioChannelCreate Array //SyntaxEnd// RawSyntaxStart: radioChannelCreate [color, label, callSign, units] @@ -42243,6 +43822,7 @@ WikiPageStart: https://community.bistudio.com/wiki/radioChannelRemove //WikiPageEnd// SyntaxStart: +Number radioChannelRemove Array //SyntaxEnd// RawSyntaxStart: index radioChannelRemove characters @@ -42283,6 +43863,7 @@ WikiPageStart: https://community.bistudio.com/wiki/radioChannelSetCallSign //WikiPageEnd// SyntaxStart: +Number radioChannelSetCallSign String //SyntaxEnd// RawSyntaxStart: index radioChannelSetCallSign callSign @@ -42311,6 +43892,7 @@ WikiPageStart: https://community.bistudio.com/wiki/radioChannelSetLabel //WikiPageEnd// SyntaxStart: +Number radioChannelSetLabel String //SyntaxEnd// RawSyntaxStart: index radioChannelSetLabel label @@ -42339,6 +43921,7 @@ WikiPageStart: https://community.bistudio.com/wiki/radioVolume //WikiPageEnd// SyntaxStart: +radioVolume //SyntaxEnd// RawSyntaxStart: radioVolume @@ -42367,6 +43950,7 @@ WikiPageStart: https://community.bistudio.com/wiki/rain //WikiPageEnd// SyntaxStart: +rain //SyntaxEnd// RawSyntaxStart: rain @@ -42395,6 +43979,7 @@ WikiPageStart: https://community.bistudio.com/wiki/rainbow //WikiPageEnd// SyntaxStart: +rainbow //SyntaxEnd// RawSyntaxStart: rainbow @@ -42423,11 +44008,14 @@ WikiPageStart: https://community.bistudio.com/wiki/random //WikiPageEnd// SyntaxStart: +random Number +%NextSyntax% +random Array //SyntaxEnd// RawSyntaxStart: random x %NextRawSyntax% -random [min, mid, max] Since Arma 3 v1.55.133393 +random [min, mid, max] //RawSyntaxEnd// ExampleStart: $Code$_rNumber = random 1;$/Code$ @@ -42523,6 +44111,7 @@ WikiPageStart: https://community.bistudio.com/wiki/rank //WikiPageEnd// SyntaxStart: +rank Object //SyntaxEnd// RawSyntaxStart: rank unitName @@ -42559,6 +44148,7 @@ WikiPageStart: https://community.bistudio.com/wiki/rankId //WikiPageEnd// SyntaxStart: +rankId Object //SyntaxEnd// RawSyntaxStart: rankId unit @@ -42588,6 +44178,7 @@ WikiPageStart: https://community.bistudio.com/wiki/rating //WikiPageEnd// SyntaxStart: +rating Object //SyntaxEnd// RawSyntaxStart: rating unitName @@ -42617,6 +44208,7 @@ WikiPageStart: https://community.bistudio.com/wiki/rectangular //WikiPageEnd// SyntaxStart: +rectangular Location //SyntaxEnd// RawSyntaxStart: rectangular location @@ -42645,6 +44237,7 @@ WikiPageStart: https://community.bistudio.com/wiki/registeredTasks //WikiPageEnd// SyntaxStart: +registeredTasks TeamMember //SyntaxEnd// RawSyntaxStart: registeredTasks member @@ -42677,6 +44270,7 @@ WikiPageStart: https://community.bistudio.com/wiki/registerTask //WikiPageEnd// SyntaxStart: +TeamMember registerTask String //SyntaxEnd// RawSyntaxStart: teamMember registerTask entryName @@ -42704,6 +44298,7 @@ WikiPageStart: https://community.bistudio.com/wiki/reload //WikiPageEnd// SyntaxStart: +reload Object //SyntaxEnd// RawSyntaxStart: reload unitName @@ -42732,6 +44327,7 @@ WikiPageStart: https://community.bistudio.com/wiki/reloadEnabled //WikiPageEnd// SyntaxStart: +Boolean reloadEnabled Object //SyntaxEnd// RawSyntaxStart: Boolean reloadEnabled unitName @@ -42759,6 +44355,7 @@ WikiPageStart: https://community.bistudio.com/wiki/remoteControl //WikiPageEnd// SyntaxStart: +Object remoteControl //SyntaxEnd// RawSyntaxStart: who remoteControl whom @@ -42818,6 +44415,7 @@ WikiPageStart: https://community.bistudio.com/wiki/remoteExec //WikiPageEnd// SyntaxStart: +Anything remoteExec Array; //SyntaxEnd// RawSyntaxStart: params remoteExec [functionName, targets, JIP]; @@ -42905,6 +44503,7 @@ WikiPageStart: https://community.bistudio.com/wiki/remoteExecCall //WikiPageEnd// SyntaxStart: +Anything remoteExecCall Array //SyntaxEnd// RawSyntaxStart: params remoteExecCall [functionName, targets, JIP] @@ -42970,6 +44569,7 @@ WikiPageStart: https://community.bistudio.com/wiki/remove3DENConnection //WikiPageEnd// SyntaxStart: +remove3DENConnection Array //SyntaxEnd// RawSyntaxStart: remove3DENConnection [type, from, to] @@ -43000,6 +44600,7 @@ WikiPageStart: https://community.bistudio.com/wiki/remove3DENEventHandler //WikiPageEnd// SyntaxStart: +remove3DENEventHandler Array //SyntaxEnd// RawSyntaxStart: remove3DENEventHandler [type,id] @@ -43029,6 +44630,7 @@ WikiPageStart: https://community.bistudio.com/wiki/remove3DENLayer //WikiPageEnd// SyntaxStart: +remove3DENLayer Number //SyntaxEnd// RawSyntaxStart: remove3DENLayer layerID @@ -43059,6 +44661,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeAction //WikiPageEnd// SyntaxStart: +Object removeAction Number //SyntaxEnd// RawSyntaxStart: unit removeAction index @@ -43088,6 +44691,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeAll3DENEventHandlers //WikiPageEnd// SyntaxStart: +removeAll3DENEventHandlers String //SyntaxEnd// RawSyntaxStart: removeAll3DENEventHandlers type @@ -43116,6 +44720,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeAllActions //WikiPageEnd// SyntaxStart: +removeAllActions Object //SyntaxEnd// RawSyntaxStart: removeAllActions unit @@ -43146,6 +44751,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeAllAssignedItems //WikiPageEnd// SyntaxStart: +removeAllAssignedItems Object //SyntaxEnd// RawSyntaxStart: removeAllAssignedItems unit @@ -43174,6 +44780,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeAllContainers //WikiPageEnd// SyntaxStart: +removeAllContainers Object //SyntaxEnd// RawSyntaxStart: removeAllContainers unit @@ -43204,6 +44811,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeAllCuratorAddons //WikiPageEnd// SyntaxStart: +removeAllCuratorAddons Object //SyntaxEnd// RawSyntaxStart: removeAllCuratorAddons curatorObj @@ -43233,6 +44841,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeAllCuratorCameraAreas //WikiPageEnd// SyntaxStart: +removeAllCuratorCameraAreas Object //SyntaxEnd// RawSyntaxStart: removeAllCuratorCameraAreas curatorObj @@ -43261,6 +44870,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeAllCuratorEditingAreas //WikiPageEnd// SyntaxStart: +removeAllCuratorEditingAreas Object //SyntaxEnd// RawSyntaxStart: removeAllCuratorEditingAreas curatorObj @@ -43289,6 +44899,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeAllEventHandlers //WikiPageEnd// SyntaxStart: +Object removeAllEventHandlers String //SyntaxEnd// RawSyntaxStart: objectName removeAllEventHandlers handlerType @@ -43317,6 +44928,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeAllHandgunItems //WikiPageEnd// SyntaxStart: +removeAllHandgunItems Object //SyntaxEnd// RawSyntaxStart: removeAllHandgunItems unit @@ -43344,6 +44956,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeAllItems //WikiPageEnd// SyntaxStart: +removeAllItems Object //SyntaxEnd// RawSyntaxStart: removeAllItems unit @@ -43374,6 +44987,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeAllItemsWithMagazines //WikiPageEnd// SyntaxStart: +removeAllItemsWithMagazines Object //SyntaxEnd// RawSyntaxStart: removeAllItemsWithMagazines unit @@ -43402,6 +45016,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeAllMissionEventHandlers //WikiPageEnd// SyntaxStart: +removeAllMissionEventHandlers String //SyntaxEnd// RawSyntaxStart: removeAllMissionEventHandlers type @@ -43430,6 +45045,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeAllMPEventHandlers //WikiPageEnd// SyntaxStart: +Object removeAllMPEventHandlers String //SyntaxEnd// RawSyntaxStart: objectName removeAllMPEventHandlers event @@ -43458,6 +45074,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeAllMusicEventHandlers //WikiPageEnd// SyntaxStart: +removeAllMusicEventHandlers String //SyntaxEnd// RawSyntaxStart: removeAllMusicEventHandlers type @@ -43488,6 +45105,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeAllPrimaryWeaponItems //WikiPageEnd// SyntaxStart: +removeAllPrimaryWeaponItems Object //SyntaxEnd// RawSyntaxStart: removeAllPrimaryWeaponItems unit @@ -43519,6 +45137,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeAllWeapons //WikiPageEnd// SyntaxStart: +removeAllWeapons Object //SyntaxEnd// RawSyntaxStart: removeAllWeapons unitName @@ -43550,6 +45169,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeBackpack //WikiPageEnd// SyntaxStart: +removeBackpack Object //SyntaxEnd// RawSyntaxStart: removeBackpack unit @@ -43580,6 +45200,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeBackpackGlobal //WikiPageEnd// SyntaxStart: +removeBackpackGlobal Object //SyntaxEnd// RawSyntaxStart: removeBackpackGlobal unit @@ -43591,6 +45212,9 @@ 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 @@ -43608,6 +45232,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeCuratorAddons //WikiPageEnd// SyntaxStart: +Object removeCuratorAddons Array //SyntaxEnd// RawSyntaxStart: curatorObj removeCuratorAddons addons @@ -43637,6 +45262,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeCuratorCameraArea //WikiPageEnd// SyntaxStart: +Object removeCuratorCameraArea Number //SyntaxEnd// RawSyntaxStart: curatorObj removeCuratorCameraArea cameraAreaID @@ -43665,6 +45291,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeCuratorEditableObjects //WikiPageEnd// SyntaxStart: +Object removeCuratorEditableObjects Array //SyntaxEnd// RawSyntaxStart: curatorObj removeCuratorEditableObjects [[objects],removeCrew] @@ -43694,6 +45321,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeCuratorEditingArea //WikiPageEnd// SyntaxStart: +Object removeCuratorEditingArea Number //SyntaxEnd// RawSyntaxStart: curatorObj removeCuratorEditingArea editAreaID @@ -43722,6 +45350,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeDrawIcon //WikiPageEnd// SyntaxStart: +Control removeDrawIcon Array //SyntaxEnd// RawSyntaxStart: map removeDrawIcon [object,string identifier] @@ -43749,6 +45378,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeDrawLinks //WikiPageEnd// SyntaxStart: +Control removeDrawLinks Array //SyntaxEnd// RawSyntaxStart: map removeDrawLinks [from,param type] @@ -43777,6 +45407,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeEventHandler //WikiPageEnd// SyntaxStart: +Object removeEventHandler Array //SyntaxEnd// RawSyntaxStart: objectName removeEventHandler [type, index] @@ -43805,6 +45436,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeFromRemainsCollector //WikiPageEnd// SyntaxStart: +removeFromRemainsCollector Array //SyntaxEnd// RawSyntaxStart: removeFromRemainsCollector remains @@ -43833,6 +45465,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeGoggles //WikiPageEnd// SyntaxStart: +removeGoggles Object //SyntaxEnd// RawSyntaxStart: removeGoggles unit @@ -43861,6 +45494,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeGroupIcon //WikiPageEnd// SyntaxStart: +Group removeGroupIcon Number //SyntaxEnd// RawSyntaxStart: group removeGroupIcon iconID @@ -43890,6 +45524,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeHandgunItem //WikiPageEnd// SyntaxStart: +Object removeHandgunItem String //SyntaxEnd// RawSyntaxStart: unit removeHandgunItem item @@ -43918,6 +45553,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeHeadgear //WikiPageEnd// SyntaxStart: +removeHeadgear Object //SyntaxEnd// RawSyntaxStart: removeHeadgear unit @@ -43946,6 +45582,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeItem //WikiPageEnd// SyntaxStart: +Object removeItem String //SyntaxEnd// RawSyntaxStart: unit removeItem item @@ -43979,6 +45616,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeItemFromBackpack //WikiPageEnd// SyntaxStart: +Object removeItemFromBackpack String //SyntaxEnd// RawSyntaxStart: unit removeItemFromBackpack item @@ -44006,6 +45644,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeItemFromUniform //WikiPageEnd// SyntaxStart: +Object removeItemFromUniform String //SyntaxEnd// RawSyntaxStart: unit removeItemFromUniform item @@ -44033,6 +45672,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeItemFromVest //WikiPageEnd// SyntaxStart: +Object removeItemFromVest String //SyntaxEnd// RawSyntaxStart: unit removeItemFromVest item @@ -44060,6 +45700,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeItems //WikiPageEnd// SyntaxStart: +Object removeItems String //SyntaxEnd// RawSyntaxStart: unit removeItems item @@ -44089,6 +45730,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeMagazine //WikiPageEnd// SyntaxStart: +Object removeMagazine String //SyntaxEnd// RawSyntaxStart: unitName removeMagazine magazineName @@ -44117,6 +45759,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeMagazineGlobal //WikiPageEnd// SyntaxStart: +Object removeMagazineGlobal String //SyntaxEnd// RawSyntaxStart: unit removeMagazineGlobal magazineName @@ -44146,6 +45789,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeMagazines //WikiPageEnd// SyntaxStart: +Object removeMagazines String //SyntaxEnd// RawSyntaxStart: unitName removeMagazines magazineName @@ -44170,13 +45814,13 @@ KeywordStart: removeMagazinesTurret //KeywordEnd// DescriptionStart: -Removes all magazines of the given type from the unit. Use turret path [-1] for driver's turret. -Note: you may create invalid combinations by using this function. When doing so, application behaviour is undefined. +Removes all magazines of the given type from given vehicle. Use turret path [-1] for driver's turret. //DescriptionEnd// WikiPageStart: https://community.bistudio.com/wiki/removeMagazinesTurret //WikiPageEnd// SyntaxStart: +Object removeMagazinesTurret Array //SyntaxEnd// RawSyntaxStart: vehicle removeMagazinesTurret [magazineName, turretPath] @@ -44216,6 +45860,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeMagazineTurret //WikiPageEnd// SyntaxStart: +Object removeMagazineTurret Array //SyntaxEnd// RawSyntaxStart: vehicle removeMagazineTurret [magazineName, turretPath] @@ -44246,6 +45891,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeMenuItem //WikiPageEnd// SyntaxStart: +Control removeMenuItem Number //SyntaxEnd// RawSyntaxStart: map removeMenuItem index @@ -44274,6 +45920,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeMissionEventHandler //WikiPageEnd// SyntaxStart: +removeMissionEventHandler Array //SyntaxEnd// RawSyntaxStart: removeMissionEventHandler [type, index] @@ -44307,6 +45954,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeMPEventHandler //WikiPageEnd// SyntaxStart: +Object removeMPEventHandler Array //SyntaxEnd// RawSyntaxStart: unitName removeMPEventHandler [event, index] @@ -44337,6 +45985,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeMusicEventHandler //WikiPageEnd// SyntaxStart: +removeMusicEventHandler Array //SyntaxEnd// RawSyntaxStart: removeMusicEventHandler [type, id] @@ -44371,6 +46020,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removePrimaryWeaponItem //WikiPageEnd// SyntaxStart: +Object removePrimaryWeaponItem String //SyntaxEnd// RawSyntaxStart: unit removePrimaryWeaponItem item @@ -44399,6 +46049,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeSecondaryWeaponItem //WikiPageEnd// SyntaxStart: +Object removeSecondaryWeaponItem String //SyntaxEnd// RawSyntaxStart: unit removeSecondaryWeaponItem item @@ -44427,6 +46078,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeSimpleTask //WikiPageEnd// SyntaxStart: +Object removeSimpleTask Task //SyntaxEnd// RawSyntaxStart: person removeSimpleTask task @@ -44455,6 +46107,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeSwitchableUnit //WikiPageEnd// SyntaxStart: +removeSwitchableUnit Object //SyntaxEnd// RawSyntaxStart: removeSwitchableUnit unitName @@ -44482,6 +46135,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeTeamMember //WikiPageEnd// SyntaxStart: +TeamMember removeTeamMember //SyntaxEnd// RawSyntaxStart: team removeTeamMember member @@ -44510,6 +46164,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeUniform //WikiPageEnd// SyntaxStart: +removeUniform Object //SyntaxEnd// RawSyntaxStart: removeUniform unit @@ -44538,6 +46193,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeVest //WikiPageEnd// SyntaxStart: +removeVest Object //SyntaxEnd// RawSyntaxStart: removeVest unit @@ -44567,6 +46223,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeWeapon //WikiPageEnd// SyntaxStart: +Object removeWeapon String //SyntaxEnd// RawSyntaxStart: unit removeWeapon weapon @@ -44599,6 +46256,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeWeaponGlobal //WikiPageEnd// SyntaxStart: +Object removeWeaponGlobal String //SyntaxEnd// RawSyntaxStart: unit removeWeaponGlobal weapon @@ -44635,6 +46293,7 @@ WikiPageStart: https://community.bistudio.com/wiki/removeWeaponTurret //WikiPageEnd// SyntaxStart: +Object removeWeaponTurret Array //SyntaxEnd// RawSyntaxStart: vehicle removeWeaponTurret [weaponName, turretPath] @@ -44666,6 +46325,7 @@ WikiPageStart: https://community.bistudio.com/wiki/requiredVersion //WikiPageEnd// SyntaxStart: +requiredVersion String //SyntaxEnd// RawSyntaxStart: requiredVersion version @@ -44696,6 +46356,7 @@ WikiPageStart: https://community.bistudio.com/wiki/resetCamShake //WikiPageEnd// SyntaxStart: +resetCamShake //SyntaxEnd// RawSyntaxStart: resetCamShake @@ -44724,6 +46385,7 @@ WikiPageStart: https://community.bistudio.com/wiki/resetSubgroupDirection //WikiPageEnd// SyntaxStart: +resetSubgroupDirection Object //SyntaxEnd// RawSyntaxStart: resetSubgroupDirection unit @@ -44753,6 +46415,7 @@ WikiPageStart: https://community.bistudio.com/wiki/resistance //WikiPageEnd// SyntaxStart: +resistance //SyntaxEnd// RawSyntaxStart: resistance @@ -44787,6 +46450,7 @@ WikiPageStart: https://community.bistudio.com/wiki/resize //WikiPageEnd// SyntaxStart: +Array resize Number //SyntaxEnd// RawSyntaxStart: arrayName resize count @@ -44819,6 +46483,7 @@ WikiPageStart: https://community.bistudio.com/wiki/resources //WikiPageEnd// SyntaxStart: +resources TeamMember //SyntaxEnd// RawSyntaxStart: resources member @@ -44847,6 +46512,7 @@ WikiPageStart: https://community.bistudio.com/wiki/respawnVehicle //WikiPageEnd// SyntaxStart: +Object respawnVehicle Array //SyntaxEnd// RawSyntaxStart: vehicle respawnVehicle [delay, count] @@ -44891,6 +46557,7 @@ WikiPageStart: https://community.bistudio.com/wiki/restartEditorCamera //WikiPageEnd// SyntaxStart: +restartEditorCamera Control //SyntaxEnd// RawSyntaxStart: restartEditorCamera map @@ -44922,6 +46589,9 @@ WikiPageStart: https://community.bistudio.com/wiki/reveal //WikiPageEnd// SyntaxStart: +Object/Group reveal Object +%NextSyntax% +Object/Group reveal Array //SyntaxEnd// RawSyntaxStart: toWhom reveal target @@ -44973,6 +46643,7 @@ WikiPageStart: https://community.bistudio.com/wiki/revealMine //WikiPageEnd// SyntaxStart: +Side revealMine Object //SyntaxEnd// RawSyntaxStart: side revealMine mine @@ -45001,6 +46672,7 @@ WikiPageStart: https://community.bistudio.com/wiki/reverse //WikiPageEnd// SyntaxStart: +reverse Array //SyntaxEnd// RawSyntaxStart: reverse array @@ -45035,6 +46707,7 @@ WikiPageStart: https://community.bistudio.com/wiki/reversedMouseY //WikiPageEnd// SyntaxStart: +reversedMouseY //SyntaxEnd// RawSyntaxStart: reversedMouseY @@ -45062,6 +46735,7 @@ WikiPageStart: https://community.bistudio.com/wiki/roadAt //WikiPageEnd// SyntaxStart: +roadAt Object/Array //SyntaxEnd// RawSyntaxStart: roadAt position @@ -45092,6 +46766,7 @@ WikiPageStart: https://community.bistudio.com/wiki/roadsConnectedTo //WikiPageEnd// SyntaxStart: +roadsConnectedTo Object //SyntaxEnd// RawSyntaxStart: roadsConnectedTo roadSegment @@ -45121,6 +46796,7 @@ WikiPageStart: https://community.bistudio.com/wiki/roleDescription //WikiPageEnd// SyntaxStart: +roleDescription Object //SyntaxEnd// RawSyntaxStart: roleDescription unit @@ -45151,6 +46827,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ropeAttachedObjects //WikiPageEnd// SyntaxStart: +ropeAttachedObjects Object //SyntaxEnd// RawSyntaxStart: ropeAttachedObjects vehicle @@ -45179,6 +46856,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ropeAttachedTo //WikiPageEnd// SyntaxStart: +ropeAttachedTo Object //SyntaxEnd// RawSyntaxStart: ropeAttachedTo vehicle @@ -45207,6 +46885,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ropeAttachEnabled //WikiPageEnd// SyntaxStart: +ropeAttachEnabled Object //SyntaxEnd// RawSyntaxStart: ropeAttachEnabled vehicle @@ -45235,6 +46914,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ropeAttachTo //WikiPageEnd// SyntaxStart: +Array ropeAttachTo Object //SyntaxEnd// RawSyntaxStart: [veh, toPoint, ropeEndDownDir] ropeAttachTo rope @@ -45263,6 +46943,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ropeCreate //WikiPageEnd// SyntaxStart: +ropeCreate Array //SyntaxEnd// RawSyntaxStart: ropeCreate [fromObject, fromPoint, toObject, toPoint, segments, length] @@ -45308,6 +46989,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ropeCut //WikiPageEnd// SyntaxStart: +ropeCut Array //SyntaxEnd// RawSyntaxStart: ropeCut [rope, distance] @@ -45336,6 +47018,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ropeDestroy //WikiPageEnd// SyntaxStart: +ropeDestroy Object //SyntaxEnd// RawSyntaxStart: ropeDestroy rope @@ -45364,6 +47047,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ropeDetach //WikiPageEnd// SyntaxStart: +Object ropeDetach rope; //SyntaxEnd// RawSyntaxStart: vehicle ropeDetach rope; @@ -45392,6 +47076,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ropeEndPosition //WikiPageEnd// SyntaxStart: +ropeEndPosition Object //SyntaxEnd// RawSyntaxStart: ropeEndPosition rope @@ -45422,6 +47107,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ropeLength //WikiPageEnd// SyntaxStart: +ropeLength Object //SyntaxEnd// RawSyntaxStart: ropeLength rope @@ -45452,6 +47138,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ropes //WikiPageEnd// SyntaxStart: +ropes Object //SyntaxEnd// RawSyntaxStart: ropes vehicle @@ -45484,6 +47171,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ropeUnwind //WikiPageEnd// SyntaxStart: +ropeUnwind Array //SyntaxEnd// RawSyntaxStart: ropeUnwind [rope, speed, targetLength, relative] @@ -45521,6 +47209,7 @@ WikiPageStart: https://community.bistudio.com/wiki/ropeUnwound //WikiPageEnd// SyntaxStart: +ropeUnwound Object //SyntaxEnd// RawSyntaxStart: ropeUnwound rope @@ -45549,6 +47238,7 @@ WikiPageStart: https://community.bistudio.com/wiki/rotorsForcesRTD //WikiPageEnd// SyntaxStart: +rotorsForcesRTD Object //SyntaxEnd// RawSyntaxStart: rotorsForcesRTD RTD_helicopter @@ -45582,6 +47272,7 @@ WikiPageStart: https://community.bistudio.com/wiki/rotorsRpmRTD //WikiPageEnd// SyntaxStart: +rotorsRpmRTD Object //SyntaxEnd// RawSyntaxStart: rotorsRpmRTD RTD_helicopter @@ -45611,6 +47302,7 @@ WikiPageStart: https://community.bistudio.com/wiki/round //WikiPageEnd// SyntaxStart: +round Number //SyntaxEnd// RawSyntaxStart: round x @@ -45641,6 +47333,7 @@ WikiPageStart: https://community.bistudio.com/wiki/runInitScript //WikiPageEnd// SyntaxStart: +runInitScript //SyntaxEnd// RawSyntaxStart: runInitScript @@ -45658,36 +47351,6 @@ Nothing %NextListItem% -KeywordStart: -safeZoneH -//KeywordEnd// -DescriptionStart: -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/safeZoneH -//WikiPageEnd// -SyntaxStart: -//SyntaxEnd// -RawSyntaxStart: -SafeZoneH -//RawSyntaxEnd// -ExampleStart: -$Code$_screenHeight = safeZoneH ;$/Code$ -%NextExample% -$Code$_screenBottomBorderY = safeZoneH + safeZoneY ;$/Code$ -//ExampleEnd// -LocalityStart: -undefined / undefined -//LocalityEnd// -NoteStart: -//NoteEnd// -ReturnValueStart: -Number -//ReturnValueEnd// - -%NextListItem% - KeywordStart: safeZoneW //KeywordEnd// @@ -45698,6 +47361,7 @@ WikiPageStart: https://community.bistudio.com/wiki/safeZoneW //WikiPageEnd// SyntaxStart: +safeZoneW //SyntaxEnd// RawSyntaxStart: safeZoneW @@ -45728,6 +47392,7 @@ WikiPageStart: https://community.bistudio.com/wiki/safeZoneWAbs //WikiPageEnd// SyntaxStart: +safeZoneWAbs //SyntaxEnd// RawSyntaxStart: safeZoneWAbs @@ -45746,34 +47411,6 @@ Number %NextListItem% -KeywordStart: -safeZoneX -//KeywordEnd// -DescriptionStart: -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/safeZoneX -//WikiPageEnd// -SyntaxStart: -//SyntaxEnd// -RawSyntaxStart: -SafeZoneX -//RawSyntaxEnd// -ExampleStart: -$Code$_screenLeftBorderX = safeZoneX ; // returns a float value 0$/Code$ -//ExampleEnd// -LocalityStart: -undefined / undefined -//LocalityEnd// -NoteStart: -//NoteEnd// -ReturnValueStart: -Number -//ReturnValueEnd// - -%NextListItem% - KeywordStart: safeZoneXAbs //KeywordEnd// @@ -45784,6 +47421,7 @@ WikiPageStart: https://community.bistudio.com/wiki/safeZoneXAbs //WikiPageEnd// SyntaxStart: +safeZoneXAbs //SyntaxEnd// RawSyntaxStart: safeZoneXAbs @@ -45802,34 +47440,6 @@ Number %NextListItem% -KeywordStart: -safeZoneY -//KeywordEnd// -DescriptionStart: -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/safeZoneY -//WikiPageEnd// -SyntaxStart: -//SyntaxEnd// -RawSyntaxStart: -SafeZoneY -//RawSyntaxEnd// -ExampleStart: -$Code$_screenTopBorderY = safeZoneY ; // returns a float value 0$/Code$ -//ExampleEnd// -LocalityStart: -undefined / undefined -//LocalityEnd// -NoteStart: -//NoteEnd// -ReturnValueStart: -Number -//ReturnValueEnd// - -%NextListItem% - KeywordStart: saveGame //KeywordEnd// @@ -45840,6 +47450,7 @@ WikiPageStart: https://community.bistudio.com/wiki/saveGame //WikiPageEnd// SyntaxStart: +saveGame //SyntaxEnd// RawSyntaxStart: saveGame @@ -45868,6 +47479,7 @@ WikiPageStart: https://community.bistudio.com/wiki/saveIdentity //WikiPageEnd// SyntaxStart: +Object saveIdentity String //SyntaxEnd// RawSyntaxStart: unitName saveIdentity name @@ -45898,6 +47510,7 @@ WikiPageStart: https://community.bistudio.com/wiki/saveJoysticks //WikiPageEnd// SyntaxStart: +saveJoysticks //SyntaxEnd// RawSyntaxStart: saveJoysticks @@ -45925,6 +47538,7 @@ WikiPageStart: https://community.bistudio.com/wiki/saveOverlay //WikiPageEnd// SyntaxStart: +saveOverlay Control //SyntaxEnd// RawSyntaxStart: saveOverlay map @@ -45956,6 +47570,7 @@ WikiPageStart: https://community.bistudio.com/wiki/saveProfileNamespace //WikiPageEnd// SyntaxStart: +saveProfileNamespace //SyntaxEnd// RawSyntaxStart: saveProfileNamespace @@ -45985,6 +47600,7 @@ WikiPageStart: https://community.bistudio.com/wiki/saveStatus //WikiPageEnd// SyntaxStart: +Object saveStatus String //SyntaxEnd// RawSyntaxStart: object saveStatus name @@ -46013,6 +47629,7 @@ WikiPageStart: https://community.bistudio.com/wiki/saveVar //WikiPageEnd// SyntaxStart: +saveVar String //SyntaxEnd// RawSyntaxStart: saveVar varname @@ -46043,6 +47660,7 @@ WikiPageStart: https://community.bistudio.com/wiki/savingEnabled //WikiPageEnd// SyntaxStart: +savingEnabled //SyntaxEnd// RawSyntaxStart: savingEnabled @@ -46079,6 +47697,13 @@ WikiPageStart: https://community.bistudio.com/wiki/say //WikiPageEnd// SyntaxStart: +Object say String +%NextSyntax% +Object say Array +%NextSyntax% +Array say String +%NextSyntax% +Array say //SyntaxEnd// RawSyntaxStart: from say sound @@ -46118,6 +47743,13 @@ WikiPageStart: https://community.bistudio.com/wiki/say2D //WikiPageEnd// SyntaxStart: +Object say2D String +%NextSyntax% +Object say2D Array +%NextSyntax% +Array say2D String +%NextSyntax% +Array say2D //SyntaxEnd// RawSyntaxStart: from say2D sound @@ -46154,6 +47786,13 @@ WikiPageStart: https://community.bistudio.com/wiki/say3D //WikiPageEnd// SyntaxStart: +Object say3D String +%NextSyntax% +Object say3D Array +%NextSyntax% +Array say3D String +%NextSyntax% +Array say3D //SyntaxEnd// RawSyntaxStart: from say3D sound @@ -46195,6 +47834,7 @@ WikiPageStart: https://community.bistudio.com/wiki/scopeName //WikiPageEnd// SyntaxStart: +scopeName String //SyntaxEnd// RawSyntaxStart: scopeName name @@ -46230,6 +47870,7 @@ WikiPageStart: https://community.bistudio.com/wiki/score //WikiPageEnd// SyntaxStart: +score Object //SyntaxEnd// RawSyntaxStart: score unit @@ -46258,6 +47899,7 @@ WikiPageStart: https://community.bistudio.com/wiki/scoreSide //WikiPageEnd// SyntaxStart: +scoreSide Side //SyntaxEnd// RawSyntaxStart: scoreSide side @@ -46286,6 +47928,7 @@ WikiPageStart: https://community.bistudio.com/wiki/screenToWorld //WikiPageEnd// SyntaxStart: +screenToWorld Array //SyntaxEnd// RawSyntaxStart: screenToWorld screen @@ -46314,6 +47957,7 @@ WikiPageStart: https://community.bistudio.com/wiki/scriptDone //WikiPageEnd// SyntaxStart: +scriptDone Script_ //SyntaxEnd// RawSyntaxStart: scriptDone handle @@ -46353,6 +47997,7 @@ WikiPageStart: https://community.bistudio.com/wiki/scriptName //WikiPageEnd// SyntaxStart: +scriptName String //SyntaxEnd// RawSyntaxStart: scriptName name @@ -46394,6 +48039,7 @@ WikiPageStart: https://community.bistudio.com/wiki/scriptNull //WikiPageEnd// SyntaxStart: +scriptNull //SyntaxEnd// RawSyntaxStart: scriptNull @@ -46444,6 +48090,7 @@ WikiPageStart: https://community.bistudio.com/wiki/scudState //WikiPageEnd// SyntaxStart: +scudState Object //SyntaxEnd// RawSyntaxStart: scudState scudName @@ -46483,6 +48130,7 @@ WikiPageStart: https://community.bistudio.com/wiki/secondaryWeapon //WikiPageEnd// SyntaxStart: +secondaryWeapon Object //SyntaxEnd// RawSyntaxStart: secondaryWeapon unit @@ -46516,6 +48164,7 @@ WikiPageStart: https://community.bistudio.com/wiki/secondaryWeaponItems //WikiPageEnd// SyntaxStart: +secondaryWeaponItems Object //SyntaxEnd// RawSyntaxStart: secondaryWeaponItems unit @@ -46544,6 +48193,7 @@ WikiPageStart: https://community.bistudio.com/wiki/secondaryWeaponMagazine //WikiPageEnd// SyntaxStart: +secondaryWeaponMagazine Object //SyntaxEnd// RawSyntaxStart: secondaryWeaponMagazine unit @@ -46583,6 +48233,17 @@ WikiPageStart: https://community.bistudio.com/wiki/select //WikiPageEnd// SyntaxStart: +Array select Number +%NextSyntax% +Array select Boolean +%NextSyntax% +Config select Number +%NextSyntax% +String select Array +%NextSyntax% +Array select +%NextSyntax% +Array select Code //SyntaxEnd// RawSyntaxStart: array select index @@ -46652,6 +48313,7 @@ WikiPageStart: https://community.bistudio.com/wiki/selectBestPlaces //WikiPageEnd// SyntaxStart: +selectBestPlaces Array //SyntaxEnd// RawSyntaxStart: selectBestPlaces [position, radius, expression, precision, sourcesCount] @@ -46715,6 +48377,7 @@ WikiPageStart: https://community.bistudio.com/wiki/selectDiarySubject //WikiPageEnd// SyntaxStart: +Object selectDiarySubject String //SyntaxEnd// RawSyntaxStart: person selectDiarySubject subject @@ -46742,6 +48405,7 @@ WikiPageStart: https://community.bistudio.com/wiki/selectedEditorObjects //WikiPageEnd// SyntaxStart: +selectedEditorObjects Control //SyntaxEnd// RawSyntaxStart: selectedEditorObjects map @@ -46771,6 +48435,7 @@ WikiPageStart: https://community.bistudio.com/wiki/selectEditorObject //WikiPageEnd// SyntaxStart: +Control selectEditorObject String //SyntaxEnd// RawSyntaxStart: map selectEditorObject object @@ -46799,6 +48464,9 @@ WikiPageStart: https://community.bistudio.com/wiki/selectionPosition //WikiPageEnd// SyntaxStart: +Object selectionPosition String +%NextSyntax% +Object selectionPosition Array //SyntaxEnd// RawSyntaxStart: object selectionPosition selectionName @@ -46843,6 +48511,7 @@ WikiPageStart: https://community.bistudio.com/wiki/selectLeader //WikiPageEnd// SyntaxStart: +Group selectLeader Object //SyntaxEnd// RawSyntaxStart: groupName selectLeader unitName @@ -46874,6 +48543,7 @@ WikiPageStart: https://community.bistudio.com/wiki/selectNoPlayer //WikiPageEnd// SyntaxStart: +selectNoPlayer //SyntaxEnd// RawSyntaxStart: selectNoPlayer @@ -46917,6 +48587,7 @@ WikiPageStart: https://community.bistudio.com/wiki/selectPlayer //WikiPageEnd// SyntaxStart: +selectPlayer Object //SyntaxEnd// RawSyntaxStart: selectPlayer unitName @@ -46966,6 +48637,7 @@ WikiPageStart: https://community.bistudio.com/wiki/selectRandom //WikiPageEnd// SyntaxStart: +selectRandom Array //SyntaxEnd// RawSyntaxStart: selectRandom array @@ -47001,6 +48673,7 @@ WikiPageStart: https://community.bistudio.com/wiki/selectWeapon //WikiPageEnd// SyntaxStart: +Object selectWeapon String //SyntaxEnd// RawSyntaxStart: unitName selectWeapon muzzleName @@ -47069,6 +48742,7 @@ WikiPageStart: https://community.bistudio.com/wiki/selectWeaponTurret //WikiPageEnd// SyntaxStart: +Object selectWeaponTurret Array //SyntaxEnd// RawSyntaxStart: vehicle selectWeaponTurret [weapon, turretPath] @@ -47097,6 +48771,7 @@ WikiPageStart: https://community.bistudio.com/wiki/sendAUMessage //WikiPageEnd// SyntaxStart: +sendAUMessage Array //SyntaxEnd// RawSyntaxStart: sendAUMessage [clientList, command] @@ -47143,6 +48818,7 @@ WikiPageStart: https://community.bistudio.com/wiki/sendSimpleCommand //WikiPageEnd// SyntaxStart: +Object sendSimpleCommand String //SyntaxEnd// RawSyntaxStart: vehicleName sendSimpleCommand command @@ -47176,6 +48852,7 @@ WikiPageStart: https://community.bistudio.com/wiki/sendTask //WikiPageEnd// SyntaxStart: +TeamMember sendTask Array //SyntaxEnd// RawSyntaxStart: sender sendTask [receiver,[type] or [type,parentTask],priority,name1,value1,name2,value2,...] @@ -47203,6 +48880,7 @@ WikiPageStart: https://community.bistudio.com/wiki/sendTaskResult //WikiPageEnd// SyntaxStart: +Task sendTaskResult Array //SyntaxEnd// RawSyntaxStart: task sendTaskResult [state,result,sentence] @@ -47231,6 +48909,7 @@ WikiPageStart: https://community.bistudio.com/wiki/sendUDPMessage //WikiPageEnd// SyntaxStart: +sendUDPMessage Array //SyntaxEnd// RawSyntaxStart: sendUDPMessage [ip, port, message] @@ -47260,6 +48939,9 @@ WikiPageStart: https://community.bistudio.com/wiki/serverCommand //WikiPageEnd// SyntaxStart: +serverCommand String +%NextSyntax% +String serverCommand //SyntaxEnd// RawSyntaxStart: serverCommand command @@ -47305,6 +48987,7 @@ WikiPageStart: https://community.bistudio.com/wiki/serverCommandAvailable //WikiPageEnd// SyntaxStart: +serverCommandAvailable String //SyntaxEnd// RawSyntaxStart: serverCommandAvailable command @@ -47337,6 +49020,7 @@ WikiPageStart: https://community.bistudio.com/wiki/serverCommandExecutable //WikiPageEnd// SyntaxStart: +serverCommandExecutable String //SyntaxEnd// RawSyntaxStart: serverCommandExecutable command @@ -47381,6 +49065,7 @@ WikiPageStart: https://community.bistudio.com/wiki/serverName //WikiPageEnd// SyntaxStart: +serverName //SyntaxEnd// RawSyntaxStart: serverName @@ -47410,6 +49095,7 @@ WikiPageStart: https://community.bistudio.com/wiki/serverTime //WikiPageEnd// SyntaxStart: +serverTime //SyntaxEnd// RawSyntaxStart: serverTime @@ -47442,6 +49128,7 @@ WikiPageStart: https://community.bistudio.com/wiki/set //WikiPageEnd// SyntaxStart: +Array set //SyntaxEnd// RawSyntaxStart: array set [index, value] @@ -47478,6 +49165,7 @@ WikiPageStart: https://community.bistudio.com/wiki/set3DENAttribute //WikiPageEnd// SyntaxStart: +Eden set3DENAttribute Array //SyntaxEnd// RawSyntaxStart: entity set3DENAttribute [class, value] @@ -47510,6 +49198,7 @@ WikiPageStart: https://community.bistudio.com/wiki/set3DENAttributes //WikiPageEnd// SyntaxStart: +set3DENAttributes Array //SyntaxEnd// RawSyntaxStart: set3DENAttributes [[ entities1, class1, value1 ],..., [ entitiesN, classN, valueN ]] @@ -47543,6 +49232,7 @@ WikiPageStart: https://community.bistudio.com/wiki/set3DENGrid //WikiPageEnd// SyntaxStart: +set3DENGrid Array //SyntaxEnd// RawSyntaxStart: set3DENGrid [type,value] @@ -47571,6 +49261,7 @@ WikiPageStart: https://community.bistudio.com/wiki/set3DENIconsVisible //WikiPageEnd// SyntaxStart: +set3DENIconsVisible Array //SyntaxEnd// RawSyntaxStart: set3DENIconsVisible [showMap, showScene] @@ -47600,6 +49291,7 @@ WikiPageStart: https://community.bistudio.com/wiki/set3DENLayer //WikiPageEnd// SyntaxStart: +Eden set3DENLayer Number //SyntaxEnd// RawSyntaxStart: entity set3DENLayer layerID @@ -47629,6 +49321,7 @@ WikiPageStart: https://community.bistudio.com/wiki/set3DENLinesVisible //WikiPageEnd// SyntaxStart: +set3DENLinesVisible Array //SyntaxEnd// RawSyntaxStart: set3DENLinesVisible [showMap, showScene] @@ -47661,6 +49354,7 @@ WikiPageStart: https://community.bistudio.com/wiki/set3DENMissionAttributes //WikiPageEnd// SyntaxStart: +set3DENMissionAttributes Array //SyntaxEnd// RawSyntaxStart: set3DENMissionAttributes [[ section, class1, value1 ],..., [ section, classN, valueN ]] @@ -47690,6 +49384,7 @@ WikiPageStart: https://community.bistudio.com/wiki/set3DENObjectType //WikiPageEnd// SyntaxStart: +Array set3DENObjectType String //SyntaxEnd// RawSyntaxStart: objects set3DENObjectType classname @@ -47719,6 +49414,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setAccTime //WikiPageEnd// SyntaxStart: +setAccTime Number //SyntaxEnd// RawSyntaxStart: setAccTime accFactor @@ -47750,6 +49446,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setAirportSide //WikiPageEnd// SyntaxStart: +Number setAirportSide Side //SyntaxEnd// RawSyntaxStart: id setAirportSide side @@ -47778,6 +49475,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setAmmo //WikiPageEnd// SyntaxStart: +Object setAmmo Array //SyntaxEnd// RawSyntaxStart: unit setAmmo [weapon, count] @@ -47821,6 +49519,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setAmmoCargo //WikiPageEnd// SyntaxStart: +Object setAmmoCargo Number //SyntaxEnd// RawSyntaxStart: vehicleName setAmmoCargo ammoCargo @@ -47856,6 +49555,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setAnimSpeedCoef //WikiPageEnd// SyntaxStart: +Object setAnimSpeedCoef Number //SyntaxEnd// RawSyntaxStart: unit setAnimSpeedCoef coef @@ -47884,6 +49584,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setAperture //WikiPageEnd// SyntaxStart: +setAperture Number //SyntaxEnd// RawSyntaxStart: setAperture aperture @@ -47916,6 +49617,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setApertureNew //WikiPageEnd// SyntaxStart: +setApertureNew Array //SyntaxEnd// RawSyntaxStart: setApertureNew [min, std, max, stdLum] @@ -47945,6 +49647,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setArmoryPoints //WikiPageEnd// SyntaxStart: +setArmoryPoints Number //SyntaxEnd// RawSyntaxStart: setArmoryPoints points @@ -47975,6 +49678,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setAttributes //WikiPageEnd// SyntaxStart: +String setAttributes Array //SyntaxEnd// RawSyntaxStart: text setAttributes [name1, value1, name2, value2,...] @@ -48005,6 +49709,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setAutonomous //WikiPageEnd// SyntaxStart: +Object setAutonomous Boolean //SyntaxEnd// RawSyntaxStart: uav setAutonomous bool @@ -48039,6 +49744,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setBehaviour //WikiPageEnd// SyntaxStart: +Object/Group setBehaviour String //SyntaxEnd// RawSyntaxStart: groupName setBehaviour behaviour @@ -48073,6 +49779,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setBleedingRemaining //WikiPageEnd// SyntaxStart: +Object setBleedingRemaining Number //SyntaxEnd// RawSyntaxStart: unit setBleedingRemaining time @@ -48104,6 +49811,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setCameraInterest //WikiPageEnd// SyntaxStart: +Object setCameraInterest Number //SyntaxEnd// RawSyntaxStart: entity setCameraInterest interest @@ -48132,6 +49840,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setCamShakeDefParams //WikiPageEnd// SyntaxStart: +setCamShakeDefParams Array //SyntaxEnd// RawSyntaxStart: setCamShakeDefParams [power, duration, frequency, minSpeed, minMass, caliberCoefHit, vehicleCoef] @@ -48165,6 +49874,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setCamShakeParams //WikiPageEnd// SyntaxStart: +setCamShakeParams Array //SyntaxEnd// RawSyntaxStart: setCamShakeParams [posCoef, vertCoef, horzCoef, bankCoef, interpolation] @@ -48202,6 +49912,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setCamUseTi //WikiPageEnd// SyntaxStart: +Boolean setCamUseTi Number //SyntaxEnd// RawSyntaxStart: Bool setCamUseTi modeIndex @@ -48239,6 +49950,9 @@ WikiPageStart: https://community.bistudio.com/wiki/setCaptive //WikiPageEnd// SyntaxStart: +Object setCaptive Boolean +%NextSyntax% +Object setCaptive Number //SyntaxEnd// RawSyntaxStart: unitName setCaptive status @@ -48278,6 +49992,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setCenterOfMass //WikiPageEnd// SyntaxStart: +Object setCenterOfMass Array //SyntaxEnd// RawSyntaxStart: myObject setCenterOfMass [com, time] @@ -48324,6 +50039,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setCollisionLight //WikiPageEnd// SyntaxStart: +Object setCollisionLight Boolean //SyntaxEnd// RawSyntaxStart: vehicle setCollisionLight set @@ -48358,6 +50074,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setCombatMode //WikiPageEnd// SyntaxStart: +Object/Group setCombatMode String //SyntaxEnd// RawSyntaxStart: groupName setCombatMode mode @@ -48386,6 +50103,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setCompassOscillation //WikiPageEnd// SyntaxStart: +setCompassOscillation Array //SyntaxEnd// RawSyntaxStart: setCompassOscillation [angle, frequencyMin, frequencyMax] @@ -48414,6 +50132,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setCuratorCameraAreaCeiling //WikiPageEnd// SyntaxStart: +Object setCuratorCameraAreaCeiling Number //SyntaxEnd// RawSyntaxStart: curatorObj setCuratorCameraAreaCeiling height @@ -48443,6 +50162,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setCuratorCoef //WikiPageEnd// SyntaxStart: +Object setCuratorCoef Array //SyntaxEnd// RawSyntaxStart: curatorObj setCuratorCoef [action,coef] @@ -48483,6 +50203,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setCuratorEditingAreaType //WikiPageEnd// SyntaxStart: +Object setCuratorEditingAreaType Boolean //SyntaxEnd// RawSyntaxStart: curatorObj setCuratorEditingAreaType bool @@ -48512,6 +50233,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setCuratorWaypointCost //WikiPageEnd// SyntaxStart: +Object setCuratorWaypointCost Number //SyntaxEnd// RawSyntaxStart: curatorObj setCuratorWaypointCost cost @@ -48548,6 +50270,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setCurrentChannel //WikiPageEnd// SyntaxStart: +setCurrentChannel Number //SyntaxEnd// RawSyntaxStart: setCurrentChannel channel @@ -48581,6 +50304,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setCurrentTask //WikiPageEnd// SyntaxStart: +Object setCurrentTask Task //SyntaxEnd// RawSyntaxStart: object setCurrentTask task @@ -48609,6 +50333,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setCurrentWaypoint //WikiPageEnd// SyntaxStart: +Object/Group setCurrentWaypoint Array //SyntaxEnd// RawSyntaxStart: groupName setCurrentWaypoint waypoint @@ -48648,6 +50373,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setCustomAimCoef //WikiPageEnd// SyntaxStart: +Object setCustomAimCoef Number //SyntaxEnd// RawSyntaxStart: unit setCustomAimCoef coef @@ -48679,6 +50405,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setDamage //WikiPageEnd// SyntaxStart: +Object setDamage Number //SyntaxEnd// RawSyntaxStart: object setDamage damage @@ -48713,6 +50440,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setDammage //WikiPageEnd// SyntaxStart: +Object setDammage Number //SyntaxEnd// RawSyntaxStart: object setDammage damage @@ -48742,6 +50470,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setDate //WikiPageEnd// SyntaxStart: +setDate Array //SyntaxEnd// RawSyntaxStart: setDate [year, month, day, hour, minute] @@ -48794,6 +50523,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setDebriefingText //WikiPageEnd// SyntaxStart: +String setDebriefingText Array //SyntaxEnd// RawSyntaxStart: endType setDebriefingText [title, description] @@ -48823,6 +50553,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setDefaultCamera //WikiPageEnd// SyntaxStart: +setDefaultCamera Array //SyntaxEnd// RawSyntaxStart: setDefaultCamera [position, direction] @@ -48862,6 +50593,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setDestination //WikiPageEnd// SyntaxStart: +Object setDestination Array //SyntaxEnd// RawSyntaxStart: object setDestination [position, planningMode, forceReplan] @@ -48890,6 +50622,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setDetailMapBlendPars //WikiPageEnd// SyntaxStart: +setDetailMapBlendPars Array //SyntaxEnd// RawSyntaxStart: setDetailMapBlendPars [fullDetail, noDetail] @@ -48927,6 +50660,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setDir //WikiPageEnd// SyntaxStart: +Object setDir Number //SyntaxEnd// RawSyntaxStart: object setDir heading @@ -49012,6 +50746,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setDirection //WikiPageEnd// SyntaxStart: +Location setDirection Number //SyntaxEnd// RawSyntaxStart: location setDirection direction @@ -49042,6 +50777,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setDrawIcon //WikiPageEnd// SyntaxStart: +Control setDrawIcon Array //SyntaxEnd// RawSyntaxStart: map setDrawIcon [object,texture,color,offset,width,height,maintain size?,angle,string identifier,shadow,is3D,draw line?,priority] @@ -49069,6 +50805,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setDropInterval //WikiPageEnd// SyntaxStart: +Object setDropInterval Number //SyntaxEnd// RawSyntaxStart: particleSource setDropInterval interval @@ -49097,6 +50834,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setEditorMode //WikiPageEnd// SyntaxStart: +Control setEditorMode String //SyntaxEnd// RawSyntaxStart: map setEditorMode mode @@ -49129,6 +50867,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setEditorObjectScope //WikiPageEnd// SyntaxStart: +Control setEditorObjectScope Array //SyntaxEnd// RawSyntaxStart: map setEditorObjectScope [objects, editorType, condition, scope, subordinatesAlso] @@ -49162,6 +50901,9 @@ WikiPageStart: https://community.bistudio.com/wiki/setEffectCondition //WikiPageEnd// SyntaxStart: +Object setEffectCondition String +%NextSyntax% +Waypoint setEffectCondition String //SyntaxEnd// RawSyntaxStart: trigger setEffectCondition statement @@ -49192,6 +50934,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setFace //WikiPageEnd// SyntaxStart: +Object setFace String //SyntaxEnd// RawSyntaxStart: person setFace face @@ -49262,6 +51005,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setFaceAnimation //WikiPageEnd// SyntaxStart: +Object setFaceAnimation Number //SyntaxEnd// RawSyntaxStart: person setFaceAnimation blink @@ -49292,6 +51036,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setFatigue //WikiPageEnd// SyntaxStart: +Object setFatigue Number //SyntaxEnd// RawSyntaxStart: unit setFatigue value @@ -49322,6 +51067,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setFlagOwner //WikiPageEnd// SyntaxStart: +Object setFlagOwner //SyntaxEnd// RawSyntaxStart: flag setFlagOwner owner @@ -49357,6 +51103,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setFlagSide //WikiPageEnd// SyntaxStart: +Object setFlagSide Side //SyntaxEnd// RawSyntaxStart: flag setFlagSide side @@ -49394,6 +51141,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setFlagTexture //WikiPageEnd// SyntaxStart: +Object setFlagTexture String //SyntaxEnd// RawSyntaxStart: flag setFlagTexture texture @@ -49434,6 +51182,9 @@ WikiPageStart: https://community.bistudio.com/wiki/setFog //WikiPageEnd// SyntaxStart: +Number setFog +%NextSyntax% +Number setFog Array //SyntaxEnd// RawSyntaxStart: time setFog fog @@ -49487,6 +51238,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setFormation //WikiPageEnd// SyntaxStart: +Object/Group setFormation String //SyntaxEnd// RawSyntaxStart: group setFormation formation @@ -49515,6 +51267,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setFormationTask //WikiPageEnd// SyntaxStart: +Object setFormationTask String //SyntaxEnd// RawSyntaxStart: object setFormationTask task @@ -49543,6 +51296,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setFormDir //WikiPageEnd// SyntaxStart: +Object/Group setFormDir Number //SyntaxEnd// RawSyntaxStart: group setFormDir heading @@ -49583,6 +51337,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setFriend //WikiPageEnd// SyntaxStart: +Side setFriend Array //SyntaxEnd// RawSyntaxStart: side1 setFriend [side2, value] @@ -49627,6 +51382,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setFromEditor //WikiPageEnd// SyntaxStart: +TeamMember setFromEditor Boolean //SyntaxEnd// RawSyntaxStart: teamMember setFromEditor fromEditor @@ -49656,6 +51412,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setFSMVariable //WikiPageEnd// SyntaxStart: +Number setFSMVariable Array //SyntaxEnd// RawSyntaxStart: handle setFSMVariable [name, value] @@ -49689,6 +51446,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setFuel //WikiPageEnd// SyntaxStart: +Object setFuel Number //SyntaxEnd// RawSyntaxStart: vehicle setFuel amount @@ -49718,6 +51476,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setFuelCargo //WikiPageEnd// SyntaxStart: +Object setFuelCargo Number //SyntaxEnd// RawSyntaxStart: vehicle setFuelCargo amount @@ -49748,6 +51507,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setGroupIcon //WikiPageEnd// SyntaxStart: +Group setGroupIcon Array //SyntaxEnd// RawSyntaxStart: group setGroupIcon [id, icon, offset] @@ -49780,6 +51540,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setGroupIconParams //WikiPageEnd// SyntaxStart: +Group setGroupIconParams Array //SyntaxEnd// RawSyntaxStart: group setGroupIconParams properties @@ -49809,6 +51570,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setGroupIconsSelectable //WikiPageEnd// SyntaxStart: +setGroupIconsSelectable Boolean //SyntaxEnd// RawSyntaxStart: setGroupIconsSelectable bool @@ -49837,6 +51599,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setGroupIconsVisible //WikiPageEnd// SyntaxStart: +setGroupIconsVisible Array //SyntaxEnd// RawSyntaxStart: setGroupIconsVisible array @@ -49933,6 +51696,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setGroupId //WikiPageEnd// SyntaxStart: +Object/Group setGroupId Array //SyntaxEnd// RawSyntaxStart: group setGroupId [nameFormat, nameParam1,..., nameParamN] @@ -50019,6 +51783,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setGroupIdGlobal //WikiPageEnd// SyntaxStart: +Object/Group setGroupIdGlobal Array //SyntaxEnd// RawSyntaxStart: group setGroupIdGlobal [nameFormat, nameParam1,..., nameParamN] @@ -50046,6 +51811,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setGroupOwner //WikiPageEnd// SyntaxStart: +Group setGroupOwner Number //SyntaxEnd// RawSyntaxStart: group setGroupOwner clientID @@ -50078,6 +51844,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setGusts //WikiPageEnd// SyntaxStart: +Number setGusts //SyntaxEnd// RawSyntaxStart: time setGusts value @@ -50107,6 +51874,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setHideBehind //WikiPageEnd// SyntaxStart: +Object setHideBehind Array //SyntaxEnd// RawSyntaxStart: object setHideBehind [objectWhereHide, hidePosition] @@ -50135,6 +51903,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setHit //WikiPageEnd// SyntaxStart: +Object setHit Array //SyntaxEnd// RawSyntaxStart: object setHit [part, damage] @@ -50188,6 +51957,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setHitIndex //WikiPageEnd// SyntaxStart: +Object setHitIndex Array //SyntaxEnd// RawSyntaxStart: vehicle setHitIndex [hitPartIndex, damage] @@ -50220,6 +51990,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setHitPointDamage //WikiPageEnd// SyntaxStart: +Object setHitPointDamage Array //SyntaxEnd// RawSyntaxStart: vehicle setHitPointDamage [hitPointName, damage] @@ -50255,6 +52026,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setHorizonParallaxCoef //WikiPageEnd// SyntaxStart: +setHorizonParallaxCoef Number //SyntaxEnd// RawSyntaxStart: setHorizonParallaxCoef coef @@ -50283,6 +52055,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setHUDMovementLevels //WikiPageEnd// SyntaxStart: +setHUDMovementLevels Array //SyntaxEnd// RawSyntaxStart: setHUDMovementLevels [minSpeed, maxSpeed, minAlt, maxAlt, minDir, maxDir, targetOrPosition] @@ -50314,6 +52087,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setIdentity //WikiPageEnd// SyntaxStart: +Object setIdentity String //SyntaxEnd// RawSyntaxStart: person setIdentity identity @@ -50538,6 +52312,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setImportance //WikiPageEnd// SyntaxStart: +Location setImportance Number //SyntaxEnd// RawSyntaxStart: location setImportance value @@ -50566,6 +52341,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setLeader //WikiPageEnd// SyntaxStart: +TeamMember setLeader //SyntaxEnd// RawSyntaxStart: team setLeader leader @@ -50593,6 +52369,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setLightAmbient //WikiPageEnd// SyntaxStart: +Object setLightAmbient Array //SyntaxEnd// RawSyntaxStart: light setLightAmbient [r, g, b] @@ -50638,6 +52415,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setLightAttenuation //WikiPageEnd// SyntaxStart: +Object setLightAttenuation Array //SyntaxEnd// RawSyntaxStart: light setLightAttenuation [start, constant, linear, quadratic, hardlimitstart, hardlimitend] @@ -50683,6 +52461,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setLightBrightness //WikiPageEnd// SyntaxStart: +Object setLightBrightness Number //SyntaxEnd// RawSyntaxStart: light setLightBrightness brightness @@ -50723,6 +52502,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setLightColor //WikiPageEnd// SyntaxStart: +Object setLightColor Array //SyntaxEnd// RawSyntaxStart: light setLightColor [r, g, b] @@ -50775,6 +52555,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setLightDayLight //WikiPageEnd// SyntaxStart: +Object setLightDayLight Boolean //SyntaxEnd// RawSyntaxStart: light setLightDayLight bool @@ -50803,6 +52584,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setLightFlareMaxDistance //WikiPageEnd// SyntaxStart: +Object setLightFlareMaxDistance Number //SyntaxEnd// RawSyntaxStart: light setLightFlareMaxDistance distance @@ -50831,6 +52613,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setLightFlareSize //WikiPageEnd// SyntaxStart: +Object setLightFlareSize Number //SyntaxEnd// RawSyntaxStart: light setLightFlareSize size @@ -50859,6 +52642,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setLightIntensity //WikiPageEnd// SyntaxStart: +Object setLightIntensity Number //SyntaxEnd// RawSyntaxStart: light setLightIntensity value @@ -50890,6 +52674,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setLightnings //WikiPageEnd// SyntaxStart: +Number setLightnings //SyntaxEnd// RawSyntaxStart: time setLightnings value @@ -50918,6 +52703,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setLightUseFlare //WikiPageEnd// SyntaxStart: +Object setLightUseFlare Boolean //SyntaxEnd// RawSyntaxStart: light setLightUseFlare bool @@ -50950,6 +52736,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setLocalWindParams //WikiPageEnd// SyntaxStart: +setLocalWindParams Array //SyntaxEnd// RawSyntaxStart: setLocalWindParams [strength, diameter] @@ -50979,6 +52766,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMagazineTurretAmmo //WikiPageEnd// SyntaxStart: +Object setMagazineTurretAmmo Array //SyntaxEnd// RawSyntaxStart: vehicle setMagazineTurretAmmo [magazineClass, ammoCount, turretPath] @@ -51008,6 +52796,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMarkerAlpha //WikiPageEnd// SyntaxStart: +String setMarkerAlpha Number //SyntaxEnd// RawSyntaxStart: marker setMarkerAlpha alpha @@ -51040,6 +52829,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMarkerAlphaLocal //WikiPageEnd// SyntaxStart: +String setMarkerAlphaLocal Number //SyntaxEnd// RawSyntaxStart: marker setMarkerAlphaLocal alpha @@ -51085,6 +52875,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMarkerBrush //WikiPageEnd// SyntaxStart: +String setMarkerBrush //SyntaxEnd// RawSyntaxStart: markerName setMarkerBrush brush @@ -51125,6 +52916,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMarkerBrushLocal //WikiPageEnd// SyntaxStart: +String setMarkerBrushLocal //SyntaxEnd// RawSyntaxStart: markerName setMarkerBrushLocal brush @@ -51181,6 +52973,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMarkerColor //WikiPageEnd// SyntaxStart: +String setMarkerColor //SyntaxEnd// RawSyntaxStart: markerName setMarkerColor color @@ -51237,6 +53030,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMarkerColorLocal //WikiPageEnd// SyntaxStart: +String setMarkerColorLocal //SyntaxEnd// RawSyntaxStart: markerName setMarkerColorLocal color @@ -51265,6 +53059,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMarkerDir //WikiPageEnd// SyntaxStart: +String setMarkerDir Number //SyntaxEnd// RawSyntaxStart: markerName setMarkerDir angle @@ -51293,6 +53088,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMarkerDirLocal //WikiPageEnd// SyntaxStart: +String setMarkerDirLocal Number //SyntaxEnd// RawSyntaxStart: markerName setMarkerDirLocal angle @@ -51321,6 +53117,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMarkerPos //WikiPageEnd// SyntaxStart: +String setMarkerPos Array //SyntaxEnd// RawSyntaxStart: markerName setMarkerPos pos @@ -51356,6 +53153,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMarkerPosLocal //WikiPageEnd// SyntaxStart: +String setMarkerPosLocal Array //SyntaxEnd// RawSyntaxStart: markerName setMarkerPosLocal pos @@ -51385,6 +53183,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMarkerShape //WikiPageEnd// SyntaxStart: +String setMarkerShape //SyntaxEnd// RawSyntaxStart: markerName setMarkerShape shape @@ -51414,6 +53213,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMarkerShapeLocal //WikiPageEnd// SyntaxStart: +String setMarkerShapeLocal //SyntaxEnd// RawSyntaxStart: markerName setMarkerShapeLocal shape @@ -51443,6 +53243,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMarkerSize //WikiPageEnd// SyntaxStart: +String setMarkerSize Array //SyntaxEnd// RawSyntaxStart: markerName setMarkerSize [a-axis, b-axis] @@ -51472,6 +53273,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMarkerSizeLocal //WikiPageEnd// SyntaxStart: +String setMarkerSizeLocal Array //SyntaxEnd// RawSyntaxStart: markerName setMarkerSizeLocal [a-axis, b-axis] @@ -51500,6 +53302,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMarkerText //WikiPageEnd// SyntaxStart: +String setMarkerText //SyntaxEnd// RawSyntaxStart: markerName setMarkerText text @@ -51530,6 +53333,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMarkerTextLocal //WikiPageEnd// SyntaxStart: +String setMarkerTextLocal //SyntaxEnd// RawSyntaxStart: markerName setMarkerTextLocal text @@ -51558,6 +53362,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMarkerType //WikiPageEnd// SyntaxStart: +String setMarkerType //SyntaxEnd// RawSyntaxStart: markerName setMarkerType type @@ -51586,6 +53391,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMarkerTypeLocal //WikiPageEnd// SyntaxStart: +String setMarkerTypeLocal //SyntaxEnd// RawSyntaxStart: markerName setMarkerTypeLocal type @@ -51614,6 +53420,9 @@ WikiPageStart: https://community.bistudio.com/wiki/setMass //WikiPageEnd// SyntaxStart: +Object setMass Array +%NextSyntax% +Object setMass Number //SyntaxEnd// RawSyntaxStart: myObject setMass [mass, time] @@ -51682,6 +53491,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMimic //WikiPageEnd// SyntaxStart: +Object setMimic String //SyntaxEnd// RawSyntaxStart: person setMimic mimic @@ -51719,6 +53529,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMousePosition //WikiPageEnd// SyntaxStart: +setMousePosition Array //SyntaxEnd// RawSyntaxStart: setMousePosition [x, y] @@ -51748,6 +53559,9 @@ WikiPageStart: https://community.bistudio.com/wiki/setMusicEffect //WikiPageEnd// SyntaxStart: +Object setMusicEffect String +%NextSyntax% +Array setMusicEffect String //SyntaxEnd// RawSyntaxStart: trigger setMusicEffect track @@ -51780,6 +53594,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setMusicEventHandler //WikiPageEnd// SyntaxStart: +setMusicEventHandler Array //SyntaxEnd// RawSyntaxStart: setMusicEventHandler [type, function] @@ -51810,6 +53625,9 @@ WikiPageStart: https://community.bistudio.com/wiki/setName //WikiPageEnd// SyntaxStart: +Location/Object setName String +%NextSyntax% +Object setName Array //SyntaxEnd// RawSyntaxStart: object setName name @@ -51856,6 +53674,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setNameSound //WikiPageEnd// SyntaxStart: +Object setNameSound String //SyntaxEnd// RawSyntaxStart: person setNameSound name @@ -51968,6 +53787,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setObjectArguments //WikiPageEnd// SyntaxStart: +Control setObjectArguments Array //SyntaxEnd// RawSyntaxStart: map setObjectArguments [object,[name1,value1,...]] @@ -51995,6 +53815,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setObjectMaterial //WikiPageEnd// SyntaxStart: +Object setObjectMaterial Array //SyntaxEnd// RawSyntaxStart: obj setObjectMaterial [selectionNumber, material] @@ -52024,6 +53845,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setObjectMaterialGlobal //WikiPageEnd// SyntaxStart: +Object setObjectMaterialGlobal Array //SyntaxEnd// RawSyntaxStart: obj setObjectMaterialGlobal [selection, material] @@ -52052,6 +53874,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setObjectProxy //WikiPageEnd// SyntaxStart: +Control setObjectProxy Array //SyntaxEnd// RawSyntaxStart: map setObjectProxy [object,proxy object] @@ -52082,6 +53905,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setObjectTexture //WikiPageEnd// SyntaxStart: +Object setObjectTexture Array //SyntaxEnd// RawSyntaxStart: object setObjectTexture [selectionNumber,texture] @@ -52143,6 +53967,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setObjectTextureGlobal //WikiPageEnd// SyntaxStart: +Object setObjectTextureGlobal Array //SyntaxEnd// RawSyntaxStart: obj setObjectTextureGlobal [selection, texture] @@ -52190,6 +54015,9 @@ WikiPageStart: https://community.bistudio.com/wiki/setObjectViewDistance //WikiPageEnd// SyntaxStart: +setObjectViewDistance Number +%NextSyntax% +setObjectViewDistance Array //SyntaxEnd// RawSyntaxStart: setObjectViewDistance distance @@ -52222,6 +54050,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setOvercast //WikiPageEnd// SyntaxStart: +Number setOvercast //SyntaxEnd// RawSyntaxStart: time setOvercast overcast @@ -52260,6 +54089,11 @@ simulWeatherSync ; There is slight freeze with simul command. %NextNote% Delay in Arma 3 doesn't work for quick changes. Using 120 setOvercast 1 only reaches full overcast after about 50 minutes. Using setTimeMultiplier does speed up the overcast, but it doesn't render any clouds. You will need to skipTime or forceWeatherChange to render clouds if you want it to happen within the hour. +%NextNote% +(May 4, 2016) +Actual transition time is inversely proportional to the timeMultiplier. For example, a time of 7200 (2 hours) and a timeMultiplier of 2 will result in a real-life transition time of 7200 / 2 = 3600 (1 hour). +In case of overcast, a timeMultiplier 1 will cause gradual desyncing of the cloud cover with the overcast value, so it is advised that you multiply the transition time by the multiplier, i.e. : +$Code$(7200 * timeMultiplier ) setOvercast 1$/Code$ //NoteEnd// ReturnValueStart: Nothing @@ -52280,6 +54114,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setOwner //WikiPageEnd// SyntaxStart: +Object setOwner Number //SyntaxEnd// RawSyntaxStart: object setOwner clientID @@ -52314,6 +54149,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setOxygenRemaining //WikiPageEnd// SyntaxStart: +Object setOxygenRemaining Number //SyntaxEnd// RawSyntaxStart: unit setOxygenRemaining value @@ -52342,6 +54178,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setParticleCircle //WikiPageEnd// SyntaxStart: +Object setParticleCircle Array //SyntaxEnd// RawSyntaxStart: particleSource setParticleCircle [radius, velocity] @@ -52370,6 +54207,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setParticleClass //WikiPageEnd// SyntaxStart: +Object setParticleClass String //SyntaxEnd// RawSyntaxStart: source setParticleClass className @@ -52403,6 +54241,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setParticleFire //WikiPageEnd// SyntaxStart: +Object setParticleFire Array //SyntaxEnd// RawSyntaxStart: source setParticleFire [coreIntensity, coreDistance, damageTime] @@ -52434,6 +54273,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setParticleParams //WikiPageEnd// SyntaxStart: +Object setParticleParams Array //SyntaxEnd// RawSyntaxStart: particleSource setParticleParams array @@ -52462,6 +54302,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setParticleRandom //WikiPageEnd// SyntaxStart: +Object setParticleRandom Array //SyntaxEnd// RawSyntaxStart: particleSource setParticleRandom [lifeTime, position, moveVelocity, rotationVelocity, size, color, randomDirectionPeriod, randomDirectionIntensity, {angle}, bounceOnSurface] @@ -52492,6 +54333,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setPilotLight //WikiPageEnd// SyntaxStart: +Object setPilotLight Boolean //SyntaxEnd// RawSyntaxStart: vehicle setPilotLight set @@ -52528,6 +54370,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setPiPEffect //WikiPageEnd// SyntaxStart: +String setPiPEffect Array //SyntaxEnd// RawSyntaxStart: name setPiPEffect [effect, optionalParam1,..., optionalParamN] @@ -52571,6 +54414,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setPitch //WikiPageEnd// SyntaxStart: +Object setPitch Number //SyntaxEnd// RawSyntaxStart: person setPitch pitch @@ -52601,6 +54445,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setPlayable //WikiPageEnd// SyntaxStart: +setPlayable Object //SyntaxEnd// RawSyntaxStart: setPlayable unitName @@ -52634,6 +54479,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setPlayerRespawnTime //WikiPageEnd// SyntaxStart: +setPlayerRespawnTime Number //SyntaxEnd// RawSyntaxStart: setPlayerRespawnTime interval @@ -52662,6 +54508,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setPos //WikiPageEnd// SyntaxStart: +Object setPos Array //SyntaxEnd// RawSyntaxStart: object setPos pos @@ -52713,6 +54560,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setPosASL //WikiPageEnd// SyntaxStart: +Object setPosASL Array //SyntaxEnd// RawSyntaxStart: object setPosASL pos @@ -52744,6 +54592,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setPosASL2 //WikiPageEnd// SyntaxStart: +Object setPosASL2 Array //SyntaxEnd// RawSyntaxStart: obj setPosASL2 pos @@ -52774,6 +54623,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setPosASLW //WikiPageEnd// SyntaxStart: +Object setPosASLW Array //SyntaxEnd// RawSyntaxStart: obj setPosASLW pos @@ -52802,6 +54652,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setPosATL //WikiPageEnd// SyntaxStart: +Object setPosATL Array //SyntaxEnd// RawSyntaxStart: object setPosATL pos @@ -52835,6 +54686,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setPosition //WikiPageEnd// SyntaxStart: +Location setPosition Array //SyntaxEnd// RawSyntaxStart: location setPosition pos @@ -52863,6 +54715,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setPosWorld //WikiPageEnd// SyntaxStart: +Object setPosWorld PositionW/ld //SyntaxEnd// RawSyntaxStart: object setPosWorld position @@ -52891,6 +54744,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setRadioMsg //WikiPageEnd// SyntaxStart: +Number setRadioMsg String //SyntaxEnd// RawSyntaxStart: index setRadioMsg text @@ -52920,6 +54774,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setRain //WikiPageEnd// SyntaxStart: +Number setRain //SyntaxEnd// RawSyntaxStart: time setRain rain @@ -52957,6 +54812,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setRainbow //WikiPageEnd// SyntaxStart: +Number setRainbow //SyntaxEnd// RawSyntaxStart: time setRainbow value @@ -52986,6 +54842,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setRandomLip //WikiPageEnd// SyntaxStart: +Object setRandomLip Boolean //SyntaxEnd// RawSyntaxStart: unit setRandomLip bool @@ -53015,6 +54872,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setRank //WikiPageEnd// SyntaxStart: +Object setRank String //SyntaxEnd// RawSyntaxStart: unitName setRank rank @@ -53048,6 +54906,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setRectangular //WikiPageEnd// SyntaxStart: +Location setRectangular Boolean //SyntaxEnd// RawSyntaxStart: location setRectangular set @@ -53077,6 +54936,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setRepairCargo //WikiPageEnd// SyntaxStart: +Object setRepairCargo Number //SyntaxEnd// RawSyntaxStart: vehicleName setRepairCargo amount @@ -53107,6 +54967,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setShadowDistance //WikiPageEnd// SyntaxStart: +setShadowDistance Number //SyntaxEnd// RawSyntaxStart: setShadowDistance value @@ -53135,6 +54996,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setSide //WikiPageEnd// SyntaxStart: +Location setSide Side //SyntaxEnd// RawSyntaxStart: location setSide side @@ -53168,6 +55030,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setSimpleTaskCustomData //WikiPageEnd// SyntaxStart: +Task setSimpleTaskCustomData Array //SyntaxEnd// RawSyntaxStart: task setSimpleTaskCustomData [IconPath, tooltip, description] @@ -53195,6 +55058,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setSimpleTaskDescription //WikiPageEnd// SyntaxStart: +Task setSimpleTaskDescription Array //SyntaxEnd// RawSyntaxStart: task setSimpleTaskDescription [description, descriptionShort, descriptionHUD] @@ -53223,6 +55087,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setSimpleTaskDestination //WikiPageEnd// SyntaxStart: +Task setSimpleTaskDestination Array //SyntaxEnd// RawSyntaxStart: task setSimpleTaskDestination pos @@ -53251,6 +55116,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setSimpleTaskTarget //WikiPageEnd// SyntaxStart: +Task setSimpleTaskTarget Array //SyntaxEnd// RawSyntaxStart: task setSimpleTaskTarget [target, precisePosition] @@ -53279,6 +55145,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setSimpleTaskType //WikiPageEnd// SyntaxStart: +Task setSimpleTaskType String //SyntaxEnd// RawSyntaxStart: task setSimpleTaskType taskType @@ -53306,6 +55173,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setSimulWeatherLayers //WikiPageEnd// SyntaxStart: +setSimulWeatherLayers Number //SyntaxEnd// RawSyntaxStart: setSimulWeatherLayers layers @@ -53334,6 +55202,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setSize //WikiPageEnd// SyntaxStart: +Location setSize Array //SyntaxEnd// RawSyntaxStart: location setSize size @@ -53362,6 +55231,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setSkill //WikiPageEnd// SyntaxStart: +Object setSkill Number //SyntaxEnd// RawSyntaxStart: vehicleName setSkill skill @@ -53401,6 +55271,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setSlingLoad //WikiPageEnd// SyntaxStart: +Object setSlingLoad //SyntaxEnd// RawSyntaxStart: vehicle setSlingLoad cargo @@ -53439,6 +55310,9 @@ WikiPageStart: https://community.bistudio.com/wiki/setSoundEffect //WikiPageEnd// SyntaxStart: +Object setSoundEffect Array +%NextSyntax% +Array setSoundEffect //SyntaxEnd// RawSyntaxStart: trigger setSoundEffect [sound, voice, soundEnv, soundDet] @@ -53496,6 +55370,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setSpeaker //WikiPageEnd// SyntaxStart: +Object setSpeaker String //SyntaxEnd// RawSyntaxStart: person setSpeaker speaker @@ -53601,6 +55476,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setSpeech //WikiPageEnd// SyntaxStart: +Location setSpeech String //SyntaxEnd// RawSyntaxStart: location setSpeech speech @@ -53631,6 +55507,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setSpeedMode //WikiPageEnd// SyntaxStart: +Object/Group setSpeedMode String //SyntaxEnd// RawSyntaxStart: groupName setSpeedMode mode @@ -53669,6 +55546,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setStamina //WikiPageEnd// SyntaxStart: +Object setStamina Number //SyntaxEnd// RawSyntaxStart: unit setStamina stamina @@ -53699,9 +55577,10 @@ WikiPageStart: https://community.bistudio.com/wiki/setStaminaScheme //WikiPageEnd// SyntaxStart: +setStaminaScheme String //SyntaxEnd// RawSyntaxStart: -setStaminaScheme "scheme" +setStaminaScheme scheme //RawSyntaxEnd// ExampleStart: $Code$setStaminaScheme "Default";$/Code$ @@ -53727,6 +55606,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setStatValue //WikiPageEnd// SyntaxStart: +setStatValue Array //SyntaxEnd// RawSyntaxStart: setStatValue [StatName, Value] @@ -53754,6 +55634,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setSuppression //WikiPageEnd// SyntaxStart: +Object setSuppression Number //SyntaxEnd// RawSyntaxStart: unit setSuppression value @@ -53782,6 +55663,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setSystemOfUnits //WikiPageEnd// SyntaxStart: +setSystemOfUnits Number //SyntaxEnd// RawSyntaxStart: setSystemOfUnits value @@ -53812,12 +55694,13 @@ WikiPageStart: https://community.bistudio.com/wiki/setTargetAge //WikiPageEnd// SyntaxStart: +Object setTargetAge String //SyntaxEnd// RawSyntaxStart: object setTargetAge age //RawSyntaxEnd// ExampleStart: -$Code$player setTargetAge 10 MIN$/Code$ +$Code$player setTargetAge "10 MIN"$/Code$ //ExampleEnd// LocalityStart: undefined / undefined @@ -53840,6 +55723,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setTaskResult //WikiPageEnd// SyntaxStart: +Task setTaskResult Array //SyntaxEnd// RawSyntaxStart: task setTaskResult [state,result] @@ -53873,6 +55757,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setTaskState //WikiPageEnd// SyntaxStart: +Task setTaskState String //SyntaxEnd// RawSyntaxStart: task setTaskState state @@ -53909,6 +55794,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setTerrainGrid //WikiPageEnd// SyntaxStart: +setTerrainGrid Number //SyntaxEnd// RawSyntaxStart: setTerrainGrid grid @@ -53965,6 +55851,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setText //WikiPageEnd// SyntaxStart: +Location setText String //SyntaxEnd// RawSyntaxStart: location setText text @@ -53993,6 +55880,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setTimeMultiplier //WikiPageEnd// SyntaxStart: +setTimeMultiplier Number //SyntaxEnd// RawSyntaxStart: setTimeMultiplier value @@ -54032,6 +55920,9 @@ WikiPageStart: https://community.bistudio.com/wiki/setTitleEffect //WikiPageEnd// SyntaxStart: +Object setTitleEffect Array +%NextSyntax% +Array setTitleEffect //SyntaxEnd// RawSyntaxStart: trigger setTitleEffect [type, effect, text] @@ -54063,6 +55954,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setTriggerActivation //WikiPageEnd// SyntaxStart: +Object setTriggerActivation Array //SyntaxEnd// RawSyntaxStart: trigger setTriggerActivation [by, type, repeating] @@ -54092,6 +55984,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setTriggerArea //WikiPageEnd// SyntaxStart: +Object setTriggerArea Array //SyntaxEnd// RawSyntaxStart: trigger setTriggerArea [a, b, angle, isRectangle, c] @@ -54123,6 +56016,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setTriggerStatements //WikiPageEnd// SyntaxStart: +Object setTriggerStatements Array //SyntaxEnd// RawSyntaxStart: trigger setTriggerStatements [condition, activation, deactivation] @@ -54156,6 +56050,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setTriggerText //WikiPageEnd// SyntaxStart: +Object setTriggerText String //SyntaxEnd// RawSyntaxStart: trigger setTriggerText text @@ -54185,6 +56080,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setTriggerTimeout //WikiPageEnd// SyntaxStart: +Object setTriggerTimeout Array //SyntaxEnd// RawSyntaxStart: trigger setTriggerTimeout [min, mid, max, interruptable] @@ -54226,6 +56122,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setTriggerType //WikiPageEnd// SyntaxStart: +Object setTriggerType String //SyntaxEnd// RawSyntaxStart: trigger setTriggerType action @@ -54262,6 +56159,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setType //WikiPageEnd// SyntaxStart: +Location setType String //SyntaxEnd// RawSyntaxStart: location setType name @@ -54291,6 +56189,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setUnconscious //WikiPageEnd// SyntaxStart: +Object setUnconscious Boolean //SyntaxEnd// RawSyntaxStart: unit setUnconscious set @@ -54319,6 +56218,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setUnitAbility //WikiPageEnd// SyntaxStart: +Object setUnitAbility Number //SyntaxEnd// RawSyntaxStart: unit setUnitAbility skill @@ -54356,6 +56256,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setUnitPos //WikiPageEnd// SyntaxStart: +Object setUnitPos String //SyntaxEnd// RawSyntaxStart: unit setUnitPos mode @@ -54399,6 +56300,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setUnitPosWeak //WikiPageEnd// SyntaxStart: +Object setUnitPosWeak String //SyntaxEnd// RawSyntaxStart: unit setUnitPosWeak mode @@ -54443,6 +56345,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setUnitRank //WikiPageEnd// SyntaxStart: +Object setUnitRank String //SyntaxEnd// RawSyntaxStart: unitName setUnitRank rank @@ -54483,6 +56386,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setUnitRecoilCoefficient //WikiPageEnd// SyntaxStart: +Object setUnitRecoilCoefficient Number //SyntaxEnd// RawSyntaxStart: unitName setUnitRecoilCoefficient coefficient @@ -54513,6 +56417,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setUnloadInCombat //WikiPageEnd// SyntaxStart: +Object setUnloadInCombat Array //SyntaxEnd// RawSyntaxStart: vehicle setUnloadInCombat [allowCargo, allowTurrets] @@ -54541,6 +56446,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setUserActionText //WikiPageEnd// SyntaxStart: +Object setUserActionText Array //SyntaxEnd// RawSyntaxStart: unit setUserActionText [index, text] @@ -54581,6 +56487,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setVariable //WikiPageEnd// SyntaxStart: +Object/Location setVariable Array //SyntaxEnd// RawSyntaxStart: objectName setVariable [name, value, public] @@ -54664,6 +56571,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setVectorDir //WikiPageEnd// SyntaxStart: +Object setVectorDir Array //SyntaxEnd// RawSyntaxStart: object setVectorDir [x,y,z] @@ -54724,6 +56632,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setVectorDirAndUp //WikiPageEnd// SyntaxStart: +Object setVectorDirAndUp Array //SyntaxEnd// RawSyntaxStart: vehicle setVectorDirAndUp [[x1, y1, z1],[x2, y2, z2]] @@ -54842,6 +56751,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setVectorUp //WikiPageEnd// SyntaxStart: +Object setVectorUp Array //SyntaxEnd// RawSyntaxStart: object setVectorUp [x, y, z] @@ -54893,6 +56803,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setVehicleAmmo //WikiPageEnd// SyntaxStart: +Object setVehicleAmmo Number //SyntaxEnd// RawSyntaxStart: vehicleName setVehicleAmmo value @@ -54931,12 +56842,13 @@ KeywordStart: setVehicleAmmoDef //KeywordEnd// DescriptionStart: -Sets how much ammunition (compared to the current configuration of magazines, but fully loaded) the vehicle has. Note that the ammo will beaddet only to local turrets. To check the locality of turret use turretLocal. +Sets how much ammunition (compared to the current configuration of magazines, but fully loaded) the vehicle has. Note that the ammo will only be added to local turrets. To check the locality of turret use turretLocal. //DescriptionEnd// WikiPageStart: https://community.bistudio.com/wiki/setVehicleAmmoDef //WikiPageEnd// SyntaxStart: +Object setVehicleAmmoDef Number //SyntaxEnd// RawSyntaxStart: unit setVehicleAmmoDef value @@ -54970,6 +56882,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setVehicleArmor //WikiPageEnd// SyntaxStart: +Object setVehicleArmor Number //SyntaxEnd// RawSyntaxStart: vehicleName setVehicleArmor value @@ -54998,6 +56911,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setVehicleId //WikiPageEnd// SyntaxStart: +Object setVehicleId Number //SyntaxEnd// RawSyntaxStart: vehicleName setVehicleId id @@ -55030,6 +56944,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setVehicleLock //WikiPageEnd// SyntaxStart: +Object setVehicleLock String //SyntaxEnd// RawSyntaxStart: vehicleName setVehicleLock lockState @@ -55068,6 +56983,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setVehiclePosition //WikiPageEnd// SyntaxStart: +Object setVehiclePosition Array //SyntaxEnd// RawSyntaxStart: object setVehiclePosition [position, markers, placement, special] @@ -55083,6 +56999,13 @@ _cam setDir random 360; _cam setVehiclePosition [[5000,5000], [], 1000, "NONE"]; _cam setPosWorld ( getPosWorld _cam vectorAdd [0,0,1.8]); _cam cameraEffect ["Internal", "Back"];$/Code$ +%NextExample% +$Code$private _tablePos = player getRelPos [3, 0]; +private _table = "Land_CampingTable_F" createVehicle [0,0,0]; +private _laptop = "Land_Laptop_unfolded_F" createVehicle [0,0,0]; +_table setPos _tablePos; +_laptop setVehiclePosition [_tablePos vectorAdd [0.5, 0.2, 10], [], 0, "CAN_COLLIDE"]; +_laptop attachTo [_table];$/Code$ //ExampleEnd// LocalityStart: global / global @@ -55109,6 +57032,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setVehicleTiPars //WikiPageEnd// SyntaxStart: +Object setVehicleTiPars Array //SyntaxEnd// RawSyntaxStart: vehicle setVehicleTiPars [engine, wheels, weapon] @@ -55143,6 +57067,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setVehicleVarName //WikiPageEnd// SyntaxStart: +Object setVehicleVarName String //SyntaxEnd// RawSyntaxStart: object setVehicleVarName name @@ -55171,6 +57096,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setVelocity //WikiPageEnd// SyntaxStart: +Object setVelocity Array //SyntaxEnd// RawSyntaxStart: vehicleName setVelocity [x, y, z] @@ -55211,6 +57137,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setVelocityTransformation //WikiPageEnd// SyntaxStart: +Object setVelocityTransformation Array //SyntaxEnd// RawSyntaxStart: objectName setVelocityTransformation [position1, position2, velocity1, velocity2, direction1, direction2, up1, up2, time] @@ -55302,6 +57229,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setViewDistance //WikiPageEnd// SyntaxStart: +setViewDistance Number //SyntaxEnd// RawSyntaxStart: setViewDistance distance @@ -55348,6 +57276,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setVisibleIfTreeCollapsed //WikiPageEnd// SyntaxStart: +Control setVisibleIfTreeCollapsed Array //SyntaxEnd// RawSyntaxStart: map setVisibleIfTreeCollapsed [object, visible] @@ -55376,6 +57305,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWaves //WikiPageEnd// SyntaxStart: +Number setWaves //SyntaxEnd// RawSyntaxStart: time setWaves value @@ -55414,6 +57344,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWaypointBehaviour //WikiPageEnd// SyntaxStart: +Array setWaypointBehaviour String //SyntaxEnd// RawSyntaxStart: waypoint setWaypointBehaviour mode @@ -55451,6 +57382,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWaypointCombatMode //WikiPageEnd// SyntaxStart: +Array setWaypointCombatMode String //SyntaxEnd// RawSyntaxStart: waypoint setWaypointCombatMode mode @@ -55479,6 +57411,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWaypointCompletionRadius //WikiPageEnd// SyntaxStart: +Array setWaypointCompletionRadius Number //SyntaxEnd// RawSyntaxStart: waypoint setWaypointCompletionRadius radius @@ -55513,6 +57446,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWaypointDescription //WikiPageEnd// SyntaxStart: +Array setWaypointDescription String //SyntaxEnd// RawSyntaxStart: waypoint setWaypointDescription text @@ -55552,6 +57486,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWaypointFormation //WikiPageEnd// SyntaxStart: +Array setWaypointFormation String //SyntaxEnd// RawSyntaxStart: waypoint setWaypointFormation formation @@ -55580,6 +57515,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWaypointHousePosition //WikiPageEnd// SyntaxStart: +Array setWaypointHousePosition Number //SyntaxEnd// RawSyntaxStart: waypoint setWaypointHousePosition pos @@ -55608,6 +57544,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWaypointLoiterRadius //WikiPageEnd// SyntaxStart: +Waypoint setWaypointLoiterRadius Number //SyntaxEnd// RawSyntaxStart: waypoint setWaypointLoiterRadius radius @@ -55636,6 +57573,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWaypointLoiterType //WikiPageEnd// SyntaxStart: +Waypoint setWaypointLoiterType String //SyntaxEnd// RawSyntaxStart: waypoint setWaypointLoiterType type @@ -55666,6 +57604,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWaypointName //WikiPageEnd// SyntaxStart: +Waypoint setWaypointName String //SyntaxEnd// RawSyntaxStart: waypoint setWaypointName name @@ -55693,6 +57632,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWaypointPosition //WikiPageEnd// SyntaxStart: +Array setWaypointPosition //SyntaxEnd// RawSyntaxStart: waypoint setWaypointPosition [center, radius] @@ -55723,6 +57663,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWaypointScript //WikiPageEnd// SyntaxStart: +Array setWaypointScript String //SyntaxEnd// RawSyntaxStart: waypoint setWaypointScript command @@ -55756,6 +57697,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWaypointSpeed //WikiPageEnd// SyntaxStart: +Array setWaypointSpeed String //SyntaxEnd// RawSyntaxStart: waypoint setWaypointSpeed mode @@ -55787,6 +57729,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWaypointStatements //WikiPageEnd// SyntaxStart: +Array setWaypointStatements //SyntaxEnd// RawSyntaxStart: waypoint setWaypointStatements [condition, statement] @@ -55800,6 +57743,9 @@ LocalityStart: undefined / undefined //LocalityEnd// NoteStart: +(May 21, 2016) +Within the completion statement currentWaypoint will give the index of the waypoint being completed (as opposed to the following one). +This is particularly useful if you need a self deleting waypoint: $Code$ setWaypointStatements [" true "," deleteWaypoint [ group this, currentWaypoint ( group this)]"]$/Code$ //NoteEnd// ReturnValueStart: Nothing @@ -55817,6 +57763,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWaypointTimeout //WikiPageEnd// SyntaxStart: +Array setWaypointTimeout //SyntaxEnd// RawSyntaxStart: waypoint setWaypointTimeout [min, mid, max] @@ -55875,6 +57822,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWaypointType //WikiPageEnd// SyntaxStart: +Array setWaypointType String //SyntaxEnd// RawSyntaxStart: waypoint setWaypointType type @@ -55923,6 +57871,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWaypointVisible //WikiPageEnd// SyntaxStart: +Array setWaypointVisible Boolean //SyntaxEnd// RawSyntaxStart: waypoint setWaypointVisible visible @@ -55955,6 +57904,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWeaponReloadingTime //WikiPageEnd// SyntaxStart: +Object setWeaponReloadingTime Array //SyntaxEnd// RawSyntaxStart: vehicle setWeaponReloadingTime [gunner, muzzleName, reloadTime] @@ -55990,6 +57940,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWind //WikiPageEnd// SyntaxStart: +setWind Array //SyntaxEnd// RawSyntaxStart: setWind [x, y, forced] @@ -56019,6 +57970,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWindDir //WikiPageEnd// SyntaxStart: +Number setWindDir //SyntaxEnd// RawSyntaxStart: time setWindDir value @@ -56049,6 +58001,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWindForce //WikiPageEnd// SyntaxStart: +Number setWindForce //SyntaxEnd// RawSyntaxStart: time setWindForce wind @@ -56077,6 +58030,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWindStr //WikiPageEnd// SyntaxStart: +Number setWindStr //SyntaxEnd// RawSyntaxStart: time setWindStr value @@ -56104,6 +58058,7 @@ WikiPageStart: https://community.bistudio.com/wiki/setWPPos //WikiPageEnd// SyntaxStart: +Array setWPPos //SyntaxEnd// RawSyntaxStart: waypoint setWPPos pos @@ -56132,6 +58087,7 @@ WikiPageStart: https://community.bistudio.com/wiki/show3DIcons //WikiPageEnd// SyntaxStart: +Control show3DIcons Boolean //SyntaxEnd// RawSyntaxStart: map show3DIcons bool @@ -56159,6 +58115,7 @@ WikiPageStart: https://community.bistudio.com/wiki/showChat //WikiPageEnd// SyntaxStart: +showChat Boolean //SyntaxEnd// RawSyntaxStart: showChat bool @@ -56187,6 +58144,7 @@ WikiPageStart: https://community.bistudio.com/wiki/showCinemaBorder //WikiPageEnd// SyntaxStart: +showCinemaBorder Boolean //SyntaxEnd// RawSyntaxStart: showCinemaBorder show @@ -56217,6 +58175,7 @@ WikiPageStart: https://community.bistudio.com/wiki/showCommandingMenu //WikiPageEnd// SyntaxStart: +showCommandingMenu String //SyntaxEnd// RawSyntaxStart: showCommandingMenu name @@ -56346,6 +58305,7 @@ WikiPageStart: https://community.bistudio.com/wiki/showCompass //WikiPageEnd// SyntaxStart: +showCompass Boolean //SyntaxEnd// RawSyntaxStart: showCompass show @@ -56376,6 +58336,7 @@ WikiPageStart: https://community.bistudio.com/wiki/showCuratorCompass //WikiPageEnd// SyntaxStart: +showCuratorCompass Boolean //SyntaxEnd// RawSyntaxStart: showCuratorCompass bool @@ -56404,6 +58365,7 @@ WikiPageStart: https://community.bistudio.com/wiki/showGPS //WikiPageEnd// SyntaxStart: +showGPS Boolean //SyntaxEnd// RawSyntaxStart: showGPS show @@ -56438,6 +58400,9 @@ WikiPageStart: https://community.bistudio.com/wiki/showHUD //WikiPageEnd// SyntaxStart: +showHUD Boolean +%NextSyntax% +showHUD Array //SyntaxEnd// RawSyntaxStart: showHUD enable @@ -56476,6 +58441,7 @@ WikiPageStart: https://community.bistudio.com/wiki/showLegend //WikiPageEnd// SyntaxStart: +Control showLegend Boolean //SyntaxEnd// RawSyntaxStart: map showLegend bool @@ -56503,6 +58469,7 @@ WikiPageStart: https://community.bistudio.com/wiki/showMap //WikiPageEnd// SyntaxStart: +showMap Boolean //SyntaxEnd// RawSyntaxStart: showMap show @@ -56533,6 +58500,7 @@ WikiPageStart: https://community.bistudio.com/wiki/shownArtilleryComputer //WikiPageEnd// SyntaxStart: +shownArtilleryComputer //SyntaxEnd// RawSyntaxStart: shownArtilleryComputer @@ -56561,6 +58529,7 @@ WikiPageStart: https://community.bistudio.com/wiki/shownChat //WikiPageEnd// SyntaxStart: +shownChat //SyntaxEnd// RawSyntaxStart: shownChat @@ -56589,6 +58558,7 @@ WikiPageStart: https://community.bistudio.com/wiki/shownCompass //WikiPageEnd// SyntaxStart: +shownCompass //SyntaxEnd// RawSyntaxStart: shownCompass @@ -56617,6 +58587,7 @@ WikiPageStart: https://community.bistudio.com/wiki/shownCuratorCompass //WikiPageEnd// SyntaxStart: +shownCuratorCompass //SyntaxEnd// RawSyntaxStart: shownCuratorCompass @@ -56644,6 +58615,7 @@ WikiPageStart: https://community.bistudio.com/wiki/showNewEditorObject //WikiPageEnd// SyntaxStart: +Control showNewEditorObject Array //SyntaxEnd// RawSyntaxStart: map showNewEditorObject [type,class,side,position] @@ -56671,6 +58643,7 @@ WikiPageStart: https://community.bistudio.com/wiki/shownGPS //WikiPageEnd// SyntaxStart: +shownGPS //SyntaxEnd// RawSyntaxStart: shownGPS @@ -56699,6 +58672,7 @@ WikiPageStart: https://community.bistudio.com/wiki/shownHUD //WikiPageEnd// SyntaxStart: +shownHUD //SyntaxEnd// RawSyntaxStart: shownHUD @@ -56727,6 +58701,7 @@ WikiPageStart: https://community.bistudio.com/wiki/shownMap //WikiPageEnd// SyntaxStart: +shownMap //SyntaxEnd// RawSyntaxStart: shownMap @@ -56755,6 +58730,7 @@ WikiPageStart: https://community.bistudio.com/wiki/shownPad //WikiPageEnd// SyntaxStart: +shownPad //SyntaxEnd// RawSyntaxStart: shownPad @@ -56783,6 +58759,7 @@ WikiPageStart: https://community.bistudio.com/wiki/shownRadio //WikiPageEnd// SyntaxStart: +shownRadio //SyntaxEnd// RawSyntaxStart: shownRadio @@ -56811,6 +58788,7 @@ WikiPageStart: https://community.bistudio.com/wiki/shownUAVFeed //WikiPageEnd// SyntaxStart: +shownUAVFeed //SyntaxEnd// RawSyntaxStart: shownUAVFeed @@ -56839,6 +58817,7 @@ WikiPageStart: https://community.bistudio.com/wiki/shownWarrant //WikiPageEnd// SyntaxStart: +shownWarrant //SyntaxEnd// RawSyntaxStart: shownWarrant @@ -56866,6 +58845,7 @@ WikiPageStart: https://community.bistudio.com/wiki/shownWatch //WikiPageEnd// SyntaxStart: +shownWatch //SyntaxEnd// RawSyntaxStart: shownWatch @@ -56894,6 +58874,7 @@ WikiPageStart: https://community.bistudio.com/wiki/showPad //WikiPageEnd// SyntaxStart: +showPad Boolean //SyntaxEnd// RawSyntaxStart: showPad show @@ -56922,6 +58903,7 @@ WikiPageStart: https://community.bistudio.com/wiki/showRadio //WikiPageEnd// SyntaxStart: +showRadio Boolean //SyntaxEnd// RawSyntaxStart: showRadio show @@ -56952,6 +58934,7 @@ WikiPageStart: https://community.bistudio.com/wiki/showSubtitles //WikiPageEnd// SyntaxStart: +showSubtitles Boolean //SyntaxEnd// RawSyntaxStart: showSubtitles enable @@ -56980,6 +58963,7 @@ WikiPageStart: https://community.bistudio.com/wiki/showUAVFeed //WikiPageEnd// SyntaxStart: +showUAVFeed Boolean //SyntaxEnd// RawSyntaxStart: showUAVFeed bool @@ -57008,6 +58992,7 @@ WikiPageStart: https://community.bistudio.com/wiki/showWarrant //WikiPageEnd// SyntaxStart: +showWarrant Boolean //SyntaxEnd// RawSyntaxStart: showWarrant show @@ -57035,6 +59020,7 @@ WikiPageStart: https://community.bistudio.com/wiki/showWatch //WikiPageEnd// SyntaxStart: +showWatch Boolean //SyntaxEnd// RawSyntaxStart: showWatch show @@ -57069,6 +59055,7 @@ WikiPageStart: https://community.bistudio.com/wiki/showWaypoint //WikiPageEnd// SyntaxStart: +Array showWaypoint String //SyntaxEnd// RawSyntaxStart: waypoint showWaypoint show @@ -57098,6 +59085,9 @@ WikiPageStart: https://community.bistudio.com/wiki/side //WikiPageEnd// SyntaxStart: +side Object/Group +%NextSyntax% +side Location //SyntaxEnd// RawSyntaxStart: side object @@ -57158,6 +59148,7 @@ WikiPageStart: https://community.bistudio.com/wiki/sideAmbientLife //WikiPageEnd// SyntaxStart: +sideAmbientLife //SyntaxEnd// RawSyntaxStart: sideAmbientLife @@ -57187,6 +59178,9 @@ WikiPageStart: https://community.bistudio.com/wiki/sideChat //WikiPageEnd// SyntaxStart: +Object sideChat String +%NextSyntax% +Array sideChat String //SyntaxEnd// RawSyntaxStart: unitName sideChat chatText @@ -57228,6 +59222,7 @@ WikiPageStart: https://community.bistudio.com/wiki/sideEmpty //WikiPageEnd// SyntaxStart: +sideEmpty //SyntaxEnd// RawSyntaxStart: sideEmpty @@ -57258,6 +59253,7 @@ WikiPageStart: https://community.bistudio.com/wiki/sideEnemy //WikiPageEnd// SyntaxStart: +sideEnemy //SyntaxEnd// RawSyntaxStart: sideEnemy @@ -57288,6 +59284,7 @@ WikiPageStart: https://community.bistudio.com/wiki/sideFriendly //WikiPageEnd// SyntaxStart: +sideFriendly //SyntaxEnd// RawSyntaxStart: sideFriendly @@ -57316,6 +59313,7 @@ WikiPageStart: https://community.bistudio.com/wiki/sideLogic //WikiPageEnd// SyntaxStart: +sideLogic //SyntaxEnd// RawSyntaxStart: sideLogic @@ -57346,6 +59344,7 @@ WikiPageStart: https://community.bistudio.com/wiki/sideRadio //WikiPageEnd// SyntaxStart: +Object sideRadio String //SyntaxEnd// RawSyntaxStart: unitName sideRadio chat @@ -57377,6 +59376,7 @@ WikiPageStart: https://community.bistudio.com/wiki/sideUnknown //WikiPageEnd// SyntaxStart: +sideUnknown //SyntaxEnd// RawSyntaxStart: sideUnknown @@ -57410,6 +59410,7 @@ WikiPageStart: https://community.bistudio.com/wiki/simpleTasks //WikiPageEnd// SyntaxStart: +simpleTasks Object //SyntaxEnd// RawSyntaxStart: simpleTasks person @@ -57437,6 +59438,7 @@ WikiPageStart: https://community.bistudio.com/wiki/simulationEnabled //WikiPageEnd// SyntaxStart: +simulationEnabled Object //SyntaxEnd// RawSyntaxStart: simulationEnabled entity @@ -57464,6 +59466,7 @@ WikiPageStart: https://community.bistudio.com/wiki/simulCloudDensity //WikiPageEnd// SyntaxStart: +simulCloudDensity Position //SyntaxEnd// RawSyntaxStart: simulCloudDensity pos @@ -57492,6 +59495,7 @@ WikiPageStart: https://community.bistudio.com/wiki/simulCloudOcclusion //WikiPageEnd// SyntaxStart: +simulCloudOcclusion Array //SyntaxEnd// RawSyntaxStart: simulCloudOcclusion [pos1,pos2] @@ -57522,6 +59526,7 @@ WikiPageStart: https://community.bistudio.com/wiki/simulInClouds //WikiPageEnd// SyntaxStart: +simulInClouds Position //SyntaxEnd// RawSyntaxStart: simulInClouds pos @@ -57550,6 +59555,7 @@ WikiPageStart: https://community.bistudio.com/wiki/simulWeatherSync //WikiPageEnd// SyntaxStart: +simulWeatherSync //SyntaxEnd// RawSyntaxStart: simulWeatherSync @@ -57560,6 +59566,8 @@ LocalityStart: undefined / undefined //LocalityEnd// NoteStart: +(May 4, 2016) +The behavior of this command is similar to forceWeatherChange, however it leaves current weather transitions intact. Its main purpose would be to refresh the cloud cover to properly reflect current overcast, as they can sometime get out of sync, especially when using setTimeMultiplier and setAccTime. //NoteEnd// ReturnValueStart: Nothing @@ -57577,6 +59585,7 @@ WikiPageStart: https://community.bistudio.com/wiki/sin //WikiPageEnd// SyntaxStart: +sin Number //SyntaxEnd// RawSyntaxStart: sin x @@ -57605,6 +59614,7 @@ WikiPageStart: https://community.bistudio.com/wiki/size //WikiPageEnd// SyntaxStart: +size Location //SyntaxEnd// RawSyntaxStart: size location @@ -57634,6 +59644,7 @@ WikiPageStart: https://community.bistudio.com/wiki/sizeOf //WikiPageEnd// SyntaxStart: +sizeOf String //SyntaxEnd// RawSyntaxStart: sizeOf type @@ -57662,6 +59673,9 @@ WikiPageStart: https://community.bistudio.com/wiki/skill //WikiPageEnd// SyntaxStart: +skill Object +%NextSyntax% +Object skill String //SyntaxEnd// RawSyntaxStart: skill unitName @@ -57696,6 +59710,7 @@ WikiPageStart: https://community.bistudio.com/wiki/skillFinal //WikiPageEnd// SyntaxStart: +Object skillFinal String //SyntaxEnd// RawSyntaxStart: unitName skillFinal sub-skill @@ -57727,6 +59742,7 @@ WikiPageStart: https://community.bistudio.com/wiki/skipTime //WikiPageEnd// SyntaxStart: +skipTime Number //SyntaxEnd// RawSyntaxStart: skipTime duration @@ -57806,6 +59822,7 @@ WikiPageStart: https://community.bistudio.com/wiki/sleep //WikiPageEnd// SyntaxStart: +sleep Number //SyntaxEnd// RawSyntaxStart: sleep delay @@ -57850,6 +59867,9 @@ WikiPageStart: https://community.bistudio.com/wiki/sliderPosition //WikiPageEnd// SyntaxStart: +sliderPosition Number +%NextSyntax% +sliderPosition Control //SyntaxEnd// RawSyntaxStart: sliderPosition idc @@ -57880,6 +59900,9 @@ WikiPageStart: https://community.bistudio.com/wiki/sliderRange //WikiPageEnd// SyntaxStart: +sliderRange Number +%NextSyntax% +sliderRange Control //SyntaxEnd// RawSyntaxStart: sliderRange idc @@ -57910,6 +59933,9 @@ WikiPageStart: https://community.bistudio.com/wiki/sliderSetPosition //WikiPageEnd// SyntaxStart: +sliderSetPosition Array +%NextSyntax% +Control sliderSetPosition Number //SyntaxEnd// RawSyntaxStart: sliderSetPosition [idc, pos] @@ -57940,6 +59966,9 @@ WikiPageStart: https://community.bistudio.com/wiki/sliderSetRange //WikiPageEnd// SyntaxStart: +sliderSetRange Array +%NextSyntax% +Control sliderSetRange Array //SyntaxEnd// RawSyntaxStart: sliderSetRange [idc, min, max] @@ -57972,6 +60001,9 @@ WikiPageStart: https://community.bistudio.com/wiki/sliderSetSpeed //WikiPageEnd// SyntaxStart: +sliderSetSpeed Array +%NextSyntax% +Control sliderSetSpeed Array //SyntaxEnd// RawSyntaxStart: sliderSetSpeed [idc,line,page] @@ -58002,6 +60034,9 @@ WikiPageStart: https://community.bistudio.com/wiki/sliderSpeed //WikiPageEnd// SyntaxStart: +sliderSpeed Number +%NextSyntax% +sliderSpeed Control //SyntaxEnd// RawSyntaxStart: sliderSpeed idc @@ -58032,6 +60067,7 @@ WikiPageStart: https://community.bistudio.com/wiki/slingLoadAssistantShown //WikiPageEnd// SyntaxStart: +slingLoadAssistantShown //SyntaxEnd// RawSyntaxStart: slingLoadAssistantShown @@ -58062,6 +60098,7 @@ WikiPageStart: https://community.bistudio.com/wiki/soldierMagazines //WikiPageEnd// SyntaxStart: +soldierMagazines Object //SyntaxEnd// RawSyntaxStart: soldierMagazines unit @@ -58098,6 +60135,7 @@ WikiPageStart: https://community.bistudio.com/wiki/someAmmo //WikiPageEnd// SyntaxStart: +someAmmo Object //SyntaxEnd// RawSyntaxStart: someAmmo unitName @@ -58130,6 +60168,7 @@ WikiPageStart: https://community.bistudio.com/wiki/sort //WikiPageEnd// SyntaxStart: +Array sort Boolean //SyntaxEnd// RawSyntaxStart: array sort order @@ -58184,6 +60223,7 @@ WikiPageStart: https://community.bistudio.com/wiki/soundVolume //WikiPageEnd// SyntaxStart: +soundVolume //SyntaxEnd// RawSyntaxStart: soundVolume @@ -58212,6 +60252,7 @@ WikiPageStart: https://community.bistudio.com/wiki/spawn //WikiPageEnd// SyntaxStart: +Anything spawn Code //SyntaxEnd// RawSyntaxStart: arguments spawn code @@ -58276,6 +60317,7 @@ WikiPageStart: https://community.bistudio.com/wiki/speaker //WikiPageEnd// SyntaxStart: +speaker Object //SyntaxEnd// RawSyntaxStart: speaker person @@ -58304,6 +60346,7 @@ WikiPageStart: https://community.bistudio.com/wiki/speed //WikiPageEnd// SyntaxStart: +speed Object //SyntaxEnd// RawSyntaxStart: speed object @@ -58335,6 +60378,7 @@ WikiPageStart: https://community.bistudio.com/wiki/speedMode //WikiPageEnd// SyntaxStart: +speedMode Object/Group //SyntaxEnd// RawSyntaxStart: speedMode groupName @@ -58363,6 +60407,7 @@ WikiPageStart: https://community.bistudio.com/wiki/splitString //WikiPageEnd// SyntaxStart: +String splitString //SyntaxEnd// RawSyntaxStart: str splitString delimiters @@ -58390,6 +60435,14 @@ LocalityStart: undefined / undefined //LocalityEnd// NoteStart: +(May 17, 2016) +This command is unreliable/broken when it comes to some non-ASCII characters (as of Arma 3 1.58): +$Code$"Mörser" splitString "" +- ["M"," "," ","r","s","e","r"] +"Mörser" splitString "ö" +- ["M","rser"] +"Mörser" splitString "ä" +- ["M"," rser"]$/Code$ //NoteEnd// ReturnValueStart: Array @@ -58407,6 +60460,7 @@ WikiPageStart: https://community.bistudio.com/wiki/sqrt //WikiPageEnd// SyntaxStart: +sqrt Number //SyntaxEnd// RawSyntaxStart: sqrt x @@ -58442,6 +60496,7 @@ WikiPageStart: https://community.bistudio.com/wiki/squadParams //WikiPageEnd// SyntaxStart: +squadParams Object //SyntaxEnd// RawSyntaxStart: squadParams unit @@ -58472,6 +60527,7 @@ WikiPageStart: https://community.bistudio.com/wiki/stance //WikiPageEnd// SyntaxStart: +stance Object //SyntaxEnd// RawSyntaxStart: stance unit @@ -58505,6 +60561,7 @@ WikiPageStart: https://community.bistudio.com/wiki/startLoadingScreen //WikiPageEnd// SyntaxStart: +startLoadingScreen Array //SyntaxEnd// RawSyntaxStart: startLoadingScreen [text, resource] @@ -58683,6 +60740,21 @@ Optionally can set step. If you want to count down, step must be specified, and WikiPageStart: https://community.bistudio.com/wiki/step //WikiPageEnd// +SyntaxStart: +step rigthConstruct +//SyntaxEnd// +RawSyntaxStart: +//RawSyntaxEnd// +ExampleStart: +//ExampleEnd// +LocalityStart: +undefined / undefined +//LocalityEnd// +NoteStart: +//NoteEnd// +ReturnValueStart: +Nothing +//ReturnValueEnd// %NextListItem% @@ -58696,6 +60768,7 @@ WikiPageStart: https://community.bistudio.com/wiki/stop //WikiPageEnd// SyntaxStart: +Object stop Boolean //SyntaxEnd// RawSyntaxStart: unitName stop toggle @@ -58726,6 +60799,7 @@ WikiPageStart: https://community.bistudio.com/wiki/stopped //WikiPageEnd// SyntaxStart: +stopped Object //SyntaxEnd// RawSyntaxStart: stopped unitName @@ -58757,6 +60831,7 @@ WikiPageStart: https://community.bistudio.com/wiki/str //WikiPageEnd// SyntaxStart: +str Anything //SyntaxEnd// RawSyntaxStart: str value @@ -58802,6 +60877,7 @@ WikiPageStart: https://community.bistudio.com/wiki/sunOrMoon //WikiPageEnd// SyntaxStart: +sunOrMoon //SyntaxEnd// RawSyntaxStart: sunOrMoon @@ -58844,6 +60920,7 @@ WikiPageStart: https://community.bistudio.com/wiki/supportInfo //WikiPageEnd// SyntaxStart: +supportInfo String //SyntaxEnd// RawSyntaxStart: supportInfo mask @@ -58883,6 +60960,7 @@ WikiPageStart: https://community.bistudio.com/wiki/suppressFor //WikiPageEnd// SyntaxStart: +Object suppressFor Number //SyntaxEnd// RawSyntaxStart: unit suppressFor duration @@ -58912,6 +60990,7 @@ WikiPageStart: https://community.bistudio.com/wiki/surfaceIsWater //WikiPageEnd// SyntaxStart: +surfaceIsWater Array //SyntaxEnd// RawSyntaxStart: surfaceIsWater position @@ -58944,6 +61023,7 @@ WikiPageStart: https://community.bistudio.com/wiki/surfaceNormal //WikiPageEnd// SyntaxStart: +surfaceNormal Array //SyntaxEnd// RawSyntaxStart: surfaceNormal position @@ -58974,6 +61054,7 @@ WikiPageStart: https://community.bistudio.com/wiki/surfaceType //WikiPageEnd// SyntaxStart: +surfaceType Array //SyntaxEnd// RawSyntaxStart: surfaceType position @@ -59034,6 +61115,7 @@ WikiPageStart: https://community.bistudio.com/wiki/swimInDepth //WikiPageEnd// SyntaxStart: +Object swimInDepth Number //SyntaxEnd// RawSyntaxStart: unit swimInDepth value @@ -59064,6 +61146,21 @@ switch returns whatever the return value of the case block is. WikiPageStart: https://community.bistudio.com/wiki/switch //WikiPageEnd// +SyntaxStart: +switch rigthConstruct +//SyntaxEnd// +RawSyntaxStart: +//RawSyntaxEnd// +ExampleStart: +//ExampleEnd// +LocalityStart: +undefined / undefined +//LocalityEnd// +NoteStart: +//NoteEnd// +ReturnValueStart: +Nothing +//ReturnValueEnd// %NextListItem% @@ -59077,6 +61174,7 @@ WikiPageStart: https://community.bistudio.com/wiki/switchableUnits //WikiPageEnd// SyntaxStart: +switchableUnits //SyntaxEnd// RawSyntaxStart: switchableUnits @@ -59106,6 +61204,7 @@ WikiPageStart: https://community.bistudio.com/wiki/switchAction //WikiPageEnd// SyntaxStart: +Object switchAction String //SyntaxEnd// RawSyntaxStart: soldier switchAction action @@ -59140,6 +61239,7 @@ WikiPageStart: https://community.bistudio.com/wiki/switchCamera //WikiPageEnd// SyntaxStart: +Object switchCamera String //SyntaxEnd// RawSyntaxStart: unitName switchCamera mode @@ -59188,6 +61288,7 @@ WikiPageStart: https://community.bistudio.com/wiki/switchGesture //WikiPageEnd// SyntaxStart: +Object switchGesture String //SyntaxEnd// RawSyntaxStart: soldier switchGesture moveName @@ -59218,6 +61319,7 @@ WikiPageStart: https://community.bistudio.com/wiki/switchLight //WikiPageEnd// SyntaxStart: +Object switchLight String //SyntaxEnd// RawSyntaxStart: lamp switchLight mode @@ -59265,42 +61367,6 @@ 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: -//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// @@ -59311,6 +61377,7 @@ WikiPageStart: https://community.bistudio.com/wiki/synchronizedObjects //WikiPageEnd// SyntaxStart: +synchronizedObjects Object //SyntaxEnd// RawSyntaxStart: synchronizedObjects unit @@ -59347,6 +61414,7 @@ WikiPageStart: https://community.bistudio.com/wiki/synchronizedTriggers //WikiPageEnd// SyntaxStart: +synchronizedTriggers Waypoint //SyntaxEnd// RawSyntaxStart: synchronizedTriggers waypoint @@ -59374,6 +61442,7 @@ WikiPageStart: https://community.bistudio.com/wiki/synchronizedWaypoints //WikiPageEnd// SyntaxStart: +synchronizedWaypoints Object/Waypoint //SyntaxEnd// RawSyntaxStart: synchronizedWaypoints obj @@ -59401,6 +61470,7 @@ WikiPageStart: https://community.bistudio.com/wiki/synchronizeObjectsAdd //WikiPageEnd// SyntaxStart: +Object synchronizeObjectsAdd Array //SyntaxEnd// RawSyntaxStart: unit synchronizeObjectsAdd [objects] @@ -59430,6 +61500,7 @@ WikiPageStart: https://community.bistudio.com/wiki/synchronizeObjectsRemove //WikiPageEnd// SyntaxStart: +Object synchronizeObjectsRemove Array //SyntaxEnd// RawSyntaxStart: unit synchronizeObjectsRemove [objects] @@ -59457,6 +61528,7 @@ WikiPageStart: https://community.bistudio.com/wiki/synchronizeTrigger //WikiPageEnd// SyntaxStart: +Object synchronizeTrigger Array //SyntaxEnd// RawSyntaxStart: trigger synchronizeTrigger [waypoint1, waypoint2,...] @@ -59489,6 +61561,7 @@ WikiPageStart: https://community.bistudio.com/wiki/synchronizeWaypoint //WikiPageEnd// SyntaxStart: +Array synchronizeWaypoint //SyntaxEnd// RawSyntaxStart: waypoint synchronizeWaypoint [waypoint1, waypoint2,...] @@ -59509,34 +61582,6 @@ Nothing %NextListItem% -KeywordStart: -synchronizeWaypoint_trigger -//KeywordEnd// -DescriptionStart: -Synchronizes a trigger with other waypoints. Each waypoint is given as an array [group, index]. -//DescriptionEnd// -WikiPageStart: -https://community.bistudio.com/wiki/synchronizeWaypoint_trigger -//WikiPageEnd// -SyntaxStart: -//SyntaxEnd// -RawSyntaxStart: -trigger synchronizeWaypoint [waypoint1, waypoint2,...] -//RawSyntaxEnd// -ExampleStart: -$Code$_myTrigger synchronizeWaypoint [ [_group2, 3] ];$/Code$ -//ExampleEnd// -LocalityStart: -undefined / undefined -//LocalityEnd// -NoteStart: -//NoteEnd// -ReturnValueStart: -Nothing -//ReturnValueEnd// - -%NextListItem% - KeywordStart: systemChat //KeywordEnd// @@ -59547,6 +61592,7 @@ WikiPageStart: https://community.bistudio.com/wiki/systemChat //WikiPageEnd// SyntaxStart: +systemChat String //SyntaxEnd// RawSyntaxStart: systemChat text @@ -59586,6 +61632,7 @@ WikiPageStart: https://community.bistudio.com/wiki/systemOfUnits //WikiPageEnd// SyntaxStart: +systemOfUnits //SyntaxEnd// RawSyntaxStart: systemOfUnits @@ -59614,6 +61661,7 @@ WikiPageStart: https://community.bistudio.com/wiki/tan //WikiPageEnd// SyntaxStart: +tan Number //SyntaxEnd// RawSyntaxStart: tan x @@ -59650,6 +61698,7 @@ WikiPageStart: https://community.bistudio.com/wiki/targetKnowledge //WikiPageEnd// SyntaxStart: +Object targetKnowledge //SyntaxEnd// RawSyntaxStart: unit targetKnowledge target @@ -59680,6 +61729,7 @@ WikiPageStart: https://community.bistudio.com/wiki/targetsAggregate //WikiPageEnd// SyntaxStart: +Array targetsAggregate //SyntaxEnd// RawSyntaxStart: [speaker, side, unit, place, time] targetsAggregate candidates @@ -59708,6 +61758,7 @@ WikiPageStart: https://community.bistudio.com/wiki/targetsQuery //WikiPageEnd// SyntaxStart: +Object targetsQuery Array //SyntaxEnd// RawSyntaxStart: enquirer targetsQuery [targetIgnore, targetSide, targetType, targetPosition, targetMaxAge] @@ -59740,6 +61791,7 @@ WikiPageStart: https://community.bistudio.com/wiki/taskAlwaysVisible //WikiPageEnd// SyntaxStart: +taskAlwaysVisible Task //SyntaxEnd// RawSyntaxStart: taskAlwaysVisible task @@ -59767,6 +61819,7 @@ WikiPageStart: https://community.bistudio.com/wiki/taskChildren //WikiPageEnd// SyntaxStart: +taskChildren Task //SyntaxEnd// RawSyntaxStart: taskChildren task @@ -59794,6 +61847,7 @@ WikiPageStart: https://community.bistudio.com/wiki/taskCompleted //WikiPageEnd// SyntaxStart: +taskCompleted Task //SyntaxEnd// RawSyntaxStart: taskCompleted task @@ -59821,6 +61875,7 @@ WikiPageStart: https://community.bistudio.com/wiki/taskCustomData //WikiPageEnd// SyntaxStart: +taskCustomData Task //SyntaxEnd// RawSyntaxStart: taskCustomData task @@ -59848,6 +61903,7 @@ WikiPageStart: https://community.bistudio.com/wiki/taskDescription //WikiPageEnd// SyntaxStart: +taskDescription Task //SyntaxEnd// RawSyntaxStart: taskDescription task @@ -59880,6 +61936,7 @@ WikiPageStart: https://community.bistudio.com/wiki/taskDestination //WikiPageEnd// SyntaxStart: +taskDestination Task //SyntaxEnd// RawSyntaxStart: taskDestination task @@ -59909,6 +61966,7 @@ WikiPageStart: https://community.bistudio.com/wiki/taskHint //WikiPageEnd// SyntaxStart: +taskHint Array //SyntaxEnd// RawSyntaxStart: taskHint [hintText, [r, g, b, a], icon] @@ -59948,6 +62006,7 @@ WikiPageStart: https://community.bistudio.com/wiki/taskNull //WikiPageEnd// SyntaxStart: +taskNull //SyntaxEnd// RawSyntaxStart: taskNull @@ -59978,6 +62037,7 @@ WikiPageStart: https://community.bistudio.com/wiki/taskParent //WikiPageEnd// SyntaxStart: +taskParent Task //SyntaxEnd// RawSyntaxStart: taskParent task @@ -60005,6 +62065,7 @@ WikiPageStart: https://community.bistudio.com/wiki/taskResult //WikiPageEnd// SyntaxStart: +taskResult Task //SyntaxEnd// RawSyntaxStart: taskResult task @@ -60039,6 +62100,7 @@ WikiPageStart: https://community.bistudio.com/wiki/taskState //WikiPageEnd// SyntaxStart: +taskState Task //SyntaxEnd// RawSyntaxStart: taskState task @@ -60068,6 +62130,7 @@ WikiPageStart: https://community.bistudio.com/wiki/taskType //WikiPageEnd// SyntaxStart: +taskType Task //SyntaxEnd// RawSyntaxStart: taskType task @@ -60095,6 +62158,7 @@ WikiPageStart: https://community.bistudio.com/wiki/teamMember //WikiPageEnd// SyntaxStart: +teamMember Object //SyntaxEnd// RawSyntaxStart: teamMember person @@ -60126,6 +62190,7 @@ WikiPageStart: https://community.bistudio.com/wiki/teamMemberNull //WikiPageEnd// SyntaxStart: +teamMemberNull //SyntaxEnd// RawSyntaxStart: teamMemberNull @@ -60160,6 +62225,7 @@ WikiPageStart: https://community.bistudio.com/wiki/teamName //WikiPageEnd// SyntaxStart: +teamName TeamMember //SyntaxEnd// RawSyntaxStart: teamName team @@ -60188,6 +62254,7 @@ WikiPageStart: https://community.bistudio.com/wiki/teams //WikiPageEnd// SyntaxStart: +teams //SyntaxEnd// RawSyntaxStart: teams @@ -60216,6 +62283,7 @@ WikiPageStart: https://community.bistudio.com/wiki/teamSwitch //WikiPageEnd// SyntaxStart: +teamSwitch //SyntaxEnd// RawSyntaxStart: teamSwitch @@ -60248,6 +62316,7 @@ WikiPageStart: https://community.bistudio.com/wiki/teamSwitchEnabled //WikiPageEnd// SyntaxStart: +teamSwitchEnabled //SyntaxEnd// RawSyntaxStart: teamSwitchEnabled @@ -60275,6 +62344,7 @@ WikiPageStart: https://community.bistudio.com/wiki/teamType //WikiPageEnd// SyntaxStart: +teamType TeamMember //SyntaxEnd// RawSyntaxStart: teamType team @@ -60303,6 +62373,7 @@ WikiPageStart: https://community.bistudio.com/wiki/terminate //WikiPageEnd// SyntaxStart: +terminate Script_ //SyntaxEnd// RawSyntaxStart: terminate scriptHandle @@ -60334,6 +62405,7 @@ WikiPageStart: https://community.bistudio.com/wiki/terrainIntersect //WikiPageEnd// SyntaxStart: +terrainIntersect Array //SyntaxEnd// RawSyntaxStart: terrainIntersect [pos1, pos2] @@ -60378,6 +62450,7 @@ WikiPageStart: https://community.bistudio.com/wiki/terrainIntersectASL //WikiPageEnd// SyntaxStart: +terrainIntersectASL Array //SyntaxEnd// RawSyntaxStart: terrainIntersectASL [pos1, pos2] @@ -60419,6 +62492,7 @@ WikiPageStart: https://community.bistudio.com/wiki/text //WikiPageEnd// SyntaxStart: +text String //SyntaxEnd// RawSyntaxStart: text param @@ -60437,36 +62511,6 @@ Structured Text %NextListItem% -KeywordStart: -text_location -//KeywordEnd// -DescriptionStart: -Returns a location's text value. -//DescriptionEnd// -WikiPageStart: -https://community.bistudio.com/wiki/text_location -//WikiPageEnd// -SyntaxStart: -//SyntaxEnd// -RawSyntaxStart: -text location -//RawSyntaxEnd// -ExampleStart: -$Code$_townName = text myTownLocation;$/Code$ -%NextExample% -$Code$_loc = text nearestLocation [ position player, "NameMarine"]; //"Marina Bay"$/Code$ -//ExampleEnd// -LocalityStart: -undefined / undefined -//LocalityEnd// -NoteStart: -//NoteEnd// -ReturnValueStart: -String -//ReturnValueEnd// - -%NextListItem% - KeywordStart: textLog //KeywordEnd// @@ -60478,6 +62522,7 @@ WikiPageStart: https://community.bistudio.com/wiki/textLog //WikiPageEnd// SyntaxStart: +textLog Anything //SyntaxEnd// RawSyntaxStart: textLog anything @@ -60506,6 +62551,7 @@ WikiPageStart: https://community.bistudio.com/wiki/textLogFormat //WikiPageEnd// SyntaxStart: +textLogFormat Array //SyntaxEnd// RawSyntaxStart: textLogFormat [format, arg1, arg2,...] @@ -60533,6 +62579,7 @@ WikiPageStart: https://community.bistudio.com/wiki/tg //WikiPageEnd// SyntaxStart: +tg Number //SyntaxEnd// RawSyntaxStart: tg x @@ -60559,6 +62606,21 @@ First or second element of array is executed depending on result of if condition WikiPageStart: https://community.bistudio.com/wiki/then //WikiPageEnd// +SyntaxStart: +leftConstruct then rigthConstruct +//SyntaxEnd// +RawSyntaxStart: +//RawSyntaxEnd// +ExampleStart: +//ExampleEnd// +LocalityStart: +undefined / undefined +//LocalityEnd// +NoteStart: +//NoteEnd// +ReturnValueStart: +Nothing +//ReturnValueEnd// %NextListItem% @@ -60573,11 +62635,14 @@ WikiPageStart: https://community.bistudio.com/wiki/throw //WikiPageEnd// SyntaxStart: +throw Anything +%NextSyntax% +IfType throw Anything //SyntaxEnd// RawSyntaxStart: throw expression %NextRawSyntax% -if +if throw exception //RawSyntaxEnd// ExampleStart: $Code$try { throw "invalid argument"} catch { hint str _exception};$/Code$ @@ -60634,6 +62699,7 @@ WikiPageStart: https://community.bistudio.com/wiki/time //WikiPageEnd// SyntaxStart: +time //SyntaxEnd// RawSyntaxStart: time @@ -60682,6 +62748,7 @@ WikiPageStart: https://community.bistudio.com/wiki/timeMultiplier //WikiPageEnd// SyntaxStart: +timeMultiplier //SyntaxEnd// RawSyntaxStart: timeMultiplier @@ -60710,6 +62777,7 @@ WikiPageStart: https://community.bistudio.com/wiki/titleCut //WikiPageEnd// SyntaxStart: +titleCut Array //SyntaxEnd// RawSyntaxStart: titleCut [text, type, speed] @@ -60738,6 +62806,7 @@ WikiPageStart: https://community.bistudio.com/wiki/titleFadeOut //WikiPageEnd// SyntaxStart: +titleFadeOut Number //SyntaxEnd// RawSyntaxStart: titleFadeOut duration @@ -60775,6 +62844,7 @@ WikiPageStart: https://community.bistudio.com/wiki/titleObj //WikiPageEnd// SyntaxStart: +titleObj Array //SyntaxEnd// RawSyntaxStart: titleObj [class, type, speed, showOnMap] @@ -60803,6 +62873,7 @@ WikiPageStart: https://community.bistudio.com/wiki/titleRsc //WikiPageEnd// SyntaxStart: +titleRsc Array //SyntaxEnd// RawSyntaxStart: titleRsc [text, type, speed] @@ -60839,6 +62910,7 @@ WikiPageStart: https://community.bistudio.com/wiki/titleText //WikiPageEnd// SyntaxStart: +titleText Array //SyntaxEnd// RawSyntaxStart: titleText [text, type, speed] @@ -60876,6 +62948,21 @@ Continue sequence of 'for' command. WikiPageStart: https://community.bistudio.com/wiki/to //WikiPageEnd// +SyntaxStart: +to rigthConstruct +//SyntaxEnd// +RawSyntaxStart: +//RawSyntaxEnd// +ExampleStart: +//ExampleEnd// +LocalityStart: +undefined / undefined +//LocalityEnd// +NoteStart: +//NoteEnd// +ReturnValueStart: +Nothing +//ReturnValueEnd// %NextListItem% @@ -60890,6 +62977,7 @@ WikiPageStart: https://community.bistudio.com/wiki/toArray //WikiPageEnd// SyntaxStart: +toArray String //SyntaxEnd// RawSyntaxStart: toArray string @@ -60919,6 +63007,7 @@ WikiPageStart: https://community.bistudio.com/wiki/toLower //WikiPageEnd// SyntaxStart: +toLower String //SyntaxEnd// RawSyntaxStart: toLower string @@ -60949,6 +63038,7 @@ WikiPageStart: https://community.bistudio.com/wiki/toString //WikiPageEnd// SyntaxStart: +toString Array //SyntaxEnd// RawSyntaxStart: toString array @@ -60991,6 +63081,7 @@ WikiPageStart: https://community.bistudio.com/wiki/toUpper //WikiPageEnd// SyntaxStart: +toUpper String //SyntaxEnd// RawSyntaxStart: toUpper string @@ -61021,6 +63112,7 @@ WikiPageStart: https://community.bistudio.com/wiki/triggerActivated //WikiPageEnd// SyntaxStart: +triggerActivated Object //SyntaxEnd// RawSyntaxStart: triggerActivated trigger @@ -61054,6 +63146,7 @@ WikiPageStart: https://community.bistudio.com/wiki/triggerActivation //WikiPageEnd// SyntaxStart: +triggerActivation Object //SyntaxEnd// RawSyntaxStart: triggerActivation trigger @@ -61082,6 +63175,7 @@ WikiPageStart: https://community.bistudio.com/wiki/triggerArea //WikiPageEnd// SyntaxStart: +triggerArea Object //SyntaxEnd// RawSyntaxStart: triggerArea trigger @@ -61114,6 +63208,7 @@ WikiPageStart: https://community.bistudio.com/wiki/triggerAttachedVehicle //WikiPageEnd// SyntaxStart: +triggerAttachedVehicle Object //SyntaxEnd// RawSyntaxStart: triggerAttachedVehicle trigger @@ -61142,6 +63237,7 @@ WikiPageStart: https://community.bistudio.com/wiki/triggerAttachObject //WikiPageEnd// SyntaxStart: +Object triggerAttachObject Number //SyntaxEnd// RawSyntaxStart: triggerName triggerAttachObject objectId @@ -61177,6 +63273,7 @@ WikiPageStart: https://community.bistudio.com/wiki/triggerAttachVehicle //WikiPageEnd// SyntaxStart: +Object triggerAttachVehicle Array //SyntaxEnd// RawSyntaxStart: triggerName triggerAttachVehicle objects @@ -61208,6 +63305,7 @@ WikiPageStart: https://community.bistudio.com/wiki/triggerStatements //WikiPageEnd// SyntaxStart: +triggerStatements Object //SyntaxEnd// RawSyntaxStart: triggerStatements trigger @@ -61236,6 +63334,7 @@ WikiPageStart: https://community.bistudio.com/wiki/triggerText //WikiPageEnd// SyntaxStart: +triggerText Object //SyntaxEnd// RawSyntaxStart: triggerText trigger @@ -61265,6 +63364,7 @@ WikiPageStart: https://community.bistudio.com/wiki/triggerTimeout //WikiPageEnd// SyntaxStart: +triggerTimeout Object //SyntaxEnd// RawSyntaxStart: triggerTimeout trigger @@ -61293,6 +63393,7 @@ WikiPageStart: https://community.bistudio.com/wiki/triggerTimeoutCurrent //WikiPageEnd// SyntaxStart: +triggerTimeoutCurrent Object //SyntaxEnd// RawSyntaxStart: triggerTimeoutCurrent trigger @@ -61324,6 +63425,7 @@ WikiPageStart: https://community.bistudio.com/wiki/triggerType //WikiPageEnd// SyntaxStart: +triggerType Object //SyntaxEnd// RawSyntaxStart: triggerType trigger @@ -61355,6 +63457,7 @@ WikiPageStart: https://community.bistudio.com/wiki/true //WikiPageEnd// SyntaxStart: +true //SyntaxEnd// RawSyntaxStart: true @@ -61388,6 +63491,9 @@ WikiPageStart: https://community.bistudio.com/wiki/try //WikiPageEnd// SyntaxStart: +try Code +%NextSyntax% +Anything try Code //SyntaxEnd// RawSyntaxStart: try code @@ -61420,6 +63526,7 @@ WikiPageStart: https://community.bistudio.com/wiki/turretLocal //WikiPageEnd// SyntaxStart: +Object turretLocal Array //SyntaxEnd// RawSyntaxStart: vehicle turretLocal turretPath @@ -61453,6 +63560,7 @@ WikiPageStart: https://community.bistudio.com/wiki/turretOwner //WikiPageEnd// SyntaxStart: +Object turretOwner Array //SyntaxEnd// RawSyntaxStart: vehicle turretOwner turretPath @@ -61481,6 +63589,7 @@ WikiPageStart: https://community.bistudio.com/wiki/turretUnit //WikiPageEnd// SyntaxStart: +Object turretUnit Array //SyntaxEnd// RawSyntaxStart: vehicle turretUnit turretpath @@ -61509,6 +63618,9 @@ WikiPageStart: https://community.bistudio.com/wiki/tvAdd //WikiPageEnd// SyntaxStart: +tvAdd Array +%NextSyntax% +Control tvAdd Array //SyntaxEnd// RawSyntaxStart: tvAdd [idc, path, text] @@ -61568,6 +63680,9 @@ WikiPageStart: https://community.bistudio.com/wiki/tvClear //WikiPageEnd// SyntaxStart: +tvClear Number +%NextSyntax% +tvClear Control //SyntaxEnd// RawSyntaxStart: tvClear idc @@ -61625,6 +63740,7 @@ WikiPageStart: https://community.bistudio.com/wiki/tvCollapse //WikiPageEnd// SyntaxStart: +tvCollapse Array //SyntaxEnd// RawSyntaxStart: tvCollapse [idc, [path]] @@ -61680,6 +63796,9 @@ WikiPageStart: https://community.bistudio.com/wiki/tvCount //WikiPageEnd// SyntaxStart: +tvCount Array +%NextSyntax% +Control tvCount Array //SyntaxEnd// RawSyntaxStart: tvCount [idc, [path]] @@ -61739,6 +63858,9 @@ WikiPageStart: https://community.bistudio.com/wiki/tvCurSel //WikiPageEnd// SyntaxStart: +tvCurSel Number +%NextSyntax% +tvCurSel Control //SyntaxEnd// RawSyntaxStart: tvCurSel idc @@ -61798,6 +63920,9 @@ WikiPageStart: https://community.bistudio.com/wiki/tvData //WikiPageEnd// SyntaxStart: +tvData Array +%NextSyntax% +Control tvData Array //SyntaxEnd// RawSyntaxStart: tvData [idc, [path]] @@ -61857,6 +63982,9 @@ WikiPageStart: https://community.bistudio.com/wiki/tvDelete //WikiPageEnd// SyntaxStart: +tvDelete Array +%NextSyntax% +Control tvDelete Array //SyntaxEnd// RawSyntaxStart: tvDelete [idc, [path]] @@ -61916,6 +64044,9 @@ WikiPageStart: https://community.bistudio.com/wiki/tvExpand //WikiPageEnd// SyntaxStart: +tvExpand Array +%NextSyntax% +Control tvExpand Array //SyntaxEnd// RawSyntaxStart: tvExpand [idc, [path]] @@ -61973,6 +64104,9 @@ WikiPageStart: https://community.bistudio.com/wiki/tvPicture //WikiPageEnd// SyntaxStart: +tvPicture Array +%NextSyntax% +Control tvPicture Array //SyntaxEnd// RawSyntaxStart: tvPicture [idc, [path]] @@ -62032,6 +64166,9 @@ WikiPageStart: https://community.bistudio.com/wiki/tvSetCurSel //WikiPageEnd// SyntaxStart: +tvSetCurSel Array +%NextSyntax% +Control tvSetCurSel Array //SyntaxEnd// RawSyntaxStart: tvSetCurSel [idc, path] @@ -62110,6 +64247,9 @@ WikiPageStart: https://community.bistudio.com/wiki/tvSetData //WikiPageEnd// SyntaxStart: +tvSetData Array +%NextSyntax% +Control tvSetData Array //SyntaxEnd// RawSyntaxStart: tvSetData [idc, [path], data] @@ -62169,6 +64309,9 @@ WikiPageStart: https://community.bistudio.com/wiki/tvSetPicture //WikiPageEnd// SyntaxStart: +tvSetPicture Array +%NextSyntax% +Control tvSetPicture Array //SyntaxEnd// RawSyntaxStart: tvSetPicture [idc, path, name] @@ -62228,6 +64371,9 @@ WikiPageStart: https://community.bistudio.com/wiki/tvSetPictureColor //WikiPageEnd// SyntaxStart: +tvSetPictureColor Array +%NextSyntax% +Control tvSetPictureColor Array //SyntaxEnd// RawSyntaxStart: tvSetPictureColor [idc, path, color] @@ -62260,6 +64406,9 @@ WikiPageStart: https://community.bistudio.com/wiki/tvSetText //WikiPageEnd// SyntaxStart: +tvSetText Array +%NextSyntax% +Control tvSetText Array //SyntaxEnd// RawSyntaxStart: tvSetText [idc, path, text] @@ -62292,6 +64441,9 @@ WikiPageStart: https://community.bistudio.com/wiki/tvSetTooltip //WikiPageEnd// SyntaxStart: +tvSetTooltip Array +%NextSyntax% +Control tvSetTooltip Array //SyntaxEnd// RawSyntaxStart: tvSetTooltip [idc, path, text] @@ -62324,6 +64476,9 @@ WikiPageStart: https://community.bistudio.com/wiki/tvSetValue //WikiPageEnd// SyntaxStart: +tvSetValue Array +%NextSyntax% +Control tvSetValue Array //SyntaxEnd// RawSyntaxStart: tvSetValue [idc, [path], val] @@ -62384,6 +64539,7 @@ WikiPageStart: https://community.bistudio.com/wiki/tvSort //WikiPageEnd// SyntaxStart: +Control tvSort Array //SyntaxEnd// RawSyntaxStart: _ctrl tvSort [ [path], reversed] @@ -62439,6 +64595,7 @@ WikiPageStart: https://community.bistudio.com/wiki/tvSortByValue //WikiPageEnd// SyntaxStart: +Control tvSortByValue Array //SyntaxEnd// RawSyntaxStart: _ctrl tvSortByValue [ [path], reversed] @@ -62497,6 +64654,9 @@ WikiPageStart: https://community.bistudio.com/wiki/tvText //WikiPageEnd// SyntaxStart: +tvText Array +%NextSyntax% +Control tvText Array //SyntaxEnd// RawSyntaxStart: tvText [idc, path] @@ -62556,6 +64716,9 @@ WikiPageStart: https://community.bistudio.com/wiki/tvValue //WikiPageEnd// SyntaxStart: +tvValue Array +%NextSyntax% +Control tvValue Array //SyntaxEnd// RawSyntaxStart: tvValue [idc, [path]] @@ -62615,6 +64778,7 @@ WikiPageStart: https://community.bistudio.com/wiki/type //WikiPageEnd// SyntaxStart: +type Location //SyntaxEnd// RawSyntaxStart: type location @@ -62661,6 +64825,7 @@ WikiPageStart: https://community.bistudio.com/wiki/typeName //WikiPageEnd// SyntaxStart: +typeName Anything //SyntaxEnd// RawSyntaxStart: typeName anything @@ -62721,6 +64886,7 @@ WikiPageStart: https://community.bistudio.com/wiki/typeOf //WikiPageEnd// SyntaxStart: +typeOf Object //SyntaxEnd// RawSyntaxStart: typeOf vehicleName @@ -62751,6 +64917,7 @@ WikiPageStart: https://community.bistudio.com/wiki/UAVControl //WikiPageEnd// SyntaxStart: +UAVControl Object //SyntaxEnd// RawSyntaxStart: UAVControl uav @@ -62778,6 +64945,7 @@ WikiPageStart: https://community.bistudio.com/wiki/uiNamespace //WikiPageEnd// SyntaxStart: +uiNamespace //SyntaxEnd// RawSyntaxStart: uiNamespace @@ -62815,6 +64983,7 @@ WikiPageStart: https://community.bistudio.com/wiki/uiSleep //WikiPageEnd// SyntaxStart: +uiSleep Number //SyntaxEnd// RawSyntaxStart: uiSleep delay @@ -62845,6 +65014,7 @@ WikiPageStart: https://community.bistudio.com/wiki/unassignCurator //WikiPageEnd// SyntaxStart: +unassignCurator Object //SyntaxEnd// RawSyntaxStart: unassignCurator curatorObj @@ -62874,6 +65044,7 @@ WikiPageStart: https://community.bistudio.com/wiki/unassignItem //WikiPageEnd// SyntaxStart: +Object unassignItem String //SyntaxEnd// RawSyntaxStart: unit unassignItem item @@ -62907,6 +65078,7 @@ WikiPageStart: https://community.bistudio.com/wiki/unassignTeam //WikiPageEnd// SyntaxStart: +unassignTeam Object //SyntaxEnd// RawSyntaxStart: unassignTeam vehicleName @@ -62935,6 +65107,7 @@ WikiPageStart: https://community.bistudio.com/wiki/unassignVehicle //WikiPageEnd// SyntaxStart: +unassignVehicle Object //SyntaxEnd// RawSyntaxStart: unassignVehicle unitName @@ -62973,6 +65146,7 @@ WikiPageStart: https://community.bistudio.com/wiki/underwater //WikiPageEnd// SyntaxStart: +underwater Object //SyntaxEnd// RawSyntaxStart: underwater object @@ -63005,6 +65179,7 @@ WikiPageStart: https://community.bistudio.com/wiki/uniform //WikiPageEnd// SyntaxStart: +uniform Object //SyntaxEnd// RawSyntaxStart: uniform unit @@ -63033,6 +65208,7 @@ WikiPageStart: https://community.bistudio.com/wiki/uniformContainer //WikiPageEnd// SyntaxStart: +uniformContainer Object //SyntaxEnd// RawSyntaxStart: uniformContainer unit @@ -63067,6 +65243,7 @@ WikiPageStart: https://community.bistudio.com/wiki/uniformItems //WikiPageEnd// SyntaxStart: +uniformItems Object //SyntaxEnd// RawSyntaxStart: uniformItems unit @@ -63100,6 +65277,7 @@ WikiPageStart: https://community.bistudio.com/wiki/uniformMagazines //WikiPageEnd// SyntaxStart: +uniformMagazines Object //SyntaxEnd// RawSyntaxStart: uniformMagazines unit @@ -63130,6 +65308,7 @@ WikiPageStart: https://community.bistudio.com/wiki/unitAddons //WikiPageEnd// SyntaxStart: +unitAddons String //SyntaxEnd// RawSyntaxStart: unitAddons className @@ -63165,6 +65344,7 @@ WikiPageStart: https://community.bistudio.com/wiki/unitBackpack //WikiPageEnd// SyntaxStart: +unitBackpack Object //SyntaxEnd// RawSyntaxStart: unitBackpack unit @@ -63201,6 +65381,7 @@ WikiPageStart: https://community.bistudio.com/wiki/unitPos //WikiPageEnd// SyntaxStart: +unitPos Object //SyntaxEnd// RawSyntaxStart: unitPos unit @@ -63229,6 +65410,7 @@ WikiPageStart: https://community.bistudio.com/wiki/unitReady //WikiPageEnd// SyntaxStart: +unitReady Object //SyntaxEnd// RawSyntaxStart: unitReady unitName @@ -63286,6 +65468,7 @@ WikiPageStart: https://community.bistudio.com/wiki/unitRecoilCoefficient //WikiPageEnd// SyntaxStart: +unitRecoilCoefficient Object //SyntaxEnd// RawSyntaxStart: unitRecoilCoefficient soldier @@ -63316,6 +65499,7 @@ WikiPageStart: https://community.bistudio.com/wiki/units //WikiPageEnd// SyntaxStart: +units Group/Object //SyntaxEnd// RawSyntaxStart: units groupOrunit @@ -63349,6 +65533,7 @@ WikiPageStart: https://community.bistudio.com/wiki/unitsBelowHeight //WikiPageEnd// SyntaxStart: +Group/Array unitsBelowHeight Number //SyntaxEnd// RawSyntaxStart: units unitsBelowHeight height @@ -63381,6 +65566,7 @@ WikiPageStart: https://community.bistudio.com/wiki/unlinkItem //WikiPageEnd// SyntaxStart: +Object unlinkItem String //SyntaxEnd// RawSyntaxStart: unit unlinkItem item @@ -63411,6 +65597,7 @@ WikiPageStart: https://community.bistudio.com/wiki/unlockAchievement //WikiPageEnd// SyntaxStart: +unlockAchievement String //SyntaxEnd// RawSyntaxStart: unlockAchievement name @@ -63441,6 +65628,7 @@ WikiPageStart: https://community.bistudio.com/wiki/unregisterTask //WikiPageEnd// SyntaxStart: +TeamMember unregisterTask String //SyntaxEnd// RawSyntaxStart: teamMember unregisterTask name @@ -63469,6 +65657,7 @@ WikiPageStart: https://community.bistudio.com/wiki/updateDrawIcon //WikiPageEnd// SyntaxStart: +Control updateDrawIcon Array //SyntaxEnd// RawSyntaxStart: map updateDrawIcon [object,string identifier,color,offset,width,height,maintain size?,angle,shadow] @@ -63496,6 +65685,7 @@ WikiPageStart: https://community.bistudio.com/wiki/updateMenuItem //WikiPageEnd// SyntaxStart: +Control updateMenuItem Array //SyntaxEnd// RawSyntaxStart: map updateMenuItem [menu item index,text,command] @@ -63523,6 +65713,7 @@ WikiPageStart: https://community.bistudio.com/wiki/updateObjectTree //WikiPageEnd// SyntaxStart: +updateObjectTree Control //SyntaxEnd// RawSyntaxStart: updateObjectTree map @@ -63550,6 +65741,7 @@ WikiPageStart: https://community.bistudio.com/wiki/useAudioTimeForMoves //WikiPageEnd// SyntaxStart: +Object useAudioTimeForMoves Boolean //SyntaxEnd// RawSyntaxStart: soldier useAudioTimeForMoves toggle @@ -63578,6 +65770,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vectorAdd //WikiPageEnd// SyntaxStart: +Array vectorAdd //SyntaxEnd// RawSyntaxStart: vector1 vectorAdd vector2 @@ -63615,6 +65808,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vectorCos //WikiPageEnd// SyntaxStart: +Array vectorCos //SyntaxEnd// RawSyntaxStart: vector1 vectorCos vector2 @@ -63651,6 +65845,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vectorCrossProduct //WikiPageEnd// SyntaxStart: +Array vectorCrossProduct //SyntaxEnd// RawSyntaxStart: vector1 vectorCrossProduct vector2 @@ -63690,6 +65885,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vectorDiff //WikiPageEnd// SyntaxStart: +Array vectorDiff //SyntaxEnd// RawSyntaxStart: vector1 vectorDiff vector2 @@ -63729,6 +65925,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vectorDir //WikiPageEnd// SyntaxStart: +vectorDir Object //SyntaxEnd// RawSyntaxStart: vectorDir objectName @@ -63761,6 +65958,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vectorDirVisual //WikiPageEnd// SyntaxStart: +vectorDirVisual Object //SyntaxEnd// RawSyntaxStart: vectorDirVisual objectName @@ -63789,6 +65987,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vectorDistance //WikiPageEnd// SyntaxStart: +Array vectorDistance //SyntaxEnd// RawSyntaxStart: vector1 vectorDistance vector2 @@ -63825,6 +66024,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vectorDistanceSqr //WikiPageEnd// SyntaxStart: +Array vectorDistanceSqr //SyntaxEnd// RawSyntaxStart: vector1 vectorDistanceSqr vector2 @@ -63859,6 +66059,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vectorDotProduct //WikiPageEnd// SyntaxStart: +Array vectorDotProduct //SyntaxEnd// RawSyntaxStart: vector1 vectorDotProduct vector2 @@ -63894,6 +66095,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vectorFromTo //WikiPageEnd// SyntaxStart: +Array vectorFromTo //SyntaxEnd// RawSyntaxStart: vector1 vectorFromTo vector2 @@ -63932,6 +66134,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vectorMagnitude //WikiPageEnd// SyntaxStart: +vectorMagnitude Array //SyntaxEnd// RawSyntaxStart: vectorMagnitude vector @@ -63971,6 +66174,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vectorMagnitudeSqr //WikiPageEnd// SyntaxStart: +vectorMagnitudeSqr Array //SyntaxEnd// RawSyntaxStart: vectorMagnitudeSqr vector @@ -64006,6 +66210,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vectorMultiply //WikiPageEnd// SyntaxStart: +Array vectorMultiply Number //SyntaxEnd// RawSyntaxStart: vector vectorMultiply scalar @@ -64044,6 +66249,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vectorNormalized //WikiPageEnd// SyntaxStart: +vectorNormalized Array //SyntaxEnd// RawSyntaxStart: vectorNormalized vector @@ -64080,6 +66286,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vectorUp //WikiPageEnd// SyntaxStart: +vectorUp Object //SyntaxEnd// RawSyntaxStart: vectorUp objectName @@ -64110,6 +66317,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vectorUpVisual //WikiPageEnd// SyntaxStart: +vectorUpVisual Object //SyntaxEnd// RawSyntaxStart: vectorUpVisual objectName @@ -64132,12 +66340,13 @@ KeywordStart: vehicle //KeywordEnd// DescriptionStart: -Vehicle in which given unit is mounted. If none, unit is returned. +Vehicle in which given unit is mounted. If none, unit is returned. Alternatively, use objectParent //DescriptionEnd// WikiPageStart: https://community.bistudio.com/wiki/vehicle //WikiPageEnd// SyntaxStart: +vehicle Object //SyntaxEnd// RawSyntaxStart: vehicle unitName @@ -64146,8 +66355,8 @@ ExampleStart: $Code$// SQS ? vehicle player != player : hint "Player is in a vehicle"$/Code$ %NextExample% -$Code$// SQF (see Notes) -if ( vehicle player != player ) then { hint "Player is in a vehicle"; };$/Code$ +$Code$// SQF +if ( vehicle player != player ) then { hint "Player is in a vehicle"};$/Code$ //ExampleEnd// LocalityStart: undefined / undefined @@ -64173,6 +66382,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vehicleChat //WikiPageEnd// SyntaxStart: +Object vehicleChat String //SyntaxEnd// RawSyntaxStart: vehicleName vehicleChat text @@ -64209,6 +66419,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vehicleRadio //WikiPageEnd// SyntaxStart: +Object vehicleRadio String //SyntaxEnd// RawSyntaxStart: vehicleName vehicleRadio name @@ -64237,6 +66448,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vehicles //WikiPageEnd// SyntaxStart: +vehicles //SyntaxEnd// RawSyntaxStart: vehicles @@ -64275,6 +66487,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vehicleVarName //WikiPageEnd// SyntaxStart: +vehicleVarName Object //SyntaxEnd// RawSyntaxStart: vehicleVarName object @@ -64319,6 +66532,7 @@ WikiPageStart: https://community.bistudio.com/wiki/velocity //WikiPageEnd// SyntaxStart: +velocity Object //SyntaxEnd// RawSyntaxStart: velocity vehicleName @@ -64349,6 +66563,7 @@ WikiPageStart: https://community.bistudio.com/wiki/velocityModelSpace //WikiPageEnd// SyntaxStart: +velocityModelSpace Object //SyntaxEnd// RawSyntaxStart: velocityModelSpace vehicle @@ -64386,6 +66601,7 @@ WikiPageStart: https://community.bistudio.com/wiki/verifySignature //WikiPageEnd// SyntaxStart: +verifySignature String //SyntaxEnd// RawSyntaxStart: verifySignature filename @@ -64416,6 +66632,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vest //WikiPageEnd// SyntaxStart: +vest Object //SyntaxEnd// RawSyntaxStart: vest unit @@ -64444,6 +66661,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vestContainer //WikiPageEnd// SyntaxStart: +vestContainer Object //SyntaxEnd// RawSyntaxStart: vestContainer unit @@ -64493,6 +66711,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vestItems //WikiPageEnd// SyntaxStart: +vestItems Object //SyntaxEnd// RawSyntaxStart: vestItems unit @@ -64532,6 +66751,7 @@ WikiPageStart: https://community.bistudio.com/wiki/vestMagazines //WikiPageEnd// SyntaxStart: +vestMagazines Object //SyntaxEnd// RawSyntaxStart: vestMagazines unit @@ -64567,6 +66787,7 @@ WikiPageStart: https://community.bistudio.com/wiki/viewDistance //WikiPageEnd// SyntaxStart: +viewDistance //SyntaxEnd// RawSyntaxStart: viewDistance @@ -64595,6 +66816,7 @@ WikiPageStart: https://community.bistudio.com/wiki/visibleCompass //WikiPageEnd// SyntaxStart: +visibleCompass //SyntaxEnd// RawSyntaxStart: visibleCompass @@ -64623,6 +66845,7 @@ WikiPageStart: https://community.bistudio.com/wiki/visibleGPS //WikiPageEnd// SyntaxStart: +visibleGPS //SyntaxEnd// RawSyntaxStart: visibleGPS @@ -64651,6 +66874,7 @@ WikiPageStart: https://community.bistudio.com/wiki/visibleMap //WikiPageEnd// SyntaxStart: +visibleMap //SyntaxEnd// RawSyntaxStart: visibleMap @@ -64679,6 +66903,7 @@ WikiPageStart: https://community.bistudio.com/wiki/visiblePosition //WikiPageEnd// SyntaxStart: +visiblePosition Object: //SyntaxEnd// RawSyntaxStart: visiblePosition object @@ -64709,6 +66934,7 @@ WikiPageStart: https://community.bistudio.com/wiki/visiblePositionASL //WikiPageEnd// SyntaxStart: +visiblePositionASL Object: //SyntaxEnd// RawSyntaxStart: visiblePositionASL object @@ -64737,6 +66963,7 @@ WikiPageStart: https://community.bistudio.com/wiki/visibleWatch //WikiPageEnd// SyntaxStart: +visibleWatch //SyntaxEnd// RawSyntaxStart: visibleWatch @@ -64767,6 +66994,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waitUntil //WikiPageEnd// SyntaxStart: +waitUntil Code //SyntaxEnd// RawSyntaxStart: waitUntil condition @@ -64844,6 +67072,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waves //WikiPageEnd// SyntaxStart: +waves //SyntaxEnd// RawSyntaxStart: waves @@ -64872,6 +67101,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointAttachedObject //WikiPageEnd// SyntaxStart: +waypointAttachedObject Array //SyntaxEnd// RawSyntaxStart: waypointAttachedObject waypoint @@ -64903,6 +67133,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointAttachedVehicle //WikiPageEnd// SyntaxStart: +waypointAttachedVehicle Array //SyntaxEnd// RawSyntaxStart: waypointAttachedVehicle waypoint @@ -64934,6 +67165,9 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointAttachObject //WikiPageEnd// SyntaxStart: +Array waypointAttachObject Number +%NextSyntax% +Array waypointAttachObject Object //SyntaxEnd// RawSyntaxStart: waypoint waypointAttachObject objectID @@ -64969,6 +67203,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointAttachVehicle //WikiPageEnd// SyntaxStart: +Array waypointAttachVehicle Object //SyntaxEnd// RawSyntaxStart: waypoint waypointAttachVehicle vehicleName @@ -65001,6 +67236,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointBehaviour //WikiPageEnd// SyntaxStart: +waypointBehaviour Array //SyntaxEnd// RawSyntaxStart: waypointBehaviour waypoint @@ -65029,6 +67265,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointCombatMode //WikiPageEnd// SyntaxStart: +waypointCombatMode Array //SyntaxEnd// RawSyntaxStart: waypointCombatMode waypoint @@ -65057,6 +67294,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointCompletionRadius //WikiPageEnd// SyntaxStart: +waypointCompletionRadius Array //SyntaxEnd// RawSyntaxStart: waypointCompletionRadius waypoint @@ -65085,6 +67323,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointDescription //WikiPageEnd// SyntaxStart: +waypointDescription Array //SyntaxEnd// RawSyntaxStart: waypointDescription waypoint @@ -65124,6 +67363,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointFormation //WikiPageEnd// SyntaxStart: +waypointFormation Array //SyntaxEnd// RawSyntaxStart: waypointFormation waypoint @@ -65152,6 +67392,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointHousePosition //WikiPageEnd// SyntaxStart: +waypointHousePosition Array //SyntaxEnd// RawSyntaxStart: waypointHousePosition waypoint @@ -65180,6 +67421,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointLoiterRadius //WikiPageEnd// SyntaxStart: +waypointLoiterRadius Waypoint //SyntaxEnd// RawSyntaxStart: waypointLoiterRadius Waypoint @@ -65208,6 +67450,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointLoiterType //WikiPageEnd// SyntaxStart: +waypointLoiterType Waypoint //SyntaxEnd// RawSyntaxStart: waypointLoiterType Waypoint @@ -65236,6 +67479,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointName //WikiPageEnd// SyntaxStart: +waypointName Waypoint //SyntaxEnd// RawSyntaxStart: waypointName waypoint @@ -65263,6 +67507,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointPosition //WikiPageEnd// SyntaxStart: +waypointPosition Array //SyntaxEnd// RawSyntaxStart: waypointPosition waypoint @@ -65291,6 +67536,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypoints //WikiPageEnd// SyntaxStart: +waypoints Group //SyntaxEnd// RawSyntaxStart: waypoints groupName @@ -65322,6 +67568,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointScript //WikiPageEnd// SyntaxStart: +waypointScript Array //SyntaxEnd// RawSyntaxStart: waypointScript waypoint @@ -65350,6 +67597,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointsEnabledUAV //WikiPageEnd// SyntaxStart: +waypointsEnabledUAV Object //SyntaxEnd// RawSyntaxStart: waypointsEnabledUAV uav @@ -65384,6 +67632,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointShow //WikiPageEnd// SyntaxStart: +waypointShow Array //SyntaxEnd// RawSyntaxStart: waypointShow waypoint @@ -65417,6 +67666,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointSpeed //WikiPageEnd// SyntaxStart: +waypointSpeed Array //SyntaxEnd// RawSyntaxStart: waypointSpeed waypoint @@ -65445,6 +67695,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointStatements //WikiPageEnd// SyntaxStart: +waypointStatements Array //SyntaxEnd// RawSyntaxStart: waypointStatements waypoint @@ -65473,6 +67724,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointTimeout //WikiPageEnd// SyntaxStart: +waypointTimeout Array //SyntaxEnd// RawSyntaxStart: waypointTimeout waypoint @@ -65501,6 +67753,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointTimeoutCurrent //WikiPageEnd// SyntaxStart: +waypointTimeoutCurrent Group //SyntaxEnd// RawSyntaxStart: waypointTimeoutCurrent waypoint @@ -65552,6 +67805,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointType //WikiPageEnd// SyntaxStart: +waypointType Array //SyntaxEnd// RawSyntaxStart: waypointType waypoint @@ -65586,6 +67840,7 @@ WikiPageStart: https://community.bistudio.com/wiki/waypointVisible //WikiPageEnd// SyntaxStart: +waypointVisible Array //SyntaxEnd// RawSyntaxStart: waypointVisible waypoint @@ -65616,6 +67871,7 @@ WikiPageStart: https://community.bistudio.com/wiki/weaponAccessories //WikiPageEnd// SyntaxStart: +Object weaponAccessories String //SyntaxEnd// RawSyntaxStart: unit weaponAccessories weapon @@ -65651,6 +67907,7 @@ WikiPageStart: https://community.bistudio.com/wiki/weaponCargo //WikiPageEnd// SyntaxStart: +weaponCargo Object //SyntaxEnd// RawSyntaxStart: weaponCargo box @@ -65681,6 +67938,7 @@ WikiPageStart: https://community.bistudio.com/wiki/weaponDirection //WikiPageEnd// SyntaxStart: +Object weaponDirection String //SyntaxEnd// RawSyntaxStart: vehicleName weaponDirection weaponName @@ -65737,6 +67995,7 @@ WikiPageStart: https://community.bistudio.com/wiki/weaponLowered //WikiPageEnd// SyntaxStart: +weaponLowered Object //SyntaxEnd// RawSyntaxStart: weaponLowered unit @@ -65765,6 +68024,7 @@ WikiPageStart: https://community.bistudio.com/wiki/weapons //WikiPageEnd// SyntaxStart: +weapons Object //SyntaxEnd// RawSyntaxStart: weapons vehicleName @@ -65808,6 +68068,7 @@ WikiPageStart: https://community.bistudio.com/wiki/weaponsItems //WikiPageEnd// SyntaxStart: +weaponsItems Object //SyntaxEnd// RawSyntaxStart: weaponsItems vehicle @@ -65940,6 +68201,7 @@ WikiPageStart: https://community.bistudio.com/wiki/weaponsItemsCargo //WikiPageEnd// SyntaxStart: +weaponsItemsCargo Object //SyntaxEnd// RawSyntaxStart: weaponsItemsCargo vehicle @@ -65970,6 +68232,9 @@ WikiPageStart: https://community.bistudio.com/wiki/weaponState //WikiPageEnd// SyntaxStart: +weaponState Object +%NextSyntax% +weaponState Array //SyntaxEnd// RawSyntaxStart: weaponState unitName @@ -66007,6 +68272,7 @@ WikiPageStart: https://community.bistudio.com/wiki/weaponsTurret //WikiPageEnd// SyntaxStart: +Object weaponsTurret Array //SyntaxEnd// RawSyntaxStart: vehicle weaponsTurret turretPath @@ -66100,6 +68366,7 @@ WikiPageStart: https://community.bistudio.com/wiki/weightRTD //WikiPageEnd// SyntaxStart: +weightRTD Object //SyntaxEnd// RawSyntaxStart: weightRTD helicopter @@ -66128,6 +68395,7 @@ WikiPageStart: https://community.bistudio.com/wiki/west //WikiPageEnd// SyntaxStart: +west //SyntaxEnd// RawSyntaxStart: west @@ -66172,6 +68440,7 @@ WikiPageStart: https://community.bistudio.com/wiki/WFSideText //WikiPageEnd// SyntaxStart: +WFSideText Object/Group/Side //SyntaxEnd// RawSyntaxStart: WFSideText param @@ -66205,6 +68474,21 @@ Repeats Code while condition is true. A part of while do construct. WikiPageStart: https://community.bistudio.com/wiki/while //WikiPageEnd// +SyntaxStart: +while rigthConstruct +//SyntaxEnd// +RawSyntaxStart: +//RawSyntaxEnd// +ExampleStart: +//ExampleEnd// +LocalityStart: +undefined / undefined +//LocalityEnd// +NoteStart: +//NoteEnd// +ReturnValueStart: +Nothing +//ReturnValueEnd// %NextListItem% @@ -66218,6 +68502,7 @@ WikiPageStart: https://community.bistudio.com/wiki/wind //WikiPageEnd// SyntaxStart: +wind //SyntaxEnd// RawSyntaxStart: wind @@ -66247,6 +68532,7 @@ WikiPageStart: https://community.bistudio.com/wiki/windDir //WikiPageEnd// SyntaxStart: +windDir //SyntaxEnd// RawSyntaxStart: windDir @@ -66277,6 +68563,7 @@ WikiPageStart: https://community.bistudio.com/wiki/windStr //WikiPageEnd// SyntaxStart: +windStr //SyntaxEnd// RawSyntaxStart: windStr @@ -66305,6 +68592,7 @@ WikiPageStart: https://community.bistudio.com/wiki/wingsForcesRTD //WikiPageEnd// SyntaxStart: +wingsForcesRTD Object //SyntaxEnd// RawSyntaxStart: wingsForcesRTD RTD_helicopter @@ -66379,6 +68667,21 @@ To eliminate possibility of error you can also use setVariable or getVariable wi WikiPageStart: https://community.bistudio.com/wiki/with //WikiPageEnd// +SyntaxStart: +with rigthConstruct +//SyntaxEnd// +RawSyntaxStart: +//RawSyntaxEnd// +ExampleStart: +//ExampleEnd// +LocalityStart: +undefined / undefined +//LocalityEnd// +NoteStart: +//NoteEnd// +ReturnValueStart: +Nothing +//ReturnValueEnd// %NextListItem% @@ -66392,6 +68695,7 @@ WikiPageStart: https://community.bistudio.com/wiki/worldName //WikiPageEnd// SyntaxStart: +worldName //SyntaxEnd// RawSyntaxStart: worldName @@ -66420,6 +68724,7 @@ WikiPageStart: https://community.bistudio.com/wiki/worldSize //WikiPageEnd// SyntaxStart: +worldSize //SyntaxEnd// RawSyntaxStart: worldSize @@ -66448,6 +68753,7 @@ WikiPageStart: https://community.bistudio.com/wiki/worldToModel //WikiPageEnd// SyntaxStart: +Object worldToModel Array //SyntaxEnd// RawSyntaxStart: object worldToModel position @@ -66480,6 +68786,7 @@ WikiPageStart: https://community.bistudio.com/wiki/worldToModelVisual //WikiPageEnd// SyntaxStart: +Object worldToModelVisual Array //SyntaxEnd// RawSyntaxStart: object worldToModelVisual worldPosition @@ -66514,6 +68821,7 @@ WikiPageStart: https://community.bistudio.com/wiki/worldToScreen //WikiPageEnd// SyntaxStart: +worldToScreen Array //SyntaxEnd// RawSyntaxStart: worldToScreen position diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/activator/Activator.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/activator/Activator.java index eb630974..fe356a65 100644 --- a/plugin/Raven.SQDev.Util/src/raven/sqdev/activator/Activator.java +++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/activator/Activator.java @@ -19,6 +19,7 @@ static BundleContext getContext() { * @see org.osgi.framework.BundleActivator#start(org.osgi.framework. * BundleContext) */ + @Override public void start(BundleContext bundleContext) throws Exception { super.start(bundleContext); Activator.context = bundleContext; @@ -32,6 +33,7 @@ public void start(BundleContext bundleContext) throws Exception { * @see * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) */ + @Override public void stop(BundleContext bundleContext) throws Exception { Activator.context = null; diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/miscellaneous/AdditionalKeywordProposalInformation.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/miscellaneous/AdditionalKeywordProposalInformation.java index 42d136a6..23bee7f6 100644 --- a/plugin/Raven.SQDev.Util/src/raven/sqdev/miscellaneous/AdditionalKeywordProposalInformation.java +++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/miscellaneous/AdditionalKeywordProposalInformation.java @@ -18,7 +18,7 @@ * An additional proposal information based on a Keyword * * @author Raven - * + * */ public class AdditionalKeywordProposalInformation extends AbstractAdditionalProposalInformation { @@ -69,11 +69,14 @@ protected ArrayList computeCategories( overviewContent += command.getDescription() + "\n\n"; } - // syntax - overviewContent += SQDev.BOLD.getOpener() + "Possible syntax: " - + SQDev.BOLD.getCloser() - + command.getRawSytaxes().get(command.getRawSytaxes().size() - 1) + "\n\n"; - + if (command.hasRawSyntax()) { + // syntax + overviewContent += SQDev.BOLD.getOpener() + "Possible syntax: " + + SQDev.BOLD.getCloser() + + command.getRawSytaxes().get(command.getRawSytaxes().size() - 1) + + "\n\n"; + } + // locality if (command.isArgumentLocalityDefined()) { overviewContent += SQDev.BOLD.getOpener() + "Argument locality: " @@ -86,10 +89,12 @@ protected ArrayList computeCategories( + SQDev.BOLD.getCloser() + command.getEffectLocality() + "\n\n"; } - // return value - overviewContent += SQDev.BOLD.getOpener() + "Return Value: " - + SQDev.BOLD.getCloser() + command.getReturnType(); - + if (command.hasReturnValue()) { + // return value + overviewContent += SQDev.BOLD.getOpener() + "Return Value: " + + SQDev.BOLD.getCloser() + command.getReturnType(); + } + if (!overviewContent.isEmpty()) { categories.add(0, new StyledProposalInformationCategory("Overview", overviewContent)); @@ -112,7 +117,8 @@ protected ArrayList computeCategories( } if (command.hasSyntax()) { - // TODO: add syntaxes + categories.add(new StyledProposalInformationCategory("Syntax", + command.getStringSyntaxes())); } } } diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/pluginManagement/ResourceManager.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/pluginManagement/ResourceManager.java index 34dc1614..301d197c 100644 --- a/plugin/Raven.SQDev.Util/src/raven/sqdev/pluginManagement/ResourceManager.java +++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/pluginManagement/ResourceManager.java @@ -22,7 +22,7 @@ * of this plugin including reading and writing * * @author Raven - * + * */ public class ResourceManager { /** @@ -40,6 +40,11 @@ public class ResourceManager { * plugins */ public static final String VERSION_RESOURCE = "versions.txt"; + /** + * The name of the resource containing the stored keywords and the + * respective information about them + */ + public static final String KEYWORDS_RESOURCE = "SQFKeywords.txt"; /** * The internal path to the icons folder */ @@ -67,11 +72,31 @@ public class ResourceManager { /** * The internal path to the SQF icon resource */ - public static final String SQF_ICON = ICON_FOLDER + "/SQF_image.gif"; + public static final String SQF_ICON = ICON_FOLDER + "/SQFIcon.png"; /** * The internal path to the SQFCommand icon resource */ public static final String SQFCOMMAND_ICON = ICON_FOLDER + "/SQFCommandIcon.png"; + /** + * The internal path to the plus icon resource + */ + public static final String PLUS_ICON = ICON_FOLDER + "/plusIcon.png"; + /** + * The internal path to the remove icon + */ + public static final String REMOVE_ICON = ICON_FOLDER + "/removeIcon.png"; + /** + * The internal path to the minus icon + */ + public static final String MINUS_ICON = ICON_FOLDER + "/minusIcon.png"; + /** + * The internal path to the Stringtable icon + */ + public static final String STRINGTABLE_ICON = ICON_FOLDER + "/StringTableIcon.png"; + /** + * The internal path to the keyword file + */ + public static final String INTERNAL_KEYWORDS = "/resources/sqf/SQFKeywords.txt"; private ClassLoader loader; private URL locationURL; @@ -135,7 +160,7 @@ public InputStream getInternalResourceStream(String path) { case "file": in = getLoader().getResourceAsStream(path); break; - + case "jar": try { in = new JarInputStream(getLoader().getResourceAsStream(path)); @@ -160,7 +185,7 @@ public InputStream getInternalResourceStream(String path) { * @param content * The new content of this resourcefile * @throws IOException - * @throws SQDevException + * @throws SQDevException */ public void updateResource(String name, String content) throws IOException, SQDevException { if (!resourceExists(name)) { @@ -323,7 +348,7 @@ private void initializeResourceLocation() { String content = FileUtil .readAll(getInternalResourceStream("/resources/sqf/SQFKeywords.txt")); - + // put content in respective resource files FileWriter writer = new FileWriter(getResource("SQFKeywords.txt").toFile()); writer.write(content); @@ -438,7 +463,7 @@ private IPath getBackupResource(String name) { * @param name * The name of the backup resource file. If it does not contain * an extension the extension ".txt" will be added - * @throws SQDevException + * @throws SQDevException */ private void backupResource(String name) throws SQDevException { if (!name.contains(".")) { diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/sqdevFile/SQDevFile.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/sqdevFile/SQDevFile.java index d7085413..fc7e3ba7 100644 --- a/plugin/Raven.SQDev.Util/src/raven/sqdev/sqdevFile/SQDevFile.java +++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/sqdevFile/SQDevFile.java @@ -20,8 +20,8 @@ import raven.sqdev.exceptions.SQDevFileIsInvalidException; import raven.sqdev.exceptions.SQDevFileNoSuchAttributeException; import raven.sqdev.exceptions.SQDevIllegalFileChangeException; +import raven.sqdev.misc.TextUtils; import raven.sqdev.util.SQDevInfobox; -import raven.sqdev.util.TextUtils; /** * A SQDevFile contains some project specific information for the 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 bb654ac3..31c257ea 100644 --- a/plugin/Raven.SQDev.Util/src/raven/sqdev/startup/SQDevStarter.java +++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/startup/SQDevStarter.java @@ -1,26 +1,46 @@ package raven.sqdev.startup; +import java.io.IOException; + import org.eclipse.swt.SWT; import org.eclipse.ui.IStartup; +import org.osgi.framework.Version; +import raven.sqdev.exceptions.SQDevCoreException; +import raven.sqdev.exceptions.SQDevException; import raven.sqdev.interfaces.IVersionListener; import raven.sqdev.misc.VersionChangeEvent; +import raven.sqdev.pluginManagement.ResourceManager; import raven.sqdev.pluginManagement.VersionManager; +import raven.sqdev.util.FileUtil; import raven.sqdev.util.SQDevInfobox; /** * The SQDev class that gets loaded when the workbench is initialized * * @author Raven - * + * */ public class SQDevStarter implements IStartup, IVersionListener { + private boolean didCompampability; + @Override public void earlyStartup() { // check the versions VersionManager.getManager().addVersionListener(this); VersionManager.getManager().checkVersions(); + + if (didCompampability) { + didCompampability = false; + + // open dialog to inform the user about changes + SQDevInfobox info = new SQDevInfobox( + "Performed some compability changes in order to match new version", + SWT.ICON_INFORMATION); + + info.open(false); + } } @Override @@ -30,6 +50,7 @@ public void versionChanged(VersionChangeEvent event) { case EDITORS: break; case MISC: + miscVersionChanged(event); break; case PREFERENCES: preferenceVersionChange(event); @@ -52,9 +73,26 @@ private void preferenceVersionChange(VersionChangeEvent event) { "The preferences where updated.\n\nMake sure you check them " + "out in order to make the plugin work properly", SWT.ICON_INFORMATION); - + info.open(); } } + private void miscVersionChanged(VersionChangeEvent event) { + if (event.getNewVersion().compareTo(new Version(0, 2, 0)) > 0) { + // update the keyword list on the hard drive as there is the new + // syntax attribute + ResourceManager manager = ResourceManager.getManager(); + + try { + manager.updateResource(ResourceManager.KEYWORDS_RESOURCE, FileUtil.readAll( + manager.getInternalResourceStream(ResourceManager.INTERNAL_KEYWORDS))); + } catch (IOException | SQDevException e) { + throw new SQDevCoreException("Failed at updating local keywords", e); + } + + didCompampability = true; + } + } + } diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/ColorUtils.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/ColorUtils.java index a270afe1..1d1114ba 100644 --- a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/ColorUtils.java +++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/ColorUtils.java @@ -3,6 +3,7 @@ import org.eclipse.swt.graphics.RGB; import raven.sqdev.exceptions.IllegalRGBSyntaxException; +import raven.sqdev.misc.TextUtils; /** * A class containing various static Color functions @@ -21,7 +22,7 @@ public class ColorUtils { * @return The newly created String */ public static String getRGBValuesAsString(RGB rgb) { - return (String) (rgb.red + "," + rgb.green + "," + rgb.blue); + return rgb.red + "," + rgb.green + "," + rgb.blue; } /** diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/EFileType.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/EFileType.java index 40815db5..c3ef3ad7 100644 --- a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/EFileType.java +++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/EFileType.java @@ -65,7 +65,7 @@ public String getInitialContent() { content += "\n * Description:\n * Not given\n * "; content += "\n * Parameter(s):"; content += "\n * 0: None \n * "; - content += "\n * Return Value:\n * None \n * \n */"; + content += "\n * Return Value:\n * None \n * \n */\n\n"; return content; } @@ -221,8 +221,29 @@ public String getInitialContent() { return initialContent; } + }, + STRINGTABLE { + + @Override + public String getExtension() { + return ".xml"; + } + + @Override + public String getInitialContent() { + return ""; + } + + @Override + public void create(String name, boolean open) { + name = "StringTable"; + + super.create(name, open); + } + }; + /** * The path where the file should be created */ @@ -245,8 +266,8 @@ public String getInitialContent() { * * @param name * The name of the new file (without extension!)
    - * Will be overriden in {@linkplain #EXT} and {@linkplain #SQM}; - *
    + * Will be overriden in {@linkplain #EXT}, {@link #STRINGTABLE} + * and {@linkplain #SQM};
    * For {@linkplain #SQDEV} it has to be of type * {@link ESQDevFileType} * @see ESQDevFileType @@ -436,6 +457,7 @@ public IPath getPath() { // run in UI thread because it may depend on UI elements PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() { + @Override public void run() { if (path == null || path.isEmpty()) { diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/EditorUtil.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/EditorUtil.java index af778243..e9656769 100644 --- a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/EditorUtil.java +++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/EditorUtil.java @@ -3,6 +3,8 @@ import org.eclipse.core.runtime.Assert; import org.eclipse.jface.text.IDocument; +import raven.sqdev.misc.TextUtils; + /** * A class containing various static util methods for usage with editors * diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/ProjectUtil.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/ProjectUtil.java index da911c1e..cd796785 100644 --- a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/ProjectUtil.java +++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/ProjectUtil.java @@ -4,10 +4,10 @@ import java.io.FileNotFoundException; import java.util.ArrayList; +import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.CoreException; @@ -262,7 +262,7 @@ public static SQDevInformation getInformation(IProject project) { */ public static boolean exists(String name) { for (IProject currentProject : ResourcesPlugin.getWorkspace().getRoot() - .getProjects(IWorkspaceRoot.INCLUDE_HIDDEN)) { + .getProjects(IContainer.INCLUDE_HIDDEN)) { if (currentProject.getName().equals(name)) { return true; } 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 e6a27e67..a2989e4f 100644 --- a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/SQDevInfobox.java +++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/SQDevInfobox.java @@ -14,7 +14,7 @@ * automatically * * @author Raven - * + * */ public class SQDevInfobox { @@ -82,7 +82,7 @@ public int open() { public void run() { Shell activeShell = Display.getCurrent().getActiveShell(); - if(activeShell == null) { + if (activeShell == null) { // can't report error because user is not in eclipse anymore return; } @@ -108,4 +108,48 @@ public void run() { return result.get(); } + /** + * Makes the dialog visible and brings it to the front of the display.
    + * Note: This method can't return any value + * + * @param suspend + * Whether or not to suspend the calling thread. + */ + public void open(boolean suspend) { + if (suspend) { + open(); + } else { + Display display = PlatformUI.getWorkbench().getDisplay(); + + display.syncExec(new Runnable() { + + @Override + public void run() { + Shell activeShell = Display.getCurrent().getActiveShell(); + + if (activeShell == null) { + // can't report error because user is not in eclipse + // anymore + return; + } + + MessageBox box = new MessageBox(activeShell, style); + + box.setText("SQDev Info"); + box.setMessage(message); + + box.open(); + + Shell active = Display.getCurrent().getActiveShell(); + + if (style == SWT.ERROR && !active.equals( + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell())) { + // close every other opened window + active.close(); + } + } + }); + } + } + } diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/SQDevPreferenceUtil.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/SQDevPreferenceUtil.java index 521bdf82..599a64d7 100644 --- a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/SQDevPreferenceUtil.java +++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/SQDevPreferenceUtil.java @@ -21,7 +21,7 @@ * This class provides functions for dealing with SQDev preferences * * @author Raven - * + * */ public class SQDevPreferenceUtil { @@ -225,7 +225,18 @@ public static Color getCurrentLineHighlightingColor() { */ public static Color getSyntaxHighlightingColor() { return new Color(Display.getCurrent(), ColorUtils.decodeRGB(getPreferenceStore() - .getString(SQDevPreferenceConstants.SQDEV_EDITOR_SYNTAXHIGHLIGHTING_COLOR_KEY))); + .getString(SQDevPreferenceConstants.SQDEV_EDITOR_KEYWORDHIGHLIGHTING_COLOR_KEY))); + } + + /** + * Gets the value of the + * SQDevPreferenceConstants.SQDEV_EDITOR_PARSE_DELAY preference + * that defines the color for the hihlighting of keywords + * + * @see {@linkplain SQDevPreferenceConstants} + */ + public static int getParseDelay() { + return getPreferenceStore().getInt(SQDevPreferenceConstants.SQDEV_EDITOR_PARSE_DELAY); } /** diff --git a/plugin/Raven.SQDev.Wizards/META-INF/MANIFEST.MF b/plugin/Raven.SQDev.Wizards/META-INF/MANIFEST.MF index a9bf7d98..fe408a76 100644 --- a/plugin/Raven.SQDev.Wizards/META-INF/MANIFEST.MF +++ b/plugin/Raven.SQDev.Wizards/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Wizards Bundle-SymbolicName: raven.sqdev.wizards;singleton:=true -Bundle-Version: 0.2.1 +Bundle-Version: 0.3.0 Bundle-Activator: raven.sqdev.wizards.activator.Activator Bundle-Vendor: Raven Require-Bundle: org.eclipse.core.runtime, diff --git a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/activator/Activator.class b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/activator/Activator.class index 3a7bc8c8..6f1e97d8 100644 Binary files a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/activator/Activator.class and b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/activator/Activator.class differ diff --git a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizard.class b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizard.class index f4718eb2..ad42e92e 100644 Binary files a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizard.class and b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizard.class differ diff --git a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage$1.class b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage$1.class index 91aa3bc2..832aff86 100644 Binary files a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage$1.class and b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage$1.class differ diff --git a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage$2.class b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage$2.class index 46ba107f..6d177dd1 100644 Binary files a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage$2.class and b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage$2.class differ diff --git a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage$3.class b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage$3.class index 18431e45..1c692919 100644 Binary files a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage$3.class and b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage$3.class differ diff --git a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage$4.class b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage$4.class index 90abd2e3..6101c728 100644 Binary files a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage$4.class and b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage$4.class differ diff --git a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage.class b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage.class index f3f9900b..4b5590a5 100644 Binary files a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage.class and b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage.class differ diff --git a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizard.class b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizard.class index 50856b05..be3fcc56 100644 Binary files a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizard.class and b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizard.class differ diff --git a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizardPage$1.class b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizardPage$1.class index 2a677b8c..022c51e2 100644 Binary files a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizardPage$1.class and b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizardPage$1.class differ diff --git a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizardPage.class b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizardPage.class index bb56b082..3d925a2d 100644 Binary files a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizardPage.class and b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizardPage.class differ diff --git a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/stringtable/StringTableWizard.class b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/stringtable/StringTableWizard.class new file mode 100644 index 00000000..ee57238a Binary files /dev/null and b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/stringtable/StringTableWizard.class differ diff --git a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/stringtable/StringTableWizardPage.class b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/stringtable/StringTableWizardPage.class new file mode 100644 index 00000000..825044d0 Binary files /dev/null and b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/stringtable/StringTableWizardPage.class differ diff --git a/plugin/Raven.SQDev.Wizards/plugin.xml b/plugin/Raven.SQDev.Wizards/plugin.xml index 66b2c307..7908f191 100644 --- a/plugin/Raven.SQDev.Wizards/plugin.xml +++ b/plugin/Raven.SQDev.Wizards/plugin.xml @@ -4,22 +4,22 @@ + + + + diff --git a/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/activator/Activator.java b/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/activator/Activator.java index 7e30608d..6f094ca6 100644 --- a/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/activator/Activator.java +++ b/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/activator/Activator.java @@ -19,6 +19,7 @@ static BundleContext getContext() { * @see org.osgi.framework.BundleActivator#start(org.osgi.framework. * BundleContext) */ + @Override public void start(BundleContext bundleContext) throws Exception { super.start(bundleContext); Activator.context = bundleContext; @@ -32,6 +33,7 @@ public void start(BundleContext bundleContext) throws Exception { * @see * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) */ + @Override public void stop(BundleContext bundleContext) throws Exception { Activator.context = null; diff --git a/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqdevProject/SQDevProjectWizard.java b/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqdevProject/SQDevProjectWizard.java index 0b9997dd..43e86a18 100644 --- a/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqdevProject/SQDevProjectWizard.java +++ b/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqdevProject/SQDevProjectWizard.java @@ -17,6 +17,7 @@ public SQDevProjectWizard() { super(); } + @Override public void addPages() { page = new SQDevProjectWizardPage("SQDevProjectWizardPage"); addPage(page); diff --git a/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage.java b/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage.java index 175ed43b..77e48f14 100644 --- a/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage.java +++ b/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage.java @@ -17,10 +17,10 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Text; +import raven.sqdev.misc.TextUtils; import raven.sqdev.util.EProjectType; import raven.sqdev.util.SQDevInformation; import raven.sqdev.util.SQDevPreferenceUtil; -import raven.sqdev.util.TextUtils; import raven.sqdev.util.Util; /** @@ -90,6 +90,7 @@ public void createControl(Composite parent) { getNameText().setToolTipText(nameTooltip); getNameText().setLayoutData(gd); getNameText().addModifyListener(new ModifyListener() { + @Override public void modifyText(ModifyEvent e) { dialogChanged(); } diff --git a/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizard.java b/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizard.java index 9cc16b14..89fb3c51 100644 --- a/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizard.java +++ b/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizard.java @@ -36,6 +36,7 @@ public SqfNewFileWizard() { * Adding the page to the wizard. */ + @Override public void addPages() { page = new SqfNewFileWizardPage(selection); addPage(page); @@ -45,6 +46,7 @@ public void addPages() { * This method is called when 'Finish' button is pressed in the wizard. We * will create an operation and run it using wizard as execution context. */ + @Override public boolean performFinish() { final String fileName = page.getFileName(); @@ -105,6 +107,7 @@ public boolean performFinish() { * * @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection) */ + @Override public void init(IWorkbench workbench, IStructuredSelection selection) { this.selection = selection; } diff --git a/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizardPage.java b/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizardPage.java index 8b77d461..46cfb250 100644 --- a/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizardPage.java +++ b/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqfNewFileWizard/SqfNewFileWizardPage.java @@ -18,7 +18,7 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Text; -import raven.sqdev.util.TextUtils; +import raven.sqdev.misc.TextUtils; /** * The "New" wizard page allows setting the container for the new file as well @@ -48,6 +48,7 @@ public SqfNewFileWizardPage(ISelection selection) { /** * @see IDialogPage#createControl(Composite) */ + @Override public void createControl(Composite parent) { Composite container = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); @@ -62,6 +63,7 @@ public void createControl(Composite parent) { GridData gd = new GridData(GridData.FILL_HORIZONTAL); fileText.setLayoutData(gd); fileText.addModifyListener(new ModifyListener() { + @Override public void modifyText(ModifyEvent e) { dialogChanged(); } diff --git a/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/stringtable/StringTableWizard.java b/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/stringtable/StringTableWizard.java new file mode 100644 index 00000000..0ce85dfc --- /dev/null +++ b/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/stringtable/StringTableWizard.java @@ -0,0 +1,36 @@ +package raven.sqdev.wizards.stringtable; + +import org.eclipse.core.resources.IProject; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.ui.INewWizard; +import org.eclipse.ui.IWorkbench; + +import raven.sqdev.util.EFileType; + +public class StringTableWizard extends Wizard implements INewWizard { + + private StringTableWizardPage page; + + public StringTableWizard() { + super(); + } + + @Override + public void init(IWorkbench workbench, IStructuredSelection selection) { + page = new StringTableWizardPage("StringTableWizardPage"); + addPage(page); + } + + @Override + public boolean performFinish() { + IProject project = page.getProject(); + + EFileType stringTable = EFileType.STRINGTABLE; + stringTable.setPath(project.getLocation().toOSString()); + stringTable.create("StringTable"); + + return true; + } + +} diff --git a/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/stringtable/StringTableWizardPage.java b/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/stringtable/StringTableWizardPage.java new file mode 100644 index 00000000..6c04618d --- /dev/null +++ b/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/stringtable/StringTableWizardPage.java @@ -0,0 +1,121 @@ +package raven.sqdev.wizards.stringtable; + +import java.io.File; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.IPath; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; +import org.eclipse.ui.PlatformUI; + +public class StringTableWizardPage extends WizardPage { + /** + * The selected project + */ + private IProject project; + + public StringTableWizardPage(String pageName) { + super(pageName); + + setTitle("New StringTable"); + } + + public StringTableWizardPage(String pageName, String title, ImageDescriptor titleImage) { + super(pageName, title, titleImage); + } + + @Override + public void createControl(Composite parent) { + Composite container = new Composite(parent, SWT.NONE); + container.setLayout(new GridLayout()); + + Label infoLabel = new Label(container, SWT.NONE); + infoLabel.setText("This wizard will create a new StringTable..."); + + setControl(container); + check(); + } + + /** + * Checks if there is already an existing StringTable + */ + private void check() { + ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow() + .getSelectionService().getSelection(); + + if (selection == null) { + updateStatus("No project selected!"); + return; + } + + if (!(selection instanceof IStructuredSelection)) { + updateStatus("The selection is not of type IStructuredSelection!"); + return; + } + + IStructuredSelection structured = (IStructuredSelection) selection; + Object firstElement = structured.getFirstElement(); + + if (!(firstElement instanceof IResource)) { + updateStatus("No resource selected!"); + return; + } + + if (!(firstElement instanceof IProject || firstElement instanceof IFile)) { + updateStatus("You have to select either a project or a file!"); + return; + } + + project = ((IResource) firstElement).getProject(); + + if (project == null) { + updateStatus("Can't retrieve corresponding project for " + + ((IResource) firstElement).getName()); + return; + } + + IPath path = project.getLocation(); + File file = path.toFile(); + File[] fileList = file.listFiles(); + + if (fileList != null) { + for (File currentFile : fileList) { + if (currentFile.getName().toLowerCase().equals("stringtable.xml")) { + updateStatus("The project " + project.getName() + + " does already contain a StringTable!"); + return; + } + } + } + } + + /** + * Sets the error message for this wizard page. It will automatically + * prevent the page from being finished as long as there is a error message. + * If you want to make remove the error message pass null as an + * argument which will make the page finishable again. + * + * @param message + * The message to be displayed + */ + private void updateStatus(String message) { + setErrorMessage(message); + setPageComplete(message == null); + } + + /** + * Gets the project the stringTable should be created in + */ + public IProject getProject() { + return project; + } + +} diff --git a/plugin/Raven.SQDev/feature.xml b/plugin/Raven.SQDev/feature.xml index f2fb00f1..2aca1fbc 100644 --- a/plugin/Raven.SQDev/feature.xml +++ b/plugin/Raven.SQDev/feature.xml @@ -2,7 +2,7 @@ @@ -13,17 +13,28 @@ of scripts for the ArmA series. SQDev is published under the MIT License - - The MIT License (MIT) -Copyright (c) 2015 Raven +Copyright (c) 2015 Krzmbrzl Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 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 + +ANTLR 4 License [The BSD License] Copyright (c) 2012 Terence Parr and Sam Harwell All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +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. +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. @@ -40,45 +51,45 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRES diff --git a/plugin/RavenSQDev.Preferences/META-INF/MANIFEST.MF b/plugin/RavenSQDev.Preferences/META-INF/MANIFEST.MF index 81c99e13..9ea1c660 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.3.0 +Bundle-Version: 0.4.0 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/activator/Activator.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/activator/Activator.class index 03379105..396ce7a6 100644 Binary files a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/activator/Activator.class and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/activator/Activator.class differ diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/initializer/SQDevPreferenceInitializer.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/initializer/SQDevPreferenceInitializer.class index 18046867..ba749b24 100644 Binary files a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/initializer/SQDevPreferenceInitializer.class and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/initializer/SQDevPreferenceInitializer.class differ diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevEditorPreferencePage.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevEditorPreferencePage.class index e84ae7f6..a38fff07 100644 Binary files a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevEditorPreferencePage.class and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevEditorPreferencePage.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 7354fd99..55db2c69 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 new file mode 100644 index 00000000..341709e8 Binary files /dev/null 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 new file mode 100644 index 00000000..1f702c75 Binary files /dev/null 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 59a3c150..c05868b1 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/bin/raven/sqdev/preferences/preferenceEditors/AbstractSQDevPreferenceEditor.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/AbstractSQDevPreferenceEditor.class index 6cbe237d..e11f03f8 100644 Binary files a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/AbstractSQDevPreferenceEditor.class and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/AbstractSQDevPreferenceEditor.class differ diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/BooleanSQDevPreferenceEditor$1.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/BooleanSQDevPreferenceEditor$1.class index 5a2fb019..9dd0b96a 100644 Binary files a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/BooleanSQDevPreferenceEditor$1.class and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/BooleanSQDevPreferenceEditor$1.class differ diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/BooleanSQDevPreferenceEditor.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/BooleanSQDevPreferenceEditor.class index 415dd241..68d72248 100644 Binary files a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/BooleanSQDevPreferenceEditor.class and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/BooleanSQDevPreferenceEditor.class differ diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/IntegerSQDevPreferenceEditor$1.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/IntegerSQDevPreferenceEditor$1.class new file mode 100644 index 00000000..c4fb6d34 Binary files /dev/null and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/IntegerSQDevPreferenceEditor$1.class differ diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/IntegerSQDevPreferenceEditor.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/IntegerSQDevPreferenceEditor.class new file mode 100644 index 00000000..e8d47478 Binary files /dev/null and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/IntegerSQDevPreferenceEditor.class differ diff --git a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/activator/Activator.java b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/activator/Activator.java index e518777e..ec721cad 100644 --- a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/activator/Activator.java +++ b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/activator/Activator.java @@ -22,6 +22,7 @@ public class Activator extends AbstractUIPlugin { * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework. * BundleContext) */ + @Override public void start(BundleContext context) throws Exception { super.start(context); plugin = this; @@ -36,6 +37,7 @@ public void start(BundleContext context) throws Exception { * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework. * BundleContext) */ + @Override public void stop(BundleContext context) throws Exception { plugin = null; super.stop(context); diff --git a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/initializer/SQDevPreferenceInitializer.java b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/initializer/SQDevPreferenceInitializer.java index 0adf76a6..a9894f44 100644 --- a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/initializer/SQDevPreferenceInitializer.java +++ b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/initializer/SQDevPreferenceInitializer.java @@ -23,21 +23,22 @@ public class SQDevPreferenceInitializer extends AbstractPreferenceInitializer { * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer# * initializeDefaultPreferences() */ + @Override public void initializeDefaultPreferences() { IPreferenceStore store = Activator.getDefault().getPreferenceStore(); // find the ArmA directory in programs folder store.setDefault(SQDevPreferenceConstants.SQDEV_INFO_ARMA_MAIN_DIRECTORY, locateArmaMainDirectory()); - + // find ArmA directory in documents folder store.setDefault(SQDevPreferenceConstants.SQDEV_INFO_ARMA_DOCUMENTS_DIRECTORY, locateArmaDocumentsDirectory()); - + // set default profile store.setDefault(SQDevPreferenceConstants.SQDEV_INFO_DEFAULT_PROFILE, System.getProperty("user.name")); - + // set deafult map store.setDefault(SQDevPreferenceConstants.SQDEV_INFO_DEFAULT_TERRAIN, "Altis"); @@ -51,19 +52,30 @@ public void initializeDefaultPreferences() { store.setDefault(SQDevPreferenceConstants.SQDEV_EDITOR_MATCHING_BRACKETS_KEY, true); store.setDefault(SQDevPreferenceConstants.SQDEV_EDITOR_MATCHING_BRACKETS_COLOR_KEY, ColorUtils.getRGBValuesAsString(ISQDevColorConstants.BRACKETMATCH)); - + // enable currentLine highlighting store.setDefault(SQDevPreferenceConstants.SQDEV_EDITOR_HIGHLIGHT_CURRENTLINE_KEY, true); store.setDefault(SQDevPreferenceConstants.SQDEV_EDITOR_HIGHLIGHT_CURRENTLINE_COLOR_KEY, ColorUtils.getRGBValuesAsString(ISQDevColorConstants.CURRENTLINE)); - + // enable autoComplete store.setDefault(SQDevPreferenceConstants.SQDEV_EDITOR_ENABLE_AUTOCOMPLETE_KEY, true); - // set syntax highlighting - store.setDefault(SQDevPreferenceConstants.SQDEV_EDITOR_SYNTAXHIGHLIGHTING_COLOR_KEY, + // set keyword highlighting + store.setDefault(SQDevPreferenceConstants.SQDEV_EDITOR_KEYWORDHIGHLIGHTING_COLOR_KEY, ColorUtils.getRGBValuesAsString(ISQDevColorConstants.KEYWORD)); - + + // set local variable highlighting + store.setDefault(SQDevPreferenceConstants.SQDEV_EDITOR_LOCALVARIABLEHIGHLIGHTING_COLOR_KEY, + ColorUtils.getRGBValuesAsString(ISQDevColorConstants.LOCAL_VARIABLE)); + + // set global variable highlighting + store.setDefault(SQDevPreferenceConstants.SQDEV_EDITOR_GLOBALVARIABLEHIGHLIGHTING_COLOR_KEY, + ColorUtils.getRGBValuesAsString(ISQDevColorConstants.GLOBAL_VARIABLE)); + + // set parsing interval + store.setDefault(SQDevPreferenceConstants.SQDEV_EDITOR_PARSE_DELAY, 2); + // set autoClean store.setDefault(SQDevPreferenceConstants.SQDEV_EXPORT_AUTOCLEAN, false); diff --git a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevEditorPreferencePage.java b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevEditorPreferencePage.java index b590bc44..0a6d1d9e 100644 --- a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevEditorPreferencePage.java +++ b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevEditorPreferencePage.java @@ -6,12 +6,13 @@ import raven.sqdev.constants.SQDevPreferenceConstants; import raven.sqdev.preferences.preferenceEditors.BooleanSQDevPreferenceEditor; import raven.sqdev.preferences.preferenceEditors.ColorSQDevPreferenceEditor; +import raven.sqdev.preferences.preferenceEditors.IntegerSQDevPreferenceEditor; /** * The preferencePage that contains all settings concerning the editor * * @author Raven - * + * */ public class SQDevEditorPreferencePage extends SQDevPreferencePage { @@ -48,18 +49,38 @@ public void init(IWorkbench workbench) { "&Enable autoComplete:", "Enables/Disables autoComplete meaning that content assist will insert the proposal automatically if there is only one choice", behaviour)); - - + + IntegerSQDevPreferenceEditor parseDelayEditor = new IntegerSQDevPreferenceEditor( + SQDevPreferenceConstants.SQDEV_EDITOR_PARSE_DELAY, "&Parse delay:", + "Specifies the delay in seconds between a user input in the editor and the actual parsing of the editor's content", + behaviour); + parseDelayEditor.setMinValue(1); + + addPreferenceEditor(parseDelayEditor); + + // preferences for the coloring Group colors = createGroup("Colors"); createDescription(colors, "Here you can change the colors of the editor"); - ColorSQDevPreferenceEditor syntaxHighlightingColorEditor = new ColorSQDevPreferenceEditor( - SQDevPreferenceConstants.SQDEV_EDITOR_SYNTAXHIGHLIGHTING_COLOR_KEY, - "&Syntax highlighting:", "Defines the color in which keywords are highlighted", + ColorSQDevPreferenceEditor keywordHighlightingColorEditor = new ColorSQDevPreferenceEditor( + SQDevPreferenceConstants.SQDEV_EDITOR_KEYWORDHIGHLIGHTING_COLOR_KEY, + "&Keyword highlighting:", "Defines the color in which keywords are highlighted", colors); - addPreferenceEditor(syntaxHighlightingColorEditor); + addPreferenceEditor(keywordHighlightingColorEditor); + + ColorSQDevPreferenceEditor localVariableHighlightingEditor = new ColorSQDevPreferenceEditor( + SQDevPreferenceConstants.SQDEV_EDITOR_LOCALVARIABLEHIGHLIGHTING_COLOR_KEY, + "&Local variable highlighting:", + "Defines the color in which local variables are highlighted", colors); + addPreferenceEditor(localVariableHighlightingEditor); + + ColorSQDevPreferenceEditor globalVariableHighlightingEditor = new ColorSQDevPreferenceEditor( + SQDevPreferenceConstants.SQDEV_EDITOR_GLOBALVARIABLEHIGHLIGHTING_COLOR_KEY, + "&Global variable highlighting:", + "Defines the color in which global variables are highlighted", colors); + addPreferenceEditor(globalVariableHighlightingEditor); ColorSQDevPreferenceEditor currentLineHighlightingColorEditor = new ColorSQDevPreferenceEditor( SQDevPreferenceConstants.SQDEV_EDITOR_HIGHLIGHT_CURRENTLINE_COLOR_KEY, 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 efa2d7f8..de47d858 100644 --- a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevMiscPreferencePage.java +++ b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevMiscPreferencePage.java @@ -51,13 +51,13 @@ public void init(IWorkbench workbench) { "The name of the first command in the list in the BIKI that should be" + " processed. If there is no urgent need do not change this value!", keywordGroup)); - + addPreferenceEditor(new ValueSQDevPreferenceEditor( SQDevPreferenceConstants.SQDEV_COLLECTION_ENDCOMMAND, "&Last command:", "The name of the last command in the list in the BIKI that should be" + " processed. If there is no urgent need do not change this value!", keywordGroup)); - + // SQF keyword collection updateButton = new Button(createContainer(), SWT.PUSH); updateButton.setToolTipText( @@ -82,6 +82,26 @@ public void mouseUp(MouseEvent e) { updateKeywords(); } }); + + Button resetButton = new Button(createContainer(), SWT.PUSH); + resetButton.setText("Reset Keywords"); + + if (ResourceManager.getManager().isOnBackup("SQFKeywords.txt")) { + resetButton.setEnabled(false); + } else { + resetButton.setToolTipText("Resets the keywords to the backup version"); + + resetButton.addMouseListener(new MouseAdapter() { + + @Override + public void mouseUp(MouseEvent e) { + // backup keywords + ResourceManager.getManager().switchToBackup("SQFKeywords.txt"); + + resetButton.setEnabled(false); + } + }); + } } /** @@ -100,7 +120,7 @@ protected IStatus run(IProgressMonitor monitor) { + "Scripting_Commands_Arma_3"), SQDevPreferenceUtil.getFirstCommand(), SQDevPreferenceUtil.getLastCommand()).collect(monitor); - + if (monitor.isCanceled()) { // ask whether to save the list SQDevInfobox info = new SQDevInfobox( @@ -109,7 +129,7 @@ protected IStatus run(IProgressMonitor monitor) { + " (This will override the current keword list and may" + " leed to an incomplete list)", SWT.ICON_QUESTION | SWT.YES | SWT.NO); - + if (info.open() != SWT.YES) { // don't save return Status.OK_STATUS; @@ -121,14 +141,15 @@ protected IStatus run(IProgressMonitor monitor) { monitor.beginTask("Storing keywords...", IProgressMonitor.UNKNOWN); ResourceManager manager = ResourceManager.getManager(); - manager.updateResource("SQFKeywords.txt", list.getSaveableFormat()); + manager.updateResource(ResourceManager.KEYWORDS_RESOURCE, + list.getSaveableFormat()); // tell the user to restart SQDevInfobox info = new SQDevInfobox( "In order for the new keywords to take effect" + " you have to restart all respective editors", SWT.ICON_INFORMATION); - + info.open(); } catch (IOException | SQDevException e) { diff --git a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/preferenceEditors/AbstractSQDevPreferenceEditor.java b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/preferenceEditors/AbstractSQDevPreferenceEditor.java index 2b821e27..1aced75c 100644 --- a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/preferenceEditors/AbstractSQDevPreferenceEditor.java +++ b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/preferenceEditors/AbstractSQDevPreferenceEditor.java @@ -446,6 +446,7 @@ public void setContainer(Composite container) { * * @see #getComponentCount() */ + @Override public void matchComponentCount(int count) { if (count < getComponentCount()) { throw new IllegalArgumentException( @@ -517,6 +518,7 @@ public String getStatusHint() { * Creates the required components for this editor in the set container.
    * Should call {@linkplain #createEmptyComponents()} in the end! */ + @Override public void createComponents() { createComponents(getContainer()); } diff --git a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/preferenceEditors/BooleanSQDevPreferenceEditor.java b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/preferenceEditors/BooleanSQDevPreferenceEditor.java index 12a72f89..4f1eb978 100644 --- a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/preferenceEditors/BooleanSQDevPreferenceEditor.java +++ b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/preferenceEditors/BooleanSQDevPreferenceEditor.java @@ -13,6 +13,7 @@ /** * A preference editor that let the user change a boolean preference. + * * @author Raven * */ diff --git a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/preferenceEditors/IntegerSQDevPreferenceEditor.java b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/preferenceEditors/IntegerSQDevPreferenceEditor.java new file mode 100644 index 00000000..0e35df7a --- /dev/null +++ b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/preferenceEditors/IntegerSQDevPreferenceEditor.java @@ -0,0 +1,281 @@ +package raven.sqdev.preferences.preferenceEditors; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Spinner; + +import raven.sqdev.preferences.pages.ISQDevPreferencePage; +import raven.sqdev.preferences.util.EStatus; +import raven.sqdev.preferences.util.SQDevChangeEvent; + +/** + * A preference editor for integer values + * + * @author Raven + * + */ +public class IntegerSQDevPreferenceEditor extends AbstractSQDevPreferenceEditor { + /** + * The number selection widget + */ + private Spinner numberSelector; + /** + * The initial value of this editor + */ + private int initialValue; + /** + * The minimum value this editor may have + */ + private int min; + /** + * Indicates whether a minimum has been specified + */ + private boolean minIsSet; + + /** + * The maximum value this editor may have + */ + private int max; + /** + * Indicating whether a maximum has been set + */ + private boolean maxIsSet; + + /** + * Creates a new SQDevPreferenceEditor
    + * This constructor can only be used if the given container is an + * instance of ISQDevPreferenceComposite or one of it's parents + * is. + * + * @param preferenceKey + * The key of the preference to work on + * @param labelText + * The text of the label + * @param container + * The container the GUI elements should be placed in + */ + public IntegerSQDevPreferenceEditor(String preferenceKey, String labelText, + Composite container) { + super(preferenceKey, labelText, container); + } + + /** + * Creates a new SQDevPreferenceEditor
    + * This constructor can only be used if the given container is an + * instance of ISQDevPreferenceComposite or one of it's parents + * is. + * + * @param preferenceKey + * The key of the preference to work on + * @param labelText + * The text of the label + * @param tooltip + * The tooltip that will be displayed on the editor's preference + * value-field + * @param container + * The container the GUI elements should be placed in + */ + public IntegerSQDevPreferenceEditor(String preferenceKey, String labelText, String tooltip, + Composite container) { + super(preferenceKey, labelText, tooltip, container); + } + + /** + * Creates a new SQDevPreferenceEditor + * + * @param preferenceKey + * The key of the preference to work on + * @param labelText + * The text of the label + * @param container + * The container the GUI elements should be placed in + * @param page + * The ISQDevPreferencePage this editor is apllied + * to + */ + public IntegerSQDevPreferenceEditor(String preferenceKey, String labelText, Composite container, + ISQDevPreferencePage page) { + super(preferenceKey, labelText, container, page); + } + + /** + * Creates a new SQDevPreferenceEditor + * + * @param preferenceKey + * The key of the preference to work on + * @param labelText + * The text of the label + * @param tooltip + * The tooltip that will be displayed on the editor's preference + * value-field + * @param container + * The container the GUI elements should be placed in + * @param page + * The ISQDevPreferencePage this editor is apllied + * to + */ + public IntegerSQDevPreferenceEditor(String preferenceKey, String labelText, String tooltip, + Composite container, ISQDevPreferencePage page) { + super(preferenceKey, labelText, tooltip, container, page); + } + + @Override + public boolean needsSave() { + return willNeedSave(numberSelector.getText()); + } + + @Override + public void doLoad() { + load(getPreferenceStore().getInt(getPreferenceKey())); + } + + @Override + public void doLoadDefault() { + load(getPreferenceStore().getDefaultInt(getPreferenceKey())); + } + + /** + * Loads the given value in the widget + * + * @param value + * The new value + */ + private void load(int value) { + if (numberSelector == null) { + initialValue = value; + } else { + if (numberSelector.isDisposed()) { + return; + } + + numberSelector.setSelection(value); + + evaluateInput(); + updateSaveStatus(String.valueOf(value)); + } + + changed(new SQDevChangeEvent(SQDevChangeEvent.SQDEV_VALUE_LOADED)); + } + + @Override + public void evaluateInput() { + EStatus status = EStatus.OK; + + int value = numberSelector.getSelection(); + + if (minIsSet && value < min) { + status = EStatus.ERROR; + status.setHint("The specified value has to be at least " + min + "!"); + setStatus(status); + return; + } + + if (maxIsSet && value > max) { + status = EStatus.ERROR; + status.setHint("The specified status exceeds " + max + "!"); + setStatus(status); + return; + } + + setStatus(status); + } + + @Override + public int getComponentCount() { + return 2; + } + + @Override + public void createComponents(Composite container) { + // label + label = new Label(container, SWT.NONE); + label.setText(getLabelText()); + label.setToolTipText(getTooltip()); + + numberSelector = new Spinner(container, SWT.BORDER); + numberSelector.setToolTipText(getTooltip()); + + if (minIsSet) { + numberSelector.setMinimum(min); + } + if (maxIsSet) { + numberSelector.setMaximum(max); + } + + numberSelector.addModifyListener(new ModifyListener() { + + @Override + public void modifyText(ModifyEvent e) { + // fire change event + changed(new SQDevChangeEvent(SQDevChangeEvent.SQDEV_VALUE_ABOUT_TO_CHANGE)); + + evaluateInput(); + + updateSaveStatus(String.valueOf(numberSelector.getSelection())); + } + }); + + load(initialValue); + } + + @Override + public boolean willNeedSave(String content) { + return getPreferenceStore().getInt(getPreferenceKey()) != Integer.parseInt(content); + } + + @Override + public boolean doSave() { + if (super.doSave()) { + getPreferenceStore().setValue(getPreferenceKey(), numberSelector.getSelection()); + + return true; + } else { + return false; + } + + } + + /** + * Sets the minimum value this editor may contain + * + * @param value + * The minimum value (inclusive) + */ + public void setMinValue(int value) { + if (numberSelector == null) { + min = value; + } else { + if (numberSelector.isDisposed()) { + return; + } + + numberSelector.setMinimum(value); + } + + minIsSet = true; + } + + /** + * Sets the maximum value this editor may contain + * + * @param value + * The maximum value (inclusive) + */ + public void setMaxValue(int value) { + if (numberSelector.isDisposed()) { + return; + } + + if (numberSelector == null) { + max = value; + } else { + numberSelector.setMaximum(value); + } + + maxIsSet = true; + } + +} diff --git a/plugin/SQDev/SQDev_0.5.3.zip b/plugin/SQDev/SQDev_0.5.3.zip new file mode 100644 index 00000000..14d4d3df Binary files /dev/null and b/plugin/SQDev/SQDev_0.5.3.zip differ diff --git a/plugin/SQDev/artifacts.jar b/plugin/SQDev/artifacts.jar index dd1ff5ed..d4cb480b 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 9f01cc23..466fd2a0 100644 Binary files a/plugin/SQDev/content.jar and b/plugin/SQDev/content.jar differ diff --git a/plugin/SQDev/features/raven.sqdev_0.5.3.jar b/plugin/SQDev/features/raven.sqdev_0.5.3.jar index e7522dfc..b7ede410 100644 Binary files a/plugin/SQDev/features/raven.sqdev_0.5.3.jar and b/plugin/SQDev/features/raven.sqdev_0.5.3.jar differ diff --git a/plugin/SQDev/features/raven.sqdev_0.6.0.jar b/plugin/SQDev/features/raven.sqdev_0.6.0.jar new file mode 100644 index 00000000..c65057ea Binary files /dev/null and b/plugin/SQDev/features/raven.sqdev_0.6.0.jar differ diff --git a/plugin/SQDev/plugins/raven.sqdev.editors.sqfeditor_0.3.0.jar b/plugin/SQDev/plugins/raven.sqdev.editors.sqfeditor_0.3.0.jar index 98f913ef..26aef363 100644 Binary files a/plugin/SQDev/plugins/raven.sqdev.editors.sqfeditor_0.3.0.jar and b/plugin/SQDev/plugins/raven.sqdev.editors.sqfeditor_0.3.0.jar differ diff --git a/plugin/SQDev/plugins/raven.sqdev.editors.sqfeditor_0.4.0.jar b/plugin/SQDev/plugins/raven.sqdev.editors.sqfeditor_0.4.0.jar new file mode 100644 index 00000000..4501431e Binary files /dev/null and b/plugin/SQDev/plugins/raven.sqdev.editors.sqfeditor_0.4.0.jar differ diff --git a/plugin/SQDev/plugins/raven.sqdev.editors_0.3.1.jar b/plugin/SQDev/plugins/raven.sqdev.editors_0.3.1.jar index 1242ef90..29801f45 100644 Binary files a/plugin/SQDev/plugins/raven.sqdev.editors_0.3.1.jar and b/plugin/SQDev/plugins/raven.sqdev.editors_0.3.1.jar differ diff --git a/plugin/SQDev/plugins/raven.sqdev.editors_0.4.0.jar b/plugin/SQDev/plugins/raven.sqdev.editors_0.4.0.jar new file mode 100644 index 00000000..c586932e Binary files /dev/null and b/plugin/SQDev/plugins/raven.sqdev.editors_0.4.0.jar differ diff --git a/plugin/SQDev/plugins/raven.sqdev.misc_0.2.0.jar b/plugin/SQDev/plugins/raven.sqdev.misc_0.2.0.jar index bde74e8f..b30dbc1a 100644 Binary files a/plugin/SQDev/plugins/raven.sqdev.misc_0.2.0.jar and b/plugin/SQDev/plugins/raven.sqdev.misc_0.2.0.jar differ diff --git a/plugin/SQDev/plugins/raven.sqdev.misc_0.3.0.jar b/plugin/SQDev/plugins/raven.sqdev.misc_0.3.0.jar new file mode 100644 index 00000000..2d93692d Binary files /dev/null and b/plugin/SQDev/plugins/raven.sqdev.misc_0.3.0.jar differ diff --git a/plugin/SQDev/plugins/raven.sqdev.preferences_0.3.0.jar b/plugin/SQDev/plugins/raven.sqdev.preferences_0.3.0.jar index 726ece84..d62ebe05 100644 Binary files a/plugin/SQDev/plugins/raven.sqdev.preferences_0.3.0.jar and b/plugin/SQDev/plugins/raven.sqdev.preferences_0.3.0.jar differ diff --git a/plugin/SQDev/plugins/raven.sqdev.preferences_0.4.0.jar b/plugin/SQDev/plugins/raven.sqdev.preferences_0.4.0.jar new file mode 100644 index 00000000..7fd6d1c9 Binary files /dev/null and b/plugin/SQDev/plugins/raven.sqdev.preferences_0.4.0.jar differ diff --git a/plugin/SQDev/plugins/raven.sqdev.util_0.5.3.jar b/plugin/SQDev/plugins/raven.sqdev.util_0.5.3.jar index 922f8e03..c439b2cb 100644 Binary files a/plugin/SQDev/plugins/raven.sqdev.util_0.5.3.jar and b/plugin/SQDev/plugins/raven.sqdev.util_0.5.3.jar differ diff --git a/plugin/SQDev/plugins/raven.sqdev.util_0.6.0.jar b/plugin/SQDev/plugins/raven.sqdev.util_0.6.0.jar new file mode 100644 index 00000000..81b28df9 Binary files /dev/null and b/plugin/SQDev/plugins/raven.sqdev.util_0.6.0.jar differ diff --git a/plugin/SQDev/plugins/raven.sqdev.wizards_0.2.1.jar b/plugin/SQDev/plugins/raven.sqdev.wizards_0.2.1.jar index c56c2dd9..1c660fbc 100644 Binary files a/plugin/SQDev/plugins/raven.sqdev.wizards_0.2.1.jar and b/plugin/SQDev/plugins/raven.sqdev.wizards_0.2.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 new file mode 100644 index 00000000..5ba9cd0a Binary files /dev/null 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 445ab56d..380b567f 100644 --- a/plugin/SQDev/site.xml +++ b/plugin/SQDev/site.xml @@ -1,6 +1,6 @@ - +