Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 117791 Details for
Bug 250982
CDTCommonProjectWizard does not report progress
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch for HEAD
bug_250982_wizard_progress_3 (text/plain), 23.78 KB, created by
Vivian Kong
on 2008-11-13 11:09:47 EST
(
hide
)
Description:
patch for HEAD
Filename:
MIME Type:
Creator:
Vivian Kong
Created:
2008-11-13 11:09:47 EST
Size:
23.78 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.cdt.ui >Index: src/org/eclipse/cdt/ui/wizards/CCProjectWizard.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CCProjectWizard.java,v >retrieving revision 1.9 >diff -u -r1.9 CCProjectWizard.java >--- src/org/eclipse/cdt/ui/wizards/CCProjectWizard.java 17 Oct 2008 15:05:52 -0000 1.9 >+++ src/org/eclipse/cdt/ui/wizards/CCProjectWizard.java 13 Nov 2008 16:07:46 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007 Intel Corporation and others. >+ * Copyright (c) 2007, 2008 Intel Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -7,12 +7,14 @@ > * > * Contributors: > * Intel Corporation - initial API and implementation >+ * IBM Corporation > *******************************************************************************/ > package org.eclipse.cdt.ui.wizards; > > import org.eclipse.core.resources.IProject; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.NullProgressMonitor; >+import org.eclipse.core.runtime.SubProgressMonitor; > > import org.eclipse.cdt.core.CCProjectNature; > import org.eclipse.cdt.core.CCorePlugin; >@@ -32,10 +34,16 @@ > > @Override > protected IProject continueCreation(IProject prj) { >+ if (continueCreationMonitor == null) { >+ continueCreationMonitor = new NullProgressMonitor(); >+ } >+ > try { >- CProjectNature.addCNature(prj, new NullProgressMonitor()); >- CCProjectNature.addCCNature(prj, new NullProgressMonitor()); >+ continueCreationMonitor.beginTask(UIMessages.getString("CCProjectWizard.0"), 2); //$NON-NLS-1$ >+ CProjectNature.addCNature(prj, new SubProgressMonitor(continueCreationMonitor, 1)); >+ CCProjectNature.addCCNature(prj, new SubProgressMonitor(continueCreationMonitor, 1)); > } catch (CoreException e) {} >+ finally {continueCreationMonitor.done();} > return prj; > } > >Index: src/org/eclipse/cdt/ui/wizards/CDTCommonProjectWizard.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CDTCommonProjectWizard.java,v >retrieving revision 1.24 >diff -u -r1.24 CDTCommonProjectWizard.java >--- src/org/eclipse/cdt/ui/wizards/CDTCommonProjectWizard.java 17 Oct 2008 15:05:52 -0000 1.24 >+++ src/org/eclipse/cdt/ui/wizards/CDTCommonProjectWizard.java 13 Nov 2008 16:07:46 -0000 >@@ -34,6 +34,7 @@ > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.NullProgressMonitor; > import org.eclipse.core.runtime.Platform; >+import org.eclipse.core.runtime.SubProgressMonitor; > import org.eclipse.core.runtime.content.IContentType; > import org.eclipse.core.runtime.content.IContentTypeManager; > import org.eclipse.jface.dialogs.MessageDialog; >@@ -230,23 +231,70 @@ > final boolean defaults = _defaults; > return new IRunnableWithProgress() { > public void run(IProgressMonitor imonitor) throws InvocationTargetException, InterruptedException { >+ final Exception except[] = new Exception[1]; > getShell().getDisplay().syncExec(new Runnable() { >- public void run() { >+ public void run() { >+ IRunnableWithProgress op= new WorkspaceModifyDelegatingOperation(new IRunnableWithProgress() { >+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { >+ final IProgressMonitor fMonitor; >+ if (monitor == null) { >+ fMonitor= new NullProgressMonitor(); >+ } else { >+ fMonitor = monitor; >+ } >+ fMonitor.beginTask(CUIPlugin.getResourceString("CProjectWizard.op_description"), 100); //$NON-NLS-1$ >+ fMonitor.worked(10); >+ try { >+ newProject = createIProject(lastProjectName, lastProjectLocation, new SubProgressMonitor(fMonitor, 40)); >+ if (newProject != null) >+ fMainPage.h_selected.createProject(newProject, defaults, onFinish, new SubProgressMonitor(fMonitor, 40)); >+ fMonitor.worked(10); >+ } catch (CoreException e) { CUIPlugin.log(e); } >+ finally { >+ fMonitor.done(); >+ } >+ } >+ }); > try { >- newProject = createIProject(lastProjectName, lastProjectLocation); >- if (newProject != null) >- fMainPage.h_selected.createProject(newProject, defaults, onFinish); >- } catch (CoreException e) { CUIPlugin.log(e); } >+ getContainer().run(false, true, op); >+ } catch (InvocationTargetException e) { >+ except[0] = e; >+ } catch (InterruptedException e) { >+ except[0] = e; >+ } > } > }); >+ if (except[0] != null) { >+ if (except[0] instanceof InvocationTargetException) { >+ throw (InvocationTargetException)except[0]; >+ } >+ if (except[0] instanceof InterruptedException) { >+ throw (InterruptedException)except[0]; >+ } >+ throw new InvocationTargetException(except[0]); >+ } > } > }; > } >+ >+ public IProject createIProject(final String name, final URI location) throws CoreException{ >+ return createIProject(name, location, new NullProgressMonitor()); >+ } >+ >+ /** >+ * @since 5.1 >+ */ >+ protected IProgressMonitor continueCreationMonitor; > > /** >+ * @param monitor >+ * @since 5.1 > * > */ >- public IProject createIProject(final String name, final URI location) throws CoreException{ >+ public IProject createIProject(final String name, final URI location, IProgressMonitor monitor) throws CoreException{ >+ >+ monitor.beginTask("createIProject", 100); >+ > if (newProject != null) return newProject; > > IWorkspace workspace = ResourcesPlugin.getWorkspace(); >@@ -260,23 +308,28 @@ > IProjectDescription description = workspace.newProjectDescription(newProjectHandle.getName()); > if(location != null) > description.setLocationURI(location); >- newProject = CCorePlugin.getDefault().createCDTProject(description, newProjectHandle, new NullProgressMonitor()); >+ newProject = CCorePlugin.getDefault().createCDTProject(description, newProjectHandle, new SubProgressMonitor(monitor,25)); > } else { > IWorkspaceRunnable runnable = new IWorkspaceRunnable() { > public void run(IProgressMonitor monitor) throws CoreException { > newProjectHandle.refreshLocal(IResource.DEPTH_INFINITE, monitor); > } > }; >- NullProgressMonitor monitor = new NullProgressMonitor(); >- workspace.run(runnable, root, IWorkspace.AVOID_UPDATE, monitor); >+ workspace.run(runnable, root, IWorkspace.AVOID_UPDATE, new SubProgressMonitor(monitor,25)); > newProject = newProjectHandle; > } > > // Open the project if we have to > if (!newProject.isOpen()) { >- newProject.open(new NullProgressMonitor()); >+ newProject.open(new SubProgressMonitor(monitor,25)); > } >- return continueCreation(newProject); >+ >+ continueCreationMonitor = new SubProgressMonitor(monitor,25); >+ IProject proj = continueCreation(newProject); >+ >+ monitor.done(); >+ >+ return proj; > } > > protected abstract IProject continueCreation(IProject prj); >Index: src/org/eclipse/cdt/ui/wizards/CWizardHandler.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CWizardHandler.java,v >retrieving revision 1.12 >diff -u -r1.12 CWizardHandler.java >--- src/org/eclipse/cdt/ui/wizards/CWizardHandler.java 28 Apr 2008 18:35:19 -0000 1.12 >+++ src/org/eclipse/cdt/ui/wizards/CWizardHandler.java 13 Nov 2008 16:07:46 -0000 >@@ -7,6 +7,7 @@ > * > * Contributors: > * Intel Corporation - initial API and implementation >+ * IBM Corporation > *******************************************************************************/ > package org.eclipse.cdt.ui.wizards; > >@@ -14,6 +15,7 @@ > > import org.eclipse.core.resources.IProject; > import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.jface.wizard.IWizardPage; > import org.eclipse.swt.SWT; > import org.eclipse.swt.graphics.Image; >@@ -148,7 +150,7 @@ > * @param proj - simple project to be used as base > * @param defaults - true if called from 1st Wizard page > * @param onFinish - true when the project creation is performed on finish. false -otherwise >- * false means that the project created is actually a temporary one that can be removed in case cancell is pressed >+ * false means that the project created is actually a temporary one that can be removed in case cancel is pressed > * > * @throws CoreException > */ >@@ -156,6 +158,36 @@ > throws CoreException { > createProject(proj, defaults); > } >+ >+ >+ /** >+ * Creates project >+ * >+ * @param proj - simple project to be used as base >+ * @param defaults - true if called from 1st Wizard page >+ * @param monitor - progress monitor to track the creation process >+ * @throws CoreException >+ * @since 5.1 >+ */ >+ public void createProject(IProject proj, boolean defaults, IProgressMonitor monitor) >+ throws CoreException {} >+ >+ /** >+ * Creates project >+ * >+ * @param proj - simple project to be used as base >+ * @param defaults - true if called from 1st Wizard page >+ * @param onFinish - true when the project creation is performed on finish. false -otherwise >+ * false means that the project created is actually a temporary one that can be removed in case cancel is pressed >+ * @param monitor - progress monitor to track the creation process >+ * >+ * @throws CoreException >+ * @since 5.1 >+ */ >+ public void createProject(IProject proj, boolean defaults, boolean onFinish, IProgressMonitor monitor) >+ throws CoreException { >+ createProject(proj, defaults, monitor); >+ } > /** > * > * @return true if settings were changed >Index: src/org/eclipse/cdt/ui/wizards/CProjectWizard.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CProjectWizard.java,v >retrieving revision 1.16 >diff -u -r1.16 CProjectWizard.java >--- src/org/eclipse/cdt/ui/wizards/CProjectWizard.java 17 Oct 2008 15:05:52 -0000 1.16 >+++ src/org/eclipse/cdt/ui/wizards/CProjectWizard.java 13 Nov 2008 16:07:46 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007 Intel Corporation and others. >+ * Copyright (c) 2007, 2008 Intel Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -7,12 +7,14 @@ > * > * Contributors: > * Intel Corporation - initial API and implementation >+ * IBM Corporation > *******************************************************************************/ > package org.eclipse.cdt.ui.wizards; > > import org.eclipse.core.resources.IProject; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.NullProgressMonitor; >+import org.eclipse.core.runtime.SubProgressMonitor; > > import org.eclipse.cdt.core.CCorePlugin; > import org.eclipse.cdt.core.CProjectNature; >@@ -29,12 +31,18 @@ > public String[] getNatures() { > return new String[] { CProjectNature.C_NATURE_ID }; > } >- >+ > @Override > protected IProject continueCreation(IProject prj) { >+ if (continueCreationMonitor == null) { >+ continueCreationMonitor = new NullProgressMonitor(); >+ } >+ > try { >- CProjectNature.addCNature(prj, new NullProgressMonitor()); >+ continueCreationMonitor.beginTask(UIMessages.getString("CProjectWizard.0"), 1); //$NON-NLS-1$ >+ CProjectNature.addCNature(prj, new SubProgressMonitor(continueCreationMonitor, 1)); > } catch (CoreException e) {} >+ finally {continueCreationMonitor.done();} > return prj; > } > >Index: src/org/eclipse/cdt/ui/newui/PluginResources.properties >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PluginResources.properties,v >retrieving revision 1.69 >diff -u -r1.69 PluginResources.properties >--- src/org/eclipse/cdt/ui/newui/PluginResources.properties 1 Oct 2008 15:22:35 -0000 1.69 >+++ src/org/eclipse/cdt/ui/newui/PluginResources.properties 13 Nov 2008 16:07:46 -0000 >@@ -526,6 +526,8 @@ > NewCfgDialog.5=Import predefined > CDTMainWizardPage.0=Project name cannot contain '\#' symbol > CDTMainWizardPage.1=Project category is selected. Expand the category and select a concrete project type. >+CProjectWizard.0=Add C Project Nature >+CCProjectWizard.0=Add CC Project Nature > WorkingSetConfigAction.0=Symbols ' > WorkingSetConfigAction.1=Choose active configs for Working Sets > WorkingSetConfigAction.10=-- CURRENT -- >#P org.eclipse.cdt.managedbuilder.ui >Index: src/org/eclipse/cdt/managedbuilder/ui/wizards/STDWizardHandler.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/STDWizardHandler.java,v >retrieving revision 1.11 >diff -u -r1.11 STDWizardHandler.java >--- src/org/eclipse/cdt/managedbuilder/ui/wizards/STDWizardHandler.java 26 Feb 2008 14:38:37 -0000 1.11 >+++ src/org/eclipse/cdt/managedbuilder/ui/wizards/STDWizardHandler.java 13 Nov 2008 16:07:47 -0000 >@@ -7,6 +7,7 @@ > * > * Contributors: > * Intel Corporation - initial API and implementation >+ * IBM Corporation > *******************************************************************************/ > package org.eclipse.cdt.managedbuilder.ui.wizards; > >@@ -26,6 +27,7 @@ > import org.eclipse.cdt.ui.newui.UIMessages; > import org.eclipse.core.resources.IProject; > import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.jface.wizard.IWizard; > import org.eclipse.swt.widgets.Composite; > >@@ -48,40 +50,49 @@ > /** > * Note that configurations parameter is ignored > */ >- public void createProject(IProject project, boolean defaults, boolean onFinish) throws CoreException { >- ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager(); >- ICProjectDescription des = mngr.createProjectDescription(project, false, !onFinish); >- ManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project); >- ManagedProject mProj = new ManagedProject(des); >- info.setManagedProject(mProj); >- >- cfgs = CfgHolder.unique(fConfigPage.getCfgItems(defaults)); >- cfgs = CfgHolder.reorder(cfgs); >- >- for (int i=0; i<cfgs.length; i++) { >- String s = (cfgs[i].getToolChain() == null) ? "0" : ((ToolChain)(cfgs[i].getToolChain())).getId(); //$NON-NLS-1$ >- Configuration cfg = new Configuration(mProj, (ToolChain)cfgs[i].getToolChain(), ManagedBuildManager.calculateChildId(s, null), cfgs[i].getName()); >- IBuilder bld = cfg.getEditableBuilder(); >- if (bld != null) { >- if(bld.isInternalBuilder()){ >- IConfiguration prefCfg = ManagedBuildManager.getPreferenceConfiguration(false); >- IBuilder prefBuilder = prefCfg.getBuilder(); >- cfg.changeBuilder(prefBuilder, ManagedBuildManager.calculateChildId(cfg.getId(), null), prefBuilder.getName()); >- bld = cfg.getEditableBuilder(); >- bld.setBuildPath(null); >+ @Override >+ public void createProject(IProject project, boolean defaults, boolean onFinish, IProgressMonitor monitor) throws CoreException { >+ try { >+ monitor.beginTask("", 100);//$NON-NLS-1$ >+ >+ ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager(); >+ ICProjectDescription des = mngr.createProjectDescription(project, false, !onFinish); >+ ManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project); >+ ManagedProject mProj = new ManagedProject(des); >+ info.setManagedProject(mProj); >+ monitor.worked(20); >+ cfgs = CfgHolder.unique(fConfigPage.getCfgItems(defaults)); >+ cfgs = CfgHolder.reorder(cfgs); >+ int work = 50/cfgs.length; >+ for (int i=0; i<cfgs.length; i++) { >+ String s = (cfgs[i].getToolChain() == null) ? "0" : ((ToolChain)(cfgs[i].getToolChain())).getId(); //$NON-NLS-1$ >+ Configuration cfg = new Configuration(mProj, (ToolChain)cfgs[i].getToolChain(), ManagedBuildManager.calculateChildId(s, null), cfgs[i].getName()); >+ IBuilder bld = cfg.getEditableBuilder(); >+ if (bld != null) { >+ if(bld.isInternalBuilder()){ >+ IConfiguration prefCfg = ManagedBuildManager.getPreferenceConfiguration(false); >+ IBuilder prefBuilder = prefCfg.getBuilder(); >+ cfg.changeBuilder(prefBuilder, ManagedBuildManager.calculateChildId(cfg.getId(), null), prefBuilder.getName()); >+ bld = cfg.getEditableBuilder(); >+ bld.setBuildPath(null); >+ } >+ bld.setManagedBuildOn(false); >+ } else { >+ System.out.println(UIMessages.getString("StdProjectTypeHandler.3")); //$NON-NLS-1$ > } >- bld.setManagedBuildOn(false); >- } else { >- System.out.println(UIMessages.getString("StdProjectTypeHandler.3")); //$NON-NLS-1$ >+ cfg.setArtifactName(removeSpaces(project.getName())); >+ CConfigurationData data = cfg.getConfigurationData(); >+ des.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data); >+ monitor.worked(work); > } >- cfg.setArtifactName(removeSpaces(project.getName())); >- CConfigurationData data = cfg.getConfigurationData(); >- des.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data); >+ mngr.setProjectDescription(project, des); >+ >+ doTemplatesPostProcess(project); >+ doCustom(project); >+ monitor.worked(30); >+ } finally { >+ monitor.done(); > } >- mngr.setProjectDescription(project, des); >- >- doTemplatesPostProcess(project); >- doCustom(project); > } > public boolean canCreateWithoutToolchain() { return true; } > >Index: src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java,v >retrieving revision 1.40 >diff -u -r1.40 MBSWizardHandler.java >--- src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java 17 Oct 2008 15:05:52 -0000 1.40 >+++ src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java 13 Nov 2008 16:07:47 -0000 >@@ -55,6 +55,7 @@ > import org.eclipse.cdt.ui.wizards.IWizardItemsListListener; > import org.eclipse.core.resources.IProject; > import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.Status; > import org.eclipse.jface.operation.IRunnableWithProgress; >@@ -520,54 +521,63 @@ > full_tcs.put(tc.getUniqueRealName(), tc); > } > >- public void createProject(IProject project, boolean defaults, boolean onFinish) throws CoreException { >- ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager(); >- ICProjectDescription des = mngr.createProjectDescription(project, false, !onFinish); >- ManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project); >- >- cfgs = fConfigPage.getCfgItems(false); >- if (cfgs == null || cfgs.length == 0) >- cfgs = CDTConfigWizardPage.getDefaultCfgs(this); >- >- if (cfgs == null || cfgs.length == 0 || cfgs[0].getConfiguration() == null) { >- throw new CoreException(new Status(IStatus.ERROR, >- ManagedBuilderUIPlugin.getUniqueIdentifier(), >- Messages.getString("CWizardHandler.6"))); //$NON-NLS-1$ >- } >- Configuration cf = (Configuration)cfgs[0].getConfiguration(); >- ManagedProject mProj = new ManagedProject(project, cf.getProjectType()); >- info.setManagedProject(mProj); >- >- cfgs = CfgHolder.unique(cfgs); >- cfgs = CfgHolder.reorder(cfgs); >- >- ICConfigurationDescription cfgDebug = null; >- ICConfigurationDescription cfgFirst = null; >- >- for(int i = 0; i < cfgs.length; i++){ >- cf = (Configuration)cfgs[i].getConfiguration(); >- String id = ManagedBuildManager.calculateChildId(cf.getId(), null); >- Configuration config = new Configuration(mProj, cf, id, false, true); >- CConfigurationData data = config.getConfigurationData(); >- ICConfigurationDescription cfgDes = des.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data); >- config.setConfigurationDescription(cfgDes); >- config.exportArtifactInfo(); >- >- IBuilder bld = config.getEditableBuilder(); >- if (bld != null) { bld.setManagedBuildOn(true); } >- >- config.setName(cfgs[i].getName()); >- config.setArtifactName(removeSpaces(project.getName())); >- >- IBuildProperty b = config.getBuildProperties().getProperty(PROPERTY); >- if (cfgDebug == null && b != null && b.getValue() != null && PROP_VAL.equals(b.getValue().getId())) >- cfgDebug = cfgDes; >- if (cfgFirst == null) // select at least first configuration >- cfgFirst = cfgDes; >- } >- mngr.setProjectDescription(project, des); >- doTemplatesPostProcess(project); >- doCustom(project); >+ public void createProject(IProject project, boolean defaults, boolean onFinish, IProgressMonitor monitor) throws CoreException { >+ try { >+ monitor.beginTask("", 100); //$NON-NLS-1$ >+ ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager(); >+ ICProjectDescription des = mngr.createProjectDescription(project, false, !onFinish); >+ ManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project); >+ monitor.worked(10); >+ cfgs = fConfigPage.getCfgItems(false); >+ if (cfgs == null || cfgs.length == 0) >+ cfgs = CDTConfigWizardPage.getDefaultCfgs(this); >+ >+ if (cfgs == null || cfgs.length == 0 || cfgs[0].getConfiguration() == null) { >+ throw new CoreException(new Status(IStatus.ERROR, >+ ManagedBuilderUIPlugin.getUniqueIdentifier(), >+ Messages.getString("CWizardHandler.6"))); //$NON-NLS-1$ >+ } >+ Configuration cf = (Configuration)cfgs[0].getConfiguration(); >+ ManagedProject mProj = new ManagedProject(project, cf.getProjectType()); >+ info.setManagedProject(mProj); >+ monitor.worked(10); >+ cfgs = CfgHolder.unique(cfgs); >+ cfgs = CfgHolder.reorder(cfgs); >+ >+ ICConfigurationDescription cfgDebug = null; >+ ICConfigurationDescription cfgFirst = null; >+ >+ int work = 50/cfgs.length; >+ >+ for(int i = 0; i < cfgs.length; i++){ >+ cf = (Configuration)cfgs[i].getConfiguration(); >+ String id = ManagedBuildManager.calculateChildId(cf.getId(), null); >+ Configuration config = new Configuration(mProj, cf, id, false, true); >+ CConfigurationData data = config.getConfigurationData(); >+ ICConfigurationDescription cfgDes = des.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data); >+ config.setConfigurationDescription(cfgDes); >+ config.exportArtifactInfo(); >+ >+ IBuilder bld = config.getEditableBuilder(); >+ if (bld != null) { bld.setManagedBuildOn(true); } >+ >+ config.setName(cfgs[i].getName()); >+ config.setArtifactName(removeSpaces(project.getName())); >+ >+ IBuildProperty b = config.getBuildProperties().getProperty(PROPERTY); >+ if (cfgDebug == null && b != null && b.getValue() != null && PROP_VAL.equals(b.getValue().getId())) >+ cfgDebug = cfgDes; >+ if (cfgFirst == null) // select at least first configuration >+ cfgFirst = cfgDes; >+ monitor.worked(work); >+ } >+ mngr.setProjectDescription(project, des); >+ doTemplatesPostProcess(project); >+ doCustom(project); >+ monitor.worked(30); >+ } finally { >+ monitor.done(); >+ } > } > > protected void doTemplatesPostProcess(IProject prj) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 250982
:
115176
|
115211
|
115276
|
115577
|
115815
| 117791