Ejemplo n.º 1
0
        ///     Shows the body of the user code with the given method
        ///     name. This returns true if it was possible to show
        ///     the code, or false if not. We are never showing code
        ///     since we do not generate handler methods.
        protected bool ShowCode(object component, EventDescriptor e, string methodName)
        {
            EventDescription ev = new EventDescription(methodName, e);

            VisualPascalABC.CodeFileDocumentControl cfdc = VisualPascalABC.VisualPABCSingleton.MainForm._currentCodeFileDocument;
            cfdc.GenerateDesignerCode(ev);
            if (ev.editor != null)
            {
                cfdc.DesignerAndCodeTabs.SelectedTab = cfdc.TextPage;
                VisualPascalABC.VisualPABCSingleton.MainForm.VisualEnvironmentCompiler.ExecuteSourceLocationAction(
                    new PascalABCCompiler.SourceLocation(cfdc.FileName, ev.line_num, ev.column_num, ev.line_num, ev.column_num),
                    VisualPascalABCPlugins.SourceLocationAction.GotoBeg);
            }
            return(false);
        }