01: /*******************************************************************************
02: * Copyright (c) 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.ui.refactoring;
11:
12: import org.eclipse.osgi.service.resolver.BundleDescription;
13: import org.eclipse.pde.core.plugin.IPluginBase;
14: import org.eclipse.pde.core.plugin.IPluginModelBase;
15:
16: public class RenamePluginInfo {
17:
18: private IPluginModelBase fBase;
19:
20: private boolean fRenameProject;
21:
22: private boolean fUpdateReferences = true;
23:
24: private String fNewID;
25:
26: public IPluginModelBase getBase() {
27: return fBase;
28: }
29:
30: public void setBase(IPluginModelBase base) {
31: fBase = base;
32: }
33:
34: public boolean isRenameProject() {
35: return fRenameProject;
36: }
37:
38: public void setRenameProject(boolean renameProject) {
39: fRenameProject = renameProject;
40: }
41:
42: public boolean isUpdateReferences() {
43: return fUpdateReferences;
44: }
45:
46: public void setUpdateReferences(boolean updateReferences) {
47: fUpdateReferences = updateReferences;
48: }
49:
50: public String getNewID() {
51: return fNewID;
52: }
53:
54: public void setNewID(String newName) {
55: fNewID = newName;
56: }
57:
58: public String getCurrentID() {
59: BundleDescription desc = fBase.getBundleDescription();
60: if (desc != null)
61: return desc.getSymbolicName();
62: IPluginBase pb = fBase.getPluginBase();
63: return pb.getId();
64: }
65:
66: }
|