KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > corext > refactoring > reorg > JDTCopyRefactoringDescriptor


1 /*******************************************************************************
2  * Copyright (c) 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 package org.eclipse.jdt.internal.corext.refactoring.reorg;
12
13 import java.util.HashMap JavaDoc;
14 import java.util.Map JavaDoc;
15
16 import org.eclipse.core.runtime.Assert;
17
18 import org.eclipse.ltk.core.refactoring.participants.ReorgExecutionLog;
19
20 import org.eclipse.jdt.internal.corext.refactoring.JDTRefactoringDescriptor;
21
22 /**
23  * Descriptor object of a JDT copy refactoring.
24  *
25  * @since 3.3
26  */

27 public final class JDTCopyRefactoringDescriptor extends JDTRefactoringDescriptor {
28
29     /** The reorg execution log */
30     private final ReorgExecutionLog fLog;
31
32     /**
33      * Creates a new JDT copy refactoring descriptor.
34      *
35      * @param log
36      * the reorg execution log
37      * @param id
38      * the unique id of the refactoring
39      * @param project
40      * the project name, or <code>null</code>
41      * @param description
42      * the description
43      * @param comment
44      * the comment, or <code>null</code>
45      * @param arguments
46      * the argument map
47      * @param flags
48      * the flags
49      */

50     public JDTCopyRefactoringDescriptor(final ReorgExecutionLog log, final String JavaDoc id, final String JavaDoc project, final String JavaDoc description, final String JavaDoc comment, final Map JavaDoc arguments, final int flags) {
51         super(id, project, description, comment, arguments, flags);
52         Assert.isNotNull(log);
53         fLog= log;
54     }
55
56     /**
57      * {@inheritDoc}
58      */

59     public Map JavaDoc getArguments() {
60         final Map JavaDoc arguments= new HashMap JavaDoc(super.getArguments());
61         ReorgPolicyFactory.storeReorgExecutionLog(getProject(), arguments, fLog);
62         return arguments;
63     }
64 }
Popular Tags