in = jEdit.getPluginJAR(pluginIndex).getClassLoader() .getResourceAsStream(resource);
if(plugin == null) { in = jEdit.class.getResourceAsStream(resource); } else { EditPlugin.JAR[] plugins = jEdit.getPluginJARs(); for(int i = 0; i < plugins.length; i++) { EditPlugin.JAR jar = plugins[i]; if(MiscUtilities.getFileName(jar.getPath()) .equalsIgnoreCase(plugin)) { in = jar.getClassLoader() .getResourceAsStream( resource); break; } } }
	public void connect() throws IOException	{		if(!connected)		{			in = jEdit.getPluginJAR(pluginIndex).getClassLoader()				.getResourceAsStream(resource);			if(in == null)			{				throw new IOException("Resource not found: "					+ resource);			}			connected = true;		}	}