Changeset 1112


Ignore:
Timestamp:
Jun 26, 2011, 6:10:13 PM (6 years ago)
Author:
stefan
Message:

added completion for parameters of \documentclass, \usepackage, \usetheme, \usecolortheme, \usefonttheme, \useinnertheme, \useoutertheme

Location:
trunk/src
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/de/endrullis/utils/CollectionUtils.java

    r744 r1112  
    11package de.endrullis.utils;
    22
     3import sun.org.mozilla.javascript.internal.Function;
     4import util.Function1;
     5
     6import java.util.ArrayList;
    37import java.util.Iterator;
     8import java.util.List;
    49
    510/**
     
    7681    }
    7782  }
     83
     84  public static <T,R> List<R> map(List<T> list, Function1<T,R> f) {
     85    ArrayList<R> newList = new ArrayList<R>();
     86    for (T t : list) {
     87      newList.add(f.apply(t));
     88    }
     89    return newList;
     90  }
    7891}
  • trunk/src/jlatexeditor/PackagesExtractor.java

    r1111 r1112  
    66import util.StreamUtils;
    77import util.TrieSet;
    8 
    9 import java.io.FileNotFoundException;
    10 import java.io.IOException;
    118
    129/**
     
    1815
    1916  private static PackageParser packageParser;
    20   private static PackageParser docclassesParser;
     17  private static PackageParser docClassesParser;
    2118
    2219  public static void main(String[] args) {
     
    2522
    2623      packageParser = new PackageParser(PACKAGES_FILE);
    27       docclassesParser = new PackageParser(DOCCLASSES_FILE);
     24      docClassesParser = new PackageParser(DOCCLASSES_FILE);
    2825
    2926      System.out.println((System.nanoTime() - startTime) / (1000 * 1000));
     
    3128      e.printStackTrace();
    3229    }
     30  }
     31
     32  public static PackageParser getPackageParser() {
     33    if (packageParser == null) {
     34      packageParser = new PackageParser(PACKAGES_FILE);
     35    }
     36    return packageParser;
     37  }
     38
     39  public static PackageParser getDocClassesParser() {
     40    if (docClassesParser == null) {
     41      docClassesParser = new PackageParser(DOCCLASSES_FILE);
     42    }
     43    return docClassesParser;
    3344  }
    3445
     
    8293      //System.out.println(e.getLineNumber());
    8394      super.fatalError(e);
     95    }
     96
     97    public TrieSet<Package> getPackages() {
     98      return packages;
     99    }
     100
     101    public TrieSet<Command> getCommands() {
     102      return commands;
    84103    }
    85104  }
  • trunk/src/jlatexeditor/SCEManager.java

    r1093 r1112  
    102102      }));
    103103    }
     104    codeHelper.addPatternHelper(new UsePackageCodeHelper());
     105    codeHelper.addPatternHelper(new DocumentClassCodeHelper());
     106    codeHelper.addPatternHelper(new BeamerCodeHelper());
    104107    codeHelper.addPatternHelper(new IncludeCodeHelper());
    105108    codeHelper.addPatternHelper(new CommandsCodeHelper());
     
    163166      codeHelper.addPatternHelper(new BibCodeHelper());
    164167    }
    165     codeHelper.addPatternHelper(new IncludeCodeHelper());
     168    //codeHelper.addPatternHelper(new IncludeCodeHelper());
    166169    codeHelper.addPatternHelper(new CommandsCodeHelper());
    167170    if (backgroundParser != null) {
  • trunk/src/jlatexeditor/codehelper/BackgroundParser.java

    r1048 r1112  
    369369          for (int i = 1; i < keys.size(); i++) {
    370370            String key = keys.get(i);
    371             if (entry.getText().toLowerCase().indexOf(key) == -1) {
     371            if (!entry.getText().toLowerCase().contains(key)) {
    372372              all = false;
    373373              break;
Note: See TracChangeset for help on using the changeset viewer.