Author: timotei
Date: Sat Jun 11 18:25:59 2011
New Revision: 49842
URL: http://svn.gna.org/viewcvs/wesnoth?rev=49842&view=rev
Log:
eclipse plugin: Switch to the new '--campaign' syntax
Modified:
trunk/utils/java/org.wesnoth/src/org/wesnoth/navigator/WesnothProjectsExplorer.java
trunk/utils/java/org.wesnoth/src/org/wesnoth/preferences/WesnothInstallsPage.java
trunk/utils/java/org.wesnoth/src/org/wesnoth/utils/GameUtils.java
Modified:
trunk/utils/java/org.wesnoth/src/org/wesnoth/navigator/WesnothProjectsExplorer.java
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/java/org.wesnoth/src/org/wesnoth/navigator/WesnothProjectsExplorer.java?rev=49842&r1=49841&r2=49842&view=diff
==============================================================================
---
trunk/utils/java/org.wesnoth/src/org/wesnoth/navigator/WesnothProjectsExplorer.java
(original)
+++
trunk/utils/java/org.wesnoth/src/org/wesnoth/navigator/WesnothProjectsExplorer.java
Sat Jun 11 18:25:59 2011
@@ -29,9 +29,9 @@
@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;
}
Modified:
trunk/utils/java/org.wesnoth/src/org/wesnoth/preferences/WesnothInstallsPage.java
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/java/org.wesnoth/src/org/wesnoth/preferences/WesnothInstallsPage.java?rev=49842&r1=49841&r2=49842&view=diff
==============================================================================
---
trunk/utils/java/org.wesnoth/src/org/wesnoth/preferences/WesnothInstallsPage.java
(original)
+++
trunk/utils/java/org.wesnoth/src/org/wesnoth/preferences/WesnothInstallsPage.java
Sat Jun 11 18:25:59 2011
@@ -518,18 +518,20 @@
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 += ";";
-
- installs += install.Name + ":" + install.Version;
- }
- Preferences.getPreferences().setValue(Constants.P_INST_INSTALL_LIST,
installs);
+ if ( installs.length() > 0 )
+ installs.append( ";" );
+
+ installs.append( install.Name );
+ installs.append( ":" );
+ installs.append( install.Version );
+ }
+ Preferences.getPreferences().setValue( Constants.P_INST_INSTALL_LIST,
installs.toString() );
}
@Override
@@ -555,7 +557,7 @@
}
}
- private class TableLabelProvider extends LabelProvider implements
ITableLabelProvider {
+ private static class TableLabelProvider extends LabelProvider implements
ITableLabelProvider {
public Image getColumnImage(Object element, int columnIndex) {
return null;
}
Modified: trunk/utils/java/org.wesnoth/src/org/wesnoth/utils/GameUtils.java
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/java/org.wesnoth/src/org/wesnoth/utils/GameUtils.java?rev=49842&r1=49841&r2=49842&view=diff
==============================================================================
--- trunk/utils/java/org.wesnoth/src/org/wesnoth/utils/GameUtils.java (original)
+++ trunk/utils/java/org.wesnoth/src/org/wesnoth/utils/GameUtils.java Sat Jun
11 18:25:59 2011
@@ -91,10 +91,16 @@
}
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)
{
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits