| org.eclipse.jdt.internal.ui.actions.BlockCommentAction
All known Subclasses: org.eclipse.jdt.internal.ui.actions.RemoveBlockCommentAction, org.eclipse.jdt.internal.ui.actions.AddBlockCommentAction,
BlockCommentAction | abstract public class BlockCommentAction extends TextEditorAction (Code) | | Common block comment code.
since: 3.0 |
Inner Class :static class Edit extends DocumentEvent | |
Method Summary | |
protected boolean | ensureEditable(ITextEditor editor) Ensures that the editor is modifyable. | protected void | executeEdits(List edits) Calls perform on all Edit s in edits . | protected String | getCommentEnd() Returns the text to be inserted at the selection end. | protected String | getCommentStart() Returns the text to be inserted at the selection start. | protected ITextSelection | getCurrentSelection() Returns the editor's selection, or null if no selection can be obtained or the
editor is null . | abstract protected boolean | isValidSelection(ITextSelection selection) Checks whether selection is valid. | public void | run() | abstract protected void | runInternal(ITextSelection selection, IDocumentExtension3 docExtension, Edit.EditFactory factory) Runs the real command once all the editor, document, and selection checks have succeeded. | public void | update() |
BlockCommentAction | public BlockCommentAction(ResourceBundle bundle, String prefix, ITextEditor editor)(Code) | | Creates a new instance.
Parameters: bundle - Parameters: prefix - Parameters: editor - |
ensureEditable | protected boolean ensureEditable(ITextEditor editor)(Code) | | Ensures that the editor is modifyable. If the editor is an instance of
ITextEditorExtension2 , its validateEditorInputState method
is called, otherwise, the result of isEditable is returned.
Parameters: editor - the editor to be checked true if the editor is editable, false otherwise |
executeEdits | protected void executeEdits(List edits) throws BadLocationException(Code) | | Calls perform on all Edit s in edits .
Parameters: edits - a list of Edit s throws: BadLocationException - if an Edit threw such an exception. |
getCommentEnd | protected String getCommentEnd()(Code) | | Returns the text to be inserted at the selection end.
the text to be inserted at the selection end |
getCommentStart | protected String getCommentStart()(Code) | | Returns the text to be inserted at the selection start.
the text to be inserted at the selection start |
getCurrentSelection | protected ITextSelection getCurrentSelection()(Code) | | Returns the editor's selection, or null if no selection can be obtained or the
editor is null .
the selection of the action's editor, or null |
isValidSelection | abstract protected boolean isValidSelection(ITextSelection selection)(Code) | | Checks whether selection is valid.
Parameters: selection - the selection to check true if the selection is valid, false otherwise |
runInternal | abstract protected void runInternal(ITextSelection selection, IDocumentExtension3 docExtension, Edit.EditFactory factory) throws BadLocationException, BadPartitioningException(Code) | | Runs the real command once all the editor, document, and selection checks have succeeded.
Parameters: selection - the current selection we are being called for Parameters: docExtension - the document extension where we get the partitioning from Parameters: factory - the edit factory we can use to create Edit s throws: BadLocationException - if an edition fails throws: BadPartitioningException - if a partitioning call fails |
update | public void update()(Code) | | |
|
|