public static ascx_SourceCodeViewer onTextChanged(this ascx_SourceCodeViewer sourceCodeViewer, Action <string> textChanged)
 {
     sourceCodeViewer.editor().eDocumentDataChanged += textChanged;
     return(sourceCodeViewer);
 }
Esempio n. 2
0
 public static ascx_SourceCodeViewer show(this ascx_SourceCodeViewer codeViewer, IO2Trace o2Trace)
 {
     codeViewer.editor().show(o2Trace);
     return(codeViewer);
 }
Esempio n. 3
0
 public static ascx_TraceTreeView afterSelect_ShowTraceInCodeViewer(this ascx_TraceTreeView traceViewer, ascx_SourceCodeViewer codeViewer)
 {
     return(traceViewer.afterSelect_ShowTraceInCodeEditor(codeViewer.editor()));
 }
Esempio n. 4
0
 public static TreeView after_TagSelect_showIn_SouceCodeViewer(this TreeView htmlTags_TreeView, ascx_SourceCodeViewer htmlCodeViewer)
 {
     htmlTags_TreeView.afterSelect <HtmlAgilityPack.HtmlNode>(
         (htmlNode) => {
         try
         {
             htmlCodeViewer.showHtmlNodeLocation(htmlNode);
             htmlCodeViewer.editor().caret(htmlNode.Line, htmlNode.LinePosition);
         }
         catch (Exception ex)
         {
             "[after_TagSelect_showIn_SouceCodeViewer] Error: {0}".error(ex.Message);
         }
     });
     return(htmlTags_TreeView);
 }
Esempio n. 5
0
 public static ascx_FindingsViewer set_CodeViewer(this ascx_FindingsViewer findingsViewer, ascx_SourceCodeViewer codeViewer)
 {
     return(findingsViewer.set_CodeEditor(codeViewer.editor()));
 }
Esempio n. 6
0
 public static TreeView jint_configure_showSelectionDetails(this TreeView treeView, ascx_SourceCodeViewer sourceCode, TextBox textBox)
 {
     return(treeView.jint_configure_showSelectionDetails(sourceCode, textBox, true));
 }
Esempio n. 7
0
 public static SourceCodeDescriptor highlightInCode(this SourceCodeDescriptor sourceCodeDescriptor, ascx_SourceCodeViewer codeViewer)
 {
     if (sourceCodeDescriptor != null)
     {
         var start = sourceCodeDescriptor.Start;
         var stop  = sourceCodeDescriptor.Stop;
         codeViewer.editor().selectTextWithColor(start.Line, start.Char + 1, stop.Line, stop.Char + 1);
         codeViewer.editor().caret(start.Line, start.Char + 1);
     }
     return(sourceCodeDescriptor);
 }
        // this wasn't working as expected

        /*public static void enableCodeComplete(this ascx_SourceCodeEditor sourceCodeEditor, ascx_SourceCodeEditor sourceCodeEditorToGrabCodeFrom)
         * {
         *  var o2CodeComplete = sourceCodeEditor.enableCodeComplete();
         *  o2CodeComplete.textEditorToGrabCodeFrom = sourceCodeEditorToGrabCodeFrom.getObject_TextEditorControl();
         * }
         * public static void enableCodeComplete(this ascx_SourceCodeViewer sourceCodeViewer, ascx_SourceCodeViewer sourceCodeViewerToGrabCodeFrom)
         * {
         *  sourceCodeViewer.editor().enableCodeComplete(sourceCodeViewerToGrabCodeFrom.editor());
         * }*/
        public static TextArea textArea(this ascx_SourceCodeViewer sourceCodeViewer)
        {
            return(sourceCodeViewer.editor().textArea());
        }
 public static O2CodeCompletion updateCodeComplete(this ascx_SourceCodeViewer sourceCodeViewer, CSharp_FastCompiler csharpFastCompiler)
 {
     return(sourceCodeViewer.editor().updateCodeComplete(csharpFastCompiler));
 }
 public static ascx_SourceCodeViewer open(this ascx_SourceCodeViewer sourceCodeViewer, string fileToOpen)
 {
     sourceCodeViewer.editor().loadSourceCodeFile(fileToOpen);
     return(sourceCodeViewer);
 }
 public static ascx_SourceCodeViewer enableCodeComplete(this ascx_SourceCodeViewer sourceCodeViewer)
 {
     sourceCodeViewer.editor().enableCodeComplete();
     return(sourceCodeViewer);
 }
 public static IDocument document(this ascx_SourceCodeViewer sourceCodeViewer)
 {
     return(sourceCodeViewer.editor().document());
 }
 public static ascx_SourceCodeViewer allowCompile(this ascx_SourceCodeViewer sourceCodeViewer, bool value)
 {
     sourceCodeViewer.editor().allowCodeCompilation = value;
     return(sourceCodeViewer);
 }
 public static ascx_SourceCodeEditor editor(this ascx_SourceCodeViewer sourceCodeViewer)
 {
     return(sourceCodeViewer.getSourceCodeEditor());
 }
