args = new String[1]; args[0] = docDir.getPath(); if(new File(docDir,"jeditdocs").exists())
String path = docDir.getPath() + File.separator + "jeditdocs" + File.separator + "index.html"; if(new File(path).exists()) { args[0] = "\"file:" + path + "\"";
	public DocIndexURLConnection(URL url)	{		super(url);		StringBuffer buf = new StringBuffer();		buf.append(jEdit.getProperty("docindex.header"));		File docDir = new File(jEdit.getJEditHome() + File.separator + "doc");		// Text files		buf.append(jEdit.getProperty("docindex.general"));		String textFileEntry = jEdit.getProperty("docindex.general.entry");		String[] textFiles = docDir.list();		String[] args = new String[2];		for(int i = 0; i < textFiles.length; i++)		{			if(textFiles[i].toUpperCase().endsWith(".TXT"))			{				args[0] = docDir.getPath();				args[1] = textFiles[i];				buf.append(MessageFormat.format(textFileEntry,args));			}		}		// Books		buf.append(jEdit.getProperty("docindex.books"));		args = new String[1];		args[0] = docDir.getPath();		if(new File(docDir,"jeditdocs").exists())			buf.append(jEdit.getProperty("docindex.books.jeditdocs",args));		if(new File(docDir,"api").exists())			buf.append(jEdit.getProperty("docindex.books.api",args));		// Plugins		buf.append(jEdit.getProperty("docindex.plugins"));		String pluginEntry = jEdit.getProperty("docindex.plugins.entry");		// This code is really messy 'cos it needs to handle		// old and new plugins		EditPlugin[] plugins = jEdit.getPlugins();		args = new String[4];		for(int i = 0; i < plugins.length; i++)		{			EditPlugin plugin = plugins[i];			String clazz = (plugin instanceof Plugin.Wrapper				? ((Plugin.Wrapper)plugin).getPlugin()				.getClass().getName()				: plugin.getClass().getName());			args[0] = jEdit.getProperty("plugin." + clazz				+ ".name");			if(args[0] == null)				continue;			args[1] = jEdit.getProperty("plugin." + clazz				+ ".author");			if(args[1] == null)				continue;			args[2] = jEdit.getProperty("plugin." + clazz				+ ".version");			if(args[2] == null)				continue;			String docs = jEdit.getProperty("plugin."				+ clazz + ".docs");			if(docs == null)				continue;			JARClassLoader classLoader = (JARClassLoader)				plugin.getClass().getClassLoader();			args[3] = classLoader.getResourceAsPath(docs);			buf.append(MessageFormat.format(				pluginEntry,args));		}		buf.append(jEdit.getProperty("docindex.footer"));		in = new StringBufferInputStream(buf.toString());	}