diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerConfigInfoFactory.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerConfigInfoFactory.java index a0c71b17577..e542a558ed8 100644 --- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerConfigInfoFactory.java +++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerConfigInfoFactory.java @@ -291,10 +291,8 @@ public class ScannerConfigInfoFactory { IProjectDescription description = project.getDescription(); ICommand builder = ScannerConfigNature.getBuildSpec(description, builderID); args.put(name, value); - ICommand newBuilder = description.newCommand(); - newBuilder.setBuilderName(builder.getBuilderName()); - newBuilder.setArguments(args); - description = MakeProjectNature.setBuildSpec(description, newBuilder); + builder.setArguments(args); + MakeProjectNature.setBuildSpec(description, builder); project.setDescription(description, null); } diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerInfoCollector.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerInfoCollector.java index b99fd411ee0..372fbb774bb 100644 --- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerInfoCollector.java +++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerInfoCollector.java @@ -294,7 +294,10 @@ public class ScannerInfoCollector implements IScannerInfoCollector { String includePath = (String) i.next(); IPath realPath = new Path(includePath); if (!realPath.toFile().exists()) { - String translatedPath = new CygpathTranslator(currentProject, includePath).run(); + String translatedPath = includePath; + if (Platform.getOS().equals(Platform.OS_WIN32)) { + translatedPath = new CygpathTranslator(currentProject, includePath).run(); + } if (translatedPath != null) { if (!translatedPath.equals(includePath)) { // Check if the translated path exists diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/ScannerInfoConsoleParserUtility.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/ScannerInfoConsoleParserUtility.java index 5914db5c4c1..3b7cd7c4882 100644 --- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/ScannerInfoConsoleParserUtility.java +++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/ScannerInfoConsoleParserUtility.java @@ -322,7 +322,7 @@ public class ScannerInfoConsoleParserUtility implements IScannerInfoConsoleParse for (Iterator i = includes.iterator(); i.hasNext(); ) { String include = (String) i.next(); IPath includePath = new Path(include); - if (!includePath.isAbsolute()) { + if (!includePath.isAbsolute() && !includePath.isUNC()) { // do not translate UNC paths // First try the current working directory IPath cwd = getWorkingDirectory(); if (!cwd.isAbsolute()) { diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveryOptionsBlock.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveryOptionsBlock.java index 07b3cf15899..c6914852497 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveryOptionsBlock.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveryOptionsBlock.java @@ -71,8 +71,6 @@ public class DiscoveryOptionsBlock extends AbstractCOptionPage { private static final String PREFIX_BP = "BuildPathInfoBlock"; //$NON-NLS-1$ private static final String SC_GROUP_LABEL = PREFIX_BP + ".scGroup.label"; //$NON-NLS-1$ private static final String SC_ENABLED_LABEL = PREFIX_BP + ".scGroup.enabled.label"; //$NON-NLS-1$ - // private static final String SC_OPTIONS_LABEL = PREFIX + - // ".scGroup.options.label"; //$NON-NLS-1$ private static final String MISSING_BUILDER_MSG = "ScannerConfigOptionsDialog.label.missingBuilderInformation"; //$NON-NLS-1$ private static final String PREFIX = "ScannerConfigOptionsDialog"; //$NON-NLS-1$ @@ -156,11 +154,15 @@ public class DiscoveryOptionsBlock extends AbstractCOptionPage { IScannerConfigBuilderInfo buildInfo; IProject project = getContainer().getProject(); if (project != null) { + if (needsSCNature) { + ScannerConfigNature.addScannerConfigNature(getContainer().getProject()); + needsSCNature = false; + } buildInfo = MakeCorePlugin.createScannerConfigBuildInfo(project, ScannerConfigBuilder.BUILDER_ID); if (isScannerConfigDiscoveryEnabled()) { - createDiscoveredPathContainer(project); + createDiscoveredPathContainer(project, monitor); } else { - removeDiscoveredPathContainer(project); + removeDiscoveredPathContainer(project, monitor); } // create a new discovered scanner config store MakeCorePlugin.getDefault().getDiscoveryManager().removeDiscoveredInfo(project); @@ -193,9 +195,10 @@ public class DiscoveryOptionsBlock extends AbstractCOptionPage { } /** * @param project + * @param monitor * @throws CModelException */ - private void createDiscoveredPathContainer(IProject project) throws CModelException { + private void createDiscoveredPathContainer(IProject project, IProgressMonitor monitor) throws CModelException { IPathEntry container = CoreModel.newContainerEntry(DiscoveredPathContainer.CONTAINER_ID); ICProject cProject = CoreModel.getDefault().create(project); if (cProject != null) { @@ -203,13 +206,12 @@ public class DiscoveryOptionsBlock extends AbstractCOptionPage { List newEntries = new ArrayList(Arrays.asList(entries)); if (!newEntries.contains(container)) { newEntries.add(container); - cProject.setRawPathEntries((IPathEntry[])newEntries.toArray(new IPathEntry[newEntries.size()]), - new NullProgressMonitor()); + cProject.setRawPathEntries((IPathEntry[])newEntries.toArray(new IPathEntry[newEntries.size()]), monitor); } } } - private void removeDiscoveredPathContainer(IProject project) throws CModelException { + private void removeDiscoveredPathContainer(IProject project, IProgressMonitor monitor) throws CModelException { IPathEntry container = CoreModel.newContainerEntry(DiscoveredPathContainer.CONTAINER_ID); ICProject cProject = CoreModel.getDefault().create(project); if (cProject != null) { @@ -217,8 +219,7 @@ public class DiscoveryOptionsBlock extends AbstractCOptionPage { List newEntries = new ArrayList(Arrays.asList(entries)); if (newEntries.contains(container)) { newEntries.remove(container); - cProject.setRawPathEntries((IPathEntry[])newEntries.toArray(new IPathEntry[newEntries.size()]), - new NullProgressMonitor()); + cProject.setRawPathEntries((IPathEntry[])newEntries.toArray(new IPathEntry[newEntries.size()]), monitor); } } } @@ -326,32 +327,14 @@ public class DiscoveryOptionsBlock extends AbstractCOptionPage { // VMIR* old projects will have discovery disabled by default scEnabledButton.setSelection(needsSCNature ? false : fBuildInfo.isAutoDiscoveryEnabled()); scEnabledButton.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - handleScannerConfigEnable(); + enableAllControls(); } }); // handleScannerConfigEnable(); Only if true in VMIR* return true; } - /** - * Handles scanner configuration discovery selection change - */ - private void handleScannerConfigEnable() { - boolean enable = scEnabledButton.getSelection(); - if (enable && needsSCNature) { - // first install the SC nature - try { - ScannerConfigNature.addScannerConfigNature(getContainer().getProject()); - needsSCNature = false; - } catch (CoreException e) { - MakeCorePlugin.log(e.getStatus()); - } - } - enableAllControls(); - } - /** * Fills console parser maps */