current work

git-svn-id: https://lsleditor.svn.sourceforge.net/svnroot/lsleditor@10 3f4676ac-adda-40fd-8265-58d1435b1672
This commit is contained in:
dimentox 2010-04-29 22:31:30 +00:00
parent 3151e1e342
commit e6edb01d66
3 changed files with 1067 additions and 972 deletions

View file

@ -2020,7 +2020,59 @@ namespace LSLEditor
EndUpdate();
}
}
public void doOutline()
{
//TODO: finish the outline class and such
// still a work in progress trying to figure out exactly how i wanna do this.
int len = this.Lines.Length;
if (len < 1)
{
return;
}
Dictionary<int, Helpers.OutlineHelper> list = new Dictionary<int, LSLEditor.Helpers.OutlineHelper>();
using (StringReader reader = new StringReader(this.Text))
{
string line;
int lineNumber = 0;
while ((line = reader.ReadLine()) != null)
{
string[] words = line.Split(' ');
foreach (string word in words)
{
if (keyWords.ContainsKeyWord(word))
{
KeyWordInfo k = keyWords.GetKeyWordInfo(word);
switch (k.type)
{
case KeyWordTypeEnum.Functions:
list.Add(lineNumber, new LSLEditor.Helpers.OutlineHelper(k, lineNumber));
break;
case KeyWordTypeEnum.Events:
break;
case KeyWordTypeEnum.Constants:
break;
case KeyWordTypeEnum.Class:
break;
case KeyWordTypeEnum.Vars:
break;
default:
break;
}
}
}
lineNumber++;
}
}
//TODO: parse dict and create the outline in the treeview
}
public void SaveCurrentFile(string strPath)
{
try

View file

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace LSLEditor.Helpers
{
class OutlineHelper
{
public KeyWordInfo info;
public int line;
public OutlineHelper(KeyWordInfo i, int l)
{
this.info = i;
this.line = l;
}
}
}

File diff suppressed because it is too large Load diff