Changeset 1118


Ignore:
Timestamp:
Jun 28, 2011, 9:09:28 PM (6 years ago)
Author:
stefan
Message:
 
Location:
trunk/src/jlatexeditor/quickhelp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/jlatexeditor/quickhelp/HelpUrlHandler.java

    r1117 r1118  
    4040        if (realUrlString.contains("#")) {
    4141          int index = realUrlString.indexOf("#");
    42           command = realUrlString.substring(index);
     42          command = realUrlString.substring(index + 1);
    4343
    44           //realUrlString = realUrlString.substring()
     44          realUrlString = realUrlString.substring(0, index);
    4545        }
    4646        URL realUrl = new URL(realUrlString);
    47 
    48         //String file = url.getPath().indexOf("#");
    4947
    5048        String content = HelpUrlHandler.getHelpTextAt(command, realUrl);
     
    6967
    7068    // append packages providing the command
    71     String commandsPack = getPackagesString(PackagesExtractor.getPackageParser().getCommands().get(command.substring(1)));
    72     String commandsDoc = getPackagesString(PackagesExtractor.getDocClassesParser().getCommands().get(command.substring(1)));
    73     if (commandsPack != null || commandsDoc != null) {
    74       content += "<h3>This command is provided by ...</h3>";
    75       content += "<ul>";
    76       if (commandsPack != null) {
    77         content += "<li><b>package(s)</b>: " + commandsPack + "</li>";
     69    if (command != null) {
     70      String commandsPack = getPackagesString(PackagesExtractor.getPackageParser().getCommands().get(command.substring(1)));
     71      String commandsDoc = getPackagesString(PackagesExtractor.getDocClassesParser().getCommands().get(command.substring(1)));
     72      if (commandsPack != null || commandsDoc != null) {
     73        content += "<h3>This command is provided by ...</h3>";
     74        content += "<ul>";
     75        if (commandsPack != null) {
     76          content += "<li><b>package(s)</b>: " + commandsPack + "</li>";
     77        }
     78        if (commandsDoc != null) {
     79          content += "<li><b>documentclass(es)</b>: " + commandsDoc + "</li>";
     80        }
     81        content += "</ul>";
    7882      }
    79       if (commandsDoc != null) {
    80         content += "<li><b>documentclass(es)</b>: " + commandsDoc + "</li>";
    81       }
    82       content += "</ul>";
    8383    }
    8484
  • trunk/src/jlatexeditor/quickhelp/LatexQuickHelp.java

    r1117 r1118  
    6262
    6363    HelpUrlHandler.register();
    64 
    65     System.out.println(1);
    66     try {
    67       new URL("help:asd//test").getContent();
    68     } catch (IOException e) {
    69       e.printStackTrace();
    70     }
    7164
    7265    // Open the table of contents
Note: See TracChangeset for help on using the changeset viewer.