upload tizen1.0 source
[sdk/ide/product.git] / org.eclipse.cdt.ui / src / org / eclipse / cdt / internal / ui / refactoring / togglefunction / EmptyRefactoringDescription.java
1 /*******************************************************************************
2  * Copyright (c) 2010 Institute for Software, HSR Hochschule fuer Technik  
3  * Rapperswil, University of applied sciences and others.
4  * All rights reserved. This program and the accompanying materials 
5  * are made available under the terms of the Eclipse Public License v1.0 
6  * which accompanies this distribution, and is available at 
7  * http://www.eclipse.org/legal/epl-v10.html  
8  * 
9  * Contributors: 
10  *              Martin Schwab & Thomas Kallenberg - initial API and implementation 
11  ******************************************************************************/
12 package org.eclipse.cdt.internal.ui.refactoring.togglefunction;
13
14 import java.util.HashMap;
15
16 import org.eclipse.core.runtime.CoreException;
17 import org.eclipse.jface.text.TextSelection;
18 import org.eclipse.ltk.core.refactoring.Refactoring;
19 import org.eclipse.ltk.core.refactoring.RefactoringStatus;
20
21 import org.eclipse.cdt.internal.ui.refactoring.CRefactoringDescription;
22
23 class EmptyRefactoringDescription extends CRefactoringDescription {
24         @SuppressWarnings("nls")
25         public EmptyRefactoringDescription() {
26                 super("id", "proj", "desc", "comment", 0, new HashMap<String, String>());
27         }
28
29         @Override
30         public Refactoring createRefactoring(RefactoringStatus status) throws CoreException {
31                 return new ToggleRefactoring(getFile(), (TextSelection)getSelection(), getCProject());
32         }
33 }