summaryrefslogtreecommitdiffstats
path: root/org.rtems.cdt/src/org/rtems/cdt/wizards/BasicSetup.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.rtems.cdt/src/org/rtems/cdt/wizards/BasicSetup.java')
-rw-r--r--org.rtems.cdt/src/org/rtems/cdt/wizards/BasicSetup.java86
1 files changed, 43 insertions, 43 deletions
diff --git a/org.rtems.cdt/src/org/rtems/cdt/wizards/BasicSetup.java b/org.rtems.cdt/src/org/rtems/cdt/wizards/BasicSetup.java
index d2bd4cc..769523a 100644
--- a/org.rtems.cdt/src/org/rtems/cdt/wizards/BasicSetup.java
+++ b/org.rtems.cdt/src/org/rtems/cdt/wizards/BasicSetup.java
@@ -60,56 +60,56 @@ public class BasicSetup extends MBSCustomPage {
}
public boolean canFlipToNextPage() {
- return MBSCustomPageManager.getNextPage( pageID) != null;
+ return MBSCustomPageManager.getNextPage(pageID) != null;
}
public String getName() {
return "Basic Setup Page";
}
- public void createControl( Composite parent) {
+ public void createControl(Composite parent) {
// Create base widget
- mComposite = new Composite( parent, SWT.NONE);
+ mComposite = new Composite(parent, SWT.NONE);
- GridData gd = new GridData( GridData.FILL_BOTH);
- mComposite.setLayoutData( gd);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ mComposite.setLayoutData(gd);
GridLayout layout = new GridLayout();
layout.numColumns = 3;
- mComposite.setLayout( layout);
+ mComposite.setLayout(layout);
// Base path
- Label label = new Label( mComposite, SWT.LEFT);
- label.setText( "Base path:");
+ Label label = new Label(mComposite, SWT.LEFT);
+ label.setText("Base path:");
- mBasePath = new Text( mComposite, SWT.LEFT | SWT.BORDER);
- gd = new GridData( GridData.FILL_HORIZONTAL);
- mBasePath.setLayoutData( gd);
+ mBasePath = new Text(mComposite, SWT.LEFT | SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ mBasePath.setLayoutData(gd);
- Button button = new Button( mComposite, SWT.PUSH);
- button.setText( BROWSE);
+ Button button = new Button(mComposite, SWT.PUSH);
+ button.setText(BROWSE);
button.addSelectionListener(
new SelectionAdapter() {
- public void widgetSelected( SelectionEvent e) {
- browseForPath( mBasePath);
+ public void widgetSelected(SelectionEvent e) {
+ browseForPath(mBasePath);
}
}
);
// BSP path
- label = new Label( mComposite, SWT.LEFT);
- label.setText( "BSP path:");
+ label = new Label(mComposite, SWT.LEFT);
+ label.setText("BSP path:");
- mBSPPath = new Text( mComposite, SWT.LEFT | SWT.BORDER);
- gd = new GridData( GridData.FILL_HORIZONTAL);
- mBSPPath.setLayoutData( gd);
+ mBSPPath = new Text(mComposite, SWT.LEFT | SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ mBSPPath.setLayoutData(gd);
- button = new Button( mComposite, SWT.PUSH);
- button.setText( BROWSE);
+ button = new Button(mComposite, SWT.PUSH);
+ button.setText(BROWSE);
button.addSelectionListener(
new SelectionAdapter() {
- public void widgetSelected( SelectionEvent e) {
- browseForPath( mBSPPath);
+ public void widgetSelected(SelectionEvent e) {
+ browseForPath(mBSPPath);
}
}
);
@@ -117,14 +117,14 @@ public class BasicSetup extends MBSCustomPage {
// Connect user input
mBasePath.addModifyListener(
new ModifyListener() {
- public void modifyText( ModifyEvent e) {
+ public void modifyText(ModifyEvent e) {
basePathChanged();
}
}
);
mBSPPath.addModifyListener(
new ModifyListener() {
- public void modifyText( ModifyEvent e) {
+ public void modifyText(ModifyEvent e) {
bspPathChanged();
}
}
@@ -167,19 +167,19 @@ public class BasicSetup extends MBSCustomPage {
// Do nothing
}
- public void setDescription( String description) {
+ public void setDescription(String description) {
// Do nothing
}
- public void setImageDescriptor( ImageDescriptor image) {
+ public void setImageDescriptor(ImageDescriptor image) {
// Do nothing
}
- public void setTitle( String title) {
+ public void setTitle(String title) {
// Do nothing
}
- public void setVisible( boolean visible) {
+ public void setVisible(boolean visible) {
// Get current project
CDTCommonProjectWizard wizard = (CDTCommonProjectWizard) getWizard();
IProject project = wizard.getLastProject();
@@ -191,42 +191,42 @@ public class BasicSetup extends MBSCustomPage {
if (visible) {
if (project != null) {
// For already created projects use the properties
- mBasePath.setText( Storage.getProperty( project, Constants.BASE_PATH_KEY));
- mBSPPath.setText( Storage.getProperty( project, Constants.BSP_PATH_KEY));
+ mBasePath.setText(Storage.getProperty(project, Constants.BASE_PATH_KEY));
+ mBSPPath.setText(Storage.getProperty(project, Constants.BSP_PATH_KEY));
} else {
// For not yet created projects use the preferences
- mBasePath.setText( Storage.getPreference( Constants.BASE_PATH_KEY));
- mBSPPath.setText( Storage.getPreference( Constants.BSP_PATH_KEY));
+ mBasePath.setText(Storage.getPreference(Constants.BASE_PATH_KEY));
+ mBSPPath.setText(Storage.getPreference(Constants.BSP_PATH_KEY));
}
} else {
if (project != null) {
// Store the wizard values in the properties if the project exists already
- Storage.setProperty( project, Constants.BASE_PATH_KEY, mBasePath.getText());
- Storage.setProperty( project, Constants.BSP_PATH_KEY, mBSPPath.getText());
+ Storage.setProperty(project, Constants.BASE_PATH_KEY, mBasePath.getText());
+ Storage.setProperty(project, Constants.BSP_PATH_KEY, mBSPPath.getText());
}
}
- mComposite.setVisible( visible);
+ mComposite.setVisible(visible);
}
protected boolean isCustomPageComplete() {
return true;
}
- private void browseForPath( Text text) {
- DirectoryDialog dialog = new DirectoryDialog( mComposite.getShell(), SWT.NONE);
- dialog.setFilterPath( text.getText());
+ private void browseForPath(Text text) {
+ DirectoryDialog dialog = new DirectoryDialog(mComposite.getShell(), SWT.NONE);
+ dialog.setFilterPath(text.getText());
String path = dialog.open();
if (path != null) {
- text.setText( path);
+ text.setText(path);
}
}
private void basePathChanged() {
- MBSCustomPageManager.addPageProperty( pageID, Constants.BASE_PATH_KEY, mBasePath.getText());
+ MBSCustomPageManager.addPageProperty(pageID, Constants.BASE_PATH_KEY, mBasePath.getText());
}
private void bspPathChanged() {
- MBSCustomPageManager.addPageProperty( pageID, Constants.BSP_PATH_KEY, mBSPPath.getText());
+ MBSCustomPageManager.addPageProperty(pageID, Constants.BSP_PATH_KEY, mBSPPath.getText());
}
}