KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > refactoring > RenamePluginInfo


1 /*******************************************************************************
2  * Copyright (c) 2007 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.pde.internal.ui.refactoring;
12
13 import org.eclipse.osgi.service.resolver.BundleDescription;
14 import org.eclipse.pde.core.plugin.IPluginBase;
15 import org.eclipse.pde.core.plugin.IPluginModelBase;
16
17 public class RenamePluginInfo {
18     
19     private IPluginModelBase fBase;
20     
21     private boolean fRenameProject;
22     
23     private boolean fUpdateReferences = true;
24     
25     private String JavaDoc fNewID;
26
27     public IPluginModelBase getBase() {
28         return fBase;
29     }
30
31     public void setBase(IPluginModelBase base) {
32         fBase = base;
33     }
34
35     public boolean isRenameProject() {
36         return fRenameProject;
37     }
38
39     public void setRenameProject(boolean renameProject) {
40         fRenameProject = renameProject;
41     }
42
43     public boolean isUpdateReferences() {
44         return fUpdateReferences;
45     }
46
47     public void setUpdateReferences(boolean updateReferences) {
48         fUpdateReferences = updateReferences;
49     }
50
51     public String JavaDoc getNewID() {
52         return fNewID;
53     }
54
55     public void setNewID(String JavaDoc newName) {
56         fNewID = newName;
57     }
58     
59     public String JavaDoc getCurrentID() {
60         BundleDescription desc = fBase.getBundleDescription();
61         if (desc != null)
62             return desc.getSymbolicName();
63         IPluginBase pb = fBase.getPluginBase();
64         return pb.getId();
65     }
66
67 }
68
Popular Tags