Class PhpLanguageSupport

All Implemented Interfaces:
LanguageSupport

public class PhpLanguageSupport extends AbstractMarkupLanguageSupport
Language support for PHP. Features currently include:
  • Code completion for PHP functions.
  • Code completion for HTML5 tags and attributes.
  • Automatic creation of closing tags for non-self-closing tags.
Version:
1.0
  • Field Details

    • provider

      private PhpCompletionProvider provider
      The completion provider. This is shared amongst all PHP text areas.
    • tagsToClose

      private static Set<String> tagsToClose
      A cached set of tags that require closing tags.
  • Constructor Details

    • PhpLanguageSupport

      public PhpLanguageSupport()
      Constructor.
  • Method Details

    • createDefaultCompletionCellRenderer

      protected ListCellRenderer<Object> createDefaultCompletionCellRenderer()
      Creates the default cell renderer to use when none is specified. Subclasses can override this method if there is a "better" default renderer for a specific language.
      Overrides:
      createDefaultCompletionCellRenderer in class AbstractLanguageSupport
      Returns:
      The default renderer for the completion list.
    • getProvider

      private PhpCompletionProvider getProvider()
      Lazily creates the shared completion provider instance for PHP.
      Returns:
      The completion provider.
    • install

      public void install(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
      Installs this support.
      Parameters:
      textArea - The text area to install onto.
      See Also:
    • shouldAutoCloseTag

      protected boolean shouldAutoCloseTag(String tag)
      Subclasses should override this method to return whether a specified tag should have its closing tag auto-inserted.
      Specified by:
      shouldAutoCloseTag in class AbstractMarkupLanguageSupport
      Parameters:
      tag - The name of the tag to check.
      Returns:
      Whether the tag should have its closing tag auto-inserted.
    • uninstall

      public void uninstall(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
      Uninstalls this support.
      Parameters:
      textArea - The text area to uninstall from.
      See Also: