com.aptana.ide.editor.js.formatting
Class JSBracketInserter

java.lang.Object
  extended by com.aptana.ide.editors.formatting.UnifiedBracketInserterBase
      extended by com.aptana.ide.editors.formatting.UnifiedBracketInserter
          extended by com.aptana.ide.editor.js.formatting.JSBracketInserter
All Implemented Interfaces:
IUnifiedBracketInserter, java.util.EventListener, org.eclipse.jface.text.link.ILinkedModeListener, org.eclipse.swt.custom.VerifyKeyListener, org.eclipse.swt.internal.SWTEventListener

public class JSBracketInserter
extends UnifiedBracketInserter

Insert brackets, parens, string etc


Field Summary
 
Fields inherited from class com.aptana.ide.editors.formatting.UnifiedBracketInserter
context, sourceViewer
 
Fields inherited from class com.aptana.ide.editors.formatting.UnifiedBracketInserterBase
fCloseAngularBrackets, fCloseBrackets, fCloseStrings
 
Fields inherited from interface org.eclipse.jface.text.link.ILinkedModeListener
EXIT_ALL, EXTERNAL_MODIFICATION, NONE, SELECT, UPDATE_CARET
 
Constructor Summary
JSBracketInserter(org.eclipse.jface.text.source.ISourceViewer sourceViewer, IFileService context)
          Controls the insertion and deletion of quotes in HTML.
 
Method Summary
protected  IFileLanguageService getLanguageService()
          getLanguageService
protected  org.eclipse.jface.preference.IPreferenceStore getPreferenceStore()
          getPreferenceStore
protected  boolean isValidAutoInsertLocation(char character, Lexeme previous, Lexeme next)
          Is this location a valid place to inserts the specified character?
protected  void triggerAssistPopup(org.eclipse.swt.events.VerifyEvent event)
          triggerAssistPopup
 
Methods inherited from class com.aptana.ide.editors.formatting.UnifiedBracketInserter
autoTriggerAssist, getLexemeList, isAutoInsertEnabled, isValidAutoInsertLocation, triggerAssistClose, triggerContentAssistPopup, triggerContextAssistPopup
 
Methods inherited from class com.aptana.ide.editors.formatting.UnifiedBracketInserterBase
doEvent, getAutoInsertCharacters, getInsertMode, getPeerCharacter, hasPeerCharacter, isAngularIntroducer, isStringBalanced, left, resume, setCloseAngularBracketsEnabled, setCloseBracketsEnabled, setCloseStringsEnabled, suspend, verifyKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.swt.custom.VerifyKeyListener
verifyKey
 

Constructor Detail

JSBracketInserter

public JSBracketInserter(org.eclipse.jface.text.source.ISourceViewer sourceViewer,
                         IFileService context)
Controls the insertion and deletion of quotes in HTML.

Parameters:
sourceViewer -
context -
Method Detail

getLanguageService

protected IFileLanguageService getLanguageService()
getLanguageService

Returns:
IFileLanguageService

getPreferenceStore

protected org.eclipse.jface.preference.IPreferenceStore getPreferenceStore()
getPreferenceStore

Specified by:
getPreferenceStore in class UnifiedBracketInserter
Returns:

isValidAutoInsertLocation

protected boolean isValidAutoInsertLocation(char character,
                                            Lexeme previous,
                                            Lexeme next)
Description copied from class: UnifiedBracketInserter
Is this location a valid place to inserts the specified character?

Overrides:
isValidAutoInsertLocation in class UnifiedBracketInserter
Parameters:
character - The character inserted
previous - The previous lexeme
next - The next lexeme
Returns:
See Also:
UnifiedBracketInserter.isValidAutoInsertLocation(char, com.aptana.ide.lexer.Lexeme, com.aptana.ide.lexer.Lexeme)

triggerAssistPopup

protected void triggerAssistPopup(org.eclipse.swt.events.VerifyEvent event)
triggerAssistPopup

Overrides:
triggerAssistPopup in class UnifiedBracketInserterBase