KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > core > ILaunchConfigurationMigrationDelegate


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.debug.core;
13
14 import org.eclipse.core.runtime.CoreException;
15
16 /**
17  * Responsible for migrating launch configurations between different versions of Eclipse.
18  * A migration delegate is contributed as an optional attribute of a
19  * <code>launchConfigurationType</code> extension and is responsible for identifying
20  * migration candidates and migrating launch configurations of that type.
21  * <p>
22  * For example, since 3.2 launch configurations may have resources mapped to them. A migration
23  * delegate could assign appropriate resources to a launch configuration create in an earlier
24  * version.
25  * </p>
26  * @since 3.2
27  */

28 public interface ILaunchConfigurationMigrationDelegate {
29
30     /**
31      * Returns whether the given launch configuration requires migration.
32      *
33      * @param candidate potential migration candidate
34      * @return whether the given launch configuration requires migration
35      * @throws CoreException if an exception occurs determining the status of the
36      * given configuration
37      */

38     public boolean isCandidate(ILaunchConfiguration candidate) throws CoreException;
39     
40     /**
41      * Migrates the given launch configuration to be compatible with the current tooling.
42      *
43      * @param candidate the candidate to be migrated, which can be a launch configuration
44      * or working copy
45      * @throws CoreException if an exception occurs during migration
46      */

47     public void migrate(ILaunchConfiguration candidate) throws CoreException;
48     
49 }
50
Popular Tags