Class LessCodeCompletionProvider

java.lang.Object
org.fife.ui.autocomplete.CompletionProviderBase
org.fife.rsta.ac.css.PropertyValueCompletionProvider
org.fife.rsta.ac.less.LessCodeCompletionProvider
All Implemented Interfaces:
org.fife.ui.autocomplete.CompletionProvider

class LessCodeCompletionProvider extends PropertyValueCompletionProvider
The main completion provider for Less code.
Version:
1.0
  • Field Details

    • functionCompletions

      private List<org.fife.ui.autocomplete.Completion> functionCompletions
  • Constructor Details

    • LessCodeCompletionProvider

      LessCodeCompletionProvider()
      Constructor.
  • Method Details

    • addLessCompletions

      protected boolean addLessCompletions(List<org.fife.ui.autocomplete.Completion> completions, PropertyValueCompletionProvider.LexerState state, JTextComponent comp, String alreadyEntered)
      Overridden to handle Less properly.
      Overrides:
      addLessCompletions in class PropertyValueCompletionProvider
      Parameters:
      completions - The completion set to add to.
      state - The current lexer state.
      comp - The text component whose content is being parsed.
      alreadyEntered - The text already entered by the user.
      Returns:
      Whether any completions were added.
    • addLessBuiltinFunctionCompletions

      private void addLessBuiltinFunctionCompletions(List<org.fife.ui.autocomplete.Completion> completions, String alreadyEntered)
    • addLessVariableCompletions

      private void addLessVariableCompletions(List<org.fife.ui.autocomplete.Completion> completions, JTextComponent comp, String alreadyEntered)
    • createFunctionCompletions

      private List<org.fife.ui.autocomplete.Completion> createFunctionCompletions() throws IOException
      Throws:
      IOException
    • loadIcon

      private Icon loadIcon(String name)
      Loads an icon by file name. Note that, if Less completion support gets more icons, we should create an IconFactory class and remove this method.
      Parameters:
      name - The icon file name.
      Returns:
      The icon.