1 package net.sourceforge.phpeclipse.wiki.actions.mediawiki;
2 //Parts of this sources are copied and modified from the jEdit Wikipedia plugin:
3 //http://www.djini.de/software/wikipedia/index.html
5 //The modified sources are available under the "Common Public License"
6 //with permission from the original author: Daniel Wunsch
10 import net.sourceforge.phpeclipse.wiki.editor.WikiEditorPlugin;
11 import net.sourceforge.phpeclipse.wiki.internal.Configuration;
12 import net.sourceforge.phpeclipse.wiki.internal.ConfigurationWorkingCopy;
14 public final class DownloadWikibooksENAction extends DownloadWikipediaAction {
15 protected Configuration getConfiguration() {
16 List configs = WikiEditorPlugin.getConfigurations();
17 ConfigurationWorkingCopy configuration = null;
19 for (int i = 0; i < configs.size(); i++) {
20 configuration = (ConfigurationWorkingCopy) configs.get(i);
21 if (configuration.getName().equals("Wikibooks-en") && configuration.getType().equals("Wikipedia-Load Text")) {
27 if (configuration == null) {
28 // fall back, if user deleted configuration:
29 configuration = new ConfigurationWorkingCopy();
30 configuration.setURL("http://en.wikibooks.org/w/index.php?title=$text.wikiname&action=raw");