private void DrawOutputArea(Rect areaRect, float outputWidth)
        {
            GUILayout.BeginHorizontal();
            {
                GUILayout.Label(_texts["output_header"]);
                _outputFilterText = EditorGUILayout.TextField(_outputFilterText);
                if (RexHelper.Output.Any() && GUILayout.Button(_texts["output_clear"], GUILayout.Width(43f)))
                {
                    RexHelper.ClearOutput();
                }
            }
            GUILayout.EndHorizontal();

            EditorGUILayout.BeginVertical(slimBox);
            scroll3 = EditorGUILayout.BeginScrollView(scroll3);
            {
                foreach (var o in RexHelper.Output)
                {
                    if (o.Filter(_outputFilterText))
                    {
                        EditorGUILayout.BeginVertical(GUILayout.ExpandWidth(true));
                        o.DrawOutputUI();
                        DisplayLine();
                        EditorGUILayout.EndVertical();
                    }
                }
            }
            EditorGUILayout.EndScrollView();
            EditorGUILayout.EndVertical();
        }
Beispiel #2
0
        public void ClassSetup()
        {
            if (Parser == null)
                Parser = new RexParser();

            RexHelper.Variables.Clear();
            var expression = "1+1";
            var pResult = Parser.ParseAssignment(expression);
            var cResult = RexCompileEngine.Compile(pResult);
            var output = Execute(cResult);
            Assert.AreEqual(2, output.Value);

            RexHelper.Variables.Clear();
            RexHelper.ClearOutput();
        }