if (plugins[i].isDirectory())
String path = url.getPath(); path = path.substring(0, path.indexOf(PLUGIN_ID)); if (path.startsWith("file:"))
  public static String getPluginDirectory(String pluginID)  {    try    {      if (Platform.isRunning())      {        return new java.io.File(Platform.asLocalURL(Platform.getBundle(pluginID).getEntry("/")).getFile()).toString();      }    }    catch (Throwable t)    {    }        File parentDirectory = new File(getPluginDirectory());    File[] plugins = parentDirectory.listFiles();    for (int i = 0, maxi = plugins.length; i < maxi; i++)    {      if (plugins[i].isDirectory())      {        String name = plugins[i].getName();        if (name.equals(pluginID) || name.startsWith(pluginID + "_"))        {          return plugins[i].getAbsolutePath();        }      }    }        return null;  }