TPTP 4.5.0 Testing Tools Project
Internal API Specification

org.eclipse.hyades.test.tools.core.internal.common.codegen
Class DelegateProjectDependencyUpdater

java.lang.Object
  extended by org.eclipse.hyades.test.tools.core.internal.common.codegen.DelegateProjectDependencyUpdater
All Implemented Interfaces:
IProjectDependencyUpdater
Direct Known Subclasses:
JUnitGenerator.JUnitProjectDependencyUpdater

public abstract class DelegateProjectDependencyUpdater
extends java.lang.Object
implements IProjectDependencyUpdater

Utility dependency updater that delegates the update to a user-provided updater. Typically, a specific type provider will implement this class and use it to wrap the user-provided dependency updater. Mandatory dependencies can be registered in the constructor.


Constructor Summary
DelegateProjectDependencyUpdater(IProjectDependencyUpdater delegate)
           
 
Method Summary
 void addRequiredPlugin(java.lang.String pluginId, java.lang.String jarName)
          Add to the project dependencies the specified plugin.
 void addRequiredProject(org.eclipse.core.resources.IProject project)
          Add to the project dependencies the specified project.
 void adjustProject(org.eclipse.core.resources.IProject project, org.eclipse.core.runtime.IProgressMonitor monitor)
          Performs the actual change to the specified project.
 java.util.Collection previewAdjustProject(org.eclipse.core.resources.IProject project)
          Determines which changes the call to adjustProject would make.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegateProjectDependencyUpdater

public DelegateProjectDependencyUpdater(IProjectDependencyUpdater delegate)
Method Detail

addRequiredPlugin

public void addRequiredPlugin(java.lang.String pluginId,
                              java.lang.String jarName)
Description copied from interface: IProjectDependencyUpdater
Add to the project dependencies the specified plugin.

Specified by:
addRequiredPlugin in interface IProjectDependencyUpdater
jarName - An optional jar name. This parameter may be used as a hint by some implementations. null is valid and means that the complete libraries of the specified plugin should be taken into account.

addRequiredProject

public void addRequiredProject(org.eclipse.core.resources.IProject project)
Description copied from interface: IProjectDependencyUpdater
Add to the project dependencies the specified project.

Specified by:
addRequiredProject in interface IProjectDependencyUpdater
Parameters:
project - A project.

adjustProject

public void adjustProject(org.eclipse.core.resources.IProject project,
                          org.eclipse.core.runtime.IProgressMonitor monitor)
                   throws org.eclipse.core.runtime.CoreException
Description copied from interface: IProjectDependencyUpdater
Performs the actual change to the specified project. This project specification is updated according to the dependencies that have been registered previously.

Specified by:
adjustProject in interface IProjectDependencyUpdater
Throws:
org.eclipse.core.runtime.CoreException

previewAdjustProject

public java.util.Collection previewAdjustProject(org.eclipse.core.resources.IProject project)
Description copied from interface: IProjectDependencyUpdater
Determines which changes the call to adjustProject would make. Note for later release: the signature and semantics of this method should be changed to "Is there any change to make to the project?", so this method should return a boolean. Returning the collection of entries to added is too limiting for the implementations, and furthermore this is not a useful information since all callers to this method just test whether the returned list is empty or not.

Specified by:
previewAdjustProject in interface IProjectDependencyUpdater
Returns:
A collection of strings indicating the dependencies that need to be added to the project. An empty list indicates that the project is already up-to-date and does not need adjusting.

TPTP 4.5.0 Testing Tools Project
Internal API Specification