Rule Designer API

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

java.lang.Object
  extended by org.eclipse.debug.ui.AbstractLaunchConfigurationTab
      extended by ilog.rules.studio.dvs.ui.execution.tabgroup.IlrDVSMainTab
All Implemented Interfaces:
org.eclipse.debug.ui.ILaunchConfigurationTab

public abstract class IlrDVSMainTab
extends org.eclipse.debug.ui.AbstractLaunchConfigurationTab

An instance is used in each DVS launch configuration. This tab is used to specify:

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

Since:
JRules 7.0

Field Summary
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 source
           
 
Constructor Summary
IlrDVSMainTab()
           
 
Method Summary
 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  String getAbsolutePath(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  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, 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 launchConfig)
          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, getErrorMessage, getId, getLaunchConfigurationDialog, getLaunchManager, getMessage, getShell, getUpdateJobDelay, isDirty, launched, scheduleUpdateJob, setAttribute, setControl, setDirty, setErrorMessage, setLaunchConfigurationDialog, 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 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

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.

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:

Parameters:
parent - 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 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.

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.

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.

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,
                                  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.

Parameters:
configuration - The launch configuration.
attribute - The attribute to read.
field - The field where the value of the attribute will be set.

getAbsolutePath

protected String getAbsolutePath(String fullpath)
                          throws org.eclipse.core.runtime.CoreException
Returns the absolute path calculated from a path relative to the current workspace.

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 launchConfig)
Tests if a given launch configuration is valid.

Specified by:
isValid in interface org.eclipse.debug.ui.ILaunchConfigurationTab
Overrides:
isValid in class org.eclipse.debug.ui.AbstractLaunchConfigurationTab
Returns:
true if launchConfig is valid.

Rule Designer API

© Copyright IBM Corp. 1987, 2013