/* * Copyright (c) 2008 Embedded Brains GmbH and others. * * Embedded Brains GmbH * Obere Lagerstr. 30 * D-82178 Puchheim * Germany * rtems@embedded-brains.de * * All rights reserved. This program and the accompanying materials are made * available under the terms of the Eclipse Public License Version 1.0 ("EPL") * which accompanies this distribution and is available at * * http://www.eclipse.org/legal/epl-v10.html * * For purposes of the EPL, "Program" will mean the Content. * * Contributors: * * Sebastian Huber (Embedded Brains GmbH) - Initial API and implementation. */ package org.rtems.cdt.wizards; import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager; import org.eclipse.cdt.ui.wizards.CDTCommonProjectWizard; import org.eclipse.core.resources.IProject; import org.eclipse.jface.wizard.IWizardPage; import org.rtems.cdt.Constants; import org.rtems.cdt.Storage; public class FinishSetup implements Runnable { public void run() { // Get a handle to the wizard IWizardPage [] pages = MBSCustomPageManager.getPages(); if (pages != null && pages.length > 0) { // Get last project CDTCommonProjectWizard wizard = (CDTCommonProjectWizard) pages [0].getWizard(); IProject project = wizard.getLastProject(); // Get wizard values String basePath = (String) MBSCustomPageManager.getPageProperty( BasicSetup.PAGE_ID, Constants.BASE_PATH_KEY ); String bspPath = (String) MBSCustomPageManager.getPageProperty( BasicSetup.PAGE_ID, Constants.BSP_PATH_KEY ); // Set project properties Storage.setProperty( project, Constants.BASE_PATH_KEY, basePath); Storage.setProperty( project, Constants.BSP_PATH_KEY, bspPath); // Clear platform Storage.clearPlatform( project); } } }