ilog.rules.studio.dvs.ui.execution.tabgroup

Class IlrDVSMainTab

  • All Implemented Interfaces:
    ilog.rules.studio.dvs.ui.execution.tabgroup.block.RulesetSourceBlock<org.eclipse.core.resources.IProject>, RulesetSourceChangeListener, org.eclipse.debug.ui.ILaunchConfigurationTab


    public abstract class IlrDVSMainTab
    extends DVSMainTab<org.eclipse.core.resources.IProject>
    An instance is used in each DVS launch configuration. This tab is used to specify:
    • The rule project
    • The output path for the report
    • How to retrieve custom data

    This class must be subclassed when you implement a custom DVS launcher.

    Since:
    JRules 7.0
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected ilog.rules.studio.dvs.ui.execution.tabgroup.block.IlrWorkingDirectoryBlock dir 
      protected org.eclipse.debug.core.ILaunchConfiguration launchConfig 
      protected ilog.rules.studio.dvs.ui.execution.tabgroup.block.IlrDVSMainTabOutputBlock output 
      protected ilog.rules.studio.dvs.ui.execution.tabgroup.block.IlrDVSMainTabSourceBlock<org.eclipse.core.resources.IProject> source 
    • Constructor Summary

      Constructors 
      Constructor and Description
      IlrDVSMainTab() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void createControl(org.eclipse.swt.widgets.Composite parent)
      Creates the top level control for this launch configuration tab under a given parent composite.
      abstract void createCustomControl(org.eclipse.swt.widgets.Composite comp)
      Adds a custom control to this control.
      protected java.lang.String getAbsolutePath(java.lang.String fullpath)
      Returns the absolute path calculated from a path relative to the current workspace.
      abstract org.eclipse.swt.graphics.Image getImage()
      Returns the image that is displayed before the name in the tabulation.
      abstract java.lang.String getName()
      Return the name of the tabulation.
      org.eclipse.core.resources.IProject getProject()
      Returns the rule project in this tabulation.
      protected void initializeFileFrom(org.eclipse.debug.core.ILaunchConfiguration configuration, java.lang.String attribute, org.eclipse.swt.widgets.Text field)
      Initializes a file text field in this tab using the value of an attribute stored in a configuration, restored in the OS way.
      void initializeFrom(org.eclipse.debug.core.ILaunchConfiguration configuration)
      Initializes the controls for this tab with values from a given launch configuration.
      boolean isValid(org.eclipse.debug.core.ILaunchConfiguration configuration)
      Tests if a given launch configuration is valid.
      void performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy configuration)
      Copies values from this tab to the given launch configuration.
      void setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy configuration)
      Initializes a given launch configuration with default values for this tab.
      • Methods inherited from class org.eclipse.debug.ui.AbstractLaunchConfigurationTab

        activated, canSave, createCheckButton, createPushButton, createRadioButton, createSeparator, createUpdateJob, createVerticalSpacer, deactivated, dispose, getControl, getId, getLaunchConfigurationDialog, getLaunchManager, getShell, getUpdateJobDelay, isDirty, launched, scheduleUpdateJob, setAttribute, setControl, setDirty, setErrorMessage, setMessage, updateLaunchConfigurationDialog
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • source

        protected ilog.rules.studio.dvs.ui.execution.tabgroup.block.IlrDVSMainTabSourceBlock<org.eclipse.core.resources.IProject> source
      • output

        protected ilog.rules.studio.dvs.ui.execution.tabgroup.block.IlrDVSMainTabOutputBlock output
      • launchConfig

        protected org.eclipse.debug.core.ILaunchConfiguration launchConfig
      • dir

        protected ilog.rules.studio.dvs.ui.execution.tabgroup.block.IlrWorkingDirectoryBlock dir
    • Constructor Detail

      • IlrDVSMainTab

        public IlrDVSMainTab()
    • Method Detail

      • createControl

        public void createControl(org.eclipse.swt.widgets.Composite parent)
        Creates the top level control for this launch configuration tab under a given parent composite. This method is called once on tab creation, after setLaunchConfigurationDialog has been called.

        Implementors must ensure that the control created can be accessed by calling getControl.

        In this implementation, once createCustomControl(Composite) has been called, the following items are created:

        • The rule project name
        • The output report path
        • The working directory area
        Specified by:
        createControl in interface org.eclipse.debug.ui.ILaunchConfigurationTab
        Overrides:
        createControl in class DVSMainTab<org.eclipse.core.resources.IProject>
        Parameters:
        parent - The parent composite.
      • createCustomControl

        public abstract void createCustomControl(org.eclipse.swt.widgets.Composite comp)
        Adds a custom control to this control. The parent composite is a GridLayout with three columns.

        This method is called from createControl(Composite).

        Parameters:
        comp - The parent composite.
      • getImage

        public abstract org.eclipse.swt.graphics.Image getImage()
        Returns the image that is displayed before the name in the tabulation.
        Specified by:
        getImage in interface org.eclipse.debug.ui.ILaunchConfigurationTab
        Overrides:
        getImage in class org.eclipse.debug.ui.AbstractLaunchConfigurationTab
        Returns:
        The image to display.
        See Also:
        getName()
      • getName

        public abstract java.lang.String getName()
        Return the name of the tabulation.
        Returns:
        The name to display.
      • initializeFrom

        public void initializeFrom(org.eclipse.debug.core.ILaunchConfiguration configuration)
        Initializes the controls for this tab with values from a given launch configuration. This method is called when a configuration is selected to be viewed or edited after the control for this tab has been created.

        This method should be redefined to manage the custom area. The client method should call this method.

        Specified by:
        initializeFrom in interface org.eclipse.debug.ui.ILaunchConfigurationTab
        Overrides:
        initializeFrom in class DVSMainTab<org.eclipse.core.resources.IProject>
        Parameters:
        configuration - The launch configuration.
      • performApply

        public void performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy configuration)
        Copies values from this tab to the given launch configuration. This method should be redefined to manage the custom area. The client method should call this method.
        Specified by:
        performApply in interface org.eclipse.debug.ui.ILaunchConfigurationTab
        Overrides:
        performApply in class DVSMainTab<org.eclipse.core.resources.IProject>
        Parameters:
        configuration - The launch configuration.
      • setDefaults

        public void setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy configuration)
        Initializes a given launch configuration with default values for this tab. This method may be called before the control for this tab is created.
        Specified by:
        setDefaults in interface org.eclipse.debug.ui.ILaunchConfigurationTab
        Overrides:
        setDefaults in class DVSMainTab<org.eclipse.core.resources.IProject>
        Parameters:
        configuration - The launch configuration.
      • getProject

        public org.eclipse.core.resources.IProject getProject()
        Returns the rule project in this tabulation.
        Returns:
        The rule project.
      • initializeFileFrom

        protected void initializeFileFrom(org.eclipse.debug.core.ILaunchConfiguration configuration,
                              java.lang.String attribute,
                              org.eclipse.swt.widgets.Text field)
        Initializes a file text field in this tab using the value of an attribute stored in a configuration, restored in the OS way. This method can be called in the initializeFrom(ILaunchConfiguration) method.
        Overrides:
        initializeFileFrom in class DVSMainTab<org.eclipse.core.resources.IProject>
        Parameters:
        configuration - The launch configuration.
        attribute - The attribute to read.
        field - The field where the value of the attribute will be set.
      • getAbsolutePath

        protected java.lang.String getAbsolutePath(java.lang.String fullpath)
                                            throws org.eclipse.core.runtime.CoreException
        Returns the absolute path calculated from a path relative to the current workspace.
        Overrides:
        getAbsolutePath in class DVSMainTab<org.eclipse.core.resources.IProject>
        Throws:
        org.eclipse.core.runtime.CoreException - if there is a problem calculating the absolute path.
        Parameters:
        fullpath - The file path relative to the workspace.
        Returns:
        The absolute path on the hard disk.
      • isValid

        public boolean isValid(org.eclipse.debug.core.ILaunchConfiguration configuration)
        Tests if a given launch configuration is valid.
        Specified by:
        isValid in interface org.eclipse.debug.ui.ILaunchConfigurationTab
        Overrides:
        isValid in class DVSMainTab<org.eclipse.core.resources.IProject>
        Returns:
        true if launchConfig is valid.

© Copyright IBM Corp. 1987, 2017