org.eclipse.xtend.ide.editor
Class RichStringAwareToggleCommentAction

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.jface.action.AbstractAction
          extended by org.eclipse.jface.action.Action
              extended by org.eclipse.ui.texteditor.ResourceAction
                  extended by org.eclipse.ui.texteditor.TextEditorAction
                      extended by org.eclipse.xtext.ui.editor.toggleComments.ToggleSLCommentAction
                          extended by org.eclipse.xtend.ide.editor.RichStringAwareToggleCommentAction
All Implemented Interfaces:
org.eclipse.jface.action.IAction, org.eclipse.ui.texteditor.IUpdate

public class RichStringAwareToggleCommentAction
extends ToggleSLCommentAction

Author:
Sebastian Zarnekow - Initial contribution and API

Nested Class Summary
static class RichStringAwareToggleCommentAction.Factory
           
 
Field Summary
 
Fields inherited from interface org.eclipse.jface.action.IAction
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
 
Constructor Summary
RichStringAwareToggleCommentAction(java.util.ResourceBundle bundle, java.lang.String prefix, org.eclipse.ui.texteditor.ITextEditor editor)
           
 
Method Summary
protected  boolean isSelectionCommented(org.eclipse.jface.viewers.ISelection selection)
          Is the given selection single-line commented?
 
Methods inherited from class org.eclipse.xtext.ui.editor.toggleComments.ToggleSLCommentAction
configure, getDocumentPartitioning, getFirstCompleteLineOfRegion, getOperationTarget, getPrefixesMap, getTextBlockFromSelection, isBlockCommented, run, setEditor, update
 
Methods inherited from class org.eclipse.ui.texteditor.TextEditorAction
canModifyEditor, getTextEditor, validateEditorInputState
 
Methods inherited from class org.eclipse.ui.texteditor.ResourceAction
getString, initialize, setHelpContextId
 
Methods inherited from class org.eclipse.jface.action.Action
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from class org.eclipse.jface.action.AbstractAction
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.action.IAction
addPropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

RichStringAwareToggleCommentAction

public RichStringAwareToggleCommentAction(java.util.ResourceBundle bundle,
                                          java.lang.String prefix,
                                          org.eclipse.ui.texteditor.ITextEditor editor)
Method Detail

isSelectionCommented

protected boolean isSelectionCommented(org.eclipse.jface.viewers.ISelection selection)
Description copied from class: ToggleSLCommentAction
Is the given selection single-line commented?

Overrides:
isSelectionCommented in class ToggleSLCommentAction
Parameters:
selection - Selection to check
Returns:
true iff all selected lines are commented