first help in Smarty CC, including URL for external browser
authorMartin Fousek <marfous@netbeans.org>
Tue, 08 Jun 2010 15:19:58 +0200
changeset 16324d7934425e846
parent 16317 30816fda5c18
child 16325 7aa21f42a190
first help in Smarty CC, including URL for external browser
php.smarty/manifest.mf
php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/TplCompletionItem.java
php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/TplCompletionProvider.java
php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/CCDataBuiltInFunction.java
php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/CodeCompletionEntries.java
php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/CodeCompletionItemAttributes.java
php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/CodeCompletionItemBuiltInFunctionsAtributes.java
php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/EntryMetadata.java
php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/TplCodeCompletionData.java
php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/defs/built-in-functions.xml
php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/defs/variable-modifiers.xml
     1.1 --- a/php.smarty/manifest.mf	Mon Jun 07 10:06:41 2010 +0200
     1.2 +++ b/php.smarty/manifest.mf	Tue Jun 08 15:19:58 2010 +0200
     1.3 @@ -2,5 +2,5 @@
     1.4  OpenIDE-Module: org.netbeans.modules.php.smarty
     1.5  OpenIDE-Module-Layer: org/netbeans/modules/php/smarty/resources/layer.xml
     1.6  OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/php/smarty/resources/Bundle.properties
     1.7 -OpenIDE-Module-Specification-Version: 1.27
     1.8 +OpenIDE-Module-Specification-Version: 1.28
     1.9  
     2.1 --- a/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/TplCompletionItem.java	Mon Jun 07 10:06:41 2010 +0200
     2.2 +++ b/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/TplCompletionItem.java	Tue Jun 08 15:19:58 2010 +0200
     2.3 @@ -70,7 +70,7 @@
     2.4  
     2.5      //------------------------------------------
     2.6      protected int substitutionOffset;
     2.7 -    protected String text, helpId;
     2.8 +    protected String text, help, helpUrl;
     2.9      protected boolean shift;
    2.10  
    2.11      protected TplCompletionItem(String text, int substituteOffset) {
    2.12 @@ -78,15 +78,20 @@
    2.13          this.text = text;
    2.14      }
    2.15  
    2.16 -    protected TplCompletionItem(String text, int substituteOffset, String helpId) {
    2.17 +    protected TplCompletionItem(String text, int substituteOffset, String help, String helpUrl) {
    2.18          this(text, substituteOffset);
    2.19 -        this.helpId = helpId;
    2.20 +        this.help = help;
    2.21 +        this.helpUrl = helpUrl;
    2.22      }
    2.23  
    2.24      public String getItemText() {
    2.25          return text;
    2.26      }
    2.27  
    2.28 +    public String getItemHelp() {
    2.29 +        return help;
    2.30 +    }
    2.31 +
    2.32      public int getSortPriority() {
    2.33          return DEFAULT_SORT_PRIORITY;
    2.34      }
    2.35 @@ -234,36 +239,32 @@
    2.36          return null;
    2.37      }
    2.38  
    2.39 -    public String getHelpId() {
    2.40 -        return this.helpId;
    2.41 +    /** Returns help for the item. If the item doesn't have a help than returns null.
    2.42 +     *  The class can overwrite this method and compounds the help realtime.
    2.43 +     */
    2.44 +    public String getHelp() {
    2.45 +        return getItemHelp();
    2.46 +    }
    2.47 +
    2.48 +    /** Returns whether the item has a help.
    2.49 +     */
    2.50 +    public boolean hasHelp() {
    2.51 +        return (help != null && help.length() > 0);
    2.52      }
    2.53  
    2.54      /** Returns a url or null, if the help is not URL or the help is not defined.
    2.55       */
    2.56      public URL getHelpURL() {
    2.57 -        if (helpId == null || helpId.equals("")) {
    2.58 +        if (help == null || help.equals("")) {
    2.59              return null;
    2.60          }
    2.61          try {
    2.62 -            return new URL(helpId);
    2.63 +            return new URL(helpUrl);
    2.64          } catch (java.io.IOException e) {
    2.65          }
    2.66          return null;
    2.67      }
    2.68  
    2.69 -    /** Returns help for the item. It can be only url. If the item doesn't have a help
    2.70 -     *  than returns null. The class can overwrite this method and compounds the help realtime.
    2.71 -     */
    2.72 -    public String getHelp() {
    2.73 -        return null;
    2.74 -    }
    2.75 -
    2.76 -    /** Returns whether the item has a help.
    2.77 -     */
    2.78 -    public boolean hasHelp() {
    2.79 -        return (helpId != null && helpId.length() > 0);
    2.80 -    }
    2.81 -
    2.82      public CompletionTask createDocumentationTask() {
    2.83          return new AsyncCompletionTask(new TplCompletionProvider.DocQuery(this));
    2.84      }
    2.85 @@ -276,8 +277,8 @@
    2.86  
    2.87          protected static final String ATTR_NAME_COLOR = hexColorCode(Color.green.darker());
    2.88  
    2.89 -        public BuiltInFunction(String value, int offset, String helpId) {
    2.90 -            super(value, offset, helpId);
    2.91 +        public BuiltInFunction(String value, int offset, String help, String helpUrl) {
    2.92 +            super(value, offset, help, helpUrl);
    2.93          }
    2.94  
    2.95          @Override
    2.96 @@ -296,8 +297,8 @@
    2.97  
    2.98          protected static final String ATTR_NAME_COLOR = hexColorCode(Color.blue.darker());
    2.99  
   2.100 -        public VariableModifiers(String value, int offset, String helpId) {
   2.101 -            super(value, offset, helpId);
   2.102 +        public VariableModifiers(String value, int offset, String help, String helpUrl) {
   2.103 +            super(value, offset, help, helpUrl);
   2.104          }
   2.105  
   2.106          @Override
     3.1 --- a/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/TplCompletionProvider.java	Mon Jun 07 10:06:41 2010 +0200
     3.2 +++ b/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/TplCompletionProvider.java	Tue Jun 08 15:19:58 2010 +0200
     3.3 @@ -203,9 +203,9 @@
     3.4                  }
     3.5              }
     3.6              TplCompletionItem tplItem = (TplCompletionItem) item;
     3.7 -//            if (tplItem != null && tplItem.getHelp() != null) {
     3.8 -//                resultSet.setDocumentation(new DocItem(tplItem));
     3.9 -//            }
    3.10 +            if (tplItem != null && tplItem.getHelp() != null) {
    3.11 +                resultSet.setDocumentation(new DocItem(tplItem));
    3.12 +            }
    3.13          }
    3.14      }
    3.15  
    3.16 @@ -389,35 +389,36 @@
    3.17  //        }
    3.18  //    }
    3.19  //
    3.20 -//    private static class DocItem implements CompletionDocumentation {
    3.21 -//
    3.22 -//        TplCompletionItem item;
    3.23 -//
    3.24 -//        public DocItem(TplCompletionItem ri) {
    3.25 -//            this.item = ri;
    3.26 -//        }
    3.27 -//
    3.28 -//        @Override
    3.29 -//        public String getText() {
    3.30 -//            return item.getHelp();
    3.31 -//        }
    3.32 -//
    3.33 -//        @Override
    3.34 -//        public URL getURL() {
    3.35 -//            return item.getHelpURL();
    3.36 -//        }
    3.37 -//
    3.38 -//        @Override
    3.39 -//        public CompletionDocumentation resolveLink(String link) {
    3.40 +    private static class DocItem implements CompletionDocumentation {
    3.41 +
    3.42 +        TplCompletionItem item;
    3.43 +
    3.44 +        public DocItem(TplCompletionItem tci) {
    3.45 +            this.item = tci;
    3.46 +        }
    3.47 +
    3.48 +        @Override
    3.49 +        public String getText() {
    3.50 +            return item.getHelp();
    3.51 +        }
    3.52 +
    3.53 +        @Override
    3.54 +        public URL getURL() {
    3.55 +            return item.getHelpURL();
    3.56 +        }
    3.57 +
    3.58 +        @Override
    3.59 +        public CompletionDocumentation resolveLink(String link) {
    3.60  //            URL itemUrl = HelpManager.getDefault().getHelpURL(item.getHelpId());
    3.61  //            return itemUrl != null ?
    3.62  //                new LinkDocItem(HelpManager.getDefault().getRelativeURL(itemUrl, link)) :
    3.63  //                new NoDocItem();
    3.64 -//        }
    3.65 -//
    3.66 -//        @Override
    3.67 -//        public Action getGotoSourceAction() {
    3.68 -//            return null;
    3.69 -//        }
    3.70 -//    }
    3.71 +            return null;
    3.72 +        }
    3.73 +
    3.74 +        @Override
    3.75 +        public Action getGotoSourceAction() {
    3.76 +            return null;
    3.77 +        }
    3.78 +    }
    3.79  }
     4.1 --- a/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/CCDataBuiltInFunction.java	Mon Jun 07 10:06:41 2010 +0200
     4.2 +++ b/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/CCDataBuiltInFunction.java	Tue Jun 08 15:19:58 2010 +0200
     4.3 @@ -45,8 +45,8 @@
     4.4   */
     4.5  public class CCDataBuiltInFunction extends EntryMetadata {
     4.6  
     4.7 -    public CCDataBuiltInFunction(String keyword, String help) {
     4.8 -       super(keyword, help);
     4.9 +    public CCDataBuiltInFunction(String keyword, String help, String helpUrl) {
    4.10 +       super(keyword, help, helpUrl);
    4.11      }
    4.12  
    4.13  
     5.1 --- a/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/CodeCompletionEntries.java	Mon Jun 07 10:06:41 2010 +0200
     5.2 +++ b/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/CodeCompletionEntries.java	Tue Jun 08 15:19:58 2010 +0200
     5.3 @@ -80,14 +80,13 @@
     5.4                  if (ccNode.getNodeType() == Node.ELEMENT_NODE){
     5.5                      Element elem = (Element) ccNode;
     5.6                      NodeList desc = elem.getElementsByTagName("description");
     5.7 -                    ccEntries.add(new CCDataBuiltInFunction(elem.getAttribute("name"), desc.item(0).getTextContent()));
     5.8 +                    NodeList url = elem.getElementsByTagName("url");
     5.9 +                    ccEntries.add(new CCDataBuiltInFunction(elem.getAttribute("name"), desc.item(0).getTextContent(), url.item(0).getTextContent()));
    5.10                  }
    5.11              }
    5.12          }
    5.13  
    5.14          return ccEntries;
    5.15      }
    5.16 -
    5.17 -    
    5.18      
    5.19  }
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/CodeCompletionItemAttributes.java	Tue Jun 08 15:19:58 2010 +0200
     6.3 @@ -0,0 +1,56 @@
     6.4 +/*
     6.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     6.6 + *
     6.7 + * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
     6.8 + *
     6.9 + * The contents of this file are subject to the terms of either the GNU
    6.10 + * General Public License Version 2 only ("GPL") or the Common
    6.11 + * Development and Distribution License("CDDL") (collectively, the
    6.12 + * "License"). You may not use this file except in compliance with the
    6.13 + * License. You can obtain a copy of the License at
    6.14 + * http://www.netbeans.org/cddl-gplv2.html
    6.15 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    6.16 + * specific language governing permissions and limitations under the
    6.17 + * License.  When distributing the software, include this License Header
    6.18 + * Notice in each file and include the License file at
    6.19 + * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
    6.20 + * particular file as subject to the "Classpath" exception as provided
    6.21 + * by Sun in the GPL Version 2 section of the License file that
    6.22 + * accompanied this code. If applicable, add the following below the
    6.23 + * License Header, with the fields enclosed by brackets [] replaced by
    6.24 + * your own identifying information:
    6.25 + * "Portions Copyrighted [year] [name of copyright owner]"
    6.26 + *
    6.27 + * If you wish your version of this file to be governed by only the CDDL
    6.28 + * or only the GPL Version 2, indicate your decision by adding
    6.29 + * "[Contributor] elects to include this software in this distribution
    6.30 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
    6.31 + * single choice of license, a recipient has the option to distribute
    6.32 + * your version of this file under either the CDDL, the GPL Version 2 or
    6.33 + * to extend the choice of license to its licensees as provided above.
    6.34 + * However, if you add GPL Version 2 code and therefore, elected the GPL
    6.35 + * Version 2 license, then the option applies only if the new code is
    6.36 + * made subject to such option by the copyright holder.
    6.37 + *
    6.38 + * Contributor(s):
    6.39 + *
    6.40 + * Portions Copyrighted 2010 Sun Microsystems, Inc.
    6.41 + */
    6.42 +
    6.43 +package org.netbeans.modules.php.smarty.editor.completion.entries;
    6.44 +
    6.45 +/**
    6.46 + *
    6.47 + * @author Martin Fousek
    6.48 + */
    6.49 +public class CodeCompletionItemAttributes {
    6.50 +    private String attType, attRequired, attDefault, addDescription;
    6.51 +
    6.52 +    public CodeCompletionItemAttributes(String attType, String attRequired, String attDefault, String addDescription) {
    6.53 +        this.attType = attType;
    6.54 +        this.attRequired = attRequired;
    6.55 +        this.attDefault = attDefault;
    6.56 +        this.addDescription = addDescription;
    6.57 +    }
    6.58 +
    6.59 +}
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/CodeCompletionItemBuiltInFunctionsAtributes.java	Tue Jun 08 15:19:58 2010 +0200
     7.3 @@ -0,0 +1,58 @@
     7.4 +/*
     7.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     7.6 + *
     7.7 + * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
     7.8 + *
     7.9 + * The contents of this file are subject to the terms of either the GNU
    7.10 + * General Public License Version 2 only ("GPL") or the Common
    7.11 + * Development and Distribution License("CDDL") (collectively, the
    7.12 + * "License"). You may not use this file except in compliance with the
    7.13 + * License. You can obtain a copy of the License at
    7.14 + * http://www.netbeans.org/cddl-gplv2.html
    7.15 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    7.16 + * specific language governing permissions and limitations under the
    7.17 + * License.  When distributing the software, include this License Header
    7.18 + * Notice in each file and include the License file at
    7.19 + * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
    7.20 + * particular file as subject to the "Classpath" exception as provided
    7.21 + * by Sun in the GPL Version 2 section of the License file that
    7.22 + * accompanied this code. If applicable, add the following below the
    7.23 + * License Header, with the fields enclosed by brackets [] replaced by
    7.24 + * your own identifying information:
    7.25 + * "Portions Copyrighted [year] [name of copyright owner]"
    7.26 + *
    7.27 + * If you wish your version of this file to be governed by only the CDDL
    7.28 + * or only the GPL Version 2, indicate your decision by adding
    7.29 + * "[Contributor] elects to include this software in this distribution
    7.30 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
    7.31 + * single choice of license, a recipient has the option to distribute
    7.32 + * your version of this file under either the CDDL, the GPL Version 2 or
    7.33 + * to extend the choice of license to its licensees as provided above.
    7.34 + * However, if you add GPL Version 2 code and therefore, elected the GPL
    7.35 + * Version 2 license, then the option applies only if the new code is
    7.36 + * made subject to such option by the copyright holder.
    7.37 + *
    7.38 + * Contributor(s):
    7.39 + *
    7.40 + * Portions Copyrighted 2010 Sun Microsystems, Inc.
    7.41 + */
    7.42 +
    7.43 +package org.netbeans.modules.php.smarty.editor.completion.entries;
    7.44 +
    7.45 +/**
    7.46 + *
    7.47 + * @author Martin Fousek
    7.48 + */
    7.49 +public class CodeCompletionItemBuiltInFunctionsAtributes extends CodeCompletionItemAttributes {
    7.50 +    private String attName;
    7.51 +
    7.52 +    public CodeCompletionItemBuiltInFunctionsAtributes(String attName, String attType, String attRequired, String attDefault, String addDescription) {
    7.53 +        super(attType, attRequired, attDefault, addDescription);
    7.54 +        this.attName = attName;
    7.55 +    }
    7.56 +
    7.57 +    public String getHelp() {
    7.58 +        return attName;
    7.59 +    }
    7.60 +
    7.61 +}
     8.1 --- a/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/EntryMetadata.java	Mon Jun 07 10:06:41 2010 +0200
     8.2 +++ b/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/EntryMetadata.java	Tue Jun 08 15:19:58 2010 +0200
     8.3 @@ -47,10 +47,12 @@
     8.4  
     8.5      private String keyword;
     8.6      private String help;
     8.7 +    private String helpUrl;
     8.8  
     8.9 -    public EntryMetadata(String keyword, String help) {
    8.10 +    public EntryMetadata(String keyword, String help, String helpUrl) {
    8.11          this.keyword = keyword;
    8.12          this.help = help;
    8.13 +        this.helpUrl = helpUrl;
    8.14      }
    8.15  
    8.16      public String getKeyword() {
    8.17 @@ -61,5 +63,7 @@
    8.18          return help;
    8.19      }
    8.20  
    8.21 -    
    8.22 +    public String getHelpUrl() {
    8.23 +        return helpUrl;
    8.24 +    }
    8.25  }
     9.1 --- a/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/TplCodeCompletionData.java	Mon Jun 07 10:06:41 2010 +0200
     9.2 +++ b/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/TplCodeCompletionData.java	Tue Jun 08 15:19:58 2010 +0200
     9.3 @@ -73,12 +73,12 @@
     9.4              Collection<EntryMetadata> ccList = parseCCData(completionType);
     9.5              if (completionType.equals("built-in-functions")) {
     9.6                  for (EntryMetadata entryMetadata : ccList) {
     9.7 -                    completionItems.add(new BuiltInFunction(entryMetadata.getKeyword(), 0, null));
     9.8 +                    completionItems.add(new BuiltInFunction(entryMetadata.getKeyword(), 0, entryMetadata.getHelp(), entryMetadata.getHelpUrl()));
     9.9                  }
    9.10              }
    9.11              else if (completionType.equals("variable-modifiers")) {
    9.12                  for (EntryMetadata entryMetadata : ccList) {
    9.13 -                    completionItems.add(new VariableModifiers(entryMetadata.getKeyword(), 0, null));
    9.14 +                    completionItems.add(new VariableModifiers(entryMetadata.getKeyword(), 0, entryMetadata.getHelp(), entryMetadata.getHelpUrl()));
    9.15                  }
    9.16              }
    9.17          }
    10.1 --- a/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/defs/built-in-functions.xml	Mon Jun 07 10:06:41 2010 +0200
    10.2 +++ b/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/defs/built-in-functions.xml	Tue Jun 08 15:19:58 2010 +0200
    10.3 @@ -25,6 +25,7 @@
    10.4                  <description>The variable name where to assign the captured output to</description>
    10.5              </attribute>
    10.6          </attributes>
    10.7 +        <url>http://www.smarty.net/manual/en/language.builtin.functions.php#language.function.capture</url>
    10.8      </entry>
    10.9      
   10.10      <entry name="config_load">
   10.11 @@ -55,10 +56,11 @@
   10.12                  <description>Whether or not variables are visible to the parent template, same as scope=parent. NOTE: This attribute is deprecated by the scope attribute, but still supported. If scope is supplied, this value is ignored. </description>
   10.13              </attribute>
   10.14          </attributes>
   10.15 +        <url>http://www.smarty.net/manual/en/language.function.config.load.php</url>
   10.16      </entry>
   10.17  
   10.18      <entry name="foreach">
   10.19 -        <description>{config_load} is used for loading config #variables#  from a configuration file into the template. </description>
   10.20 +        <description>{foreach} is used to loop over an associative array as well a numerically-indexed array, unlike {section}  which is for looping over numerically-indexed arrays only. The syntax for {foreach} is much easier than {section}, but as a tradeoff it can only be used for a single array. Every {foreach}  tag must be paired with a closing {/foreach} tag. </description>
   10.21          <attributes>
   10.22              <attribute name="from">
   10.23                  <type>array</type>
   10.24 @@ -85,10 +87,11 @@
   10.25                  <description>The name of the foreach loop for accessing foreach properties</description>
   10.26              </attribute>
   10.27          </attributes>
   10.28 +        <url>http://www.smarty.net/manual/en/language.function.config.load.php</url>
   10.29      </entry>
   10.30  
   10.31      <entry name="foreachelse">
   10.32 -        <description>{config_load} is used for loading config #variables#  from a configuration file into the template. </description>
   10.33 +        <description>{foreach} is used to loop over an associative array as well a numerically-indexed array, unlike {section}  which is for looping over numerically-indexed arrays only. The syntax for {foreach} is much easier than {section}, but as a tradeoff it can only be used for a single array. Every {foreach}  tag must be paired with a closing {/foreach} tag. </description>
   10.34          <attributes>
   10.35              <attribute name="from">
   10.36                  <type>array</type>
   10.37 @@ -115,18 +118,22 @@
   10.38                  <description>The name of the foreach loop for accessing foreach properties</description>
   10.39              </attribute>
   10.40          </attributes>
   10.41 +        <url>http://www.smarty.net/manual/en/language.function.config.load.php</url>
   10.42      </entry>
   10.43  
   10.44      <entry name="if">
   10.45          <description>{if} statements in Smarty have much the same flexibility as PHP if statements, with a few added features for the template engine. Every {if} must be paired with a matching {/if}. {else} and {elseif} are also permitted. All PHP conditionals and functions are recognized, such as ||, or, &amp;&amp;, and, is_array(), etc. If $security is enabled, only PHP functions from the IF_FUNCS array from $security_settings are allowed.</description>
   10.46 +        <url>http://www.smarty.net/manual/en/language.function.if.php</url>
   10.47      </entry>
   10.48  
   10.49      <entry name="else">
   10.50          <description>{if} statements in Smarty have much the same flexibility as PHP if statements, with a few added features for the template engine. Every {if} must be paired with a matching {/if}. {else} and {elseif} are also permitted. All PHP conditionals and functions are recognized, such as ||, or, &amp;&amp;, and, is_array(), etc. If $security is enabled, only PHP functions from the IF_FUNCS array from $security_settings are allowed.</description>
   10.51 +        <url>http://www.smarty.net/manual/en/language.function.if.php</url>
   10.52      </entry>
   10.53  
   10.54      <entry name="elseif">
   10.55          <description>{if} statements in Smarty have much the same flexibility as PHP if statements, with a few added features for the template engine. Every {if} must be paired with a matching {/if}. {else} and {elseif} are also permitted. All PHP conditionals and functions are recognized, such as ||, or, &amp;&amp;, and, is_array(), etc. If $security is enabled, only PHP functions from the IF_FUNCS array from $security_settings are allowed.</description>
   10.56 +        <url>http://www.smarty.net/manual/en/language.function.if.php</url>
   10.57      </entry>
   10.58  
   10.59      <entry name="include">
   10.60 @@ -145,6 +152,7 @@
   10.61                  <description>The name of the variable that the output of include will be assigned to</description>
   10.62              </attribute>
   10.63          </attributes>
   10.64 +        <url>http://www.smarty.net/manual/en/language.function.include.php</url>
   10.65      </entry>
   10.66  
   10.67      <entry name="include_php">
   10.68 @@ -169,6 +177,7 @@
   10.69                  <description>The name of the variable that the output of include_php will be assigned to</description>
   10.70              </attribute>
   10.71          </attributes>
   10.72 +        <url>http://www.smarty.net/manual/en/language.function.include.php.php</url>
   10.73      </entry>
   10.74  
   10.75      <entry name="insert">
   10.76 @@ -193,22 +202,27 @@
   10.77                  <description>The name of the php script that is included before the insert function is called</description>
   10.78              </attribute>
   10.79          </attributes>
   10.80 +        <url>http://www.smarty.net/manual/en/language.function.insert.php</url>
   10.81      </entry>
   10.82  
   10.83      <entry name="ldelim">
   10.84          <description>{ldelim} and {rdelim} are used for escaping  template delimiters, by default { and }. You can also use {literal}{/literal}  to escape blocks of text eg Javascript or CSS. See also the complimentary {$smarty.ldelim}. </description>
   10.85 +        <url>http://www.smarty.net/manual/en/language.function.ldelim.php</url>
   10.86      </entry>
   10.87  
   10.88      <entry name="rdelim">
   10.89          <description>{ldelim} and {rdelim} are used for escaping  template delimiters, by default { and }. You can also use {literal}{/literal}  to escape blocks of text eg Javascript or CSS. See also the complimentary {$smarty.ldelim}. </description>
   10.90 +        <url>http://www.smarty.net/manual/en/language.function.ldelim.php</url>
   10.91      </entry>
   10.92  
   10.93      <entry name="literal">
   10.94          <description>{literal} tags allow a block of data to be taken literally. This is typically used around Javascript or stylesheet blocks where {curly braces} would interfere with the template delimiter  syntax. Anything within {literal}{/literal} tags is not interpreted, but displayed as-is. If you need template tags embedded in a {literal}  block, consider using {ldelim}{rdelim} to escape the individual delimiters instead. </description>
   10.95 +        <url>http://www.smarty.net/manual/en/language.function.literal.php</url>
   10.96      </entry>
   10.97  
   10.98      <entry name="php">
   10.99          <description>The {php} tags allow PHP code to be embedded directly into the template. They will not be escaped, regardless of the $php_handling setting. This is for advanced users only, not normally needed and not recommended. </description>
  10.100 +        <url>http://www.smarty.net/manual/en/language.function.php.php</url>
  10.101      </entry>
  10.102  
  10.103      <entry name="section">
  10.104 @@ -251,6 +265,7 @@
  10.105                  <description>Determines whether or not to show this section</description>
  10.106              </attribute>
  10.107          </attributes>
  10.108 +        <url>http://www.smarty.net/manual/en/language.function.section.php</url>
  10.109      </entry>
  10.110  
  10.111      <entry name="sectionelse">
  10.112 @@ -293,9 +308,11 @@
  10.113                  <description>Determines whether or not to show this section</description>
  10.114              </attribute>
  10.115          </attributes>
  10.116 +        <url>http://www.smarty.net/manual/en/language.function.section.php</url>
  10.117      </entry>
  10.118  
  10.119      <entry name="strip">
  10.120          <description> Many times web designers run into the issue where white space and carriage returns affect the output of the rendered HTML (browser "features"), so you must run all your tags together in the template to get the desired results. This usually ends up in unreadable or unmanageable templates. Anything within {strip}{/strip} tags are stripped of the extra spaces or carriage returns at the beginnings and ends of the lines before they are displayed. This way you can keep your templates readable, and not worry about extra white space causing problems. Note: {strip}{/strip} does not affect the contents of template variables, see the strip modifier instead.  </description>
  10.121 +        <url>http://www.smarty.net/manual/en/language.function.strip.php</url>
  10.122      </entry>
  10.123  </entries>
    11.1 --- a/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/defs/variable-modifiers.xml	Mon Jun 07 10:06:41 2010 +0200
    11.2 +++ b/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/defs/variable-modifiers.xml	Tue Jun 08 15:19:58 2010 +0200
    11.3 @@ -19,6 +19,7 @@
    11.4                  <description>This determines whether or not words with digits will be uppercased</description>
    11.5              </attribute>
    11.6          </attributes>
    11.7 +        <url>http://www.smarty.net/manual/en/language.modifiers.php#language.modifier.capitalize</url>
    11.8      </entry>
    11.9      
   11.10      <entry name="cat">
   11.11 @@ -31,6 +32,7 @@
   11.12                  <description>This value to catenate to the given variable.</description>
   11.13              </attribute>
   11.14          </attributes>
   11.15 +        <url>http://www.smarty.net/manual/en/language.modifier.cat.php</url>
   11.16      </entry>
   11.17  
   11.18      <entry name="count_characters">
   11.19 @@ -43,18 +45,22 @@
   11.20                  <description>This determines whether or not to include whitespace characters in the count.</description>
   11.21              </attribute>
   11.22          </attributes>
   11.23 +        <url>http://www.smarty.net/manual/en/language.modifier.count.characters.php</url>
   11.24      </entry>
   11.25  
   11.26      <entry name="count_paragraphs">
   11.27          <description>This is used to count the number of paragraphs in a variable. </description>
   11.28 +        <url>http://www.smarty.net/manual/en/language.modifier.count.paragraphs.php</url>
   11.29      </entry>
   11.30  
   11.31      <entry name="count_sentences">
   11.32          <description>This is used to count the number of sentences in a variable. </description>
   11.33 +        <url>http://www.smarty.net/manual/en/language.modifier.count.sentences.php</url>
   11.34      </entry>
   11.35  
   11.36      <entry name="count_words">
   11.37          <description>This is used to count the number of words in a variable. </description>
   11.38 +        <url>http://www.smarty.net/manual/en/language.modifier.count.words.php</url>
   11.39      </entry>
   11.40  
   11.41      <entry name="date_format">
   11.42 @@ -74,6 +80,7 @@
   11.43                  <description>This is the default date if the input is empty.</description>
   11.44              </attribute>
   11.45          </attributes>
   11.46 +        <url>http://www.smarty.net/manual/en/language.modifier.date.format.php</url>
   11.47      </entry>
   11.48  
   11.49      <entry name="default">
   11.50 @@ -86,6 +93,7 @@
   11.51                  <description>This is the default value to output if the variable is empty..</description>
   11.52              </attribute>
   11.53          </attributes>
   11.54 +        <url>http://www.smarty.net/manual/en/language.modifier.default.php</url>
   11.55      </entry>
   11.56  
   11.57      <entry name="escape">
   11.58 @@ -107,6 +115,7 @@
   11.59                  <description>The character set encoding passed to htmlentities() et. al.</description>
   11.60              </attribute>
   11.61          </attributes>
   11.62 +        <url>http://www.smarty.net/manual/en/language.modifier.escape.php</url>
   11.63      </entry>
   11.64  
   11.65      <entry name="indent">
   11.66 @@ -126,14 +135,17 @@
   11.67                  <description>This is the character used to indent with.</description>
   11.68              </attribute>
   11.69          </attributes>
   11.70 +        <url>http://www.smarty.net/manual/en/language.modifier.indent.php</url>
   11.71      </entry>
   11.72  
   11.73      <entry name="lower">
   11.74          <description>This is used to lowercase a variable. This is equivalent to the PHP  strtolower() function.</description>
   11.75 +        <url>http://www.smarty.net/manual/en/language.modifier.indent.php</url>
   11.76      </entry>
   11.77  
   11.78      <entry name="nl2br">
   11.79          <description>All "\n" line breaks will be converted to html <br /> tags in the given variable. This is equivalent to the PHP's  nl2br() function. </description>
   11.80 +        <url>http://www.smarty.net/manual/en/language.modifier.nl2br.php</url>
   11.81      </entry>
   11.82  
   11.83      <entry name="regex_replace">
   11.84 @@ -153,6 +165,7 @@
   11.85                  <description>This is the string of text to replace with.</description>
   11.86              </attribute>
   11.87          </attributes>
   11.88 +        <url>http://www.smarty.net/manual/en/language.modifier.regex.replace.php</url>
   11.89      </entry>
   11.90  
   11.91      <entry name="replace">
   11.92 @@ -172,6 +185,7 @@
   11.93                  <description>This is the string of text to replace with.</description>
   11.94              </attribute>
   11.95          </attributes>
   11.96 +        <url>http://www.smarty.net/manual/en/language.modifier.replace.php</url>
   11.97      </entry>
   11.98  
   11.99      <entry name="spacify">
  11.100 @@ -184,6 +198,7 @@
  11.101                  <description>This what gets inserted between each character of the variable.</description>
  11.102              </attribute>
  11.103          </attributes>
  11.104 +        <url>http://www.smarty.net/manual/en/language.modifier.spacify.php</url>
  11.105      </entry>
  11.106  
  11.107      <entry name="string_format">
  11.108 @@ -196,10 +211,12 @@
  11.109                  <description>This is what format to use. (sprintf)</description>
  11.110              </attribute>
  11.111          </attributes>
  11.112 +        <url>http://www.smarty.net/manual/en/language.modifier.string.format.php</url>
  11.113      </entry>
  11.114  
  11.115      <entry name="strip">
  11.116          <description> This replaces all repeated spaces, newlines and tabs with a single space, or with the supplied string. Note: If you want to strip blocks of template text, use the built-in {strip} function. </description>
  11.117 +        <url>http://www.smarty.net/manual/en/language.modifier.strip.php</url>
  11.118      </entry>
  11.119  
  11.120      <entry name="strip_tags">
  11.121 @@ -212,6 +229,7 @@
  11.122                  <description>This determines whether the tags are replaced by ' ' or ''.</description>
  11.123              </attribute>
  11.124          </attributes>
  11.125 +        <url>http://www.smarty.net/manual/en/language.modifier.strip.tags.php</url>
  11.126      </entry>
  11.127  
  11.128      <entry name="truncate">
  11.129 @@ -245,10 +263,12 @@
  11.130                  <description>This determines whether the truncation happens at the end of the string with FALSE, or in the middle of the string with TRUE. Note that if this setting is TRUE, then word boundaries are ignored. </description>
  11.131              </attribute>
  11.132          </attributes>
  11.133 +        <url>http://www.smarty.net/manual/en/language.modifier.truncate.php</url>
  11.134      </entry>
  11.135  
  11.136      <entry name="upper">
  11.137          <description> This is used to uppercase a variable. This is equivalent to the PHP  strtoupper() function. </description>
  11.138 +        <url>http://www.smarty.net/manual/en/language.modifier.upper.php</url>
  11.139      </entry>
  11.140  
  11.141      <entry name="wordwrap">
  11.142 @@ -275,6 +295,7 @@
  11.143                  <description>This determines whether or not to wrap at a word boundary (FALSE), or at the exact character (TRUE).</description>
  11.144              </attribute>
  11.145          </attributes>
  11.146 +        <url>http://www.smarty.net/manual/en/language.modifier.wordwrap.php</url>
  11.147      </entry>
  11.148  
  11.149  </entries>