--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java Mon Apr 06 15:04:50 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java Tue Apr 07 17:19:23 2009 -0500
@@ -171,7 +171,97 @@
for (IPath testPath : testFiles){
testExtensionPaths.add(testPath);
}
+ }
+
+ /**
+ * Return list of all named project extensions referenced by the given
+ * bld.inf full path. This function differentiates between PRJ_EXTENSIONS and PRJ_TESTEXTENSIONS
+ * @param bldInfFilePath - The IPath to the bld.inf file that is to be preprocessed.
+ * @param buildConfigs - List of build configuration to parse for.
+ * @param normalExtensions - The list of named PRJ_EXTENSIONS for the bld.inf
+ * @param testExtensions - The list of named PRJ_TESTEXTENSIONS for the bld.inf
+ * @param monitor
+ */
+ public static void getNamedExtensions(final IPath bldInfFilePath, List<ISymbianBuildContext> buildConfigs,
+ List<IExtension> normalExtensions, List<IExtension> testExtensions, IProgressMonitor monitor) {
+ // get a bld.inf view for each build target. take the union of all extensions for each view
+ // of the bld.inf file.
+ final Set<IExtension> normalFiles = new LinkedHashSet<IExtension>();
+ final Set<IExtension> testFiles = new LinkedHashSet<IExtension>();
+
+ monitor.beginTask("Scanning bld.inf project extensions", buildConfigs.size());
+
+ for (final ISymbianBuildContext context : buildConfigs) {
+ EpocEnginePlugin.runWithBldInfData(bldInfFilePath,
+ new DefaultViewConfiguration(context, bldInfFilePath, new AcceptedNodesViewFilter()),
+ new BldInfDataRunnableAdapter() {
+ public Object run(IBldInfData data) {
+ for (IExtension extension : data.getExtensions()) {
+ if (extension.getName() != null) {
+ normalFiles.add(extension);
+ }
+ }
+ for (IExtension extension : data.getTestExtensions()) {
+ if (extension.getName() != null) {
+ testFiles.add(extension);
+ }
+ }
+ return null;
+ }
+ });
+
+ monitor.worked(1);
+ }
+
+ monitor.done();
+
+ for (IExtension normal : normalFiles){
+ normalExtensions.add(normal);
+ }
+ for (IExtension test : testFiles){
+ testExtensions.add(test);
+ }
+ }
+
+ /**
+ * Determines if the given bld.inf file contains any unnamed project extensions
+ * @param bldInfFilePath - The IPath to the bld.inf file that is to be preprocessed.
+ * @param buildConfigs - List of build configuration to parse for.
+ * @param monitor
+ * @return
+ */
+ public static boolean hasUnnamedExtensions(final IPath bldInfFilePath, List<ISymbianBuildContext> buildConfigs, IProgressMonitor monitor) {
+
+ final Set<IExtension> extensions = new LinkedHashSet<IExtension>();
+
+ monitor.beginTask("Scanning bld.inf project extensions", buildConfigs.size());
+
+ for (final ISymbianBuildContext context : buildConfigs) {
+ EpocEnginePlugin.runWithBldInfData(bldInfFilePath,
+ new DefaultViewConfiguration(context, bldInfFilePath, new AcceptedNodesViewFilter()),
+ new BldInfDataRunnableAdapter() {
+ public Object run(IBldInfData data) {
+ for (IExtension extension : data.getExtensions()) {
+ if (extension.getName() == null) {
+ extensions.add(extension);
+ }
+ }
+ for (IExtension extension : data.getTestExtensions()) {
+ if (extension.getName() == null) {
+ extensions.add(extension);
+ }
+ }
+ return null;
+ }
+ });
+
+ monitor.worked(1);
+ }
+
+ monitor.done();
+
+ return extensions.size() > 0;
}
/**
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/builder/CarbideCPPBuilder.java Mon Apr 06 15:04:50 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/builder/CarbideCPPBuilder.java Tue Apr 07 17:19:23 2009 -0500
@@ -66,6 +66,7 @@
import com.nokia.carbide.cpp.epoc.engine.EpocEnginePlugin;
import com.nokia.carbide.cpp.epoc.engine.MMPDataRunnableAdapter;
import com.nokia.carbide.cpp.epoc.engine.PKGViewRunnableAdapter;
+import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IExtension;
import com.nokia.carbide.cpp.epoc.engine.model.mmp.EMMPLanguage;
import com.nokia.carbide.cpp.epoc.engine.model.mmp.EMMPStatement;
import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPData;
@@ -695,8 +696,23 @@
// get the list of mmp/make files for this build configuration
EpocEngineHelper.getMakMakeFiles(cpi.getAbsoluteBldInfPath(), buildConfigList, normalMakMakePaths, testMakMakePaths, new NullProgressMonitor());
-
- // if we're not supposed to build test components then clear the list
+
+ if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(cpi.getProject())) {
+ // add any named extensions
+ List<IExtension> normalNamedExtensionsList = new ArrayList<IExtension>();
+ List<IExtension> testNamedExtensionsList = new ArrayList<IExtension>();
+ EpocEngineHelper.getNamedExtensions(cpi.getAbsoluteBldInfPath(), buildConfigList,
+ normalNamedExtensionsList, testNamedExtensionsList, new NullProgressMonitor());
+
+ for (IExtension extension : normalNamedExtensionsList) {
+ normalMakMakePaths.add(new Path(extension.getName()));
+ }
+ for (IExtension extension : testNamedExtensionsList) {
+ testMakMakePaths.add(new Path(extension.getName()));
+ }
+ }
+
+ // if we're not supposed to build test components then clear the list
if (cpi.isBuildingFromInf() && !cpi.isBuildingTestComps()) {
testMakMakePaths.clear();
}
@@ -722,16 +738,13 @@
}
}
- if (buildingSubset) {
- List<IPath> normalExtensionPaths = new ArrayList<IPath>();
- List<IPath> testExtensionPaths = new ArrayList<IPath>();
- EpocEngineHelper.getExtensions(cpi.getAbsoluteBldInfPath(), buildConfigList, normalExtensionPaths, testExtensionPaths, new NullProgressMonitor());
-
- if (normalExtensionPaths.size() > 0 || testExtensionPaths.size() > 0) {
- String warningText = "WARNING: PRJ_EXTENSIONS and PRJ_TESTEXTENSIONS will be excluded because you've selected a subset of the bld.inf.";
- launcher.writeToConsole(warningText + "\n");
- CarbideBuilderPlugin.createCarbideProjectMarker(cpi.getProject(), IMarker.SEVERITY_WARNING, warningText, IMarker.PRIORITY_LOW);
+ if (buildingSubset && EpocEngineHelper.hasUnnamedExtensions(cpi.getAbsoluteBldInfPath(), buildConfigList, new NullProgressMonitor())) {
+ String warningText = "WARNING: PRJ_EXTENSIONS and PRJ_TESTEXTENSIONS will be excluded from the build because you've selected to build a subset of the bld.inf, and there is no way to specify unnamed components.";
+ if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(cpi.getProject())) {
+ warningText = warningText + " If you name the extensions then you can select them to be built from the UI.";
}
+ launcher.writeToConsole(warningText + "\n");
+ CarbideBuilderPlugin.createCarbideProjectMarker(cpi.getProject(), IMarker.SEVERITY_WARNING, warningText, IMarker.PRIORITY_LOW);
}
}
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/MMPSelectionUI.java Mon Apr 06 15:04:50 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/MMPSelectionUI.java Tue Apr 07 17:19:23 2009 -0500
@@ -18,6 +18,7 @@
import com.nokia.carbide.cdt.builder.EpocEngineHelper;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
+import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IExtension;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
import com.nokia.cpp.internal.api.utils.core.Check;
import com.nokia.cpp.internal.api.utils.core.ListenerList;
@@ -169,12 +170,13 @@
private List<? extends ISymbianBuildContext> buildConfigs;
private IPath bldInfFile;
private final IRunnableContext runnableContext;
- private List<FileInfo> data = Collections.EMPTY_LIST;
- private boolean hasProjectExtensions;
+ private List<FileInfo> data = Collections.emptyList();
+ private boolean hasUnnamedProjectExtensions;
private ViewerFilter testFileFilter;
private ViewerFilter extMakFileFilter;
private int lastSortColumn = BUILD_ORDER_COLUMN; // default
private int sortDirection = 1; // default
+ private boolean useSBSv2Builder;
/**
* Create the composite
@@ -367,12 +369,14 @@
* @param bldInfFile IPath
* @param buildConfigs List<ISymbianBuildContext>
*/
- public void setBldInfFile(final IPath bldInfFile, final List buildConfigs) {
+ public void setBldInfFile(final IPath bldInfFile, final List buildConfigs, final boolean useSBSv2Builder) {
if (bldInfFile.equals(this.bldInfFile) && buildConfigs.equals(this.buildConfigs))
return;
this.bldInfFile = bldInfFile;
this.buildConfigs = buildConfigs;
+ this.useSBSv2Builder = useSBSv2Builder;
+
try {
runnableContext.run(true, true, new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) {
@@ -388,11 +392,23 @@
for (IPath currPath : testMakMakeList) {
data.add(new FileInfo(currPath, ++i, true));
}
- List<IPath> normalExtensionsList = new ArrayList<IPath>();
- List<IPath> testExtensionsList = new ArrayList<IPath>();
- EpocEngineHelper.getExtensions(bldInfFile, buildConfigs,
- normalExtensionsList, testExtensionsList, monitor);
- hasProjectExtensions = normalExtensionsList.size() > 0 || testExtensionsList.size() > 0;
+
+ // named extensions are only supported in SBSv2
+ if (useSBSv2Builder) {
+ List<IExtension> normalNamedExtensionsList = new ArrayList<IExtension>();
+ List<IExtension> testNamedExtensionsList = new ArrayList<IExtension>();
+ EpocEngineHelper.getNamedExtensions(bldInfFile, buildConfigs,
+ normalNamedExtensionsList, testNamedExtensionsList, monitor);
+
+ for (IExtension extension : normalNamedExtensionsList) {
+ data.add(new FileInfo(new Path(extension.getName()), ++i, false));
+ }
+ for (IExtension extension : testNamedExtensionsList) {
+ data.add(new FileInfo(new Path(extension.getName()), ++i, true));
+ }
+ }
+
+ hasUnnamedProjectExtensions = EpocEngineHelper.hasUnnamedExtensions(bldInfFile, buildConfigs, monitor);
}
});
} catch (InvocationTargetException e) {
@@ -468,14 +484,6 @@
updateCheckedStateFromViewer();
}
- /**
- * Return true if the current bld.inf file has project extensions
- * @return boolean
- */
- public boolean hasProjectExtensions() {
- return hasProjectExtensions;
- }
-
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
@@ -566,4 +574,15 @@
return true;
}
+
+ public String getExtensionsWarningMessage() {
+ if (hasUnnamedProjectExtensions && !isCheckedAll()) {
+ if (useSBSv2Builder) {
+ return Messages.getString("MMPSelectionUI.prjExtensionsWarningSBSv2"); //$NON-NLS-1$
+ } else {
+ return Messages.getString("MMPSelectionUI.prjExtensionsWarningSBSv1"); //$NON-NLS-1$
+ }
+ }
+ return null;
+ }
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/messages.properties Mon Apr 06 15:04:50 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/messages.properties Tue Apr 07 17:19:23 2009 -0500
@@ -12,3 +12,5 @@
MMPSelectionUI.DeselectAllLabel=Deselect All
MMPSelectionUI.ExcludeExtMakefilesLabel=Exclude extension makefiles
MMPSelectionUI.ExcludeTestCompsLabel=Exclude test components
+MMPSelectionUI.prjExtensionsWarningSBSv1=Warning: This bld.inf contains project extensions (prj_extensions and/or prj_testextensions). These will only be built when building the entire bld.inf.
+MMPSelectionUI.prjExtensionsWarningSBSv2=Warning: This bld.inf contains unnamed project extensions (prj_extensions and/or prj_testextensions). These will only be built when building the entire bld.inf.\r\nThis only applies to unnamed extensions, so if you provide a name in the extension, this will not be an issue.
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideCPPProjectSettingsPage.java Mon Apr 06 15:04:50 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideCPPProjectSettingsPage.java Tue Apr 07 17:19:23 2009 -0500
@@ -16,8 +16,43 @@
*/
package com.nokia.carbide.cdt.internal.builder.ui;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableColorProvider;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+import org.eclipse.ui.dialogs.PropertyPage;
+
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
-import com.nokia.carbide.cdt.builder.EpocEngineHelper;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
import com.nokia.carbide.cdt.internal.api.builder.ui.MMPSelectionUI;
import com.nokia.carbide.cdt.internal.api.builder.ui.MMPSelectionUI.FileInfo;
@@ -26,25 +61,6 @@
import com.nokia.carbide.cpp.internal.qt.core.QtCorePlugin;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-import java.util.*;
-import java.util.List;
-
public class CarbideCPPProjectSettingsPage extends PropertyPage {
private Label buildDirDynLabel;
@@ -57,9 +73,6 @@
private Group optionsGroup;
private BuildSettingsUI buildSettingsUI;
- List<IPath> normalExtensionPaths = new ArrayList<IPath>();
- List<IPath> testExtensionPaths = new ArrayList<IPath>();
-
protected Control createContents(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
@@ -107,7 +120,6 @@
}
});
-
// spacer
new Label(composite, SWT.NONE).setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 2, 1));
@@ -137,7 +149,6 @@
optionsGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
boolean sbsv2Project = false;
-
IProject project = getProject();
if (project != null) {
sbsv2Project = CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(project);
@@ -344,10 +355,7 @@
List<ISymbianBuildContext> buildConfigList = new ArrayList<ISymbianBuildContext>();
buildConfigList.addAll(cpi.getBuildConfigurations());
- EpocEngineHelper.getExtensions(cpi.getAbsoluteBldInfPath(), buildConfigList, normalExtensionPaths, testExtensionPaths, new NullProgressMonitor());
-
enableOrDisableControls();
- checkValid();
}
}
@@ -383,6 +391,8 @@
if (!CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(project)) {
buildSettingsUI.setMMPChangedActionEnabledState(useProjectSettings && !isQtProject);
}
+
+ checkValid();
}
private void initMMPSelectionUI(CarbideProjectInfo cpi) {
@@ -395,7 +405,7 @@
selectionUI.setLayoutData(gridData);
// set the data
- selectionUI.setBldInfFile(cpi.getAbsoluteBldInfPath(), cpi.getBuildConfigurations());
+ selectionUI.setBldInfFile(cpi.getAbsoluteBldInfPath(), cpi.getBuildConfigurations(), CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(cpi.getProject()));
// set checked state
selectionUI.setAllChecked(false);
@@ -512,12 +522,11 @@
// if there are any new-style prj extensions, warn them that they won't be built
// when not building the entire bld.inf.
- if (normalExtensionPaths.size() > 0 || testExtensionPaths.size() > 0) {
- if (selectedComponentsButton.getSelection()) {
- if (!selectionUI.isCheckedAll()) {
- setMessage(Messages.getString("CarbideCPPProjectSettingsPage.prjExtensionsWarning"), WARNING); //$NON-NLS-1$
- }
- }
+ if (selectedComponentsButton.getSelection()) {
+ String warning = selectionUI.getExtensionsWarningMessage();
+ if (warning != null) {
+ setMessage(warning, WARNING);
+ }
}
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/messages.properties Mon Apr 06 15:04:50 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/messages.properties Tue Apr 07 17:19:23 2009 -0500
@@ -88,7 +88,6 @@
CarbideCPPProjectSettingsPage.ConfigureWorkspaceSetting=Configure Workspace Settings
CarbideCPPProjectSettingsPage.ProjectSettingsGroup=Project Settings
CarbideCPPProjectSettingsPage.ProjectSettingsGroupToolTip=These settings override the workspace settings for this project.
-CarbideCPPProjectSettingsPage.prjExtensionsWarning=Warning: This bld.inf contains project extensions (prj_extensions and/or prj_testextensions). These will only be built when building the entire bld.inf.
BuilderPreferencePage.EmulatorBuildGroup=Emulator Build Options
BuilderPreferencePage.EmulatorEnvOption=Use built-in Nokia x86 environment variables for WINSCW builds
--- a/project/com.nokia.carbide.cpp.epoc.engine/src/com/nokia/carbide/cpp/epoc/engine/model/bldinf/IExtension.java Mon Apr 06 15:04:50 2009 -0500
+++ b/project/com.nokia.carbide.cpp.epoc.engine/src/com/nokia/carbide/cpp/epoc/engine/model/bldinf/IExtension.java Tue Apr 07 17:19:23 2009 -0500
@@ -53,6 +53,12 @@
/** Access/modify the list of dependencies. No interpretation is performed. As in the bld.inf, no extension will be present. */
List<IPath> getDependencies();
+ /** Get the name associated with the extension, may be null for unnamed extension */
+ String getName();
+
+ /** Set the name associated with the extension, may be null for unnamed extension */
+ void setName(String name);
+
/** Get the tool name, may be null */
String getToolName();
--- a/project/com.nokia.carbide.cpp.epoc.engine/src/com/nokia/carbide/internal/cpp/epoc/engine/model/bldinf/Extension.java Mon Apr 06 15:04:50 2009 -0500
+++ b/project/com.nokia.carbide.cpp.epoc.engine/src/com/nokia/carbide/internal/cpp/epoc/engine/model/bldinf/Extension.java Tue Apr 07 17:19:23 2009 -0500
@@ -33,6 +33,7 @@
private IPath targetPath;
private IPath templatePath;
private String toolName;
+ private String extensionName;
public Extension() {
}
@@ -44,6 +45,7 @@
this.targetPath = other.targetPath;
this.templatePath = other.templatePath;
this.toolName = other.toolName;
+ this.extensionName = other.extensionName;
}
@Override
@@ -60,6 +62,8 @@
+ ((templatePath == null) ? 0 : templatePath.hashCode());
result = prime * result
+ ((toolName == null) ? 0 : toolName.hashCode());
+ result = prime * result
+ + ((extensionName == null) ? 0 : extensionName.hashCode());
return result;
}
@@ -104,6 +108,11 @@
return false;
} else if (!toolName.equalsIgnoreCase(other.toolName))
return false;
+ if (extensionName == null) {
+ if (other.extensionName != null)
+ return false;
+ } else if (!extensionName.equalsIgnoreCase(other.extensionName))
+ return false;
return true;
}
@@ -122,6 +131,14 @@
return dependencies;
}
+ /*
+ * (non-Javadoc)
+ * @see com.nokia.carbide.cpp.epoc.engine.model.bldinf.IExtension#getName()
+ */
+ public String getName() {
+ return extensionName;
+ }
+
/* (non-Javadoc)
* @see com.nokia.carbide.cpp.epoc.engine.model.bldinf.IExtension#getOptions()
*/
@@ -157,6 +174,14 @@
return toolName;
}
+ /*
+ * (non-Javadoc)
+ * @see com.nokia.carbide.cpp.epoc.engine.model.bldinf.IExtension#setName(java.lang.String)
+ */
+ public void setName(String name) {
+ extensionName = name;
+ }
+
/* (non-Javadoc)
* @see com.nokia.carbide.cpp.epoc.engine.model.bldinf.IExtension#setTargetPath(org.eclipse.core.runtime.IPath)
*/
--- a/project/com.nokia.carbide.cpp.epoc.engine/src/com/nokia/carbide/internal/cpp/epoc/engine/model/bldinf/ExtensionListConverter.java Mon Apr 06 15:04:50 2009 -0500
+++ b/project/com.nokia.carbide.cpp.epoc.engine/src/com/nokia/carbide/internal/cpp/epoc/engine/model/bldinf/ExtensionListConverter.java Tue Apr 07 17:19:23 2009 -0500
@@ -77,6 +77,9 @@
return null;
}
extension.setTemplatePath(FileUtils.createPossiblyRelativePath(extensionStmt.getArguments().get(1).getValue()));
+ if (extensionStmt.getArguments().size() > 2) {
+ extension.setName(extensionStmt.getArguments().get(2).getValue());
+ }
for (IASTBldInfExtensionStatement stmt : extensionStmt.getList()) {
if (stmt.getArguments() == null || stmt.getArguments().size() == 0) {
bldInfView.addErrorMessage(Messages.getString("ExtensionListConverter.MissingArgumentsError"), stmt); //$NON-NLS-1$
@@ -137,6 +140,9 @@
IASTListNode<IASTLiteralTextNode> arguments = ASTFactory.createListNode(" "); //$NON-NLS-1$
arguments.add(ASTFactory.createPreprocessorLiteralTextNode(EXTENSION_KEYWORD));
arguments.add(ASTFactory.createPreprocessorLiteralTextNode(bldInfView.pathString(extension.getTemplatePath())));
+ if (extension.getName() != null) {
+ arguments.add(ASTFactory.createPreprocessorLiteralTextNode(extension.getName()));
+ }
IASTListNode<IASTBldInfExtensionStatement> stmts = ASTBldInfFactory.createBldInfExtensionStatementList();
if (extension.getTargetPath() != null) {
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/importWizards/BldInfImportWizard.java Mon Apr 06 15:04:50 2009 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/importWizards/BldInfImportWizard.java Tue Apr 07 17:19:23 2009 -0500
@@ -122,7 +122,7 @@
newProject = ProjectCorePlugin.createProject(projectName, rootDirectory.toOSString());
monitor.worked(1);
- newProject.setSessionProperty(CarbideBuilderPlugin.SBSV2_PROJECT, Boolean.valueOf(bldInfSelectionPage.useSBSv2Builder()));
+ newProject.setSessionProperty(CarbideBuilderPlugin.SBSV2_PROJECT, Boolean.valueOf(useSBSv2Builder()));
// TODO pass PKG file path to postProjectCreatedActions, currently passing null
ProjectCorePlugin.postProjectCreatedActions(newProject, projectRelativePath, selectedConfigs, components, debugMMP, null, monitor);
@@ -188,4 +188,8 @@
// setting the last page is good enough
projectPropertiesPage.setPageComplete(false);
}
+
+ public boolean useSBSv2Builder() {
+ return bldInfSelectionPage.useSBSv2Builder();
+ }
}
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/importWizards/MMPSelectionPage.java Mon Apr 06 15:04:50 2009 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/importWizards/MMPSelectionPage.java Tue Apr 07 17:19:23 2009 -0500
@@ -93,12 +93,11 @@
setErrorMessage(Messages.MMPSelectionPage_noMMPsSelectedError);
return false;
}
- // if there are any new-style prj extensions, warn them that they won't be built
+ // if there are any unnamed new-style prj extensions, warn them that they won't be built
// when not building the entire bld.inf.
- boolean hasProjectExtensions = selectionUI.hasProjectExtensions();
- if (hasProjectExtensions && !areAllMakMakeReferencesChecked()) {
- setMessage(Messages.MMPSelectionPage_prjExtensionsWarning, WARNING);
- return true;
+ String warning = selectionUI.getExtensionsWarningMessage();
+ if (warning != null) {
+ setMessage(warning, WARNING);
}
return true;
}
@@ -111,7 +110,7 @@
// know if we need to re-parse again if either of these changes, e.g. the user
// hits back and selects a different bld.inf or set of configs
if (visible) {
- selectionUI.setBldInfFile(new Path(theWizard.getBldInfFile()), theWizard.getSelectedConfigs());
+ selectionUI.setBldInfFile(new Path(theWizard.getBldInfFile()), theWizard.getSelectedConfigs(), theWizard.useSBSv2Builder());
}
super.setVisible(visible);
}
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/importWizards/Messages.java Mon Apr 06 15:04:50 2009 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/importWizards/Messages.java Tue Apr 07 17:19:23 2009 -0500
@@ -71,8 +71,6 @@
public static String MMPSelectionPage_noMMPsSelectedError;
- public static String MMPSelectionPage_prjExtensionsWarning;
-
public static String ProjectPropertiesPage_noProjectSpecifiedError;
public static String ProjectPropertiesPage_projectExistsError;
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/importWizards/messages.properties Mon Apr 06 15:04:50 2009 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/importWizards/messages.properties Tue Apr 07 17:19:23 2009 -0500
@@ -29,7 +29,6 @@
MMPSelectionPage_sortByMMPNameCheckboxTooltip=Sorts the list alphabetically by name. Otherwise they are displayed in the order listed in the bld.inf file.
MMPSelectionPage_noMMPsFoundWarning=Note: No mmp or extension make files were found in the bld.inf file.
MMPSelectionPage_noMMPsSelectedError=Please select at least one mmp or extension makefile.
-MMPSelectionPage_prjExtensionsWarning=Warning: This bld.inf contains project extensions (prj_extensions and/or prj_testextensions). These will only be built when building the entire bld.inf.
BldInfImportWizard_title=File Import Wizard
BldInfSelectionPage_title=Symbian OS Bld.inf file
BldInfSelectionPage_description=Import an existing Symbian OS project