mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Bug 440057: Fix ClassCastException invoking C/C++ Project Settings Import Wizard.
This commit is contained in:
parent
099a88b980
commit
dc3a09bbce
1 changed files with 5 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008, 2009 IBM Corporation and others.
|
* Copyright (c) 2008, 2014 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -35,8 +35,10 @@ public abstract class ProjectSettingsWizard extends Wizard {
|
||||||
|
|
||||||
// happens if the user invoked the wizard by right clicking on a project element
|
// happens if the user invoked the wizard by right clicking on a project element
|
||||||
if(selection != null) {
|
if(selection != null) {
|
||||||
IProject project = (IProject)selection.getFirstElement();
|
final Object firstElement = selection.getFirstElement();
|
||||||
mainPage.setInitialProject(project);
|
if (firstElement instanceof IProject) {
|
||||||
|
mainPage.setInitialProject((IProject)firstElement);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addPage(mainPage);
|
addPage(mainPage);
|
||||||
|
|
Loading…
Add table
Reference in a new issue