类 AbstractLanguageSupport
- java.lang.Object
-
- org.meteoinfo.laboratory.codecomplete.AbstractLanguageSupport
-
- 所有已实现的接口:
LanguageSupport
- 直接已知子类:
JythonLanguageSupport
public abstract class AbstractLanguageSupport extends java.lang.Object implements LanguageSupport
A base class for language support implementations.- 版本:
- 1.0
- 作者:
- Robert Futrell
-
-
字段概要
-
从接口继承的字段 org.meteoinfo.laboratory.codecomplete.LanguageSupport
PROPERTY_LANGUAGE_PARSER
-
-
构造器概要
构造器 限定符 构造器 说明 protectedAbstractLanguageSupport()Constructor.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected org.fife.ui.autocomplete.AutoCompletioncreateAutoCompletion(org.fife.ui.autocomplete.CompletionProvider p)Creates an auto-completion instance pre-configured and usable by mostLanguageSupports.protected javax.swing.ListCellRenderercreateDefaultCompletionCellRenderer()Creates the default cell renderer to use when none is specified.intgetAutoActivationDelay()Returns the delay between when the user types a character and when the code completion popup should automatically appear (if applicable).protected org.fife.ui.autocomplete.AutoCompletiongetAutoCompletionFor(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)Returns the auto completion instance used by a text area.javax.swing.ListCellRenderergetDefaultCompletionCellRenderer()Returns the default list cell renderer to install for all text areas with this language support installed.booleangetShowDescWindow()REturns whether the description window is also shown when the completion list is displayed, for editors of this language.protected java.util.Set<org.fife.ui.rsyntaxtextarea.RSyntaxTextArea>getTextAreas()Returns the text areas with this language support currently installed.protected voidinstallImpl(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea, org.fife.ui.autocomplete.AutoCompletion ac)Registers an auto-completion instance.booleanisAutoActivationEnabled()Returns whether auto-activation is enabled (that is, whether the completion popup will automatically appear after a delay when the user types an appropriate character).booleanisAutoCompleteEnabled()Returns whether auto-completion is enabled for this language.booleanisParameterAssistanceEnabled()Returns whether parameter assistance is enabled for editors of this language.voidsetAutoActivationDelay(int ms)Sets the delay between when the user types a character and when the code completion popup should automatically appear (if applicable).voidsetAutoActivationEnabled(boolean enabled)Toggles whether auto-activation is enabled.voidsetAutoCompleteEnabled(boolean enabled)Toggles whether auto-completion is enabled for this language.voidsetDefaultCompletionCellRenderer(javax.swing.ListCellRenderer r)Sets the default list cell renderer to install for all text areas with this language support installed.voidsetParameterAssistanceEnabled(boolean enabled)Toggles whether parameter assistance is enabled for editors of this language.voidsetShowDescWindow(boolean show)Toggles whether the description window should also be shown when the completion list is displayed, for editors of this language.protected voiduninstallImpl(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)Unregisters an textArea.-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.meteoinfo.laboratory.codecomplete.LanguageSupport
install, uninstall
-
-
-
-
方法详细资料
-
createAutoCompletion
protected org.fife.ui.autocomplete.AutoCompletion createAutoCompletion(org.fife.ui.autocomplete.CompletionProvider p)
Creates an auto-completion instance pre-configured and usable by mostLanguageSupports.- 参数:
p- The completion provider.- 返回:
- The auto-completion instance.
-
createDefaultCompletionCellRenderer
protected javax.swing.ListCellRenderer 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.- 返回:
- The default renderer for the completion list.
-
getAutoActivationDelay
public int getAutoActivationDelay()
Returns the delay between when the user types a character and when the code completion popup should automatically appear (if applicable). This parameter is only honored ifLanguageSupport.isAutoActivationEnabled()returnstrue.- 指定者:
getAutoActivationDelay在接口中LanguageSupport- 返回:
- The delay, in milliseconds.
- 另请参阅:
LanguageSupport.setAutoActivationDelay(int)
-
getAutoCompletionFor
protected org.fife.ui.autocomplete.AutoCompletion getAutoCompletionFor(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
Returns the auto completion instance used by a text area.- 参数:
textArea- The text area.- 返回:
- The auto completion instance, or
nullif none is installed on the text area.
-
getDefaultCompletionCellRenderer
public javax.swing.ListCellRenderer getDefaultCompletionCellRenderer()
Returns the default list cell renderer to install for all text areas with this language support installed.- 指定者:
getDefaultCompletionCellRenderer在接口中LanguageSupport- 返回:
- The renderer. This will never be
null. - 另请参阅:
LanguageSupport.setDefaultCompletionCellRenderer(ListCellRenderer)
-
getShowDescWindow
public boolean getShowDescWindow()
REturns whether the description window is also shown when the completion list is displayed, for editors of this language.- 指定者:
getShowDescWindow在接口中LanguageSupport- 返回:
- Whether the description window is shown.
- 另请参阅:
LanguageSupport.setShowDescWindow(boolean)
-
getTextAreas
protected java.util.Set<org.fife.ui.rsyntaxtextarea.RSyntaxTextArea> getTextAreas()
Returns the text areas with this language support currently installed.- 返回:
- The text areas.
-
installImpl
protected void installImpl(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea, org.fife.ui.autocomplete.AutoCompletion ac)Registers an auto-completion instance. This should be called by subclasses in theirLanguageSupport.install(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea)methods so that this language support can update all of them at once.- 参数:
textArea- The text area that just installed the auto completion.ac- The auto completion instance.- 另请参阅:
uninstallImpl(RSyntaxTextArea)
-
isAutoActivationEnabled
public boolean isAutoActivationEnabled()
Returns whether auto-activation is enabled (that is, whether the completion popup will automatically appear after a delay when the user types an appropriate character). Note that this parameter will be ignored if auto-completion is disabled.- 指定者:
isAutoActivationEnabled在接口中LanguageSupport- 返回:
- Whether auto-activation is enabled.
- 另请参阅:
LanguageSupport.setAutoActivationEnabled(boolean),LanguageSupport.getAutoActivationDelay(),LanguageSupport.isAutoCompleteEnabled()
-
isAutoCompleteEnabled
public boolean isAutoCompleteEnabled()
Returns whether auto-completion is enabled for this language. If this value isfalse, thenctrl+spacewill do nothing.- 指定者:
isAutoCompleteEnabled在接口中LanguageSupport- 返回:
- Whether auto-completion is enabled.
- 另请参阅:
LanguageSupport.setAutoCompleteEnabled(boolean)
-
isParameterAssistanceEnabled
public boolean isParameterAssistanceEnabled()
Returns whether parameter assistance is enabled for editors of this language. Note that some language do not support parameter assistance at all; in those cases, this parameter does nothing.- 指定者:
isParameterAssistanceEnabled在接口中LanguageSupport- 返回:
- Whether parameter assistance is enabled for editors of this language.
- 另请参阅:
LanguageSupport.setParameterAssistanceEnabled(boolean)
-
setAutoActivationDelay
public void setAutoActivationDelay(int ms)
Sets the delay between when the user types a character and when the code completion popup should automatically appear (if applicable). This parameter is only honored ifLanguageSupport.isAutoActivationEnabled()returnstrue.- 指定者:
setAutoActivationDelay在接口中LanguageSupport- 参数:
ms- The delay, in milliseconds. This should be greater than zero.- 另请参阅:
LanguageSupport.getAutoActivationDelay()
-
setAutoActivationEnabled
public void setAutoActivationEnabled(boolean enabled)
Toggles whether auto-activation is enabled. Note that auto-activation also depends on auto-completion itself being enabled.- 指定者:
setAutoActivationEnabled在接口中LanguageSupport- 参数:
enabled- Whether auto-activation is enabled.- 另请参阅:
LanguageSupport.isAutoActivationEnabled(),LanguageSupport.setAutoActivationDelay(int)
-
setAutoCompleteEnabled
public void setAutoCompleteEnabled(boolean enabled)
Toggles whether auto-completion is enabled for this language. If this is set tofalse, thenctrl+spacewill do nothing.- 指定者:
setAutoCompleteEnabled在接口中LanguageSupport- 参数:
enabled- Whether auto-completion should be enabled.- 另请参阅:
LanguageSupport.isAutoCompleteEnabled()
-
setDefaultCompletionCellRenderer
public void setDefaultCompletionCellRenderer(javax.swing.ListCellRenderer r)
Sets the default list cell renderer to install for all text areas with this language support installed. This renderer will be shared amongst all text areas.- 指定者:
setDefaultCompletionCellRenderer在接口中LanguageSupport- 参数:
r- The renderer. If this isnull, a default will be used.- 另请参阅:
LanguageSupport.getDefaultCompletionCellRenderer()
-
setParameterAssistanceEnabled
public void setParameterAssistanceEnabled(boolean enabled)
Toggles whether parameter assistance is enabled for editors of this language.- 指定者:
setParameterAssistanceEnabled在接口中LanguageSupport- 参数:
enabled- Whether parameter assistance is enabled.- 另请参阅:
LanguageSupport.isParameterAssistanceEnabled()
-
setShowDescWindow
public void setShowDescWindow(boolean show)
Toggles whether the description window should also be shown when the completion list is displayed, for editors of this language.- 指定者:
setShowDescWindow在接口中LanguageSupport- 参数:
show- Whether to show the description window.- 另请参阅:
LanguageSupport.getShowDescWindow()
-
uninstallImpl
protected void uninstallImpl(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
Unregisters an textArea. This should be called by subclasses in theirLanguageSupport.uninstall(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea)methods. This method will also call theuninstallmethod on theAutoCompletion.- 参数:
textArea- The text area.- 另请参阅:
installImpl(RSyntaxTextArea, AutoCompletion)
-
-