org.eclipse.corona.repository.adapter.wp
Class CheckoutListener

java.lang.Object
  extended by org.eclipse.corona.repository.adapter.wp.CheckoutListener
All Implemented Interfaces:
org.eclipse.core.runtime.jobs.IJobChangeListener

public class CheckoutListener
extends java.lang.Object
implements org.eclipse.core.runtime.jobs.IJobChangeListener

CheckoutListener identifies if CVS checkout has been finished and adds collaboration nature to the checked out project. The listener is registered before checkout starts and is unregistered after checkout finishes. The event of "done" checkout is identified by event name.
TODO: find constant identifying the event of ending CVS checkout.

Author:
cwpl-pkaczmar

Field Summary
 java.lang.String ADDING_CORONA_NATURE_JOB
           
(package private)  org.eclipse.core.runtime.jobs.IJobManager jobManager
           
(package private) static java.util.ArrayList knownProjects
           
(package private) static CheckoutListener listener
           
(package private) static java.util.ArrayList projectNatureToAdd
           
(package private) static java.util.HashMap wPToPC
           
 
Method Summary
 void aboutToRun(org.eclipse.core.runtime.jobs.IJobChangeEvent event)
           
 void awake(org.eclipse.core.runtime.jobs.IJobChangeEvent event)
           
 void done(org.eclipse.core.runtime.jobs.IJobChangeEvent event)
          Identifies the end of CVS Checkout operation and stats a job to "add collaboration nature" to the checked out project.
static CheckoutListener getCheckoutListener(org.eclipse.core.runtime.jobs.IJobManager jobManager, java.lang.String projectName, java.lang.String containerUri)
          Returns the Checkout Listener if available or creates a new one if unavailable.
 void running(org.eclipse.core.runtime.jobs.IJobChangeEvent event)
           
 void scheduled(org.eclipse.core.runtime.jobs.IJobChangeEvent event)
           
 void sleeping(org.eclipse.core.runtime.jobs.IJobChangeEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADDING_CORONA_NATURE_JOB

public java.lang.String ADDING_CORONA_NATURE_JOB

jobManager

org.eclipse.core.runtime.jobs.IJobManager jobManager

knownProjects

static java.util.ArrayList knownProjects

projectNatureToAdd

static java.util.ArrayList projectNatureToAdd

wPToPC

static java.util.HashMap wPToPC

listener

static CheckoutListener listener
Method Detail

getCheckoutListener

public static CheckoutListener getCheckoutListener(org.eclipse.core.runtime.jobs.IJobManager jobManager,
                                                   java.lang.String projectName,
                                                   java.lang.String containerUri)
Returns the Checkout Listener if available or creates a new one if unavailable. The method adds projectName to the list of "monitored" projects. If monitored projects list is empty the listener is unregistered.

Parameters:
jobManager -
projectName -
containerUri -
Returns:

aboutToRun

public void aboutToRun(org.eclipse.core.runtime.jobs.IJobChangeEvent event)
Specified by:
aboutToRun in interface org.eclipse.core.runtime.jobs.IJobChangeListener

awake

public void awake(org.eclipse.core.runtime.jobs.IJobChangeEvent event)
Specified by:
awake in interface org.eclipse.core.runtime.jobs.IJobChangeListener

done

public void done(org.eclipse.core.runtime.jobs.IJobChangeEvent event)
Identifies the end of CVS Checkout operation and stats a job to "add collaboration nature" to the checked out project. The project is removed from the list of monitored projects, if the list is empty, the listener is unregistered.

Specified by:
done in interface org.eclipse.core.runtime.jobs.IJobChangeListener

running

public void running(org.eclipse.core.runtime.jobs.IJobChangeEvent event)
Specified by:
running in interface org.eclipse.core.runtime.jobs.IJobChangeListener

scheduled

public void scheduled(org.eclipse.core.runtime.jobs.IJobChangeEvent event)
Specified by:
scheduled in interface org.eclipse.core.runtime.jobs.IJobChangeListener

sleeping

public void sleeping(org.eclipse.core.runtime.jobs.IJobChangeEvent event)
Specified by:
sleeping in interface org.eclipse.core.runtime.jobs.IJobChangeListener

Copyright 2006 IBM Corporation and others.
All Rights Reserved.