Example #1
0
        internal static void OpenInclude()
        {
            Thread gothread = new Thread((ThreadStart) delegate {
                string LineNum    = NppFunctions.GetLine(NppFunctions.GetLineNumber());
                OpenMember Member = Include.HandleInclude(LineNum);

                if (Member != null)
                {
                    string FileLoc = "";

                    FileLoc = IBMiUtilities.DownloadMember(Member.GetLibrary(), Member.GetObject(), Member.GetMember());

                    if (FileLoc != "")
                    {
                        NppFunctions.OpenFile(FileLoc, true);
                    }
                    else
                    {
                        MessageBox.Show("Unable to download member " + Member.GetLibrary() + "/" + Member.GetObject() + "." + Member.GetMember() + ". Please check it exists and that you have access to the remote system.");
                    }
                }
                else
                {
                    MessageBox.Show("Unable to parse out member.");
                }
            });

            gothread.Start();
        }