eclipse plugin: Remove the special semantics 'Default'...

...from the project property page aswell
This commit is contained in:
Timotei Dolean 2011-06-24 15:18:45 +00:00
parent 46514b95e4
commit cf286d7c2f

View file

@ -54,9 +54,7 @@ public class WesnothProjectPage extends PropertyPage implements IWorkbenchProper
lblNewLabel.setText("Wesnoth install:");
cmbInstall_ = new Combo(grpGeneral, SWT.READ_ONLY );
cmbInstall_.setItems(new String[] {"Default"});
cmbInstall_.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
cmbInstall_.select(0);
// fill the installs
List<WesnothInstall> installs = WesnothInstallsUtils.getInstalls( );
@ -66,9 +64,6 @@ public class WesnothProjectPage extends PropertyPage implements IWorkbenchProper
for ( WesnothInstall wesnothInstall : installs )
{
if ( wesnothInstall.Name.equalsIgnoreCase( "Default" ) )
continue;
cmbInstall_.add( wesnothInstall.Name );
// current install is default?
@ -80,7 +75,7 @@ public class WesnothProjectPage extends PropertyPage implements IWorkbenchProper
}
// check if the current install name is existing
if ( !foundInstallInList && !installName.equalsIgnoreCase( "default" ) ) {
if ( !foundInstallInList ) {
setErrorMessage( "The currently selected install does not exist. Please select another." );
}
@ -91,7 +86,8 @@ public class WesnothProjectPage extends PropertyPage implements IWorkbenchProper
public boolean performOk()
{
// save settings.
if ( currProjectCache_ != null ){
if ( currProjectCache_ != null &&
!cmbInstall_.getText( ).isEmpty( ) ) {
currProjectCache_.setInstallName( cmbInstall_.getText( ) );
}