Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/CRefactoringDescription.java')
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/CRefactoringDescription.java82
1 files changed, 0 insertions, 82 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/CRefactoringDescription.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/CRefactoringDescription.java
deleted file mode 100644
index 86999000b95..00000000000
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/CRefactoringDescription.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Institute for Software, HSR Hochschule fuer Technik
- * Rapperswil, University of applied sciences and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Institute for Software (IFS)- initial API and implementation
- ******************************************************************************/
-package org.eclipse.cdt.internal.ui.refactoring;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ltk.core.refactoring.RefactoringDescriptor;
-
-import org.eclipse.cdt.core.model.CoreModel;
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.cdt.ui.CUIPlugin;
-
-import org.eclipse.cdt.internal.core.resources.ResourceLookup;
-
-/**
- * @author Emanuel Graf IFS
- * @deprecated Use {@link CRefactoringDescriptor} instead.
- */
-@Deprecated
-public abstract class CRefactoringDescription extends RefactoringDescriptor {
- public static final String FILE_NAME = "fileName"; //$NON-NLS-1$
- public static final String SELECTION = "selection"; //$NON-NLS-1$
- protected Map<String, String> arguments;
-
- public CRefactoringDescription(String id, String project, String description, String comment,
- int flags, Map<String, String> arguments) {
- super(id, project, description, comment, flags);
- this.arguments = arguments;
- }
-
- public Map<String, String> getParameterMap() {
- return arguments;
- }
-
- protected ISelection getSelection() throws CoreException {
- String selectStrings[] = arguments.get(SELECTION).split(","); //$NON-NLS-1$
- if (selectStrings.length < 2) {
- throw new CoreException(new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, "Illegal selection")); //$NON-NLS-1$
- }
- int offset = Integer.parseInt(selectStrings[0]);
- int length = Integer.parseInt(selectStrings[1]);
- return new TextSelection(offset, length);
- }
-
- protected ICProject getCProject() throws CoreException {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(getProject());
- ICProject cProject = CoreModel.getDefault().create(project);
- if (cProject == null) {
- throw new CoreException(new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, "Unknown Project")); //$NON-NLS-1$
- }
- return cProject;
- }
-
- protected IFile getFile() throws CoreException {
- try {
- String filename = arguments.get(FILE_NAME);
- return ResourceLookup.selectFileForLocationURI(new URI(filename),
- ResourcesPlugin.getWorkspace().getRoot().getProject(getProject()));
- } catch (URISyntaxException e) {
- throw new CoreException(new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, e.getMessage(), e));
- }
- }
-} \ No newline at end of file

Back to the top