Changeset 1359


Ignore:
Timestamp:
Oct 8, 2011, 2:50:58 PM (6 years ago)
Author:
stefan
Message:

added suggestion for file creation for command \lstinputlisting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/jlatexeditor/codehelper/FileCreationSuggester.java

    r1271 r1359  
    2121 */
    2222public class FileCreationSuggester implements CodeAssistant, SCEPopup.ItemHandler {
    23   private PatternPair parameterPattern = new PatternPair("\\\\(input|include)\\{([^\\{]*)", "([^\\}]*)\\}");
     23  private PatternPair parameterPattern = new PatternPair("\\\\(input|include|lstinputlisting)(?:\\[[^\\]]*\\])?\\{([^\\{]*)", "([^\\}]*)\\}");
    2424
    2525  public FileCreationSuggester() {
     
    7777      try {
    7878        File file = action.getFile();
     79        file.getParentFile().mkdirs();
    7980        if (file.createNewFile())
    8081          SCEManager.getInstance().open(new Doc.FileDoc(file));
Note: See TracChangeset for help on using the changeset viewer.