Esempio n. 15
0
 public static TreeView jint_Show_AstTree(this TreeView treeView, Statement statement, ascx_SourceCodeViewer sourceCode, TextBox textBox)
 {
     //jint_configureTreeViewFor_JintView(treeView);
     jint_configure_showSelectionDetails(treeView, sourceCode, textBox, true);
     treeView.rootNode().jint_Show_AstTree(statement);
     return(treeView);
 }
 public static ascx_SourceCodeViewer set_Text(this ascx_SourceCodeViewer codeViewer, string text, string highlightForExtension)
 {
     codeViewer.editor().set_Text(text, highlightForExtension);
     return(codeViewer);
 }
Esempio n. 17
0
 public static SourceCodeDescriptor showDetails(this SourceCodeDescriptor sourceCodeDescriptor, ascx_SourceCodeViewer sourceCode, TextBox textBox)
 {
     if (sourceCode != null)
     {
         sourceCodeDescriptor.highlightInCode(sourceCode);
     }
     if (textBox != null)
     {
         sourceCodeDescriptor.showCodeSnippet(textBox);
     }
     return(sourceCodeDescriptor);
 }
 public static ascx_SourceCodeViewer load(this ascx_SourceCodeViewer codeViewer, string fileOrCode)
 {
     codeViewer.editor().load(fileOrCode);
     return(codeViewer);
 }
Esempio n. 19
0
        public static TreeView jint_configure_showSelectionDetails(this TreeView treeView, ascx_SourceCodeViewer sourceCode, TextBox textBox, bool alsoConfigureForJintView)
        {
            if (alsoConfigureForJintView && (sourceCode != null || textBox != null))
            {
                treeView.jint_configureTreeViewFor_JintView();
            }

            treeView.afterSelect <Statement>((statement) => statement.showDetails(sourceCode, textBox));

            treeView.afterSelect <List <Statement> >(
                (statements) => {
                if (statements.size() > 0)
                {
                    statements[0].showDetails(sourceCode, textBox);
                }
            });
            treeView.afterSelect <SourceCodeDescriptor>(
                (sourceCodeDescriptor) => sourceCodeDescriptor.showDetails(sourceCode, textBox));

            return(treeView);
        }
 public static Caret caret(this ascx_SourceCodeViewer codeViewer)
 {
     return(codeViewer.editor().caret());
 }
Esempio n. 21
0
 public static ascx_SourceCodeViewer showHtmlNodeLocation(this ascx_SourceCodeViewer codeViewer, HtmlAgilityPack.HtmlNode htmlNode)
 {
     codeViewer.editor().showHtmlNodeLocation(htmlNode);
     return(codeViewer);
 }
 public static ascx_SourceCodeViewer onCaretMove(this ascx_SourceCodeViewer codeViewer, Action <Caret> callback)
 {
     codeViewer.editor().onCaretMove(callback);
     return(codeViewer);
 }
