project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/utils/BldInfImportWrapper.java
equal
deleted
inserted
replaced
26 import org.eclipse.core.runtime.IProgressMonitor; |
26 import org.eclipse.core.runtime.IProgressMonitor; |
27 import org.eclipse.core.runtime.IStatus; |
27 import org.eclipse.core.runtime.IStatus; |
28 import org.eclipse.core.runtime.NullProgressMonitor; |
28 import org.eclipse.core.runtime.NullProgressMonitor; |
29 import org.eclipse.core.runtime.Status; |
29 import org.eclipse.core.runtime.Status; |
30 |
30 |
|
31 import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin; |
31 import com.nokia.carbide.cdt.builder.EpocEngineHelper; |
32 import com.nokia.carbide.cdt.builder.EpocEngineHelper; |
32 import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo; |
33 import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo; |
33 import com.nokia.carbide.cpp.internal.project.ui.ProjectUIPlugin; |
34 import com.nokia.carbide.cpp.internal.project.ui.ProjectUIPlugin; |
34 import com.nokia.carbide.cpp.project.core.ProjectCorePlugin; |
35 import com.nokia.carbide.cpp.project.core.ProjectCorePlugin; |
35 import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext; |
36 import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext; |
75 } |
76 } |
76 |
77 |
77 /** |
78 /** |
78 * Create a Carbide project from member variable data. This is basically the same code as from com.nokia.carbide.cpp.internal.project.ui.importWizards#performFinish() |
79 * Create a Carbide project from member variable data. This is basically the same code as from com.nokia.carbide.cpp.internal.project.ui.importWizards#performFinish() |
79 */ |
80 */ |
80 public void createProjectFromBldInf(){ |
81 public void createProjectFromBldInf(final boolean isSBSv2){ |
81 |
82 |
82 final String projectRelativePath = bldInfFile.removeFirstSegments(rootDirectory.segmentCount()).setDevice(null).toOSString(); |
83 final String projectRelativePath = bldInfFile.removeFirstSegments(rootDirectory.segmentCount()).setDevice(null).toOSString(); |
83 |
84 |
84 // run this in a workspace job |
85 // run this in a workspace job |
85 WorkspaceJob job = new WorkspaceJob("Creating Carbide Project Wrapper") { |
86 WorkspaceJob job = new WorkspaceJob("Creating Carbide Project Wrapper") { |
106 } |
107 } |
107 } // for |
108 } // for |
108 |
109 |
109 project = ProjectCorePlugin.createProject(projectName, rootDirectory.toOSString()); |
110 project = ProjectCorePlugin.createProject(projectName, rootDirectory.toOSString()); |
110 monitor.worked(1); |
111 monitor.worked(1); |
|
112 |
|
113 project.setSessionProperty(CarbideBuilderPlugin.SBSV2_PROJECT, isSBSv2); |
|
114 |
111 // TODO pass PKG file path to postProjectCreatedActions, currently passing null |
115 // TODO pass PKG file path to postProjectCreatedActions, currently passing null |
|
116 |
|
117 |
112 ProjectCorePlugin.postProjectCreatedActions(project, projectRelativePath, selectedConfigs, components, debugMMP, null, monitor); |
118 ProjectCorePlugin.postProjectCreatedActions(project, projectRelativePath, selectedConfigs, components, debugMMP, null, monitor); |
113 |
119 |
114 if (monitor.isCanceled()) { |
120 if (monitor.isCanceled()) { |
115 // the user cancelled the import so delete the project |
121 // the user cancelled the import so delete the project |
116 project.delete(false, true, null); |
122 project.delete(false, true, null); |