Changeset 540
- Timestamp:
- 01/23/10 00:48:50 (3 years ago)
- Location:
- trunk/src/jlatexeditor
- Files:
-
- 3 modified
-
codehelper/BackgroundParser.java (modified) (3 diffs)
-
codehelper/BibParser.java (modified) (1 diff)
-
JLatexEditorJFrame.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/jlatexeditor/codehelper/BackgroundParser.java
r539 r540 2 2 3 3 import jlatexeditor.JLatexEditorJFrame; 4 import sce.component.AbstractResource; 4 5 import sce.component.SourceCodeEditor; 5 6 import util.ParseUtil; … … 26 27 while(true) { 27 28 try { 28 synchronized (this) { wait( 5000); }29 synchronized (this) { wait(1000); } 29 30 } catch (InterruptedException e) { } 30 31 31 32 SourceCodeEditor editor = jle.getMainEditor(); 32 String text = editor.getText(); 33 File directory = new File(editor.getResource().getName()).getParentFile(); 33 AbstractResource resource = editor.getResource(); 34 if(!(resource instanceof JLatexEditorJFrame.FileDoc)) continue; 35 36 String text= editor.getText(); 37 File file = ((JLatexEditorJFrame.FileDoc) resource).getFile(); 38 File directory = file.getParentFile(); 34 39 35 40 String bibCommand = "\\bibliography{"; … … 45 50 46 51 private void parseBib(File directory, String fileName) { 52 if(!fileName.endsWith(".bib")) fileName = fileName + ".bib"; 47 53 File bibFile = new File(directory, fileName); 48 54 if(bibFile.lastModified() == bibModified) return; -
trunk/src/jlatexeditor/codehelper/BibParser.java
r539 r540 53 53 entry.setBlock(block); 54 54 results.add(entry); 55 System.out.println(entry); 55 56 } 56 57 -
trunk/src/jlatexeditor/JLatexEditorJFrame.java
r539 r540 7 7 package jlatexeditor; 8 8 9 import jlatexeditor.codehelper.BackgroundParser; 9 10 import jlatexeditor.codehelper.JumpTo; 10 11 import jlatexeditor.codehelper.SpellCheckSuggester; … … 70 71 private final ProgramUpdater updater = new ProgramUpdater("JLatexEditor update", "http://endrullis.de/JLatexEditor/update/"); 71 72 73 // background parser 74 private BackgroundParser backgroundParser; 72 75 73 76 public static void main(String args[]){ … … 339 342 }.start(); 340 343 } 344 345 // background parser 346 backgroundParser = new BackgroundParser(this); 347 backgroundParser.start(); 341 348 } 342 349
![(please configure the [header_logo] section in trac.ini)](http://jlatexeditor.endrullis.de/chrome/site/logo.png)