org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/ProjectMemo.java
changeset 456 12b549765c34
parent 455 5da55957c779
child 457 f1087591ff71
equal deleted inserted replaced
455:5da55957c779 456:12b549765c34
    30 import org.eclipse.core.runtime.CoreException;
    30 import org.eclipse.core.runtime.CoreException;
    31 import org.eclipse.core.runtime.Path;
    31 import org.eclipse.core.runtime.Path;
    32 import org.eclipse.ui.IMemento;
    32 import org.eclipse.ui.IMemento;
    33 import org.eclipse.ui.XMLMemento;
    33 import org.eclipse.ui.XMLMemento;
    34 import org.symbian.tools.mtw.core.projects.IMTWProject;
    34 import org.symbian.tools.mtw.core.projects.IMTWProject;
    35 import org.symbian.tools.mtw.internal.deployment.DeploymentTargetProviderRegistry;
    35 import org.symbian.tools.mtw.internal.deployment.DeploymentTargetTypesRegistry;
    36 import org.symbian.tools.mtw.ui.deployment.IDeploymentTarget;
    36 import org.symbian.tools.mtw.ui.deployment.IDeploymentTarget;
    37 import org.symbian.tools.mtw.ui.deployment.IDeploymentTargetProvider;
    37 import org.symbian.tools.mtw.ui.deployment.IDeploymentTargetType;
    38 
    38 
    39 public class ProjectMemo {
    39 public class ProjectMemo {
    40     private static final String DEPLOYMENT_PROVIDER = "providerId";
    40     private static final String DEPLOYMENT_PROVIDER = "providerId";
    41     private static final String TARGET = "targetId";
    41     private static final String TARGET = "targetId";
    42     private static final String TARGET_CONFIGURATION = "target";
    42     private static final String TARGET_CONFIGURATION = "target";
    94     public IDeploymentTarget getPreviousDeploymentTarget() {
    94     public IDeploymentTarget getPreviousDeploymentTarget() {
    95         try {
    95         try {
    96             checkMemento();
    96             checkMemento();
    97             String type = memento.getString(DEPLOYMENT_PROVIDER);
    97             String type = memento.getString(DEPLOYMENT_PROVIDER);
    98             if (type != null) {
    98             if (type != null) {
    99                 final IDeploymentTargetProvider provider = DeploymentTargetProviderRegistry.getInstance().getProvider(
    99                 final IDeploymentTargetType provider = DeploymentTargetTypesRegistry.getInstance().getProvider(
   100                         type);
   100                         type);
   101                 if (provider != null) {
   101                 if (provider != null) {
   102                     IDeploymentTarget target = provider.findTarget(project, memento.getString(TARGET));
   102                     IDeploymentTarget target = provider.findTarget(project, memento.getString(TARGET));
   103                     if (target != null) {
   103                     if (target != null) {
   104                         IMemento child = memento.getChild(TARGET_CONFIGURATION);
   104                         IMemento child = memento.getChild(TARGET_CONFIGURATION);