private void RecurseDirectory(List<PlsqlObject> plsqlObjects, string directoryPath)
        {
            DirectoryInfo di = new DirectoryInfo(directoryPath);

            if (di.GetDirectories().Length > 0)
            {
                foreach (DirectoryInfo dir in di.GetDirectories())
                {
                    RecurseDirectory(plsqlObjects, dir.FullName);
                }
            }

            foreach (FileInfo file in di.GetFiles())
            {
                List<string> list = new List<string>(PlsqlConstants.plsqlAnalyzedEtensions);
                if (!list.Contains(file.Extension))
                    continue;

                IParser p = new LineBasedParser(file.FullName);

                if (p.Objects.Count > 0)
                {
                    foreach (PlsqlObject o in p.Objects)
                    {
                        plsqlObjects.Add(o); 
                    }
                }
            }
        }
        void test2()
        {
            var file = @"C:\Users\Kaarel\Documents\My Dropbox\PlSQLParser\TestData\LAEN.TEST.PKB";

            IParser lbp = new LineBasedParser(file);
            
            foreach (PlsqlObject i in lbp.Objects)
            {
                Console.WriteLine(i);
            }

            //NotepadPlusPlusUtil.OpenFileOnLineNumber(lbp.Objects[0].fileName, lbp.Objects[0].lineNumberStarting);
            Console.ReadLine();
        }
        private void button2_Click(object sender, EventArgs e)
        {            
            var file = @"C:\Documents and Settings\K.FS7020\My Documents\My Dropbox\"
                + @"PlSQLParser\TestData\GL_LOAN.TEST.PKB";
            IParser lbp = new LineBasedParser(file);

            foreach (PlsqlObject i in lbp.Objects)
            {
                ListViewItem item = new ListViewItem(i.type.ToString().Substring(0, 1));
                //item.SubItems.Add(i.type.ToString().Substring(0, 1));
                item.SubItems.Add(i.name);
                item.SubItems.Add(i.fileName);
                item.SubItems.Add(i.lineNumberStarting.ToString());
                listView1.Items.Add(item);
            }

            //NotepadPlusPlusUtil.OpenFileOnLineNumber(lbp.Objects[0].fileName, lbp.Objects[0].lineNumber);
        }
        private void ParseThreadFunc(object filename)

        {
            IParser parser = new LineBasedParser(filename.ToString());
            _plSqlObjects = parser.Objects;            
        }