Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Inglis2003-08-21 15:43:47 -0400
committerDavid Inglis2003-08-21 15:43:47 -0400
commitf1a4d0ae90e105105725c7134adf7e2d070d5524 (patch)
tree85bd7396f88bd3d7f8de7e6f0d22b48c40987e05
parentdb989297e985dfffeb4b7f81f9cb719f97c87913 (diff)
downloadorg.eclipse.cdt-f1a4d0ae90e105105725c7134adf7e2d070d5524.tar.gz
org.eclipse.cdt-f1a4d0ae90e105105725c7134adf7e2d070d5524.tar.xz
org.eclipse.cdt-f1a4d0ae90e105105725c7134adf7e2d070d5524.zip
- fixed problem with convert wizard with closed projects
- added .cdtproject convertion
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java13
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/UpdateMakeProjectWizardPage.java14
2 files changed, 17 insertions, 10 deletions
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java
index fc958da44aa..02907c82f61 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java
@@ -29,7 +29,6 @@ import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableContext;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ISelection;
@@ -66,13 +65,12 @@ public class UpdateMakeProjectAction implements IWorkbenchWindowActionDelegate {
project = ((ICProject) elem).getProject();
}
if (project != null) {
+ projects.add(project);
}
}
final IProject[] projectArray = (IProject[]) projects.toArray(new IProject[projects.size()]);
- ProgressMonitorDialog pd = new ProgressMonitorDialog(MakeUIPlugin.getActiveWorkbenchShell());
- run(true, pd, projectArray);
UpdateMakeProjectWizard wizard = new UpdateMakeProjectWizard(projectArray);
WizardDialog dialog = new WizardDialog(MakeUIPlugin.getActiveWorkbenchShell(), wizard);
dialog.open();
@@ -114,12 +112,19 @@ public class UpdateMakeProjectAction implements IWorkbenchWindowActionDelegate {
project[i],
MakeCorePlugin.OLD_BUILDER_ID,
new SubProgressMonitor(monitor, 1));
+
+ // convert .cdtproject
+ CCorePlugin.getDefault().mapCProjectOwner(project[i], MakeCorePlugin.getUniqueIdentifier() + ".make", true);
// add new nature
MakeProjectNature.addNature(project[i], new SubProgressMonitor(monitor, 1));
+
+ // move existing build properties to new
IMakeBuilderInfo newInfo = MakeCorePlugin.createBuildInfo(project[i], MakeBuilder.BUILDER_ID);
QualifiedName qlocation = new QualifiedName(CCorePlugin.PLUGIN_ID, "buildLocation");
String location = project[i].getPersistentProperty(qlocation);
- newInfo.setBuildCommand(new Path(location));
+ if ( location != null) {
+ newInfo.setBuildCommand(new Path(location));
+ }
//remove old properties
QualifiedName[] qName =
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/UpdateMakeProjectWizardPage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/UpdateMakeProjectWizardPage.java
index 40ea79e9628..7fe625ac5e7 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/UpdateMakeProjectWizardPage.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/UpdateMakeProjectWizardPage.java
@@ -117,12 +117,14 @@ public class UpdateMakeProjectWizardPage extends StatusWizardPage {
Vector result = new Vector();
try {
for (int i = 0; i < project.length; i++) {
- IProjectDescription desc = project[i].getDescription();
- ICommand builder[] = desc.getBuildSpec();
- for( int j = 0; j < builder.length; j++ ) {
- if (builder[j].getBuilderName().equals(MakeCorePlugin.OLD_BUILDER_ID)) {
- result.add(project[i]);
- break;
+ if (project[i].isAccessible()) {
+ IProjectDescription desc = project[i].getDescription();
+ ICommand builder[] = desc.getBuildSpec();
+ for (int j = 0; j < builder.length; j++) {
+ if (builder[j].getBuilderName().equals(MakeCorePlugin.OLD_BUILDER_ID)) {
+ result.add(project[i]);
+ break;
+ }
}
}
}

Back to the top