com.ibm.rational.common.test.editor.framework.extensions

Class DefaultTestLayoutProvider

    • Field Detail

      • _OPTIONS_ID

        public static String _OPTIONS_ID
    • Constructor Detail

      • DefaultTestLayoutProvider

        public DefaultTestLayoutProvider()
    • Method Detail

      • getOptionsHandler

        public <T extends com.ibm.rational.common.test.editor.framework.kernel.interfaces.IOptionsHandler> T getOptionsHandler(Class<T> handlerClass)
        Returns one option handler that is an instance of the specified class.
        Type Parameters:
        T -
        Parameters:
        handlerClass -
        Returns:
      • isValidFeature

        protected boolean isValidFeature(String attribute)
        Verifies that the feature is enabled for the given test. By the time this method is called, getTestEditor() will return a valid TestEditor object.

        This implementation always returns true.

        Editors that support multiple features need to override this method and supply proper checks.

        Parameters:
        attribute - String feature_id specified via extension.
        Returns:
        boolean true
      • flushCachedData

        public void flushCachedData()
        Overrides:
        flushCachedData in class com.ibm.rational.common.test.editor.framework.kernel.InteractiveLayoutProvider
      • isValidType

        protected boolean isValidType(String type)
        Verifies that the given test type (specified via testOptions extension point) is applicable to this Test. By the time this method is called, getTestEditor() will return a valid TestEditor object.

        This implementation performs the following check:

        return ( type != null ) && getTestEditor().getTest().getType().equals( type );

        Client typically do not need to overridethis method.

        Parameters:
        type - String type specified via extension.
        Returns:
        boolean true
      • drawOptions

        protected void drawOptions(CTabFolder folder,
                       boolean sNew)
      • drawUpperPart

        public Composite drawUpperPart(SashForm parent,
                              boolean sNew)
        Parameters:
        parent -
        Returns:
        true if there was anything to display, false otherwise.
      • drawBottomPart

        public Composite drawBottomPart(Composite parent,
                               boolean sNew)
        Parameters:
        parent -
        Returns:
        true if there was anything to display, false otherwise.
      • layoutControls

        public boolean layoutControls(CBActionElement selectedElement)
        Description copied from class: ExtLayoutProvider
        Implementing classes should override and provide UI for editing. However, first thing, must call super.layoutControls(selection)
        Specified by:
        layoutControls in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ILayoutProvider
        Overrides:
        layoutControls in class ExtLayoutProvider
        Parameters:
        selectedElement - CBActionElement
        Returns:
        boolean true. .
        See Also:
        com.ibm.rational.common.editor.framework.kernel.interfaces.ILayoutProvider#layoutControls(org.eclipse.jface.viewers.StructuredSelection)
      • getTabLinksThreshold

        protected int getTabLinksThreshold()
        Returns minimum number of optons tabs for which no links need to be drawn. If the number of actual tabs are greater than the return value, hyperlinks will be drawn below the tab folder. Each hyperlink will activate corresponding option tab. If total number of tabs is greater than ten, only first ten will will be represented by hyperlinks, and the "More..." link will be added at the end. The "More" link will display popup menu with the entire list of tabs.

        Labels for links and popup menu items are the same as labels of the tabs.

        Returns:
        int.
      • linkActivated

        public void linkActivated(Control linkLabel)
        Overrides:
        linkActivated in class com.ibm.rational.common.test.editor.framework.kernel.InteractiveLayoutProvider
      • linkActivated2

        public boolean linkActivated2(Object data)
      • refreshControls

        public boolean refreshControls(CBActionElement selectedElement)
        Description copied from class: ExtLayoutProvider
        Implementing classes should override and provide UI for editing. However, first thing, must call super.refreshControls(selection)
        Specified by:
        refreshControls in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ILayoutProvider
        Overrides:
        refreshControls in class ExtLayoutProvider
        Returns:
        boolean true.
        See Also:
        com.ibm.rational.common.editor.framework.kernel.interfaces.ILayoutProvider#refreshControls(org.eclipse.jface.viewers.StructuredSelection)
      • setFolder

        protected void setFolder(CTabFolder folder)
      • navigateTo

        public boolean navigateTo(com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITargetDescriptor targetDescriptor)
        Specified by:
        navigateTo in interface com.ibm.rational.common.test.editor.framework.kernel.interfaces.ILayoutProvider
        Overrides:
        navigateTo in class ExtLayoutProvider
        See Also:
        ILayoutProvider.navigateTo(com.ibm.rational.common.test.editor.framework.kernel.interfaces.ITargetDescriptor)
IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2013. All rights reserved.