package net.sourceforge.phpeclipse.wiki.actions.mediawiki; //Parts of this sources are copied and modified from the jEdit Wikipedia plugin: //http://www.djini.de/software/wikipedia/index.html // //The modified sources are available under the "Common Public License" //with permission from the original author: Daniel Wunsch import java.util.List; import net.sourceforge.phpeclipse.wiki.editor.WikiEditorPlugin; import net.sourceforge.phpeclipse.wiki.internal.Configuration; import net.sourceforge.phpeclipse.wiki.internal.ConfigurationWorkingCopy; public final class DownloadWikibooksENAction extends DownloadWikipediaAction { protected Configuration getConfiguration() { List configs = WikiEditorPlugin.getConfigurations(); ConfigurationWorkingCopy configuration = null; // Wikipedia-en"" + for (int i = 0; i < configs.size(); i++) { configuration = (ConfigurationWorkingCopy) configs.get(i); if (configuration.getName().equals("Wikibooks-en") && configuration.getType().equals("Wikipedia-Load Text")) { break; } else { configuration = null; } } if (configuration == null) { // fall back, if user deleted configuration: configuration = new ConfigurationWorkingCopy(); configuration.setURL("http://en.wikibooks.org/wiki/Special:Export"); } return configuration; } }