eclipse plugin: Switch to the new '--campaign' syntax
This commit is contained in:
parent
429cdb06ed
commit
46a33b3c64
3 changed files with 22 additions and 14 deletions
|
@ -29,9 +29,9 @@ public class WesnothProjectsExplorer extends CommonNavigator implements IAdaptab
|
|||
@SuppressWarnings("rawtypes")
|
||||
public Object getAdapter(Class adapter)
|
||||
{
|
||||
if (adapter == IPersistableElement.class) return this;
|
||||
if (adapter == IWorkbenchAdapter.class)
|
||||
return ResourcesPlugin.getWorkspace().getRoot().getAdapter(adapter);
|
||||
if ( adapter.equals( IPersistableElement.class ) ) return this;
|
||||
if ( adapter.equals( IWorkbenchAdapter.class ) )
|
||||
return ResourcesPlugin.getWorkspace().getRoot().getAdapter( adapter );
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -518,18 +518,20 @@ public class WesnothInstallsPage extends AbstractPreferencePage
|
|||
saveInstall();
|
||||
|
||||
// pack back the installs
|
||||
String installs = "";
|
||||
StringBuilder installs = new StringBuilder();
|
||||
for ( WesnothInstall install : installs_.values() ) {
|
||||
// don't save the default install
|
||||
if ( install.Name.equals("Default") )
|
||||
if ( install.Name.equals( "Default" ) )
|
||||
continue;
|
||||
|
||||
if (installs.isEmpty() == false)
|
||||
installs += ";";
|
||||
if ( installs.length() > 0 )
|
||||
installs.append( ";" );
|
||||
|
||||
installs += install.Name + ":" + install.Version;
|
||||
installs.append( install.Name );
|
||||
installs.append( ":" );
|
||||
installs.append( install.Version );
|
||||
}
|
||||
Preferences.getPreferences().setValue(Constants.P_INST_INSTALL_LIST, installs);
|
||||
Preferences.getPreferences().setValue( Constants.P_INST_INSTALL_LIST, installs.toString() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -555,7 +557,7 @@ public class WesnothInstallsPage extends AbstractPreferencePage
|
|||
}
|
||||
}
|
||||
|
||||
private class TableLabelProvider extends LabelProvider implements ITableLabelProvider {
|
||||
private static class TableLabelProvider extends LabelProvider implements ITableLabelProvider {
|
||||
public Image getColumnImage(Object element, int columnIndex) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -91,10 +91,16 @@ public class GameUtils
|
|||
}
|
||||
|
||||
List<String> args = new ArrayList<String>();
|
||||
args.add("-c"); //$NON-NLS-1$
|
||||
args.add(campaignId);
|
||||
if (scenario == true)
|
||||
args.add(scenarioId);
|
||||
|
||||
// --campaign
|
||||
args.add( "-c" ); //$NON-NLS-1$
|
||||
args.add( campaignId );
|
||||
|
||||
if ( scenario == true ) {
|
||||
args.add( "--campaign-scenario" ); //$NON-NLS-1$
|
||||
args.add( scenarioId );
|
||||
}
|
||||
|
||||
startGame(args);
|
||||
} catch (Exception e)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue