예제 #1
0
  /**
   * Returns the currently displayed modules.
   *
   * @return The currently displayed modules.
   */
  public List<INaviModule> getModules() {
    List<INaviModule> localCachedValues = m_cachedValues;

    if (localCachedValues == null) {
      final IFilter<INaviModule> filter = getFilter();

      if (m_addressSpace.isLoaded()) {
        localCachedValues =
            filter == null
                ? m_addressSpace.getContent().getModules()
                : filter.get(m_addressSpace.getContent().getModules());
      } else {
        localCachedValues = new ArrayList<INaviModule>();
      }
    }

    m_cachedValues = localCachedValues;
    return new ArrayList<INaviModule>(localCachedValues);
  }
예제 #2
0
  /**
   * Returns the currently displayed projects.
   *
   * @return The currently displayed projects.
   */
  public ArrayList<INaviProject> getProjects() {
    List<INaviProject> localCachedValues = m_cachedValues;

    if (localCachedValues == null) {
      if (m_database.isConnected()) {
        final IFilter<INaviProject> filter = getFilter();

        localCachedValues =
            filter == null
                ? m_database.getContent().getProjects()
                : filter.get(m_database.getContent().getProjects());
      } else {
        localCachedValues = new ArrayList<INaviProject>();
      }
    }

    m_cachedValues = localCachedValues;
    return new ArrayList<INaviProject>(localCachedValues);
  }