Skip to main content
summaryrefslogtreecommitdiffstats
path: root/xlc
diff options
context:
space:
mode:
authorMike Kucera2009-04-30 15:54:36 -0400
committerMike Kucera2009-04-30 15:54:36 -0400
commit01ce038d6f424c739ad3bfaeaf8b9e29e50928b0 (patch)
treecf4bc80184db4353f878367c04335c7c5a125e81 /xlc
parent436a3e5dd34c53f78c7ffd89b8f9ed3ee0a2b4d0 (diff)
downloadorg.eclipse.cdt-01ce038d6f424c739ad3bfaeaf8b9e29e50928b0.tar.gz
org.eclipse.cdt-01ce038d6f424c739ad3bfaeaf8b9e29e50928b0.tar.xz
org.eclipse.cdt-01ce038d6f424c739ad3bfaeaf8b9e29e50928b0.zip
[261232] update to XLC wizard so that it can be reused for UPC
Diffstat (limited to 'xlc')
-rw-r--r--xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/wizards/XLCSettingsWizardPage.java10
-rw-r--r--xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/wizards/XLCSettingsWizardRunnable.java37
2 files changed, 17 insertions, 30 deletions
diff --git a/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/wizards/XLCSettingsWizardPage.java b/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/wizards/XLCSettingsWizardPage.java
index b019827ea2..c07f44e32e 100644
--- a/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/wizards/XLCSettingsWizardPage.java
+++ b/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/wizards/XLCSettingsWizardPage.java
@@ -131,20 +131,20 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
fDirTextBox.setText(compilerPath);
// update the page manager with the setting
- MBSCustomPageManager.addPageProperty(PAGE_ID, PreferenceConstants.P_XL_COMPILER_ROOT, fDirTextBox.getText());
+ MBSCustomPageManager.addPageProperty(pageID, PreferenceConstants.P_XL_COMPILER_ROOT, fDirTextBox.getText());
fDirTextBox.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
// update the page manager with the setting
- MBSCustomPageManager.addPageProperty(PAGE_ID, PreferenceConstants.P_XL_COMPILER_ROOT, fDirTextBox.getText());
+ MBSCustomPageManager.addPageProperty(pageID, PreferenceConstants.P_XL_COMPILER_ROOT, fDirTextBox.getText());
}
});
// create the browse button
- String selectedPath = null;
+ //String selectedPath = null;
GridData buttonData = new GridData();
buttonData.horizontalAlignment = SWT.RIGHT;
Button browseButton = new Button(fComposite, SWT.PUSH);
@@ -179,13 +179,13 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
fVersionCombo.setText(compilerVersion);
// update the page manager with the setting
- MBSCustomPageManager.addPageProperty(PAGE_ID, PreferenceConstants.P_XLC_COMPILER_VERSION, fVersionCombo.getText());
+ MBSCustomPageManager.addPageProperty(pageID, PreferenceConstants.P_XLC_COMPILER_VERSION, fVersionCombo.getText());
fVersionCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
// update the page manager with the setting
- MBSCustomPageManager.addPageProperty(PAGE_ID, PreferenceConstants.P_XLC_COMPILER_VERSION, fVersionCombo.getText());
+ MBSCustomPageManager.addPageProperty(pageID, PreferenceConstants.P_XLC_COMPILER_VERSION, fVersionCombo.getText());
}
diff --git a/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/wizards/XLCSettingsWizardRunnable.java b/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/wizards/XLCSettingsWizardRunnable.java
index 1f4bdad73f..84d6b703bc 100644
--- a/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/wizards/XLCSettingsWizardRunnable.java
+++ b/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/wizards/XLCSettingsWizardRunnable.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM 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
@@ -12,9 +12,10 @@ package org.eclipse.cdt.managedbuilder.xlc.ui.wizards;
import java.lang.reflect.InvocationTargetException;
-import org.eclipse.cdt.ui.wizards.CDTCommonProjectWizard;
+import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager;
import org.eclipse.cdt.managedbuilder.xlc.ui.preferences.PreferenceConstants;
+import org.eclipse.cdt.ui.wizards.CDTCommonProjectWizard;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -28,21 +29,15 @@ import org.eclipse.jface.wizard.IWizardPage;
*/
public class XLCSettingsWizardRunnable implements IRunnableWithProgress {
- /**
- *
- */
+ protected String pageId = XLCSettingsWizardPage.PAGE_ID;
+
public XLCSettingsWizardRunnable() {
-
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
// take the data from the page manager, and set the project properties with it
- String compilerPath = MBSCustomPageManager.getPageProperty(XLCSettingsWizardPage.PAGE_ID, PreferenceConstants.P_XL_COMPILER_ROOT).toString();
- String compilerVersion = MBSCustomPageManager.getPageProperty(XLCSettingsWizardPage.PAGE_ID, PreferenceConstants.P_XLC_COMPILER_VERSION).toString();
+ String compilerPath = MBSCustomPageManager.getPageProperty(pageId, PreferenceConstants.P_XL_COMPILER_ROOT).toString();
+ String compilerVersion = MBSCustomPageManager.getPageProperty(pageId, PreferenceConstants.P_XLC_COMPILER_VERSION).toString();
// get a handle to the wizard
IWizardPage[] pages = MBSCustomPageManager.getPages();
@@ -50,24 +45,16 @@ public class XLCSettingsWizardRunnable implements IRunnableWithProgress {
if(pages != null && pages.length > 0) {
CDTCommonProjectWizard wizard = (CDTCommonProjectWizard) pages[0].getWizard();
-
IProject project = wizard.getLastProject();
try {
- project.setPersistentProperty(new QualifiedName("",
- PreferenceConstants.P_XL_COMPILER_ROOT), compilerPath);
-
- project.setPersistentProperty(new QualifiedName("",
- PreferenceConstants.P_XLC_COMPILER_VERSION), compilerVersion);
+ project.setPersistentProperty(new QualifiedName("", PreferenceConstants.P_XL_COMPILER_ROOT), compilerPath);
+ project.setPersistentProperty(new QualifiedName("", PreferenceConstants.P_XLC_COMPILER_VERSION), compilerVersion);
} catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
-
+ CCorePlugin.log(e);
+ }
}
-
}
}

Back to the top