Changeset 33649
- Timestamp:
- 05/28/09 20:09:43 (4 years ago)
- Location:
- lang/csharp/soyText/soyText
- Files:
-
- 15 modified
-
AttributeCondition.cs (modified) (1 diff)
-
DocumentList.cs (modified) (1 diff)
-
EditorTab.cs (modified) (1 diff)
-
Form2.Designer.cs (modified) (5 diffs)
-
Form2.cs (modified) (1 diff)
-
ParsedDocument.cs (modified) (2 diffs)
-
SearchCondition.cs (modified) (1 diff)
-
SearchLogSet.cs (modified) (1 diff)
-
bin/Debug/soyText.application (modified) (1 diff)
-
bin/Debug/soyText.exe (modified) (previous)
-
bin/Debug/soyText.exe.manifest (modified) (2 diffs)
-
bin/Debug/soyText.pdb (modified) (previous)
-
bin/Debug/soyText.vshost.application (modified) (1 diff)
-
soyText.csproj (modified) (1 diff)
-
soyText.suo (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
lang/csharp/soyText/soyText/AttributeCondition.cs
r32951 r33649 6 6 namespace SoyText 7 7 { 8 class AttributeCondition8 internal class AttributeCondition: SearchCondition 9 9 { 10 public string key; 11 public string value; 12 10 string key; 11 string value; 12 public AttributeCondition(string key, string value) 13 { 14 this.key = key; 15 this.value = value.ToLower(); 16 } 17 public override bool matches(Document d) 18 { 19 var a=d.parsed[key]; 20 return a!=null && a.ToLower().IndexOf(value) >= 0; 21 } 22 public override bool matches(DocumentLine d) 23 { 24 return false; 25 } 13 26 } 14 27 } -
lang/csharp/soyText/soyText/DocumentList.cs
r33578 r33649 8 8 public class DocumentList: SortedList<long,Document> 9 9 { 10 public void add(Document d) 11 { 12 Add(d.uniqueLastUpdate, d); 13 } 10 14 } 11 15 } -
lang/csharp/soyText/soyText/EditorTab.cs
r33484 r33649 223 223 } 224 224 TerminableThread tth = new TerminableThread(); 225 private void Form1_KeyDown(object sender, KeyEventArgs e) 226 { 227 if (e.KeyCode.Equals(Keys.F11)) 228 { 229 /*new Thread(delegate() 230 { 231 var oldActive = documentSet.getOldestActiveDocument(); 232 workspace.indexer.make(oldActive); 233 }).Start();*/ 234 } 235 if (e.KeyCode.Equals(Keys.F9)) 236 { 237 var p = new PythonEngine(); 238 var res = p.evaluate(this , curDoc.parsed.cdr); 239 //Debug.print(res); 240 Text = res; 241 /* 242 tth.exec(delegate(TerminableThread t) 243 { 244 for (var i = 0; i < 20; i++) 245 { 246 Debug.print("TTH " + i); 247 Thread.Sleep(500); 248 if (t.terminated) break; 249 } 250 }); 251 Text = curDoc.parsed.getValue("title");*/ 252 } 253 } 225 254 226 255 227 private void NewMenuItem_Click(object sender, EventArgs e) -
lang/csharp/soyText/soyText/Form2.Designer.cs
r33507 r33649 50 50 this.閉じるCToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 51 51 this.tabControl1 = new SoyText.TabControl2(); 52 this.tESTToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 52 53 this.menuStrip1.SuspendLayout(); 53 54 this.tabMenu.SuspendLayout(); … … 163 164 // 164 165 this.実行RToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 165 this.外部プログラムを実行RToolStripMenuItem}); 166 this.外部プログラムを実行RToolStripMenuItem, 167 this.tESTToolStripMenuItem}); 166 168 this.実行RToolStripMenuItem.Name = "実行RToolStripMenuItem"; 167 169 this.実行RToolStripMenuItem.Size = new System.Drawing.Size(57, 20); … … 186 188 this.閉じるCToolStripMenuItem}); 187 189 this.tabMenu.Name = "tabMenu"; 188 this.tabMenu.Size = new System.Drawing.Size(1 53, 48);190 this.tabMenu.Size = new System.Drawing.Size(117, 26); 189 191 // 190 192 // 閉じるCToolStripMenuItem 191 193 // 192 194 this.閉じるCToolStripMenuItem.Name = "閉じるCToolStripMenuItem"; 193 this.閉じるCToolStripMenuItem.Size = new System.Drawing.Size(1 52, 22);195 this.閉じるCToolStripMenuItem.Size = new System.Drawing.Size(116, 22); 194 196 this.閉じるCToolStripMenuItem.Text = "閉じる(&C)"; 195 197 this.閉じるCToolStripMenuItem.Click += new System.EventHandler(this.閉じるCToolStripMenuItem_Click); … … 206 208 this.tabControl1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.tabControl1_MouseDown); 207 209 this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); 210 // 211 // tESTToolStripMenuItem 212 // 213 this.tESTToolStripMenuItem.Name = "tESTToolStripMenuItem"; 214 this.tESTToolStripMenuItem.Size = new System.Drawing.Size(206, 22); 215 this.tESTToolStripMenuItem.Text = "TEST"; 216 this.tESTToolStripMenuItem.Click += new System.EventHandler(this.tESTToolStripMenuItem_Click); 208 217 // 209 218 // Form2 … … 250 259 private ContextMenuStrip tabMenu; 251 260 private ToolStripMenuItem 閉じるCToolStripMenuItem; 261 private ToolStripMenuItem tESTToolStripMenuItem; 252 262 } 253 263 } -
lang/csharp/soyText/soyText/Form2.cs
r33578 r33649 162 162 } 163 163 164 private void tESTToolStripMenuItem_Click(object sender, EventArgs e) 165 { 166 curTab.curDoc.parsed.setValue("test", "desu"); 167 curTab.curDoc.save(); 168 } 169 164 170 } 165 171 } -
lang/csharp/soyText/soyText/ParsedDocument.cs
r33484 r33649 42 42 cdr = ""; 43 43 var newLines = ""; 44 var valueSetted = false; 44 45 foreach (var line in Regex.Split(src.content, "\r*\n")) 45 46 { 46 47 if (resting) { newLines += line + "\n"; continue; } 47 48 var m = Regex.Match(line, "^[ \t]*$"); 48 var valueSetted = false;49 49 if (m.Success) 50 50 { 51 51 if (!valueSetted) 52 52 { 53 newLines += key + ": " + value + "\ n";53 newLines += key + ": " + value + "\r\n"; 54 54 } 55 55 resting = true; … … 62 62 if (k.Equals(key)) 63 63 { 64 newLines += key + ": " + value + "\ n";64 newLines += key + ": " + value + "\r\n"; 65 65 valueSetted = true; 66 66 } 67 67 else 68 68 { 69 newLines += line + "\ n";69 newLines += line + "\r\n"; 70 70 } 71 71 } 72 72 else 73 73 { 74 newLines += line + "\ n";74 newLines += line + "\r\n"; 75 75 } 76 76 } -
lang/csharp/soyText/soyText/SearchCondition.cs
r32912 r33649 16 16 if (s.Length == 1) 17 17 { 18 return new KeywordCondition(expr); 18 var n = new Reg("^-"); 19 if (n.m(s[0])) 20 { 21 return new NotCondition(fromExpression(n.post)); 22 } 23 var r = new Reg("^([^:]+):"); 24 if (r.m(s[0])) 25 { 26 return new AttributeCondition(r[1], r.post); 27 } 28 else 29 { 30 return new KeywordCondition(expr); 31 } 19 32 } 20 33 if (s.Length == 0) -
lang/csharp/soyText/soyText/SearchLogSet.cs
r33578 r33649 9 9 { 10 10 DocumentSet superSet; 11 DocumentList list = null; 12 internal bool addIfContains(Document d) 11 public SearchLogSet(DocumentSet superSet) 12 { 13 this.superSet = superSet; 14 list = new Dictionary<string, Document>(); 15 recents = new DocumentList(); 16 } 17 Dictionary<string,Document> list = null; 18 DocumentList recents; 19 20 internal bool add(Document d) 13 21 { 14 22 if (d.parsed["type"] != "SearchLog") return false; 15 list.Add(d.uniqueLastUpdate, d); 23 var c=d.parsed["condition"]; 24 if (!list.ContainsKey(c)) { 25 list[c]=d; 26 recents.add(d); 27 } 16 28 return true; 17 29 } 18 30 internal DocumentList getRecents() 19 31 { 20 return list; 32 return recents; 33 } 34 public void add(string searchExpr) 35 { 36 var c = searchExpr; 37 if (!list.ContainsKey(c)) 38 { 39 var d = superSet.createDocument(); 40 d.parsed["type"] = "SearchLog"; 41 d.parsed["condition"] = c; 42 d.save(); 43 add(d); 44 } 21 45 } 22 46 } -
lang/csharp/soyText/soyText/bin/Debug/soyText.application
r33578 r33649 12 12 </dsig:Transforms> 13 13 <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> 14 <dsig:DigestValue> yllOjAJh5FQBMq+0fPbgiYaPPIY=</dsig:DigestValue>14 <dsig:DigestValue>NzImv/+409azqvCZyF3CI7ckSG0=</dsig:DigestValue> 15 15 </hash> 16 16 </dependentAssembly> -
lang/csharp/soyText/soyText/bin/Debug/soyText.exe.manifest
r33578 r33649 113 113 </dependency> 114 114 <dependency> 115 <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="soyText.exe" size=" 79872">115 <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="soyText.exe" size="80896"> 116 116 <assemblyIdentity name="soyText" version="1.0.0.0" language="neutral" processorArchitecture="msil" /> 117 117 <hash> … … 120 120 </dsig:Transforms> 121 121 <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> 122 <dsig:DigestValue> SM+YQyrIGxxBmOx2qOf4KCKAS44=</dsig:DigestValue>122 <dsig:DigestValue>xoIpTSHlzPf6s71Jq19Wy0TeQ30=</dsig:DigestValue> 123 123 </hash> 124 124 </dependentAssembly> -
lang/csharp/soyText/soyText/bin/Debug/soyText.vshost.application
r33578 r33649 12 12 </dsig:Transforms> 13 13 <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> 14 <dsig:DigestValue> yllOjAJh5FQBMq+0fPbgiYaPPIY=</dsig:DigestValue>14 <dsig:DigestValue>NzImv/+409azqvCZyF3CI7ckSG0=</dsig:DigestValue> 15 15 </hash> 16 16 </dependentAssembly> -
lang/csharp/soyText/soyText/soyText.csproj
r33578 r33649 135 135 <Compile Include="MatchLine.cs" /> 136 136 <Compile Include="Mkdir.cs" /> 137 <Compile Include="NotCondition.cs" /> 137 138 <Compile Include="ParsedDocument.cs" /> 138 139 <Compile Include="ProcessExecutor.cs" />
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)