org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetWrapper.java
equal
deleted
inserted
replaced
28 import org.eclipse.ui.model.IWorkbenchAdapter; |
28 import org.eclipse.ui.model.IWorkbenchAdapter; |
29 import org.eclipse.ui.model.IWorkbenchAdapter2; |
29 import org.eclipse.ui.model.IWorkbenchAdapter2; |
30 import org.symbian.tools.mtw.core.projects.IMTWProject; |
30 import org.symbian.tools.mtw.core.projects.IMTWProject; |
31 import org.symbian.tools.mtw.core.runtimes.IPackager; |
31 import org.symbian.tools.mtw.core.runtimes.IPackager; |
32 import org.symbian.tools.mtw.ui.deployment.IDeploymentTarget; |
32 import org.symbian.tools.mtw.ui.deployment.IDeploymentTarget; |
33 import org.symbian.tools.mtw.ui.deployment.IDeploymentTargetType; |
|
34 |
33 |
35 public class DeploymentTargetWrapper implements IDeploymentTarget { |
34 public class DeploymentTargetWrapper implements IDeploymentTarget { |
36 public class WorkbenchAdapter2Wrapper implements IWorkbenchAdapter2 { |
35 public class WorkbenchAdapter2Wrapper implements IWorkbenchAdapter2 { |
37 private final IWorkbenchAdapter2 adapter; |
36 private final IWorkbenchAdapter2 adapter; |
38 |
37 |
74 |
73 |
75 public Object getParent(Object o) { |
74 public Object getParent(Object o) { |
76 return adapter.getParent(((DeploymentTargetWrapper) o).getActualTarget()); |
75 return adapter.getParent(((DeploymentTargetWrapper) o).getActualTarget()); |
77 } |
76 } |
78 } |
77 } |
79 final DeploymentTargetTypeDescriptor type; |
78 |
|
79 private final DeploymentTargetTypeDescriptor type; |
80 private final IDeploymentTarget target; |
80 private final IDeploymentTarget target; |
|
81 |
|
82 public void save(IMemento memento) { |
|
83 target.save(memento); |
|
84 } |
|
85 |
|
86 public void init(IMTWProject project, IPackager packager, IMemento memento) { |
|
87 target.init(project, packager, memento); |
|
88 } |
81 |
89 |
82 public DeploymentTargetWrapper(IDeploymentTarget target, DeploymentTargetTypeDescriptor type) { |
90 public DeploymentTargetWrapper(IDeploymentTarget target, DeploymentTargetTypeDescriptor type) { |
83 this.target = target; |
91 this.target = target; |
84 this.type = type; |
92 this.type = type; |
85 } |
93 } |
144 int result = 1; |
152 int result = 1; |
145 result = prime * result + ((target == null) ? 0 : target.hashCode()); |
153 result = prime * result + ((target == null) ? 0 : target.hashCode()); |
146 return result; |
154 return result; |
147 } |
155 } |
148 |
156 |
149 public void save(IMemento child) { |
157 public DeploymentTargetTypeDescriptor getType() { |
150 target.save(child); |
|
151 } |
|
152 |
|
153 public void load(IMemento child) { |
|
154 target.load(child); |
|
155 } |
|
156 |
|
157 public IDeploymentTargetType getType() { |
|
158 return type; |
158 return type; |
159 } |
159 } |
160 |
160 |
161 public IDeploymentTarget getActualTarget() { |
161 public IDeploymentTarget getActualTarget() { |
162 return target; |
162 return target; |