JIVE Platform
Release 0.3.1

edu.buffalo.cse.jive.ui.search.pages
Class VariableChangedSearchPage

java.lang.Object
  extended by edu.buffalo.cse.jive.ui.search.AbstractJiveSearchPage
      extended by edu.buffalo.cse.jive.ui.search.pages.VariableChangedSearchPage
All Implemented Interfaces:
IJiveSearchPage, EventListener, ModifyListener, org.eclipse.swt.internal.SWTEventListener

public class VariableChangedSearchPage
extends AbstractJiveSearchPage

An IJiveSearchPage used to create an VariableChangedSearchQuery. The page contains input fields for a class, an optional instance number, an optional method name, a variable name, and a (possibly empty) condition on the variable.

When an instance number is given, the condition is checked only for that particular instance of the class. When it is left out, the condition is checked for every instance of the class. If a method name is supplied, then the variable is assumed to be a parameter or local variable of the method. Otherwise, the variable is considered a field.

See Also:
VariableChangedSearchQuery

Field Summary
protected  Text classText
          A fully-qualified class name in which the condition is being checked.
protected  Composite control
          The top-level control returned by getControl().
protected  Text instanceText
          An optional instance number specifying what instance of the class should be checked.
protected  Text methodText
          A method name specifying in which method the variable resides.
protected  Combo operatorCombo
          A relational operator selector.
protected  Text valueText
          A value to be used on the right side of the operator.
protected  Text variableText
          A variable (either field or local variable) that should be checked.
 
Constructor Summary
VariableChangedSearchPage()
           
 
Method Summary
 void createControl(Composite parent)
          Creates the UI controls for the search page.
 IJiveSearchQuery createSearchQuery()
          Returns a new IJiveSearchQuery to be used to perform the search.
 Control getControl()
          Returns the page's top-level UI control which was created by IJiveSearchPage.createControl(Composite).
 void initializeInput(ISelection selection)
          Initializes the search page's input fields using the provided ISelection.
 boolean isInputValid()
          Returns whether the search page's input is valid.
 
Methods inherited from class edu.buffalo.cse.jive.ui.search.AbstractJiveSearchPage
getContainer, modifyText, setContainer, updatePerformAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

control

protected Composite control
The top-level control returned by getControl().


classText

protected Text classText
A fully-qualified class name in which the condition is being checked.


instanceText

protected Text instanceText
An optional instance number specifying what instance of the class should be checked.


methodText

protected Text methodText
A method name specifying in which method the variable resides.


variableText

protected Text variableText
A variable (either field or local variable) that should be checked.


operatorCombo

protected Combo operatorCombo
A relational operator selector.


valueText

protected Text valueText
A value to be used on the right side of the operator.

Constructor Detail

VariableChangedSearchPage

public VariableChangedSearchPage()
Method Detail

createControl

public void createControl(Composite parent)
Description copied from interface: IJiveSearchPage
Creates the UI controls for the search page. The page's top-level UI Control should have the supplied Composite as its parent.

Parameters:
parent - the parent of the page's top-level UI control

getControl

public Control getControl()
Description copied from interface: IJiveSearchPage
Returns the page's top-level UI control which was created by IJiveSearchPage.createControl(Composite).

Returns:
the page's top-level UI control

createSearchQuery

public IJiveSearchQuery createSearchQuery()
Description copied from interface: IJiveSearchPage
Returns a new IJiveSearchQuery to be used to perform the search. This method is called when the Search button is selected.

Returns:
a new search query to be run

initializeInput

public void initializeInput(ISelection selection)
Description copied from interface: IJiveSearchPage
Initializes the search page's input fields using the provided ISelection. This method is called whenever the search page is displayed by the Search dialog.

Parameters:
selection - the current workbench selection

isInputValid

public boolean isInputValid()
Description copied from interface: IJiveSearchPage
Returns whether the search page's input is valid. This method should be called to determine if the Search button should be enabled.

Returns:
true if the input is valid, false otherwise

JIVE Platform
Release 0.3.1