LPEX
3.6.5

com.ibm.lpex.samples
Class FindTextContextCommand

java.lang.Object
  extended by com.ibm.lpex.samples.FindTextContextCommand
All Implemented Interfaces:
LpexCommand

public class FindTextContextCommand
extends Object
implements LpexCommand

Sample command findText - redefines editor's to show context for the found text. Repositions the result of a successful find-text command or action in the specified view so that its context is shown - two lines above and below.

Here is the FindTextContextCommand source code.

To redefine the default findText command:

The repositioning of the found text can be disabled by setting userParameter.view.findTextContext to off. This is useful when running the findText command without the need to reposition the result on the screen (see, for example, the sample FindsCommand).

See Also:
TestUserProfile, All the samples

Constructor Summary
FindTextContextCommand()
           
 
Method Summary
 boolean doCommand(LpexView lpexView, String parameters)
          Runs this command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FindTextContextCommand

public FindTextContextCommand()
Method Detail

doCommand

public boolean doCommand(LpexView lpexView,
                         String parameters)
Runs this command. Issues the default findText editor command, and then repositions the found text in order to show a few lines around it.

Specified by:
doCommand in interface LpexCommand
Parameters:
lpexView - the document view in which the command was issued
parameters - the findText command parameters

LPEX
3.6.5

Copyright © 2012 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.