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 DownloadWikipediaENAction extends DownloadWikipediaAction {
15 protected Configuration getConfiguration(){
16 List configs = WikiEditorPlugin.getConfigurations();
17 ConfigurationWorkingCopy configuration = null;
18 for (int i = 0; i < configs.size(); i++) {
19 configuration = (ConfigurationWorkingCopy) configs.get(i);
20 if (configuration.getName().equals("Wikipedia-en") && configuration.getType().equals("Wikipedia-Load Text")) {
26 if (configuration == null) {
27 // fall back, if user deleted configuration:
28 configuration = new ConfigurationWorkingCopy();
29 configuration.setURL("http://en.wikipedia.org/w/wiki.phtml?title=$text.wikiname&action=raw");