Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.1.0)

E13403-02

oracle.jdeveloper.java.imports
Class AbstractSurroundWith

java.lang.Object
  extended by oracle.jdeveloper.java.imports.AbstractSurroundWith

public abstract class AbstractSurroundWith
extends java.lang.Object

The AbstractSurroundWith is the abstract implementation for starting "Surround with" operations for Java-like languages (basically, languages with descendants from C). It also provides support for starting the surround-with operation through a dialog.


Constructor Summary
AbstractSurroundWith(java.lang.Object[] surrounders)
          Constructs a AbstractSurroundWith for displaying the various "Surround with" operations.
 
Method Summary
 void performSurroundWith(BasicEditorPane editor, Context context, AbstractSurrounder surrounder, int startPos, int endPos)
          Performs the surround with operation using the given surrounder.
protected abstract  void postSurround(BasicEditorPane editorPane, Context context, AbstractSurrounder surrounder)
          Called after a surround operation has been successfully completed.
protected abstract  void preSurround(BasicEditorPane editorPane, Context context)
          Called before a surround operation is started.
 void showSurroundWithDialog(BasicEditorPane editor, Context context, javax.swing.JFrame parent, java.lang.String helpId)
          Performs the surround with operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSurroundWith

public AbstractSurroundWith(java.lang.Object[] surrounders)
Constructs a AbstractSurroundWith for displaying the various "Surround with" operations.

Method Detail

preSurround

protected abstract void preSurround(BasicEditorPane editorPane,
                                    Context context)
Called before a surround operation is started.

Parameters:
editorPane - The editor pane
context - The IDE context

postSurround

protected abstract void postSurround(BasicEditorPane editorPane,
                                     Context context,
                                     AbstractSurrounder surrounder)
Called after a surround operation has been successfully completed.

Parameters:
editorPane - The editor pane
context - The IDE context
surrounder - Surrounder object corresponding to the surround operation that was successfully completed

showSurroundWithDialog

public void showSurroundWithDialog(BasicEditorPane editor,
                                   Context context,
                                   javax.swing.JFrame parent,
                                   java.lang.String helpId)
Performs the surround with operation. This will bring up a dialog to ask which block pattern to use.

Parameters:
editor - The editor on which to do the surrounds with
context - The IDE context
parent - The parent window for modality
helpId - The help ID for the help system

performSurroundWith

public void performSurroundWith(BasicEditorPane editor,
                                Context context,
                                AbstractSurrounder surrounder,
                                int startPos,
                                int endPos)
Performs the surround with operation using the given surrounder.

Parameters:
editor - The editor on which to do the surrounds with
context - The IDE context
surrounder - The surround with operation to be performed
startPos - The start offset to surround with
endPos - The end offset to surround with

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.1.0)

E13403-02

Copyright © 1997, 2009, Oracle. All rights reserved.