debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/AbstractSymbianLaunchShortcut.java
changeset 994 1ffe668575e7
parent 956 d1e221a2875f
child 1099 88ab187cbeb8
equal deleted inserted replaced
993:df87e2d581e4 994:1ffe668575e7
     1 package com.nokia.cdt.internal.debug.launch;
     1 package com.nokia.cdt.internal.debug.launch;
     2 
     2 
     3 import java.util.List;
     3 import java.util.List;
     4 
     4 
     5 import org.eclipse.cdt.debug.core.executables.Executable;
     5 import org.eclipse.cdt.debug.core.executables.Executable;
       
     6 import org.eclipse.cdt.debug.core.executables.ISourceFileRemapping;
     6 import org.eclipse.core.resources.IFile;
     7 import org.eclipse.core.resources.IFile;
     7 import org.eclipse.core.resources.IProject;
     8 import org.eclipse.core.resources.IProject;
     8 import org.eclipse.core.resources.IResource;
     9 import org.eclipse.core.resources.IResource;
     9 import org.eclipse.core.runtime.CoreException;
    10 import org.eclipse.core.runtime.CoreException;
    10 import org.eclipse.core.runtime.IAdaptable;
    11 import org.eclipse.core.runtime.IAdaptable;
    17 import org.eclipse.ui.IEditorInput;
    18 import org.eclipse.ui.IEditorInput;
    18 import org.eclipse.ui.IEditorPart;
    19 import org.eclipse.ui.IEditorPart;
    19 import org.eclipse.ui.IFileEditorInput;
    20 import org.eclipse.ui.IFileEditorInput;
    20 
    21 
    21 import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
    22 import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
       
    23 import com.nokia.cdt.debug.cw.symbian.ui.executables.SymbianSourceFileRemapping;
    22 
    24 
    23 public abstract class AbstractSymbianLaunchShortcut implements ILaunchShortcut2 {
    25 public abstract class AbstractSymbianLaunchShortcut implements ILaunchShortcut2 {
    24 
    26 
    25 	protected abstract void launchProject(IProject project, Executable executable, IPath defaultMMP, String mode);
    27 	protected abstract void launchProject(IProject project, Executable executable, IPath defaultMMP, String mode);
    26 
    28 
    90 					{
    92 					{
    91 						defaultMMP = filePath;
    93 						defaultMMP = filePath;
    92 					}
    94 					}
    93 					else
    95 					else
    94 					{		
    96 					{		
    95 						executable = new Executable(file.getLocation(), file.getProject(), file);
    97 						executable = new Executable(file.getLocation(), file.getProject(), file,
       
    98 								new ISourceFileRemapping[] {new SymbianSourceFileRemapping()});
    96 						launchProject(file.getProject(), executable, defaultMMP, mode);
    99 						launchProject(file.getProject(), executable, defaultMMP, mode);
    97 						launched = true;					
   100 						launched = true;					
    98 					}
   101 					}
    99 				}
   102 				}
   100 			}
   103 			}
   126 					IPath filePath = file.getLocation();
   129 					IPath filePath = file.getLocation();
   127 					if ("mmp".equalsIgnoreCase(filePath.getFileExtension()))
   130 					if ("mmp".equalsIgnoreCase(filePath.getFileExtension()))
   128 					{
   131 					{
   129 						defaultMMP = filePath;
   132 						defaultMMP = filePath;
   130 					}
   133 					}
   131 					Executable executable = new Executable(file.getLocation(), file.getProject(), file);
   134 					Executable executable = new Executable(file.getLocation(), file.getProject(), file,
       
   135 							new ISourceFileRemapping[] {new SymbianSourceFileRemapping()});
   132 					return LaunchPlugin.getDefault().getLaunchConfigurations(file.getProject(), executable, defaultMMP);
   136 					return LaunchPlugin.getDefault().getLaunchConfigurations(file.getProject(), executable, defaultMMP);
   133 				}
   137 				}
   134 			}
   138 			}
   135 		}
   139 		}
   136 		
   140