LPEX
4.4.0

com.ibm.lpex.samples
Class TestCommand

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

public class TestCommand
extends Object
implements LpexCommand

Sample command - display a message. Running this command displays, on the editor message line, a short message identifying itself and its parameters.

Here is the TestCommand source code.

To run this sample:

A user command is a Java class that implements the com.ibm.lpex.core.LpexCommand interface.

See Also:
All the samples

Constructor Summary
TestCommand()
           
 
Method Summary
static String commandName(LpexCommand lpexCommand, LpexView lpexView)
          Returns the name assigned to an instance of a user-defined command in the specified view.
 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

TestCommand

public TestCommand()
Method Detail

doCommand

public boolean doCommand(LpexView lpexView,
                         String parameters)
Runs this command.

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

commandName

public static String commandName(LpexCommand lpexCommand,
                                 LpexView lpexView)
Returns the name assigned to an instance of a user-defined command in the specified view.

Parameters:
lpexCommand - instance of an LPEX command
lpexView - a document view in which it is defined
Returns:
command name as defined with e.g., set commandClass.

LPEX
4.4.0

Copyright � 2016 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.