コード例 #1
0
ファイル: ClasspathResource.java プロジェクト: paxnil/spindle
  /*
   * (non-Javadoc)
   *
   * @see core.resources.eclipse.IEclipseResource#getStorage()
   */
  @SuppressWarnings("unchecked")
  public IStorage getStorage() {
    // if we are in a build, the storages get cached for speed.
    Map cache = EclipseBuildInfrastructure.getStorageCache();

    if (cache != null && cache.containsKey(this)) return (IStorage) cache.get(this);

    IStorage result = fRoot.findStorage(this);

    if (cache != null) cache.put(this, result);

    return result;
  }