source: rtems-eclipse-plug-in/org.rtems.cdt.toolchain2/org/rtems/cdt/wizards/FinishSetup.java @ db4394f

Last change on this file since db4394f was db4394f, checked in by Sebastian Huber <sebastian.huber@…>, on 12/01/08 at 16:49:29

Updated the wizard page.

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*
2 * Copyright (c) 2008
3 * Embedded Brains GmbH
4 * Obere Lagerstr. 30
5 * D-82178 Puchheim
6 * Germany
7 * rtems@embedded-brains.de
8 *
9 * The license and distribution terms for this file may be found in the file
10 * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE.
11 */
12
13package org.rtems.cdt.wizards;
14
15import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager;
16import org.eclipse.cdt.ui.wizards.CDTCommonProjectWizard;
17import org.eclipse.core.resources.IProject;
18import org.eclipse.jface.wizard.IWizardPage;
19import org.rtems.cdt.Constants;
20import org.rtems.cdt.Storage;
21
22public class FinishSetup implements Runnable {
23        public void run() {
24                // Get a handle to the wizard
25                IWizardPage [] pages = MBSCustomPageManager.getPages();
26               
27                if (pages != null && pages.length > 0) {
28                        // Get last project
29                        CDTCommonProjectWizard wizard = (CDTCommonProjectWizard) pages [0].getWizard();
30                        IProject project = wizard.getLastProject();
31                       
32                        // Get wizard values
33                        String basePath = (String) MBSCustomPageManager.getPageProperty(
34                                BasicSetup.PAGE_ID, Constants.BASE_PATH_KEY
35                        );
36                        String bspPath = (String) MBSCustomPageManager.getPageProperty(
37                                BasicSetup.PAGE_ID, Constants.BSP_PATH_KEY
38                        );
39                       
40                        // Set project properties
41                        Storage.setProperty( project, Constants.BASE_PATH_KEY, basePath);
42                        Storage.setProperty( project, Constants.BSP_PATH_KEY, bspPath);
43                       
44                        // Update tools
45                        Storage.updateTools( project);
46                }
47        }
48}
Note: See TracBrowser for help on using the repository browser.