Esempio n. 23
0
 public static ascx_TraceTreeView afterSelect_ShowTraceInCodeViewer(this ascx_TraceTreeView traceViewer, ascx_SourceCodeViewer codeViewer)
 {
     traceViewer._onTraceSelected +=
         (o2Trace) => {
         codeViewer.show(o2Trace);
         Application.DoEvents();
         traceViewer.focus();
     };
     return(traceViewer);
 }
 public static TextEditorControl textEditor(this ascx_SourceCodeViewer sourceCodeViewer)
 {
     return(sourceCodeViewer.textEditorControl());
 }
Esempio n. 25
0
 public static ascx_SourceCodeViewer show(this ascx_SourceCodeViewer codeViewer, IO2Finding o2Finding)
 {
     codeViewer.editor().show(o2Finding);
     return(codeViewer);
 }
 public static TextEditorControl textEditorControl(this ascx_SourceCodeViewer sourceCodeViewer)
 {
     return(sourceCodeViewer.editor().getObject_TextEditorControl());
 }
Esempio n. 27
0
 public static ascx_FindingsViewer afterSelect_ShowTraceInCodeViewer(this ascx_FindingsViewer findingsViewer, ascx_SourceCodeViewer codeViewer)
 {
     findingsViewer._onFindingSelected +=
         (o2Finding) => {
         codeViewer.show(o2Finding);
         Application.DoEvents();
         findingsViewer.focus();
     };
     findingsViewer._onTraceSelected +=
         (o2Trace) => {
         codeViewer.show(o2Trace);
         Application.DoEvents();
         findingsViewer.focus();
     };
     return(findingsViewer);
 }
 public static ascx_SourceCodeViewer showInCodeViewer(this ascx_SourceCodeViewer codeViewer, Java_Class _class, Java_Method method)
 {
     codeViewer.editor().showInCodeEditor(_class, method);
     return(codeViewer);
 }
/*		public static TreeNode add_InterfaceImplementations(this TreeNode treeNode, Method_CallMapping callMapping, Dictionary<string, Method_CallMapping> callMappings , Dictionary<string, Java_Method> methods_bySignature, Dictionary<string, List<Java_Class>> classes_MappedTo_Implementations)
 *              {
 *                      if (methods_bySignature.hasKey(callMapping.Signature))
 *                      {
 *                              var method = methods_bySignature[callMapping.Signature];
 *                              if (method.IsAbstract)
 *                              {
 *                                      var implementations = method.implementations(classes_MappedTo_Implementations);
 *                                      var implementationsNode = treeNode.add_Node("_Implementations");
 *                                      if (implementations.size()==0)
 *                                              implementationsNode.add_Node("..no implementations found..");
 *                                      else
 *                                              foreach(var implementation in implementations)
 *                                                      if (callMappings.hasKey(implementation.Signature))
 *                                                      {
 *                                                              var callMappingImplementation = callMappings[implementation.Signature];
 *                                                              implementationsNode.add_Node(callMappingImplementation.str(), callMappingImplementation, true)
 *                                                                                                 .color(Color.Sienna);
 *                                                      }
 *                                                      else
 *                                                              implementationsNode.add_Node(implementation.Signature);
 *
 *                              }
 *                      }
 *                      return treeNode;
 *              }
 */

        public static JavaMetadata_XRefs showInCodeViewer(this JavaMetadata_XRefs xRefs, ascx_SourceCodeViewer codeViewer, string signature)
        {
            if (xRefs.Methods_by_Signature.hasKey(signature))
            {
                var method = xRefs.Methods_by_Signature[signature];
                var _class = xRefs.Classes_by_Signature[method.ClassName];
                codeViewer.showInCodeViewer(_class, method);
            }
            return(xRefs);
        }
 public static ascx_SourceCodeViewer onClick(this ascx_SourceCodeViewer codeViewer, MethodInvoker callback)
 {
     codeViewer.editor().onClick(callback);
     return(codeViewer);
 }