[hg] main-silver: removed archived issues functionality

  • From: Tomas Stupka < >
  • To:
  • Subject: [hg] main-silver: removed archived issues functionality
  • Date: Mon, 14 Oct 2013 08:21:34 -0700

changeset 08f7d156a837 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/08f7d156a837
description:
        removed archived issues functionality

diffstat:

 
bugtracking.kenai/test/unit/src/org/netbeans/modules/bugzilla/kenai/KenaiQueryRefreshTest.java
        |    6 -
 
bugtracking.kenai/test/unit/src/org/netbeans/modules/bugzilla/kenai/KenaiQueryTest.java
               |    6 -
 bugtracking/manifest.mf                                                      
                         |    2 +-
 bugtracking/src/org/netbeans/modules/bugtracking/QueryImpl.java              
                         |    4 -
 bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueCache.java       
                         |  562 --------
 bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueStorage.java     
                         |  664 ----------
 bugtracking/src/org/netbeans/modules/bugtracking/cache/StorageUtils.java     
                         |  183 --
 bugtracking/src/org/netbeans/modules/bugtracking/issuetable/Filter.java      
                         |   76 +-
 bugtracking/src/org/netbeans/modules/bugtracking/issuetable/IssueTable.java  
                         |   12 +-
 
bugtracking/src/org/netbeans/modules/bugtracking/issuetable/QueryTableCellRenderer.java
               |   19 +-
 bugtracking/src/org/netbeans/modules/bugtracking/spi/QueryProvider.java      
                         |    9 -
 
bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueSettingsStorage.java
                      |   69 +-
 bugtracking/test/unit/src/org/netbeans/modules/bugtracking/TestQuery.java    
                         |    4 -
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/TestQueryProvider.java
                     |    5 -
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/APITestConnector.java
                  |    5 -
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/APITestQuery.java
                      |    5 -
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/cache/CacheTest.java
                       |  563 --------
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/cache/StorageTest.java
                     |  320 ----
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/issuetable/QueryTableCellRendererTest.java
 |   94 +-
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/ui/query/KenaiTestHidden.java
              |   23 -
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/ui/query/QTCTestHidden.java
                |    5 -
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/ui/selectors/RepositorySelectorTest.java
   |    5 -
 bugzilla/manifest.mf                                                         
                         |    2 +-
 bugzilla/nbproject/project.xml                                               
                         |    2 +-
 bugzilla/src/org/netbeans/modules/bugzilla/BugzillaConfig.java               
                         |   14 +-
 bugzilla/src/org/netbeans/modules/bugzilla/BugzillaQueryProvider.java        
                         |    5 -
 bugzilla/src/org/netbeans/modules/bugzilla/issue/BugzillaIssue.java          
                         |    6 +-
 bugzilla/src/org/netbeans/modules/bugzilla/issue/CommentsPanel.java          
                         |    2 +-
 bugzilla/src/org/netbeans/modules/bugzilla/kenai/KenaiQuery.java             
                         |    3 +-
 bugzilla/src/org/netbeans/modules/bugzilla/query/BugzillaQuery.java          
                         |   39 +-
 bugzilla/src/org/netbeans/modules/bugzilla/query/QueryController.java        
                         |    5 -
 
bugzilla/src/org/netbeans/modules/bugzilla/repository/BugzillaRepository.java 
                        |   60 +-
 
bugzilla/test/unit/src/org/netbeans/modules/bugzilla/TestQueryNotifyListener.java
                     |    4 +-
 bugzilla/test/unit/src/org/netbeans/modules/bugzilla/query/QueryTest.java    
                         |   25 +-
 jira/manifest.mf                                                             
                         |    2 +-
 jira/nbproject/project.xml                                                   
                         |    2 +-
 jira/src/org/netbeans/modules/jira/JiraConfig.java                           
                         |   19 +-
 jira/src/org/netbeans/modules/jira/JiraQueryProvider.java                    
                         |   10 -
 jira/src/org/netbeans/modules/jira/issue/CommentsPanel.java                  
                         |    2 +-
 jira/src/org/netbeans/modules/jira/issue/IssueLinksPanel.java                
                         |    7 +-
 jira/src/org/netbeans/modules/jira/issue/IssuePanel.form                     
                         |   11 +-
 jira/src/org/netbeans/modules/jira/issue/IssuePanel.java                     
                         |    4 +-
 jira/src/org/netbeans/modules/jira/issue/NbJiraIssue.java                    
                         |   18 +-
 jira/src/org/netbeans/modules/jira/kenai/KenaiQuery.java                     
                         |    2 +-
 jira/src/org/netbeans/modules/jira/query/JiraQuery.java                      
                         |   37 +-
 jira/src/org/netbeans/modules/jira/query/QueryController.java                
                         |    5 -
 jira/src/org/netbeans/modules/jira/repository/JiraRepository.java            
                         |   56 +-
 jira/src/org/netbeans/modules/jira/repository/JiraStorageManager.java        
                         |    2 +-
 localtasks/src/org/netbeans/modules/localtasks/QueryProviderImpl.java        
                         |    5 -
 odcs.tasks/manifest.mf                                                       
                         |    2 +-
 odcs.tasks/nbproject/project.xml                                             
                         |    2 +-
 odcs.tasks/src/org/netbeans/modules/odcs/tasks/ODCSQueryProvider.java        
                         |    5 -
 odcs.tasks/src/org/netbeans/modules/odcs/tasks/issue/CommentsPanel.java      
                         |    2 +-
 odcs.tasks/src/org/netbeans/modules/odcs/tasks/issue/ODCSIssue.java          
                         |    6 +-
 odcs.tasks/src/org/netbeans/modules/odcs/tasks/issue/SubtaskTableModel.java  
                         |    4 +-
 odcs.tasks/src/org/netbeans/modules/odcs/tasks/query/ODCSQuery.java          
                         |   15 +-
 
odcs.tasks/src/org/netbeans/modules/odcs/tasks/query/ODCSQueryController.java 
                        |    7 +-
 
odcs.tasks/src/org/netbeans/modules/odcs/tasks/repository/ODCSRepository.java 
                        |   56 +-
 58 files changed, 220 insertions(+), 2869 deletions(-)

diffs (truncated from 4450 to 3000 lines):

diff --git 
a/bugtracking.kenai/test/unit/src/org/netbeans/modules/bugzilla/kenai/KenaiQueryRefreshTest.java
 
b/bugtracking.kenai/test/unit/src/org/netbeans/modules/bugzilla/kenai/KenaiQueryRefreshTest.java
--- 
a/bugtracking.kenai/test/unit/src/org/netbeans/modules/bugzilla/kenai/KenaiQueryRefreshTest.java
+++ 
b/bugtracking.kenai/test/unit/src/org/netbeans/modules/bugzilla/kenai/KenaiQueryRefreshTest.java
@@ -45,20 +45,14 @@
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileReader;
-import java.io.IOException;
 import org.netbeans.modules.bugzilla.query.*;
 import java.text.MessageFormat;
-import java.util.Collection;
 import java.util.logging.Level;
 import org.netbeans.junit.NbTestCase;
-import org.netbeans.modules.bugtracking.team.spi.TeamProject;
-import org.netbeans.modules.bugtracking.team.spi.TeamUtil;
-import org.netbeans.modules.bugtracking.cache.IssueCache;
 import org.netbeans.modules.bugzilla.BugzillaConfig;
 import org.netbeans.modules.bugzilla.LogHandler;
 import org.netbeans.modules.bugzilla.TestConstants;
 import org.netbeans.modules.bugzilla.TestUtil;
-import org.netbeans.modules.bugzilla.issue.BugzillaIssue;
 import org.netbeans.modules.bugzilla.repository.BugzillaRepository;
 import org.netbeans.modules.kenai.api.Kenai;
 import org.netbeans.modules.kenai.api.KenaiManager;
diff --git 
a/bugtracking.kenai/test/unit/src/org/netbeans/modules/bugzilla/kenai/KenaiQueryTest.java
 
b/bugtracking.kenai/test/unit/src/org/netbeans/modules/bugzilla/kenai/KenaiQueryTest.java
--- 
a/bugtracking.kenai/test/unit/src/org/netbeans/modules/bugzilla/kenai/KenaiQueryTest.java
+++ 
b/bugtracking.kenai/test/unit/src/org/netbeans/modules/bugzilla/kenai/KenaiQueryTest.java
@@ -100,12 +100,6 @@
 //        } catch (Exception e) {
 //            throw new RuntimeException(e);
 //        }
-        cleanupStoredIssues();
-    }
-
-    private void cleanupStoredIssues() throws NoSuchFieldException, 
IllegalArgumentException, IllegalAccessException, ClassNotFoundException, 
NoSuchMethodException, NoSuchMethodException, InstantiationException, 
InvocationTargetException {
-        
QueryTestUtil.getRepository().getIssueCache().storeArchivedQueryIssues(QUERY_NAME,
 new String[0]);
-        
QueryTestUtil.getRepository().getIssueCache().storeQueryIssues(QUERY_NAME, 
new String[0]);
     }
 
 }
diff --git a/bugtracking/manifest.mf b/bugtracking/manifest.mf
--- a/bugtracking/manifest.mf
+++ b/bugtracking/manifest.mf
@@ -2,5 +2,5 @@
 AutoUpdate-Show-In-Client: false
 OpenIDE-Module: org.netbeans.modules.bugtracking
 OpenIDE-Module-Localizing-Bundle: 
org/netbeans/modules/bugtracking/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.71
+OpenIDE-Module-Specification-Version: 1.72
 
diff --git a/bugtracking/src/org/netbeans/modules/bugtracking/QueryImpl.java 
b/bugtracking/src/org/netbeans/modules/bugtracking/QueryImpl.java
--- a/bugtracking/src/org/netbeans/modules/bugtracking/QueryImpl.java
+++ b/bugtracking/src/org/netbeans/modules/bugtracking/QueryImpl.java
@@ -146,10 +146,6 @@
         return queryProvider.getTooltip(data);
     }
 
-    public boolean contains(String id) {
-        return queryProvider.contains(data, id);
-    }
-
     public void refresh() {
         queryProvider.refresh(data);
     }
diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueCache.java 
b/bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueCache.java
deleted file mode 100644
--- a/bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueCache.java
+++ /dev/null
@@ -1,562 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
- *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common
- * Development and Distribution License("CDDL") (collectively, the
- * "License"). You may not use this file except in compliance with the
- * License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html
- * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
- * specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header
- * Notice in each file and include the License file at
- * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the
- * License Header, with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- *
- * If you wish your version of this file to be governed by only the CDDL
- * or only the GPL Version 2, indicate your decision by adding
- * "[Contributor] elects to include this software in this distribution
- * under the [CDDL or GPL Version 2] license." If you do not indicate a
- * single choice of license, a recipient has the option to distribute
- * your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above.
- * However, if you add GPL Version 2 code and therefore, elected the GPL
- * Version 2 license, then the option applies only if the new code is
- * made subject to such option by the copyright holder.
- *
- * Contributor(s):
- *
- * Portions Copyrighted 2009 Sun Microsystems, Inc.
- */
-
-package org.netbeans.modules.bugtracking.cache;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.swing.SwingUtilities;
-import org.netbeans.modules.bugtracking.BugtrackingManager;
-import org.netbeans.modules.bugtracking.api.Issue;
-
-/**
- *
- * @author Tomas Stupka
- */
-public class IssueCache<I> {
-
-    public enum Status {
-        /**
-         * No information available
-         */
-        ISSUE_STATUS_UNKNOWN(0),
-        /**
-         * Issue was seen
-         */
-        ISSUE_STATUS_SEEN(2),
-        /**
-         * Issue wasn't seen yet
-         */
-        ISSUE_STATUS_NEW(4),
-        /**
-         * Issue was remotely modified since the last time it was seen
-         */
-        ISSUE_STATUS_MODIFIED(8);
-        
-        /* used by IssueStorage */
-        private final int val;
-
-        private Status(int i) {
-            this.val = i;
-        }
-        int getVal() {
-            return val;
-        }
-    }
-    
-    /**
-     * Seen, New or Modified
-     */
-    public static final EnumSet<Status> ISSUE_STATUS_ALL = EnumSet.of(
-            Status.ISSUE_STATUS_NEW,
-            Status.ISSUE_STATUS_MODIFIED,
-            Status.ISSUE_STATUS_SEEN);
-    /**
-     * New or modified
-     */
-    public static final EnumSet<Status> ISSUE_STATUS_NOT_SEEN = EnumSet.of(
-            Status.ISSUE_STATUS_NEW,
-            Status.ISSUE_STATUS_MODIFIED);
-
-    private static final Logger LOG = 
Logger.getLogger("org.netbeans.modules.bugtracking.ui.issue.cache.IssueCache");
-    private Map<String, IssueEntry> cache;
-    private Map<String, Map<String, String>> lastSeenAttributes;
-
-    private final String nameSpace;
-
-    private final Object CACHE_LOCK = new Object();
-    private final long referenceTime;
-    private final IssueAccessor<I> issueAccessor;
-
-    /**
-     *
-     * Provides access to the particular {@link Issue} implementations
-     * kept in {@link IssueCache}
-     *
-     * @param <I>
-     */
-    public interface IssueAccessor<I> {
-
-        /**
-         * Returns attributes to be stored for the given Issue once it was 
seen
-         * @return
-         */
-        public Map<String, String> getAttributes(I issue);
-
-        /**
-         * Returns the last modification time for the given issue
-         *
-         * @issue issue
-         * @return the last modification time
-         */
-        public long getLastModified(I issue);
-
-        /**
-         * Returns the time the issue was created
-         *
-         * @issue issue
-         * @return the last modification time
-         */
-        public long getCreated(I issue);
-
-    }
-
-    /**
-     * Creates a new IssueCache
-     *
-     * @param nameSpace
-     * @param issueAccessor
-     */
-    public IssueCache(String nameSpace, IssueAccessor<I> issueAccessor) {
-        assert issueAccessor != null;
-        this.nameSpace = nameSpace;
-        this.issueAccessor = issueAccessor;
-        
-        long t = System.currentTimeMillis(); // fallback
-        try {
-            t = IssueStorage.getInstance().getReferenceTime(nameSpace);
-        } catch (IOException ex) {
-            LOG.log(Level.SEVERE, null, ex);
-        }
-        this.referenceTime = t;
-
-        BugtrackingManager.getInstance().getRequestProcessor().post(new 
Runnable() {
-            @Override
-            public void run() {
-                synchronized(CACHE_LOCK) {
-                    cleanup();
-                }
-            }
-        });
-    }
-
-    /**
-     * override in unit tests
-     */
-    protected void cleanup() {
-        IssueStorage.getInstance().cleanup(IssueCache.this.nameSpace);
-    }
-
-    /**
-     * Sets new data into the given issue
-     *
-     * @param issue issue
-     * @param issueData data representing an issue
-     * @throws IOException
-     */
-    public I setIssueData(String id, I issue) throws IOException {
-        assert id != null && !id.equals("");
-
-        synchronized(CACHE_LOCK) {
-            IssueEntry entry = getCache().get(id);
-
-            if(entry == null) {
-                entry = createNewEntry(id);
-            }
-
-            entry.issue = issue;
-            LOG.log(Level.FINE, "setting issue {0} ", new Object[] {id}); // 
NOI18N
-            if(!entry.wasRead()) {
-                readIssue(entry);
-                Map<String, String> attr = entry.getSeenAttributes();
-                if(attr == null || attr.isEmpty()) {
-                    // first timer -> this means the issue was loaded for 
the first time in the IDE 
-                    if(referenceTime >= 
issueAccessor.getLastModified(entry.issue)) {
-                        setSeen(id, true);
-                    } else if(referenceTime >= 
issueAccessor.getCreated(entry.issue)) {
-                        entry.seenAttributes = 
issueAccessor.getAttributes(entry.issue);
-                        storeIssue(entry);
-                    }
-                }
-            }
-
-            if(entry.seenAttributes != null) {
-                if(entry.wasSeen()) {
-                    LOG.log(Level.FINE, " issue {0} was seen", new Object[] 
{id}); // NOI18N
-                    long lastModified = 
issueAccessor.getLastModified(entry.issue);
-                    if(entry.lastSeenModified < lastModified) {
-                        LOG.log(Level.FINE, " issue {0} is changed", new 
Object[] {id}); // NOI18N
-                        if(entry.lastSeenModified >= lastModified) {
-                            LOG.log(Level.WARNING, " issue '{'0'}' changed, 
yet last known modify > last modify. [{0},{1}]", new 
Object[]{entry.lastSeenModified, lastModified}); // NOI18N
-                        }
-                        storeIssue(entry);
-                        entry.seen = false;
-                        entry.status= Status.ISSUE_STATUS_MODIFIED;
-                    } else {
-                        LOG.log(Level.FINE, " issue {0} isn't changed", new 
Object[] {id}); // NOI18N
-                        // keep old values
-                    }
-                } else {
-                    LOG.log(Level.FINE, " issue {0} wasn't seen yet", new 
Object[] {id}); // NOI18N
-                    if(referenceTime < 
issueAccessor.getLastModified(entry.issue))
-                    {
-                        LOG.log(Level.FINE, " issue {0} is changed", new 
Object[] {id}); // NOI18N
-                        entry.seen = false;
-                        entry.status= Status.ISSUE_STATUS_MODIFIED;
-                    } else {
-                        LOG.log(Level.FINE, " issue {0} isn't changed", new 
Object[] {id}); // NOI18N
-                        entry.seenAttributes = null;
-                        entry.seen = false;
-                        entry.status= Status.ISSUE_STATUS_NEW;
-                    }
-                }
-            }
-            return entry.issue;
-        }
-    }
-
-    /**
-     * Sets the {@link Issue} with the given id as seen, or unseen.
-     *
-     * @param id issue id
-     * @param seen seen flag
-     * @throws IOException
-     */
-    public void setSeen(String id, boolean seen) throws IOException {
-        if (id == null) {
-            return;
-        }
-        LOG.log(Level.FINE, "setting seen {0} for issue {1}", new Object[] 
{seen, id}); // NOI18N
-        assert !SwingUtilities.isEventDispatchThread();
-        IssueEntry entry;
-        synchronized(CACHE_LOCK) {
-            entry = getCache().get(id);
-            assert entry != null && entry.issue != null;
-            if(seen) {
-                getLastSeenAttributes().put(id, entry.seenAttributes);
-                entry.seenAttributes = 
issueAccessor.getAttributes(entry.issue);
-                entry.lastSeenModified = 
issueAccessor.getLastModified(entry.issue);
-                entry.lastUnseenStatus = entry.status;
-            } else {
-                entry.seenAttributes = getLastSeenAttributes().get(id);
-                if(entry.lastUnseenStatus != Status.ISSUE_STATUS_UNKNOWN) {
-                    entry.status = entry.lastUnseenStatus;
-                    if(entry.seenAttributes == null) {
-                        // no need to set the attributes once they have been 
set already
-                        entry.seenAttributes = 
issueAccessor.getAttributes(entry.issue);
-                    }
-                }
-            }
-            entry.seen = seen;
-            storeIssue(entry);
-        }
-    }
-
-    /**
-     * Determines whether the {@link Issue} with the given id was seen or 
unseen.
-     *
-     * @param id issue id
-     * @return true if issue was seen, otherwise false
-     */
-    public boolean wasSeen(String id) {
-        IssueEntry entry;
-        synchronized(CACHE_LOCK) {
-            entry = getCache().get(id);
-            if(entry == null) {
-                entry = createNewEntry(id);
-                readIssue(entry);
-            }
-        }
-        boolean seen = entry != null ? entry.seen : false;
-        LOG.log(Level.FINE, "returning seen {0} for issue {1}", new Object[] 
{seen, id}); // NOI18N
-        return seen;
-    }
-
-    /**
-     * Returns the last seen attributes for the issue with the given id.
-     *
-     * @param id issue id
-     * @return last seen attributes
-     */
-    public Map<String, String> getSeenAttributes(String id) {
-        IssueEntry entry;
-        synchronized(CACHE_LOCK) {
-            entry = getCache().get(id);
-            if(entry == null) {
-                assert !SwingUtilities.isEventDispatchThread();
-                entry = createNewEntry(id);
-                readIssue(entry);
-            }
-            return entry.seenAttributes != null ? entry.seenAttributes : 
null;
-        }
-    }
-
-    /**
-     * Returns a the issue instance with the given id
-     *
-     * @param id issue id
-     * @return the {@link Issue} with the given id or null if not known yet
-     */
-    public I getIssue(String id) {
-        synchronized(CACHE_LOCK) {
-            IssueEntry entry = getCache().get(id);
-            return (entry == null) ? null : entry.issue;
-        }
-    }
-
-    /**
-     * Returns status value for the {@link Issue} with the given id
-     *
-     * @param id issue id
-     * @return issue status
-     * @see #ISSUE_STATUS_UNKNOWN
-     * @see #ISSUE_STATUS_NEW
-     * @see #ISSUE_STATUS_MODIFIED
-     * @see #ISSUE_STATUS_ALL
-     * @see #ISSUE_STATUS_SEEN
-     * @see #ISSUE_STATUS_NOT_SEEN
-     */
-    public Status getStatus(String id) {
-        synchronized(CACHE_LOCK) {
-            IssueEntry entry = getCache().get(id);
-            if(entry == null ) {
-                LOG.log(Level.FINE, "returning UKNOWN status for issue {0}", 
new Object[] {id}); // NOI18N
-                return Status.ISSUE_STATUS_UNKNOWN;
-            }
-            if(entry.seen) {
-                LOG.log(Level.FINE, "returning SEEN status for issue {0}", 
new Object[] {id}); // NOI18N
-                return Status.ISSUE_STATUS_SEEN;
-            }
-            LOG.log(Level.FINE, "returning status {0} for issue {1}", new 
Object[] {entry.status, id}); // NOI18N
-            return entry.status;
-        }
-    }
-
-    /**
-     * Stores the given id-s for a query
-     * @param name query name
-     * @param ids id-s
-     */
-    public void storeQueryIssues(String name, String[] ids) {
-        synchronized(CACHE_LOCK) {
-            try {
-                IssueStorage.getInstance().storeQuery(nameSpace, name, ids);
-            } catch (IOException ex) {
-                LOG.log(Level.SEVERE, null, ex);
-            }
-        }
-    }
-
-    /**
-     * Returns the timestamp when a queries issues were written the last time
-     *
-     * @param name query name
-     * @return timestamp
-     */
-    public long getQueryTimestamp(String name) {
-        return IssueStorage.getInstance().getQueryTimestamp(nameSpace, name);
-    }
-
-    /**
-     * Returns the id-s stored for a query
-     * @param name query name
-     * @return list of id-s
-     */
-    public List<String> readQueryIssues(String name) {
-        synchronized(CACHE_LOCK) {
-            try {
-                return IssueStorage.getInstance().readQuery(nameSpace, name);
-            } catch (IOException ex) {
-                LOG.log(Level.SEVERE, null, ex);
-            }
-            return new ArrayList<String>(0);
-        }
-    }
-
-    /**
-     * Stores the given id-s as archived
-     *
-     * @param name query name
-     * @param ids issues id-s
-     */
-    public void storeArchivedQueryIssues(String name, String[] ids) {
-        synchronized(CACHE_LOCK) {
-            try {
-                
IssueStorage.getInstance().storeArchivedQueryIssues(nameSpace, name, ids);
-            } catch (IOException ex) {
-                LOG.log(Level.SEVERE, null, ex);
-            }
-        }
-    }
-
-    /**
-     * Returns the id-s for all issues stored as archived for the query with 
the given name
-     *
-     * @param name query name
-     * @return list of id-s
-     */
-    public List<String> readArchivedQueryIssues(String name) {
-        synchronized(CACHE_LOCK) {
-            try {
-                Map<String, Long> m = 
IssueStorage.getInstance().readArchivedQueryIssues(nameSpace, name);
-                return new ArrayList<String>(m.keySet());
-            } catch (IOException ex) {
-                LOG.log(Level.SEVERE, null, ex);
-            }
-            return new ArrayList<String>(0);
-        }
-    }
-
-    /**
-     *
-     * Removes all data associated with a query from the storage.
-     *
-     * @param name query name
-     */
-    public void removeQuery(String name) {
-        synchronized(CACHE_LOCK) {
-            try {
-                IssueStorage.getInstance().removeQuery(nameSpace, name);
-            } catch (IOException ex) {
-                LOG.log(Level.SEVERE, null, ex);
-            }
-        }
-    }
-
-    /**
-     * for testing purposes
-     */
-    void setEntryValues(String id, Status status, boolean seen) {
-        synchronized(CACHE_LOCK) {
-            IssueEntry entry = getCache().get(id);
-            assert entry != null;
-            entry.status = status;
-            entry.seen = seen;
-        }
-    }
-    
-    private IssueEntry createNewEntry(String id) {
-        IssueEntry entry = new IssueEntry();
-        entry.id = id;
-        entry.status = Status.ISSUE_STATUS_NEW;
-        getCache().put(id, entry);
-        return entry;
-    }
-
-    private Map<String, IssueEntry> getCache() {
-        if(cache == null) {
-            cache = new HashMap<String, IssueEntry>();
-        }
-        return cache;
-    }
-
-    private Map<String, Map<String, String>> getLastSeenAttributes() {
-        if(lastSeenAttributes == null) {
-            lastSeenAttributes = new HashMap<String, Map<String, String>>();
-        }
-        return lastSeenAttributes;
-    }
-
-    private synchronized void readIssue(IssueEntry entry) {
-        try {
-            IssueStorage.getInstance().readIssue(nameSpace, entry);
-        } catch (IOException ex) {
-            LOG.log(Level.SEVERE, null, ex);
-        }
-    }
-
-    private void storeIssue(IssueEntry entry) throws IOException {
-        IssueStorage.getInstance().storeIssue(nameSpace, entry);
-    }
-
-    class IssueEntry {
-        private I issue;
-        private Map<String, String> seenAttributes;
-        private Status status;
-        private boolean seen = false;
-        private String id;
-        private long lastSeenModified = -1;
-        private Status lastUnseenStatus = Status.ISSUE_STATUS_UNKNOWN;
-
-        IssueEntry() { }
-
-        IssueEntry(I issue, String id, Map<String, String> seenAttributes, 
Status status, Status lastUnseenStatus, boolean seen, long lastKnownModified) 
{
-            this.issue = issue;
-            this.id = id;
-            this.seenAttributes = seenAttributes;
-            this.status = status;
-            this.seen = seen;
-            this.lastSeenModified = lastKnownModified;
-            this.lastUnseenStatus = lastUnseenStatus;
-        }
-
-        public boolean wasSeen() {
-            return seen;
-        }
-        public Map<String, String> getSeenAttributes() {
-            return seenAttributes;
-        }
-        public Status getStatus() {
-            return status;
-        }
-        public void setSeen(boolean seen) {
-            this.seen = seen;
-        }
-        public void setSeenAttributes(Map<String, String> seenAttributes) {
-            this.seenAttributes = seenAttributes;
-        }
-        public String getId() {
-            return id;
-        }
-        public long getLastSeenModified() {
-            return lastSeenModified;
-        }
-        public void setLastSeenModified(long lastKnownModified) {
-            this.lastSeenModified = lastKnownModified;
-        }
-        public Status getLastUnseenStatus() {
-            return lastUnseenStatus;
-        }
-        public void setLastUnseenStatus(Status lastUnseenStatus) {
-            this.lastUnseenStatus = lastUnseenStatus;
-        }
-        private boolean wasRead() {
-            return seenAttributes != null;
-        }
-    }
-}
diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueStorage.java 
b/bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueStorage.java
deleted file mode 100644
--- a/bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueStorage.java
+++ /dev/null
@@ -1,664 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
- *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common
- * Development and Distribution License("CDDL") (collectively, the
- * "License"). You may not use this file except in compliance with the
- * License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html
- * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
- * specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header
- * Notice in each file and include the License file at
- * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the
- * License Header, with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- *
- * If you wish your version of this file to be governed by only the CDDL
- * or only the GPL Version 2, indicate your decision by adding
- * "[Contributor] elects to include this software in this distribution
- * under the [CDDL or GPL Version 2] license." If you do not indicate a
- * single choice of license, a recipient has the option to distribute
- * your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above.
- * However, if you add GPL Version 2 code and therefore, elected the GPL
- * Version 2 license, then the option applies only if the new code is
- * made subject to such option by the copyright holder.
- *
- * Contributor(s):
- *
- * Portions Copyrighted 2009 Sun Microsystems, Inc.
- */
-
-package org.netbeans.modules.bugtracking.cache;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.EOFException;
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import java.util.zip.ZipOutputStream;
-import javax.swing.SwingUtilities;
-import org.netbeans.modules.bugtracking.BugtrackingConfig;
-import org.netbeans.modules.bugtracking.BugtrackingManager;
-import org.netbeans.modules.bugtracking.util.BugtrackingUtil;
-import org.netbeans.modules.bugtracking.util.TextUtils;
-import org.openide.util.RequestProcessor.Task;
-import org.openide.modules.Places;
-
-/**
- *
- * @author Tomas Stupka
- */
-class IssueStorage {
-
-    private static IssueStorage instance;
-    private final File storage;
-    private static final String STORAGE_FILE  = "storage";              // 
NOI18N
-    private static final String STORAGE_VERSION_1_0 = "1.0";            // 
NOI18N
-    private static final String STORAGE_VERSION_1_1 = "1.1";            // 
NOI18N
-    private static final String STORAGE_VERSION = STORAGE_VERSION_1_1;  // 
NOI18N
-    private final static String QUERY_ARCHIVED_SUFIX = ".qa";           // 
NOI18N
-    private final static String QUERY_SUFIX = ".q";                     // 
NOI18N
-    private final static String ISSUE_SUFIX = ".i";                     // 
NOI18N
-
-    private IssueStorage() { 
-        storage = getStorageRootFile();
-        if(!storage.exists()) {
-            storage.mkdirs();
-        }
-        writeStorage();
-        Task t = 
BugtrackingManager.getInstance().getRequestProcessor().create(new Runnable() {
-            @Override
-            public void run() {
-                cleanup();
-            }
-        });
-        t.schedule(0);
-    }
-
-    public static IssueStorage getInstance() {
-        if(instance == null) {
-            instance = new IssueStorage();
-        }
-        return instance;
-    }
-
-    long getReferenceTime(String nameSpace) throws IOException {
-        File folder = StorageUtils.getNameSpaceFolder(storage, nameSpace);
-        File data = new File(folder, "data");                                
   // NOI18N
-        
-        StorageUtils.FileLocks.FileLock lock = 
StorageUtils.FileLocks.getLock(data);
-        try {
-            synchronized(lock) {
-                final File parentFile = data.getParentFile();
-                if(!parentFile.exists()) {
-                    parentFile.mkdirs();
-                }
-                int retry = 0;
-                while(true) {
-                    try {
-                        return getReferenceTimeIntern(data, nameSpace, 
folder); 
-                    } catch (EOFException ex) {
-                        BugtrackingManager.LOG.log(Level.SEVERE, 
data.getAbsolutePath(), ex);
-                        return -1;
-                    } catch (InterruptedException ex) {
-                        BugtrackingManager.LOG.log(Level.WARNING, null, ex);
-                        throw new IOException(ex);
-                    } catch (IOException ex) {
-                        retry++;
-                        if (retry > 7) {
-                            BugtrackingManager.LOG.log(Level.WARNING, "could 
not access storage data file {0}", data.getAbsolutePath()); // NOI18N
-                            throw ex;
-                        }
-                        try {
-                            Thread.sleep(retry * 34);
-                        } catch (InterruptedException iex) {
-                            throw ex;
-                        }
-                    }
-                }
-            }
-        } finally {
-            if(lock != null) { lock.release(); }
-        }
-    }
-
-    private long getReferenceTimeIntern(File data, String nameSpace, File 
folder) throws IOException, InterruptedException {
-        long ret = -1;
-        if(data.exists()) {
-            DataInputStream is = null;
-            try {
-                is = StorageUtils.getDataInputStream(data);
-                ret = is.readLong();
-                return ret;
-            } finally {
-                if(BugtrackingManager.LOG.isLoggable(Level.FINE)) {
-                    String dateString = ret > -1 ? new 
SimpleDateFormat().format(new Date(ret)) : "null";   // NOI18N
-                    BugtrackingManager.LOG.log(Level.FINE, "finished reading 
greference time {0} - {1}", new Object[] {nameSpace, dateString}); // NOI18N
-                }
-                try { if(is != null) is.close(); } catch (IOException e) {}
-            }
-        } else {
-            if(!folder.exists()) {
-                folder.mkdirs();
-            }
-            data.createNewFile();
-            ret = System.currentTimeMillis();
-            DataOutputStream os = null;
-            try {
-                os = StorageUtils.getDataOutputStream(data, false);
-                os.writeLong(ret);
-                return ret;
-            } finally {
-                if(BugtrackingManager.LOG.isLoggable(Level.FINE)) {
-                    String dateString = ret > -1 ? new 
SimpleDateFormat().format(new Date(ret)) : "null";   // NOI18N
-                    BugtrackingManager.LOG.log(Level.FINE, "finished writing 
greference time {0} - {1}", new Object[] {nameSpace, dateString}); // NOI18N
-                }
-                try { if(os != null) os.close(); } catch (IOException e) {}
-            }
-        }
-    }
-
-    void storeIssue(String nameSpace, IssueCache.IssueEntry entry) throws 
IOException {
-        assert !SwingUtilities.isEventDispatchThread() : "should not access 
the issue storage in awt"; // NOI18N
-        BugtrackingManager.LOG.log(Level.FINE, "start storing issue {0} - 
{1}", new Object[] {nameSpace, entry.getId()}); // NOI18N
-        InputStream is = null;
-        DataOutputStream dos = null;
-        StorageUtils.FileLocks.FileLock lock = null;
-        try {
-            File issueFile = 
getIssueFile(StorageUtils.getNameSpaceFolder(storage, nameSpace), 
entry.getId());
-            lock = StorageUtils.FileLocks.getLock(issueFile);
-            synchronized(lock) {
-                dos = getIssueOutputStream(issueFile);
-                if(dos == null) {
-                    return;
-                }
-                dos.writeBoolean(entry.wasSeen());
-                dos.writeLong(entry.getLastSeenModified());
-                dos.writeInt(entry.getLastUnseenStatus().getVal());
-                if(entry.getSeenAttributes() != null) {
-                    Map<String, String> sa = entry.getSeenAttributes();
-                    for(Entry<String, String> e : sa.entrySet()) {
-                        writeString(dos, e.getKey());
-                        writeString(dos, e.getValue());
-                    }
-                }
-            }
-        } catch (InterruptedException ex) {
-            BugtrackingManager.LOG.log(Level.WARNING, null, ex);
-            throw new IOException(ex);
-        } finally {
-            try { if(dos != null) dos.close(); } catch (IOException e) {}
-            try { if(is != null) is.close(); } catch (IOException e) {}
-            if(lock != null) {
-                lock.release();
-            }
-            BugtrackingManager.LOG.log(Level.FINE, "finished storing issue 
{0} - {1}", new Object[] {nameSpace, entry.getId()}); // NOI18N
-        }
-    }
-
-    void readIssue(String nameSpace, IssueCache.IssueEntry entry) throws 
IOException {
-        assert !SwingUtilities.isEventDispatchThread() : "should not access 
the issue storage in awt"; // NOI18N
-        BugtrackingManager.LOG.log(Level.FINE, "start reading issue {0} - 
{1}", new Object[] {nameSpace, entry.getId()}); // NOI18N
-        DataInputStream is = null;
-        StorageUtils.FileLocks.FileLock lock = null;
-        try {
-            File issueFile = 
getIssueFile(StorageUtils.getNameSpaceFolder(storage, nameSpace), 
entry.getId());
-            lock = StorageUtils.FileLocks.getLock(issueFile);
-            synchronized(lock) {
-                is = getIssueInputStream(issueFile);
-                if(is == null) {
-                    return;
-                }
-                Map<String, String> m = new HashMap<String, String>();
-                boolean seen = is.readBoolean();
-                long lastModified = -1;
-                IssueCache.Status lastStatus = 
IssueCache.Status.ISSUE_STATUS_UNKNOWN;
-                if(!STORAGE_VERSION.equals(STORAGE_VERSION_1_0)) {
-                    lastModified = is.readLong();
-                    int i = is.readInt();
-                    for(IssueCache.Status s : IssueCache.Status.values()) {
-                        if(s.getVal() == i) {
-                            lastStatus = s;
-                            break;
-                        }
-                    }
-                    if(i != IssueCache.Status.ISSUE_STATUS_UNKNOWN.getVal() 
&& 
-                       lastStatus == IssueCache.Status.ISSUE_STATUS_UNKNOWN) 
-                    {
-                        assert false : "there is no Status value for " + i; 
// NOI18N
-                    }
-                }
-                while(true) {
-                    try {
-                        String key = readString(is);
-                        String value = readString(is);
-                        m.put(key, value);
-                    } catch (EOFException e) { // XXX
-                        break;
-                    }
-                }
-                entry.setSeenAttributes(m);
-                entry.setSeen(seen);
-                entry.setLastSeenModified(lastModified);
-                entry.setLastUnseenStatus(lastStatus);
-            }
-        } catch (InterruptedException ex) {
-            BugtrackingManager.LOG.log(Level.WARNING, null, ex);
-            throw new IOException(ex);
-        } finally {
-            if(is != null) try { is.close(); } catch(IOException e) {}
-            if(lock != null) {
-                lock.release();
-            }
-            BugtrackingManager.LOG.log(Level.FINE, "finished reading issue 
{0} - {1}", new Object[] {nameSpace, entry.getId()}); // NOI18N
-        }
-    }
-
-    List<String> readQuery(String nameSpace, String queryName) throws 
IOException {
-        assert !SwingUtilities.isEventDispatchThread() : "should not access 
the issue storage in awt"; // NOI18N
-        BugtrackingManager.LOG.log(Level.FINE, "start reading query {0} - 
{1}", new Object[] {nameSpace, queryName}); // NOI18N
-
-        DataInputStream dis = null;
-        StorageUtils.FileLocks.FileLock lock = null;
-        try {
-            File folder = StorageUtils.getNameSpaceFolder(storage, 
nameSpace);
-            if(!folder.exists()) return Collections.emptyList();
-
-            File f = getQueryFile(folder, queryName, false);
-            lock = StorageUtils.FileLocks.getLock(f);
-            synchronized(lock) {
-                dis = StorageUtils.getQueryInputStream(f);
-                return readQuery(dis);
-            }
-        } catch (InterruptedException ex) {
-            BugtrackingManager.LOG.log(Level.WARNING, null, ex);
-            throw new IOException(ex);
-        } finally {
-            BugtrackingManager.LOG.log(Level.FINE, "finished reading query 
{0} - {1}", new Object[] {nameSpace, queryName}); // NOI18N
-            if(dis != null) try { dis.close(); } catch(IOException e) {}
-            if(lock != null) {
-                lock.release();
-            }
-        }
-    }
-
-    private List<String> readQuery(DataInputStream dis) throws IOException {
-        if(dis == null) return Collections.emptyList();
-        List<String> ids = new ArrayList<String>();
-        while(true) {
-            String id;
-            try {
-                id = readString(dis);
-            } catch (EOFException e) {
-                    break;
-            }
-            ids.add(id);
-        }
-        return ids;
-    }
-
-    long getQueryTimestamp(String nameSpace, String name) {
-        File folder = StorageUtils.getNameSpaceFolder(storage, nameSpace);
-        File file = new File(folder, TextUtils.encodeURL(name) + 
QUERY_SUFIX);
-        return file.lastModified();
-    }
-
-    Map<String, Long> readArchivedQueryIssues(String nameSpace, String 
queryName) throws IOException {
-        assert !SwingUtilities.isEventDispatchThread() : "should not access 
the issue storage in awt"; // NOI18N
-        BugtrackingManager.LOG.log(Level.FINE, "start reading archived query 
issues {0} - {1}", new Object[] {nameSpace, queryName}); // NOI18N
-        long now = System.currentTimeMillis();
-        long ttl = BugtrackingConfig.getInstance().getArchivedIssuesTTL() * 
1000 * 60 * 60 * 24;
-
-        StorageUtils.FileLocks.FileLock lock = null;
-        DataInputStream dis = null;
-        try {
-            File folder = StorageUtils.getNameSpaceFolder(storage, 
nameSpace);
-            if(!folder.exists()) return Collections.emptyMap();
-
-            File f = getQueryFile(folder, queryName, true);
-            lock = StorageUtils.FileLocks.getLock(f);
-            synchronized(lock) {
-                dis = StorageUtils.getQueryInputStream(f);
-                if(dis == null) return Collections.emptyMap();
-                Map<String, Long> ids = readArchivedQueryIssues(dis);
-                Iterator<String> it = ids.keySet().iterator();
-                while(it.hasNext()) {
-                    String id = it.next();
-                    long ts = ids.get(id);
-                    if(ts < now - ttl) {
-                        it.remove();
-                    }
-                }
-                return ids;
-            }
-        } catch (InterruptedException ex) {
-            BugtrackingManager.LOG.log(Level.WARNING, null, ex);
-            throw new IOException(ex);
-        } finally {
-            BugtrackingManager.LOG.log(Level.FINE, "finished reading 
archived query issues {0} - {1}", new Object[] {nameSpace, queryName}); // 
NOI18N
-            if(dis != null) try { dis.close(); } catch(IOException e) {}
-            if(lock != null) {
-                lock.release();
-            }
-        }
-    }
-
-    private Map<String, Long> readArchivedQueryIssues(DataInputStream dis) 
throws IOException {
-        if(dis == null) return Collections.emptyMap();
-        Map<String, Long> ids = new HashMap<String, Long>();
-        while(true) {
-            try {
-                String id = readString(dis);
-                long ts = dis.readLong();
-                ids.put(id, ts);
-            } catch (EOFException e) {
-                break;
-            }
-        }
-        return ids;
-    }
-
-    void removeQuery(String nameSpace, String queryName) throws IOException {
-        assert !SwingUtilities.isEventDispatchThread() : "should not access 
the issue storage in awt"; // NOI18N
-        BugtrackingManager.LOG.log(Level.FINE, "start removing query {0} - 
{1}", new Object[] {nameSpace, queryName}); // NOI18N
-        try {
-            StorageUtils.FileLocks.FileLock lock;
-            File folder = StorageUtils.getNameSpaceFolder(storage, 
nameSpace);
-            File query = getQueryFile(folder, queryName, false);
-            if(query.exists()) {
-                lock = StorageUtils.FileLocks.getLock(query);
-                try {
-                    synchronized(lock) {
-                        BugtrackingUtil.deleteRecursively(query);
-                    }
-                } finally {
-                    if(lock != null) { lock.release(); }
-                }
-            }
-            lock = null;
-            File queryArchived = getQueryFile(folder, queryName, true);
-            if(queryArchived.exists()) {
-                lock = StorageUtils.FileLocks.getLock(queryArchived);
-                try {
-                    synchronized(lock) {
-                        BugtrackingUtil.deleteRecursively(queryArchived);
-                    }
-                } finally {
-                    if(lock != null) {lock.release();}
-                }
-            }
-        } finally {
-            BugtrackingManager.LOG.log(Level.FINE, "finished removing query 
{0} - {1}", new Object[] {nameSpace, queryName}); // NOI18N
-        }
-    }
-
-    void storeQuery(String nameSpace, String queryName, String[] ids) throws 
IOException {
-        assert !SwingUtilities.isEventDispatchThread() : "should not access 
the issue storage in awt"; // NOI18N
-        BugtrackingManager.LOG.log(Level.FINE, "start storing query issues 
{0} - {1}", new Object[] {nameSpace, queryName}); // NOI18N
-        StorageUtils.FileLocks.FileLock lock = null;
-        DataOutputStream dos = null;
-        try {
-            File folder = StorageUtils.getNameSpaceFolder(storage, 
nameSpace);
-            File f = getQueryFile(folder, queryName, false);
-            lock = StorageUtils.FileLocks.getLock(f);
-            synchronized(lock) {
-                dos = StorageUtils.getQueryOutputStream(f);
-                for (String id : ids) {
-                    writeString(dos, id);
-                }
-                dos.flush();
-            }
-        } catch (InterruptedException ex) {
-            BugtrackingManager.LOG.log(Level.WARNING, null, ex);
-            throw new IOException(ex);
-        } finally {
-            BugtrackingManager.LOG.log(Level.FINE, "finished storing query 
issues {0} - {1}", new Object[] {nameSpace, queryName}); // NOI18N
-            if(dos != null) try { dos.close(); } catch(IOException e) {}
-            if(lock != null) {
-                lock.release();
-            }
-        }
-    }
-
-    void storeArchivedQueryIssues(String nameSpace, String queryName, 
String[] ids) throws IOException {
-        assert !SwingUtilities.isEventDispatchThread() : "should not access 
the issue storage in awt"; // NOI18N
-        BugtrackingManager.LOG.log(Level.FINE, "start storing archived query 
issues {0} - {1}", new Object[] {nameSpace, queryName}); // NOI18N
-        long now = System.currentTimeMillis();
-        Map<String, Long> archived = readArchivedQueryIssues(nameSpace, 
queryName);
-        DataOutputStream dos = null;
-        StorageUtils.FileLocks.FileLock lock = null;
-        try {
-            File folder = StorageUtils.getNameSpaceFolder(storage, 
nameSpace);
-            File f = getQueryFile(folder, queryName, true);
-            lock = StorageUtils.FileLocks.getLock(f);
-            synchronized(lock) {
-                dos = StorageUtils.getQueryOutputStream(f);
-                for (String id : ids) {
-                    writeString(dos, id);
-                    Long ts = archived.get(id);
-                    if(ts != null && ts.longValue() != -1) {
-                        dos.writeLong(ts);
-                    } else {
-                        dos.writeLong(now);
-                    }
-                }
-                dos.flush();
-            }
-        } catch (InterruptedException ex) {
-            BugtrackingManager.LOG.log(Level.WARNING, null, ex);
-            throw new IOException(ex);
-        } finally {
-            try { if(dos != null) dos.close(); } catch (IOException e) {}
-            if(lock != null) {
-                lock.release();
-            }
-            BugtrackingManager.LOG.log(Level.FINE, "finished storing 
archived query issues {0} - {1}", new Object[] {nameSpace, queryName}); // 
NOI18N
-        }
-    }
-
-    void cleanup() {
-        try {
-            BugtrackingManager.LOG.log(Level.FINE, "starting bugtrackig 
storage cleanup"); // NOI18N
-
-            File root = getStorageRootFile();
-            File[] repos = root.listFiles();
-            if(repos == null) {
-                return;
-            }
-            for (File repo : repos) {
-                cleanup(repo);
-            }
-        } finally {
-            BugtrackingManager.LOG.log(Level.FINE, "finnished bugtrackig 
storage cleanup"); // NOI18N
-        }
-    }
-
-    void cleanup(String namespace) {
-        try {
-            BugtrackingManager.LOG.log(Level.FINE, "starting bugtrackig 
storage cleanup for {0}", new Object[] {namespace}); // NOI18N
-            cleanup(StorageUtils.getNameSpaceFolder(storage, namespace));
-        } finally {
-            BugtrackingManager.LOG.log(Level.FINE, "finnished bugtrackig 
storage cleanup for {0}", new Object[] {namespace}); // NOI18N
-        }
-    }
-
-    private void cleanup(File repo) {
-        try {
-            BugtrackingManager.LOG.log(Level.FINE, "starting bugtrackig 
storage cleanup for {0}", new Object[] {repo.getAbsoluteFile()}); // NOI18N
-            Set<String> livingIssues = new HashSet<String>();
-            File[] queries = repo.listFiles(new FilenameFilter() {
-                @Override
-                public boolean accept(File dir, String name) {
-                    return name.endsWith(QUERY_SUFIX);
-                }
-            });
-            if(queries != null && queries.length > 0) {
-                for (File lq : queries) {
-                    StorageUtils.FileLocks.FileLock lock = 
StorageUtils.FileLocks.getLock(lq);
-                    List<String> ids;
-                    try {
-                        synchronized(lock) {
-                            ids = 
readQuery(StorageUtils.getDataInputStream(lq));
-                        }
-                    } finally {
-                        if(lock != null) lock.release();
-                    }
-                    if(ids == null || ids.isEmpty()) {
-                        continue;
-                    }
-                    livingIssues.addAll(ids);
-                }
-            }
-            queries = repo.listFiles(new FilenameFilter() {
-                @Override
-                public boolean accept(File dir, String name) {
-                    return name.endsWith(QUERY_ARCHIVED_SUFIX);
-                }
-            });
-            if(queries != null) {
-                for (File lq : queries) {
-                    Map<String, Long> ids;
-                    StorageUtils.FileLocks.FileLock lock = 
StorageUtils.FileLocks.getLock(lq);
-                    try {
-                        synchronized(lock) {
-                            ids = 
readArchivedQueryIssues(StorageUtils.getDataInputStream(lq));
-                        }
-                    } finally {
-                        if(lock != null) lock.release();
-                    }
-                    if(ids == null || ids.isEmpty()) {
-                        continue;
-                    }
-                    livingIssues.addAll(ids.keySet());
-                }
-            }
-            BugtrackingManager.LOG.log(Level.FINER, "living query issues 
{0}", new Object[] {livingIssues}); // NOI18N
-            File[] issues = repo.listFiles(new FilenameFilter() {
-                @Override
-                public boolean accept(File dir, String name) {
-                    return name.endsWith(ISSUE_SUFIX);
-                }
-            });
-            if(issues != null) {
-                for (File issue : issues) {
-                    StorageUtils.FileLocks.FileLock lock = 
StorageUtils.FileLocks.getLock(issue);
-                    try {
-                        String id = issue.getName();
-                        id = id.substring(0, id.length() - 
ISSUE_SUFIX.length());
-                        synchronized(lock) {
-                            if(!livingIssues.contains(id)) {
-                                BugtrackingManager.LOG.log(Level.FINE, 
"removing issue {0}", new Object[] {id}); // NOI18N
-                                issue.delete();
-                            }
-                        }
-                    } finally {
-                        if(lock != null) lock.release();
-                    }
-                }
-            }
-            
-        } catch (IOException ex) {
-            BugtrackingManager.LOG.log(Level.WARNING, null, ex); // NOI18N
-        } catch (InterruptedException ex) {
-            BugtrackingManager.LOG.log(Level.WARNING, null, ex); // NOI18N
-        } finally {
-            BugtrackingManager.LOG.log(Level.FINE, "finished bugtrackig 
storage cleanup for {0}", new Object[] {repo.getAbsoluteFile()}); // NOI18N
-        }
-    }
-
-    private File getStorageRootFile() {
-        return new File(new File(Places.getUserDirectory(), "var"), 
"bugtracking");               // NOI18N
-    }
-
-    private void writeStorage() {
-        DataOutputStream dos = null;
-        try {
-            dos = StorageUtils.getDataOutputStream(new File(storage, 
STORAGE_FILE), false);
-            writeString(dos, STORAGE_VERSION);
-            dos.flush();
-        } catch (IOException e) {
-            BugtrackingManager.LOG.log(Level.INFO, null, e);
-        } catch (InterruptedException ie) {
-            BugtrackingManager.LOG.log(Level.INFO, null, ie);
-        } finally {
-            if (dos != null) {
-                try { dos.close(); } catch (IOException e) { }
-            }
-        }
-    }
-
-    private void writeString(DataOutputStream dos, String str) throws 
IOException {
-        if(str != null) {
-            dos.writeInt(str.length());
-            dos.writeChars(str);
-        } else {
-            dos.writeInt(0);
-        }
-    }
-
-    private static String readString(DataInputStream dis) throws IOException 
{
-        int len = dis.readInt();
-        if(len == 0) {
-            return "";                                                       
   // NOI18N
-        }
-        StringBuilder sb = new StringBuilder();                
-        while(len-- > 0) {
-            char c = dis.readChar();
-            sb.append(c);                       
-        }        
-        return sb.toString();
-    }
-
-    private DataOutputStream getIssueOutputStream(File issueFile) throws 
IOException, InterruptedException {
-        ZipOutputStream zos = new ZipOutputStream(new 
BufferedOutputStream(StorageUtils.getFileOutputStream(issueFile, false)));
-        ZipEntry entry = new ZipEntry(issueFile.getName());
-        zos.putNextEntry(entry);
-        return new DataOutputStream(zos);
-    }
-
-    private DataInputStream getIssueInputStream(File file) throws 
IOException, InterruptedException {
-        if(!file.exists()) return null;
-        ZipInputStream zis = new ZipInputStream(new 
BufferedInputStream(StorageUtils.getFileInputStream(file)));
-        zis.getNextEntry();
-        return new DataInputStream(zis);
-    }
-
-    private File getIssueFile(File folder, String id) {
-        return new File(folder, id + ISSUE_SUFIX);
-    }
-    
-    private File getQueryFile(File folder, String queryName, boolean 
archived){
-        return new File(folder, TextUtils.encodeURL(queryName) + (archived ? 
QUERY_ARCHIVED_SUFIX : QUERY_SUFIX));
-    }
-    
-}
diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/cache/StorageUtils.java 
b/bugtracking/src/org/netbeans/modules/bugtracking/cache/StorageUtils.java
deleted file mode 100644
--- a/bugtracking/src/org/netbeans/modules/bugtracking/cache/StorageUtils.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
- *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common
- * Development and Distribution License("CDDL") (collectively, the
- * "License"). You may not use this file except in compliance with the
- * License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html
- * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
- * specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header
- * Notice in each file and include the License file at
- * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the
- * License Header, with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- *
- * If you wish your version of this file to be governed by only the CDDL
- * or only the GPL Version 2, indicate your decision by adding
- * "[Contributor] elects to include this software in this distribution
- * under the [CDDL or GPL Version 2] license." If you do not indicate a
- * single choice of license, a recipient has the option to distribute
- * your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above.
- * However, if you add GPL Version 2 code and therefore, elected the GPL
- * Version 2 license, then the option applies only if the new code is
- * made subject to such option by the copyright holder.
- *
- * Contributor(s):
- *
- * Portions Copyrighted 2011 Sun Microsystems, Inc.
- */
-package org.netbeans.modules.bugtracking.cache;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.netbeans.modules.bugtracking.util.TextUtils;
-
-/**
- *
- * @author tomas
- */
-public final class StorageUtils {
-
-    private static  final Logger LOG = 
Logger.getLogger(StorageUtils.class.getName());
-    private static Map<String, String> loggedUrls;
-    
-    private StorageUtils() {}
-    
-    static DataOutputStream getDataOutputStream(File file, boolean append) 
throws IOException, InterruptedException {
-        return new DataOutputStream(getFileOutputStream(file, append));
-    }
-
-    static DataInputStream getDataInputStream(File file) throws IOException, 
InterruptedException {
-        return new DataInputStream(getFileInputStream(file));
-    }
-
-    static FileOutputStream getFileOutputStream(File file, boolean append) 
throws IOException, InterruptedException {
-        int retry = 0;
-        while (true) {
-            try {
-                return new FileOutputStream(file, append);
-            } catch (IOException ioex) {
-                retry++;
-                if (retry > 7) {
-                    throw ioex;
-                }
-                Thread.sleep(retry * 30);
-            }
-        }
-    }
-
-    static FileInputStream getFileInputStream(File file) throws IOException, 
InterruptedException {
-        int retry = 0;
-        while (true) {
-            try {
-                return new FileInputStream(file);
-            } catch (IOException ioex) {
-                retry++;
-                if (retry > 7) {
-                    throw ioex;
-                }
-                Thread.sleep(retry * 30);
-            }
-        }
-    }
-
-    static void copyStreams(OutputStream out, InputStream in) throws 
IOException {
-        byte [] buffer = new byte[4096];
-        for (;;) {
-            int n = in.read(buffer);
-            if (n < 0) break;
-            out.write(buffer, 0, n);
-        }
-    }
-
-    static File getNameSpaceFolder(File storage, String url) {
-        File folderLegacy = new File(storage, TextUtils.encodeURL(url));
-        File folder = new File(storage, TextUtils.getMD5(url));
-        if(folderLegacy.exists()) {
-            folderLegacy.renameTo(folder);
-        } 
-        if(!folder.exists()) {
-            folder.mkdirs();
-        }
-        if(LOG.isLoggable(Level.FINE)) {
-            if(loggedUrls == null) {
-                loggedUrls = new HashMap<String, String>(1);
-            }
-            String folderPath = loggedUrls.get(url);
-            if(folderPath == null) {
-                folderPath = folder.getAbsolutePath();
-                loggedUrls.put(url, folderPath);
-                LOG.log(Level.FINE, "storage folder for URL {0} is {1}", new 
Object[]{url, folderPath}); // NOI18N
-            }
-        }
-        return folder;
-    }
-
-    static DataOutputStream getQueryOutputStream(File queryFile) throws 
IOException, InterruptedException {
-        return getDataOutputStream(queryFile, false);
-    }
-
-    static DataInputStream getQueryInputStream(File queryFile) throws 
IOException, InterruptedException {
-        if(!queryFile.exists()) return null;
-        return getDataInputStream(queryFile);
-    }
-
-
-    static class FileLocks {
-        private static FileLocks instance;
-        private synchronized static FileLocks getInstance() {
-            if(instance == null) {
-                instance = new FileLocks();
-            }
-            return instance;
-        }
-        private final Map<String, FileLock> locks = new HashMap<String, 
FileLock>();
-        static FileLock getLock(File file) {
-            synchronized(getInstance().locks) {
-                FileLock fl = 
getInstance().locks.get(file.getAbsolutePath());
-                if(fl == null) {
-                    fl = getInstance().new FileLock(file);
-                }
-                getInstance().locks.put(file.getAbsolutePath(), fl);
-                return fl;
-            }
-        }
-        class FileLock {
-            private final File file;
-            public FileLock(File file) {
-                this.file = file;
-            }
-            void release() {
-                synchronized(getInstance().locks) {
-                    getInstance().locks.remove(file.getAbsolutePath());
-                }
-            }
-        }
-    }
-
-}
diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/issuetable/Filter.java 
b/bugtracking/src/org/netbeans/modules/bugtracking/issuetable/Filter.java
--- a/bugtracking/src/org/netbeans/modules/bugtracking/issuetable/Filter.java
+++ b/bugtracking/src/org/netbeans/modules/bugtracking/issuetable/Filter.java
@@ -45,6 +45,7 @@
 package org.netbeans.modules.bugtracking.issuetable;
 
 import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.WeakHashMap;
@@ -74,12 +75,6 @@
     public static Filter getNewFilter() {
         return getFilter(null, NewFilter.class);
     }
-    public static Filter getObsoleteDateFilter(QueryImpl query) {
-        return getFilter(query, ObsoleteDateFilter.class);
-    }
-    public static Filter getAllButObsoleteDateFilter(QueryImpl query) {
-        return getFilter(query, AllButObsoleteDateFilter.class);
-    }
 
     private static <T extends Filter> Filter getFilter(QueryImpl query, 
Class<T> clazz) {
         Map<Class, Filter> filters = queryToFilter.get(query);
@@ -90,15 +85,19 @@
         Filter filter = filters.get(clazz);
         if(filter == null) {
             try {
-                Constructor<T> c;
-                if(query == null) {
-                    c = clazz.getDeclaredConstructor();
+                Constructor<T> c = clazz.getDeclaredConstructor();
                     filter = c.newInstance();
-                } else {
-                    c = clazz.getDeclaredConstructor(QueryImpl.class);
-                    filter = c.newInstance(query);
-                }
-            } catch (Exception ex) {
+            } catch (NoSuchMethodException ex) {
+                BugtrackingManager.LOG.log(Level.SEVERE, null, ex);
+            } catch (SecurityException ex) {
+                BugtrackingManager.LOG.log(Level.SEVERE, null, ex);
+            } catch (InstantiationException ex) {
+                BugtrackingManager.LOG.log(Level.SEVERE, null, ex);
+            } catch (IllegalAccessException ex) {
+                BugtrackingManager.LOG.log(Level.SEVERE, null, ex);
+            } catch (IllegalArgumentException ex) {
+                BugtrackingManager.LOG.log(Level.SEVERE, null, ex);
+            } catch (InvocationTargetException ex) {
                 BugtrackingManager.LOG.log(Level.SEVERE, null, ex);
             }            
             filters.put(clazz, filter);
@@ -107,36 +106,29 @@
     }
 
     private static class AllFilter extends Filter {
-        private final QueryImpl query;
-        AllFilter(QueryImpl query) {
-            this.query = query;
-        }
+        AllFilter() { }
         @Override
         public String getDisplayName() {
             return NbBundle.getMessage(Filter.class, "LBL_AllIssuesFilter"); 
    // NOI18N
         }
         @Override
         public boolean accept(IssueNode node) {
-            return contains(query, node.getIssue().getID());
+            return true;
         }
     }
     private static class NotSeenFilter extends Filter {
-        private final QueryImpl query;
-        NotSeenFilter(QueryImpl query) {
-            this.query = query;
-        }
+        NotSeenFilter() { }
         @Override
         public String getDisplayName() {
             return NbBundle.getMessage(Filter.class, 
"LBL_UnseenIssuesFilter");  // NOI18N
         }
         @Override
         public boolean accept(IssueNode node) {
-            return node.getIssue().getStatus() != 
IssueStatusProvider.Status.SEEN && contains(query, node.getIssue().getID());
+            return node.getIssue().getStatus() != 
IssueStatusProvider.Status.SEEN;
         }
     }
     private static class NewFilter extends Filter {
-        NewFilter() {
-        }
+        NewFilter() { }
         @Override
         public String getDisplayName() {
             return NbBundle.getMessage(Filter.class, "LBL_NewIssuesFilter"); 
    // NOI18N
@@ -146,37 +138,5 @@
             return node.getIssue().getStatus() == 
IssueStatusProvider.Status.INCOMING_NEW;
         }
     }
-    private static class ObsoleteDateFilter extends Filter {
-        private final QueryImpl query;
-        ObsoleteDateFilter(QueryImpl query) {
-            this.query = query;
-        }
-        @Override
-        public String getDisplayName() {
-            return NbBundle.getMessage(Filter.class, 
"LBL_ObsoleteIssuesFilter");// NOI18N
-        }
-        @Override
-        public boolean accept(IssueNode node) {
-            return !contains(query, node.getIssue().getID());
-        }
-    }
-    private static class AllButObsoleteDateFilter extends Filter {
-        private final QueryImpl query;
-        AllButObsoleteDateFilter(QueryImpl query) {
-            this.query = query;
-        }
-        @Override
-        public String getDisplayName() {
-            return NbBundle.getMessage(Filter.class, 
"LBL_AllButObsoleteIssuesFilter");  // NOI18N
-        }
-        @Override
-        public boolean accept(IssueNode node) {
-            return contains(query, node.getIssue().getID());
-        }
-    }
-    
-    private static boolean contains(QueryImpl query, String id) {
-        return query.contains(id);
-    }
     
 }
diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/issuetable/IssueTable.java 
b/bugtracking/src/org/netbeans/modules/bugtracking/issuetable/IssueTable.java
--- 
a/bugtracking/src/org/netbeans/modules/bugtracking/issuetable/IssueTable.java
+++ 
b/bugtracking/src/org/netbeans/modules/bugtracking/issuetable/IssueTable.java
@@ -156,10 +156,6 @@
     };
 
     public IssueTable(Repository repository, Q q, ColumnDescriptor[] 
descriptors) {
-        this(repository, q, descriptors, true);
-    }
-    
-    public IssueTable(Repository repository, Q q, ColumnDescriptor[] 
descriptors, boolean includeObsoletes) {
         assert q != null;
         assert descriptors != null;
         assert descriptors.length > 0;
@@ -170,7 +166,7 @@
         this.query.addPropertyChangeListener(this);
         this.component = new JPanel();
         
-        initFilters(includeObsoletes);
+        initFilters();
 
         /* table */
         tableModel = new NodeTableModel();
@@ -439,14 +435,10 @@
         return map;
     }
 
-    private void initFilters(boolean includeObsoletes) {
+    private void initFilters() {
         allFilter = Filter.getAllFilter(query);
         newOrChangedFilter = Filter.getNotSeenFilter(query);
-        if(includeObsoletes) {
-            filters = new Filter[]{allFilter, newOrChangedFilter, 
Filter.getObsoleteDateFilter(query), 
Filter.getAllButObsoleteDateFilter(query)};
-        } else {
             filters = new Filter[]{allFilter, newOrChangedFilter};
-        }
         filter = allFilter;
     }
     
diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/issuetable/QueryTableCellRenderer.java
 
b/bugtracking/src/org/netbeans/modules/bugtracking/issuetable/QueryTableCellRenderer.java
--- 
a/bugtracking/src/org/netbeans/modules/bugtracking/issuetable/QueryTableCellRenderer.java
+++ 
b/bugtracking/src/org/netbeans/modules/bugtracking/issuetable/QueryTableCellRenderer.java
@@ -312,15 +312,8 @@
         TableCellStyle style = getDefaultCellStyle(table, issueTable, p, 
isSelected, row);
         try {
             // set text format and background depending on selection and 
issue status
-            IssueStatusProvider.Status status = null;
             IssueImpl issue = APIAccessor.IMPL.getImpl(p.getIssue());
-            if(!queryImpl.contains(issue.getID())) {
-                // archived issues
-                style.format     = isSelected ? style.format           : 
issueObsoleteFormat;
-                style.background = isSelected ? obsoleteHighlightColor : 
style.background;
-                style.foreground = isSelected ? table.getBackground() : 
style.foreground;
-            } else {
-                status = issue.getStatus();
+            IssueStatusProvider.Status status = issue.getStatus();
                 if(status != IssueStatusProvider.Status.SEEN) {
                     switch(status) {
                         case INCOMING_NEW :
@@ -335,20 +328,17 @@
                             break;
                     }
                 }
-            }
             
             Object o = p.getValue();
             if(o instanceof String) {
                 String s = (String) o;
-                if(s == null) s = "";                                        
       // NOI18N
+                if(s == null) {
+                    s = "";
+                }                                               // NOI18N
                 s = TextUtils.escapeForHTMLLabel(s);
                 StringBuilder sb = new StringBuilder();
                 sb.append("<html>");                                         
       // NOI18N
                 sb.append(s);
-                if(!queryImpl.contains(issue.getID())) {
-                    sb.append("<br>").append(issueObsoleteFormat.format(new 
Object[] { labelObsolete }, new StringBuffer(), null)); // NOI18N
-                    sb.append(msgObsolete);
-                } else {
                     if(status == null) {
                         status = issue.getStatus();
                     }
@@ -362,7 +352,6 @@
                             sb.append(MessageFormat.format(msgModified, 
p.getRecentChanges()));
                             break;
                     }
-                }
                 sb.append("</html>"); // NOI18N
                 style.tooltip = sb.toString();
             }
diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/spi/QueryProvider.java 
b/bugtracking/src/org/netbeans/modules/bugtracking/spi/QueryProvider.java
--- a/bugtracking/src/org/netbeans/modules/bugtracking/spi/QueryProvider.java
+++ b/bugtracking/src/org/netbeans/modules/bugtracking/spi/QueryProvider.java
@@ -131,15 +131,6 @@
     public Collection<I> getIssues(Q q);
 
     /**
-     * Returns true if the issue does belong to the query
-     * @param q
-     * @param id
-     * @return
-     */
-    // XXX used only by query table - get rid of this
-    public boolean contains(Q q, String id);
-
-    /**
      * Refreshes the given query
      * 
      * @param query
diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueSettingsStorage.java
 
b/bugtracking/src/org/netbeans/modules/bugtracking/util/IssueSettingsStorage.java
rename from 
bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueSettingsStorage.java
rename to 
bugtracking/src/org/netbeans/modules/bugtracking/util/IssueSettingsStorage.java
--- 
a/bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueSettingsStorage.java
+++ 
b/bugtracking/src/org/netbeans/modules/bugtracking/util/IssueSettingsStorage.java
@@ -39,7 +39,7 @@
  *
  * Portions Copyrighted 2011 Sun Microsystems, Inc.
  */
-package org.netbeans.modules.bugtracking.cache;
+package org.netbeans.modules.bugtracking.util;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -47,12 +47,16 @@
 import java.io.IOException;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 import java.util.logging.Level;
+import java.util.logging.Logger;
 import org.netbeans.modules.bugtracking.BugtrackingManager;
+import org.netbeans.modules.bugtracking.util.TextUtils;
 import org.openide.modules.Places;
 
 /**
@@ -61,6 +65,7 @@
  */
 public class IssueSettingsStorage {
     
+    private static  final Logger LOG = 
Logger.getLogger(IssueSettingsStorage.class.getName());
     private static final String PROP_COLLAPSED_COMMENT_PREFIX = 
"collapsed.comment";   // NOI18N
     
     private static IssueSettingsStorage instance;
@@ -86,7 +91,7 @@
 
     public Collection<Long> loadCollapsedCommenst(String repoUrl, String id) 
{
         File file = getIssuePropertiesFile(repoUrl, id);
-        StorageUtils.FileLocks.FileLock l = 
StorageUtils.FileLocks.getLock(file);
+        FileLocks.FileLock l = FileLocks.getLock(file);
         try {
             Properties p = load(file, repoUrl, id);
             Set<Long> s = new HashSet<Long>();
@@ -122,7 +127,7 @@
     
     public void storeCollapsedComments(Collection<Long> collapsedComments, 
String repoUrl, String id) {
         File file = getIssuePropertiesFile(repoUrl, id);
-        StorageUtils.FileLocks.FileLock l = 
StorageUtils.FileLocks.getLock(file);
+        FileLocks.FileLock l = FileLocks.getLock(file);
         try {
             Properties p = load(file, repoUrl, id);
             clear(p, PROP_COLLAPSED_COMMENT_PREFIX);
@@ -153,6 +158,62 @@
     }
     
     private File getIssuePropertiesFile(String repoUrl, String id) {
-        return new File(StorageUtils.getNameSpaceFolder(storage, repoUrl), 
id);
+        return new File(getNameSpaceFolder(storage, repoUrl), id);
     }
+    
+    private static Map<String, String> loggedUrls;
+    static File getNameSpaceFolder(File storage, String url) {
+        File folderLegacy = new File(storage, TextUtils.encodeURL(url));
+        File folder = new File(storage, TextUtils.getMD5(url));
+        if(folderLegacy.exists()) {
+            folderLegacy.renameTo(folder);
 }
+        if(!folder.exists()) {
+            folder.mkdirs();
+        }
+        if(LOG.isLoggable(Level.FINE)) {
+            if(loggedUrls == null) {
+                loggedUrls = new HashMap<String, String>(1);
+            }
+            String folderPath = loggedUrls.get(url);
+            if(folderPath == null) {
+                folderPath = folder.getAbsolutePath();
+                loggedUrls.put(url, folderPath);
+                LOG.log(Level.FINE, "storage folder for URL {0} is {1}", new 
Object[]{url, folderPath}); // NOI18N
+            }
+        }
+        return folder;
+    }
+    
+    private static class FileLocks {
+        private static FileLocks instance;
+        private synchronized static FileLocks getInstance() {
+            if(instance == null) {
+                instance = new FileLocks();
+            }
+            return instance;
+        }
+        private final Map<String, FileLock> locks = new HashMap<String, 
FileLock>();
+        static FileLock getLock(File file) {
+            synchronized(getInstance().locks) {
+                FileLock fl = 
getInstance().locks.get(file.getAbsolutePath());
+                if(fl == null) {
+                    fl = getInstance().new FileLock(file);
+                }
+                getInstance().locks.put(file.getAbsolutePath(), fl);
+                return fl;
+            }
+        }
+        class FileLock {
+            private final File file;
+            public FileLock(File file) {
+                this.file = file;
+            }
+            void release() {
+                synchronized(getInstance().locks) {
+                    getInstance().locks.remove(file.getAbsolutePath());
+                }
+            }
+        }
+    }
+}
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/TestQuery.java 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/TestQuery.java
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/TestQuery.java
+++ 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/TestQuery.java
@@ -75,10 +75,6 @@
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
-    public boolean contains(String id) {
-        throw new UnsupportedOperationException("Not supported yet.");
-    }
-
     public void remove() {
         throw new UnsupportedOperationException("Not supported yet.");
     }
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/TestQueryProvider.java
 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/TestQueryProvider.java
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/TestQueryProvider.java
+++ 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/TestQueryProvider.java
@@ -85,11 +85,6 @@
     }
 
     @Override
-    public boolean contains(TestQuery q, String id) {
-        return q.contains(id);
-    }
-    
-    @Override
     public void refresh(TestQuery q) {
         q.refresh();
     }
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/APITestConnector.java
 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/APITestConnector.java
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/APITestConnector.java
+++ 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/APITestConnector.java
@@ -166,11 +166,6 @@
         }
 
         @Override
-        public boolean contains(APITestQuery q, String id) {
-            return q.contains(id);
-        }
-
-        @Override
         public void refresh(APITestQuery q) {
             q.refresh();
         }
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/APITestQuery.java
 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/APITestQuery.java
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/APITestQuery.java
+++ 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/APITestQuery.java
@@ -128,11 +128,6 @@
         return Arrays.asList(repo.getIssues(new String[] 
{APITestIssue.ID_1}));
     }
 
-    @Override
-    public boolean contains(String id) {
-        return getIssues().contains(id);
-    }
-
     private final PropertyChangeSupport support = new 
PropertyChangeSupport(this);
     @Override
     public void removePropertyChangeListener(PropertyChangeListener 
listener) {
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/cache/CacheTest.java
 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/cache/CacheTest.java
deleted file mode 100644
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/cache/CacheTest.java
+++ /dev/null
@@ -1,563 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
- *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common
- * Development and Distribution License("CDDL") (collectively, the
- * "License"). You may not use this file except in compliance with the
- * License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html
- * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
- * specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header
- * Notice in each file and include the License file at
- * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the
- * License Header, with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * If you wish your version of this file to be governed by only the CDDL
- * or only the GPL Version 2, indicate your decision by adding
- * "[Contributor] elects to include this software in this distribution
- * under the [CDDL or GPL Version 2] license." If you do not indicate a
- * single choice of license, a recipient has the option to distribute
- * your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above.
- * However, if you add GPL Version 2 code and therefore, elected the GPL
- * Version 2 license, then the option applies only if the new code is
- * made subject to such option by the copyright holder.
- * 
- * Contributor(s):
- * 
- * Portions Copyrighted 2008 Sun Microsystems, Inc.
- */
-
-package org.netbeans.modules.bugtracking.cache;
-
-import java.awt.Image;
-import java.beans.PropertyChangeListener;
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Level;
-import org.netbeans.junit.NbTestCase;
-import org.netbeans.modules.bugtracking.*;
-import org.netbeans.modules.bugtracking.RepositoryImpl;
-import org.netbeans.modules.bugtracking.issuetable.IssueNode;
-import org.netbeans.modules.bugtracking.spi.*;
-import org.netbeans.modules.bugtracking.cache.IssueCache.IssueAccessor;
-import org.netbeans.modules.bugtracking.util.BugtrackingUtil;
-import org.openide.util.Lookup;
-import org.openide.util.lookup.Lookups;
-
-/**
- *
- * @author tomas
- */
-public class CacheTest extends NbTestCase {
-
-    public CacheTest(String arg0) {
-        super(arg0);
-    }
-
-    @Override
-    protected Level logLevel() {
-        return Level.ALL;
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        File wd = getWorkDir();
-        System.setProperty("netbeans.user", wd.getAbsolutePath());
-        emptyStorage();
-        BugtrackingUtil.deleteRecursively(wd);
-    }
-
-    public void testInitialSeen2Modified2Seen() throws 
MalformedURLException, IOException, InterruptedException {
-        long tsBeforeRepo = System.currentTimeMillis();
-        Thread.sleep(10);
-
-        CTestRepository repo = new CTestRepository("test repo");
-        IssueCache<CTestIssue> cache = repo.getCache();
-        // creating issue with creation     < repo reference time;
-        //                     modification < repo reference time
-        // => initial status SEEN
-        //        new 
CTestIssue(TestKit.getRepository(CTestRepository.this), issueData)
-        CTestIssue issue = new CTestIssue(TestKit.getRepository(repo), 
"1#issue1#" + tsBeforeRepo + "#" + tsBeforeRepo + "#v11#v21#v31");
-        issue = cache.setIssueData("1", issue);
-        assertNotNull(issue);
-        IssueCache.Status status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
-        Map<String, String> attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v11", "v21", "v31");
-
-        // setting changed data => MODIFIED, attrs stay the same
-        long tsAfterRepo = System.currentTimeMillis();
-        issue.setData("1#issue1#" + tsBeforeRepo + "#" + tsAfterRepo + 
"#v12#v22#v32");
-        cache.setIssueData(issue.getID(), issue);
-        status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_MODIFIED, status);
-        attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v11", "v21", "v31");
-
-        // set SEEN TRUE => SEEN
-        cache.setSeen(issue.getID(), true);
-        status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
-        attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v12", "v22", "v32");
-    }
-
-    public void testInitialNew2RefreshChanged2Seen2Unseen() throws 
MalformedURLException, IOException, InterruptedException {
-        CTestRepository repo = new CTestRepository("test repo");
-        IssueCache<CTestIssue> cache = repo.getCache();
-        Thread.sleep(10);
-        long tsAfterRepo = System.currentTimeMillis();
-        // creating issue with creation     > repo reference time;
-        //                     modification > repo reference time
-        // => initial status NEW
-        CTestIssue  issue = new CTestIssue(TestKit.getRepository(repo), 
"1#issue1#" + tsAfterRepo + "#" + tsAfterRepo + "#v11#v21#v31");
-        cache.setIssueData("1", issue);
-        assertNotNull(issue);
-        IssueCache.Status status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_NEW, status);
-        Map<String, String> attr = cache.getSeenAttributes(issue.getID());
-        assertNull(attr);
-
-        // refresh
-        Thread.sleep(10);
-        issue.setData("1#issue1#" + tsAfterRepo + "#" + 
System.currentTimeMillis()  + "#v12#v22#v32");
-        cache.setIssueData(issue.getID(), issue);
-        status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_NEW, status);
-        attr = cache.getSeenAttributes(issue.getID());
-        assertNull(attr);
-
-        // set SEEN TRUE => SEEN
-        cache.setSeen(issue.getID(), true);
-        status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
-        attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v12", "v22", "v32");
-
-        // set SEEN FALSE => NEW
-        cache.setSeen(issue.getID(), false);
-        status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_NEW, status);
-        attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v12", "v22", "v32");
-    }
-
-    public void testInitialModified2Seen2Unseen() throws 
MalformedURLException, IOException, InterruptedException {
-        long tsBeforeRepo = System.currentTimeMillis();
-        Thread.sleep(10);
-
-        CTestRepository repo = new CTestRepository("test repo");
-        IssueCache<CTestIssue> cache = repo.getCache();
-        Thread.sleep(10);
-        long tsAfterRepo = System.currentTimeMillis();
-        // creating issue with creation     < repo reference time;
-        //                     modification > repo reference time
-        // => initial status MODIFIED
-        CTestIssue issue = new CTestIssue(TestKit.getRepository(repo), 
"1#issue1#" + tsBeforeRepo + "#" + tsAfterRepo + "#v11#v21#v31");        
-        issue = cache.setIssueData("1", issue);
-        assertNotNull(issue);
-        IssueCache.Status status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_MODIFIED, status);
-        Map<String, String> attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);        
-        assertAttributes(attr, "v11", "v21", "v31");
-
-        // set SEEN TRUE => SEEN. attrs from the last setData
-        cache.setSeen(issue.getID(), true);
-        status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
-        attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v11", "v21", "v31");
-
-        // set SEEN FALSE => MODIFIED, attrs stays the same
-        Thread.sleep(10);
-        cache.setSeen(issue.getID(), false);
-        status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_MODIFIED, status);
-        attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v11", "v21", "v31");
-
-        // set SEEN TRUE => SEEN, attsr stay the same
-        cache.setSeen(issue.getID(), true);
-        status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
-        attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v11", "v21", "v31");
-    }
-
-    public void testIssueModified2Seen2Restart2Unseen() throws 
MalformedURLException, IOException, InterruptedException {
-        long tsBeforeRepo = System.currentTimeMillis();
-        Thread.sleep(10);
-
-        CTestRepository repo = new CTestRepository("test repo");
-        IssueCache<CTestIssue> cache = repo.getCache();
-        Thread.sleep(10);
-        long tsAfterRepo = System.currentTimeMillis();
-
-        // creating issue with creation     < repo reference time;
-        //                     modification > repo reference time
-        // => initial status MODIFIED
-        String data = "1#issue1#" + tsBeforeRepo + "#" + tsAfterRepo + 
"#v11#v21#v31";
-        CTestIssue issue = new CTestIssue(TestKit.getRepository(repo), data);
-        cache.setIssueData("1", issue);
-        assertNotNull(issue);
-        IssueCache.Status status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_MODIFIED, status);
-        Map<String, String> attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v11", "v21", "v31");
-
-        // set SEEN TRUE => SEEN. attrs from the last setData
-        cache.setSeen(issue.getID(), true);
-        status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
-        attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v11", "v21", "v31");
-
-        // recreating the same repo emulates restart
-        repo = new CTestRepository("test repo");
-        cache = repo.getCache();
-        // setting the last set data emulates refresh with unchanged data
-        // status is expected to be SEEN, and data the last set
-        issue.setData(data);
-        cache.setIssueData("1", issue);
-        status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
-        attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v11", "v21", "v31");
-
-        // set SEEN FALSE => MODIFIED, attrs from the last modfiied
-        Thread.sleep(10);
-        cache.setSeen(issue.getID(), false);
-        status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_MODIFIED, status);
-        attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v11", "v21", "v31");
-    }
-
-    public void testModified2RefreshChange2Seen2RefreshChange() throws 
MalformedURLException, IOException, InterruptedException {
-        modified2RefreshChange2Seen2RefreshChange(false);
-    }
-
-    public void testModified2RefreshChange2Seen2Restart2RefreshChange() 
throws MalformedURLException, IOException, InterruptedException {
-        modified2RefreshChange2Seen2RefreshChange(true);
-    }
-    public void modified2RefreshChange2Seen2RefreshChange(boolean restart) 
throws MalformedURLException, IOException, InterruptedException {
-        long tsBeforeRepo = System.currentTimeMillis();
-        Thread.sleep(10);
-
-        CTestRepository repo = new CTestRepository("test repo");
-        IssueCache<CTestIssue> cache = repo.getCache();
-        Thread.sleep(10);
-        long tsAfterRepo = System.currentTimeMillis();
-
-        // creating issue with creation     < repo reference time;
-        //                     modification > repo reference time
-        // => initial status MODIFIED
-        String data = "1#issue1#" + tsBeforeRepo + "#" + tsAfterRepo + 
"#v11#v21#v31";
-        CTestIssue issue = new CTestIssue(TestKit.getRepository(repo), data);
-        issue = cache.setIssueData("1", issue);
-        assertNotNull(issue);
-        IssueCache.Status status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_MODIFIED, status);
-        Map<String, String> attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v11", "v21", "v31");
-
-        // one more time setting changed data => MODIFIED, attrs stay the 
same
-        tsAfterRepo = System.currentTimeMillis();
-        issue.setData("1#issue1#" + tsBeforeRepo + "#" + tsAfterRepo + 
"#v12#v22#v32");
-        cache.setIssueData(issue.getID(), issue);
-        status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_MODIFIED, status);
-        attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v11", "v21", "v31");
-
-        // set SEEN TRUE => SEEN, attrs from the last refresh
-        cache.setSeen(issue.getID(), true);
-        status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
-        attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v12", "v22", "v32");
-
-        if(restart) {
-            // recreating the same repo emulates restart
-            repo = new CTestRepository("test repo");
-            cache = repo.getCache();
-        }
-
-        // setting changed data => MODIFIED, attrs stay the same
-        tsAfterRepo = System.currentTimeMillis();
-        issue.setData("1#issue1#" + tsBeforeRepo + "#" + tsAfterRepo + 
"#v13#v23#v33");
-        cache.setIssueData("1", issue); // reload
-        status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_MODIFIED, status);
-        attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v12", "v22", "v32");
-    }
-
-    public void testInitialSeen2ModifiedNoChanges2Seen() throws 
MalformedURLException, IOException, InterruptedException {
-        long tsBeforeRepo = System.currentTimeMillis();
-        Thread.sleep(10);
-
-        CTestRepository repo = new CTestRepository("test repo");
-        IssueCache<CTestIssue> cache = repo.getCache();
-        // creating issue with creation     < repo reference time;
-        //                     modification < repo reference time
-        // => initial status SEEN
-        CTestIssue issue = new CTestIssue(TestKit.getRepository(repo), 
"1#issue1#" + tsBeforeRepo + "#" + tsBeforeRepo + "#v11#v21#v31");
-        issue = cache.setIssueData("1", issue);
-        assertNotNull(issue);
-        IssueCache.Status status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
-        Map<String, String> attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v11", "v21", "v31");
-
-        // setting changed data => MODIFIED, unchanged attrs
-        long tsAfterRepo = System.currentTimeMillis();
-        issue.setData("1#issue1#" + tsBeforeRepo + "#" + tsAfterRepo + 
"#v11#v21#v31");
-        cache.setIssueData(issue.getID(), issue);
-        status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_MODIFIED, status);
-        attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v11", "v21", "v31");
-
-        // set SEEN TRUE => SEEN
-        cache.setSeen(issue.getID(), true);
-        status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
-        attr = cache.getSeenAttributes(issue.getID());
-        assertNotNull(attr);
-        assertAttributes(attr, "v11", "v21", "v31");
-    }
-
-    private void assertAttributes(Map<String, String> attr, String... 
values) {
-        assertEquals(values.length, attr.size());
-        for (int i = 0; i < values.length; i++) {
-            assertEquals(values[i], attr.get("a"+(i+1)));
-        }
-    }
-
-    private static class CTestIssue extends TestIssue {
-        private String[] dataArray;
-        private Map<String, String> attrs = new HashMap<String, String>(3);
-        private RepositoryImpl repository;
-        public CTestIssue(RepositoryImpl repository, String data) {
-            this.repository = repository;
-            setData(data);
-        }
-        public String getDisplayName() {
-            return dataArray[1];
-        }
-        public String getTooltip() {
-            return dataArray[1];
-        }
-        public String getID() {
-            return dataArray[0];
-        }
-        public boolean isNew() {
-            return false;
-        }
-        public boolean isFinished() {
-            return false;
-        }
-        public boolean refresh() {
-            return true;
-        }
-        public Map<String, String> getAttributes() {
-            HashMap<String, String> m = new HashMap<String, String>();
-            m.put("a1", dataArray[4]);
-            m.put("a2", dataArray[5]);
-            m.put("a3", dataArray[6]);
-            return m;
-        }
-        public String getSummary() {
-            return "This is " + dataArray[1];
-        }
-
-        void setData(String data) {
-            dataArray = data.split("#");
-            assertEquals(7, dataArray.length);
-        }
-
-        private void discardOutgoing() {
-            throw new UnsupportedOperationException("Not supported yet."); 
//To change body of generated methods, choose Tools | Templates.
-        }
-    }
-
-    private class CTestRepository extends TestRepository {
-        private final String name;
-        private TestCache cache;
-        private RepositoryInfo info;
-        public CTestRepository(String name) {
-            this.name = name;
-            info = new RepositoryInfo(name, name, "http://" + name + ".org", ;
name, name, null, null, null, null);
-        }
-
-        @Override
-        public RepositoryInfo getInfo() {
-            return info;
-        }
-
-        public TestCache getCache() {
-            if(cache == null) {
-                cache = new TestCache(name, TestKit.getRepository(this));
-            }
-            return cache;
-        }
-
-        private class TestCache extends IssueCache<CTestIssue> {
-            public TestCache(String nameSpace, RepositoryImpl repository) {
-                super(
-                    nameSpace, 
-                    new IssueAccessor<CTestIssue>() {
-                        @Override
-                        public Map<String, String> getAttributes(CTestIssue 
issue) {
-                            return ((CTestIssue)issue).getAttributes();
-                        }
-                        @Override
-                        public long getLastModified(CTestIssue issue) {
-                            return 
Long.parseLong(((CTestIssue)issue).dataArray[3]);
-                        }
-                        @Override
-                        public long getCreated(CTestIssue issue) {
-                            return 
Long.parseLong(((CTestIssue)issue).dataArray[2]);
-                        }
-                    });
-            }
-            
-            protected void cleanup() {
-
-            }
-        }
-    }
-
-    public class CTestIssueProvider implements IssueProvider<CTestIssue> {
-
-        @Override
-        public String getDisplayName(CTestIssue data) {
-            return data.getDisplayName();
-        }
-
-        @Override
-        public String getTooltip(CTestIssue data) {
-            return data.getTooltip();
-        }
-
-        @Override
-        public String getID(CTestIssue data) {
-            return data.getID();
-        }
-
-        @Override
-        public String getSummary(CTestIssue data) {
-            return data.getSummary();
-        }
-
-        @Override
-        public boolean isNew(CTestIssue data) {
-            return data.isNew();
-        }
-        
-        @Override
-        public boolean isFinished(CTestIssue data) {
-            return data.isFinished();
-        }
-
-        @Override
-        public boolean refresh(CTestIssue data) {
-            return data.refresh();
-        }
-
-        @Override
-        public void addComment(CTestIssue data, String comment, boolean 
closeAsFixed) {
-            data.addComment(comment, closeAsFixed);
-        }
-
-        @Override
-        public void attachPatch(CTestIssue data, File file, String 
description) {
-            data.attachPatch(file, description);
-        }
-
-        @Override
-        public IssueController getController(CTestIssue data) {
-            return data.getController();
-        }
-
-        @Override
-        public void removePropertyChangeListener(CTestIssue data, 
PropertyChangeListener listener) {
-            data.removePropertyChangeListener(listener);
-        }
-
-        @Override
-        public void addPropertyChangeListener(CTestIssue data, 
PropertyChangeListener listener) {
-            data.addPropertyChangeListener(listener);
-        }
-
-        public String[] getSubtasks(CTestIssue data) {throw new 
UnsupportedOperationException("Not supported yet.");}
-
-        @Override
-        public void discardOutgoing(CTestIssue data) {
-            data.discardOutgoing();
-        }
-
-        @Override
-        public boolean submit(CTestIssue data) {
-            throw new UnsupportedOperationException("Not supported yet."); 
//To change body of generated methods, choose Tools | Templates.
-        }
-    }
-
-    private void emptyStorage() throws NoSuchMethodException, 
IllegalAccessException, IllegalArgumentException, InvocationTargetException, 
NoSuchFieldException {
-        File f = getStorageRootFile();
-        BugtrackingUtil.deleteRecursively(f);
-        Field field = IssueStorage.class.getDeclaredField("storage");
-        field.setAccessible(true);
-        field.set(IssueStorage.getInstance(), f);
-    }
-
-    private File getStorageRootFile() throws NoSuchMethodException, 
IllegalAccessException, IllegalArgumentException, InvocationTargetException  {
-        IssueStorage storage = IssueStorage.getInstance();
-        Method m = 
storage.getClass().getDeclaredMethod("getStorageRootFile");
-        m.setAccessible(true);
-        return (File) m.invoke(storage, new Object[0]);
-    }
-
-
-}
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/cache/StorageTest.java
 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/cache/StorageTest.java
deleted file mode 100644
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/cache/StorageTest.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
- *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common
- * Development and Distribution License("CDDL") (collectively, the
- * "License"). You may not use this file except in compliance with the
- * License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html
- * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
- * specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header
- * Notice in each file and include the License file at
- * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the
- * License Header, with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * If you wish your version of this file to be governed by only the CDDL
- * or only the GPL Version 2, indicate your decision by adding
- * "[Contributor] elects to include this software in this distribution
- * under the [CDDL or GPL Version 2] license." If you do not indicate a
- * single choice of license, a recipient has the option to distribute
- * your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above.
- * However, if you add GPL Version 2 code and therefore, elected the GPL
- * Version 2 license, then the option applies only if the new code is
- * made subject to such option by the copyright holder.
- * 
- * Contributor(s):
- * 
- * Portions Copyrighted 2008 Sun Microsystems, Inc.
- */
-
-package org.netbeans.modules.bugtracking.cache;
-
-import org.netbeans.modules.bugtracking.cache.IssueStorage;
-import org.netbeans.modules.bugtracking.cache.IssueCache;
-import org.netbeans.modules.bugtracking.cache.StorageUtils;
-import java.beans.PropertyChangeListener;
-import org.netbeans.modules.bugtracking.spi.*;
-import org.netbeans.modules.bugtracking.issuetable.IssueNode;
-import org.netbeans.modules.bugtracking.util.*;
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import org.netbeans.junit.NbTestCase;
-import org.netbeans.modules.bugtracking.BugtrackingConfig;
-import org.netbeans.modules.bugtracking.RepositoryImpl;
-import org.netbeans.modules.bugtracking.TestIssue;
-import org.netbeans.modules.bugtracking.TestKit;
-import org.netbeans.modules.bugtracking.dummies.DummyBugtrackingConnector;
-import org.netbeans.modules.bugtracking.dummies.DummyRepository;
-import org.netbeans.modules.bugtracking.cache.IssueCache.IssueEntry;
-import org.openide.nodes.Node;
-import org.openide.util.Exceptions;
-
-/**
- *
- * @author tomas
- */
-public class StorageTest extends NbTestCase {
-
-    public StorageTest(String arg0) {
-        super(arg0);
-    }
-
-    @Override
-    protected Level logLevel() {
-        return Level.ALL;
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        System.setProperty("netbeans.user", getWorkDir().getAbsolutePath());
-        emptyStorage();
-        BugtrackingConfig.getInstance().setArchivedIssuesTTL(7); // ensure 
default
-    }
-
-    public void testStorage() throws MalformedURLException, IOException {
-        final IssueStorage storage = IssueStorage.getInstance();
-
-        Map<String, String> attr1 = new HashMap<String, String>();
-        attr1.put("dummy1", "dummy3");
-        attr1.put("dummy2", "dummy2");
-        attr1.put("dummy3", "dummy1");
-        Map<String, String> attr2 = new HashMap<String, String>();
-        attr2.put("dummy5", "dummy7");
-        attr2.put("dummy6", "dummy6");
-        attr2.put("dummy7", "dummy5");
-        String id1 = "id1";
-        String id2 = "id2";
-
-        String url = "http://test/bugzilla";;
-        String qName = "SomeQuery";
-        DummyIssue i1 = new DummyIssue(id1, attr1);
-        DummyIssue i2 = new DummyIssue(id2, attr2);
-
-        storage.storeQuery(url, qName, new String[] {id1, id2});
-
-        long lm = System.currentTimeMillis();
-        IssueCache<DummyIssue> cache = getCache();
-        IssueEntry ie1 = cache.new IssueEntry(i1, i1.id, attr1, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, false, lm);
-        IssueEntry ie2 = cache.new IssueEntry(i2, i2.id, attr2, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, false, lm);
-        
-        storage.storeIssue(url, ie1);
-        storage.storeIssue(url, ie2);
-
-        List<String> issues = storage.readQuery(url, qName);
-        assertTrue(issues.contains(id1));
-        assertTrue(issues.contains(id2));
-
-        ie1 = cache.new IssueEntry(i1, i1.id, null, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, false, lm);
-        ie2 = cache.new IssueEntry(i2, i2.id, null, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, false, lm);
-        storage.readIssue(url, ie1);
-        if(ie1.getSeenAttributes() == null) fail("missing issue id [" + id1 
+ "]");
-        assertAttribute(ie1.getSeenAttributes(), "dummy1", "dummy3");
-        assertAttribute(ie1.getSeenAttributes(), "dummy2", "dummy2");
-        assertAttribute(ie1.getSeenAttributes(), "dummy3", "dummy1");
-        storage.readIssue(url, ie2);
-        if(ie2.getSeenAttributes() == null) fail("missing issue id [" + id2 
+ "]");
-        assertAttribute(ie2.getSeenAttributes(), "dummy5", "dummy7");
-        assertAttribute(ie2.getSeenAttributes(), "dummy6", "dummy6");
-        assertAttribute(ie2.getSeenAttributes(), "dummy7", "dummy5");
-
-        // create another query
-        String qName2 = "SomeQuery2";
-        storage.storeQuery(url, qName2, new String[] {id1, id2});
-        issues = storage.readQuery(url, qName2);
-        assertEquals(2, issues.size());
-
-        // remove it
-        storage.removeQuery(url, qName2);
-        issues = storage.readQuery(url, qName2);
-        // it's gone
-        assertEquals(0, issues.size());
-        // first query still exists
-        issues = storage.readQuery(url, qName);
-        assertEquals(2, issues.size());
-
-    }
-
-    public void testArchivedStorage() throws MalformedURLException, 
IOException, NoSuchFieldException, IllegalArgumentException, 
IllegalAccessException, NoSuchMethodException, InvocationTargetException {
-        IssueStorage storage = IssueStorage.getInstance();
-        long ts = System.currentTimeMillis();
-        String id1 = "id1";
-        String id2 = "id2";
-
-        String url = "http://test/bugzilla";;
-        String qName = "SomeQuery";
-
-        storage.storeArchivedQueryIssues(url, qName, new String[] {id1, 
id2});
-        Map<String, Long> read = storage.readArchivedQueryIssues(url, qName);
-
-        assertEquals(2, read.size());
-        assertTrue(ts <= read.get(id1));
-        assertTrue(ts <= read.get(id2));
-        
-        // wait a sec and set TTL so that the archived issues shuld be 
cleaned up
-        try {
-            Thread.currentThread().sleep(1000);
-        } catch (InterruptedException ex) {
-            Exceptions.printStackTrace(ex);
-        }
-        Field f = 
BugtrackingConfig.class.getDeclaredField("DEFAULT_ARCHIVED_TTL");
-        BugtrackingConfig.getInstance().setArchivedIssuesTTL(0);
-
-        read = storage.readArchivedQueryIssues(url, qName);
-        assertEquals(0, read.size());
-        
-    }
-
-    public void testCleanup() throws MalformedURLException, IOException, 
NoSuchFieldException, IllegalArgumentException, IllegalAccessException, 
NoSuchMethodException, InvocationTargetException {
-        IssueStorage storage = IssueStorage.getInstance();
-        long ts = System.currentTimeMillis();
-        Map<String, String> attr = new HashMap<String, String>();
-        String id1 = "id1";
-        String id2 = "id2";
-
-        String url = "http://test/bugzilla";;
-        String qName = "SomeQuery";
-
-        DummyIssue i1 = new DummyIssue(id1, attr);
-        DummyIssue i2 = new DummyIssue(id2, attr);
-        
-        long lm = System.currentTimeMillis();
-        IssueCache<DummyIssue> cache = getCache();
-        IssueEntry ie1 = cache. new IssueEntry(i1, i1.id, attr, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, false, lm);
-        IssueEntry ie2 = cache. new IssueEntry(i2, i2.id, attr, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, false, lm);
-
-        storage.storeIssue(url, ie1);
-        storage.storeIssue(url, ie2);
-
-        // store query
-        storage.storeQuery(url, qName, new String[] {id1, id2});
-        List<String> stored = storage.readQuery(url, qName);
-
-        assertEquals(2, stored.size());
-        File folder = getNameSpaceFolder(url);
-        File[] issueFiles = folder.listFiles(new FilenameFilter() { public 
boolean accept(File dir, String name) {return name.endsWith(".i");}});
-        assertEquals(2, issueFiles.length); // issues are there
-
-        // cleanup, yet issues are living in a stored query
-        storage.cleanup();
-        issueFiles = folder.listFiles(new FilenameFilter() { public boolean 
accept(File dir, String name) {return name.endsWith(".i");}});
-        assertEquals(2, issueFiles.length); // issues are still there
-
-        // cleanup, yet issues are living in archive
-        storage.storeQuery(url, qName, new String[] {});
-        storage.storeArchivedQueryIssues(url, qName, new String[] {id1, 
id2});
-        storage.cleanup();
-        issueFiles = folder.listFiles(new FilenameFilter() { public boolean 
accept(File dir, String name) {return name.endsWith(".i");}});
-        assertEquals(2, issueFiles.length); // issues are still there
-
-        // cleanup, issues aren't in a query or archived
-        storage.storeQuery(url, qName, new String[] {});
-        storage.storeArchivedQueryIssues(url, qName, new String[] {});
-        storage.cleanup();
-        issueFiles = folder.listFiles(new FilenameFilter() { public boolean 
accept(File dir, String name) {return name.endsWith(".i");}});
-        assertEquals(0, issueFiles.length); // issues are still there
-    }
-
-    public void testVeryLongUrl() throws IOException, InterruptedException {
-        StringBuilder url = new StringBuilder();
-        for (int i = 0; i < 1000; i++) {
-            url.append('a');
-        }
-        File f = StorageUtils.getNameSpaceFolder(getWorkDir(), 
url.toString());
-        StorageUtils.getFileOutputStream(new File(f, "file"), true); // 
shouldn't throw file too long exception
-    }
-    
-    private void emptyStorage() throws NoSuchMethodException, 
IllegalAccessException, IllegalArgumentException, InvocationTargetException, 
NoSuchFieldException {
-        File f = getStorageRootFile();
-        BugtrackingUtil.deleteRecursively(f);
-        Field field = IssueStorage.class.getDeclaredField("storage");
-        field.setAccessible(true);
-        field.set(IssueStorage.getInstance(), f);
-    }
-
-    private File getStorageRootFile() throws NoSuchMethodException, 
IllegalAccessException, IllegalArgumentException, InvocationTargetException  {
-        IssueStorage storage = IssueStorage.getInstance();
-        Method m = 
storage.getClass().getDeclaredMethod("getStorageRootFile");
-        m.setAccessible(true);
-        return (File) m.invoke(storage, new Object[0]);
-    }
-
-    private File getNameSpaceFolder(String url) throws 
NoSuchMethodException, IllegalAccessException, IllegalArgumentException, 
InvocationTargetException  {
-        return StorageUtils.getNameSpaceFolder(getStorageRootFile(), url);
-    }
-
-    private void assertAttribute(Map<String, String> attrs, String attr, 
String value) {
-        String v = attrs.get(attr);
-        if(v == null) fail("missing attribute [" + attr + "]");
-        if(!v.equals(value)) fail("value [" + v + "] for attribute [" + attr 
+ "] instead of [" + value + "]");
-    }
-
-    private static class DummyIssue extends TestIssue {
-
-        private Map<String, String> m;
-        private String id;
-
-        public DummyIssue(String id, Map<String, String> m) {
-            this.m = m;
-            this.id = id;
-        }
-
-        @Override
-        public String getID() {
-            return id;
-        }
-
-        public Map<String, String> getAttributes() {
-            return m;
-        }
-
-        @Override
-        public String getDisplayName() {
-            return getID() + " - summary";
-        }
-    }
-    
-    private IssueCache<DummyIssue> getCache() {
-        IssueCache.IssueAccessor ia = new IssueCache.IssueAccessor() {
-
-            @Override
-            public Map getAttributes(Object issue) {
-                throw new UnsupportedOperationException("Not supported 
yet.");
-            }
-            
-            @Override
-            public long getLastModified(Object issue) {
-                throw new UnsupportedOperationException("Not supported 
yet.");
-            }
-
-            @Override
-            public long getCreated(Object issue) {
-                throw new UnsupportedOperationException("Not supported 
yet.");
-            }
-        };
-        RepositoryImpl impl = TestKit.getRepository(new 
DummyRepository(DummyBugtrackingConnector.instance, "dummy"));
-        return new IssueCache<DummyIssue>("dummy", ia);
-    }
-}
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/issuetable/QueryTableCellRendererTest.java
 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/issuetable/QueryTableCellRendererTest.java
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/issuetable/QueryTableCellRendererTest.java
+++ 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/issuetable/QueryTableCellRendererTest.java
@@ -43,16 +43,10 @@
 package org.netbeans.modules.bugtracking.issuetable;
 
 import java.awt.Color;
-import java.awt.Image;
-import java.beans.PropertyChangeListener;
-import java.io.File;
 import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.text.MessageFormat;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
 import javax.swing.JTable;
 import org.junit.After;
 import org.junit.AfterClass;
@@ -64,17 +58,13 @@
 import org.netbeans.modules.bugtracking.QueryImpl;
 import org.netbeans.modules.bugtracking.RepositoryImpl;
 import 
org.netbeans.modules.bugtracking.issuetable.QueryTableCellRenderer.TableCellStyle;
-import org.netbeans.modules.bugtracking.spi.IssueController;
 import org.netbeans.modules.bugtracking.issuetable.IssueNode.IssueProperty;
 import org.netbeans.modules.bugtracking.spi.*;
-import org.netbeans.modules.bugtracking.cache.IssueCache;
-import org.netbeans.modules.bugtracking.cache.IssueCache.IssueAccessor;
+import org.netbeans.modules.bugtracking.spi.IssueStatusProvider.Status;
 import org.netbeans.modules.bugtracking.util.UIUtils;
 import org.openide.nodes.Node.Property;
 import org.openide.util.Exceptions;
-import org.openide.util.Lookup;
 import org.openide.util.NbBundle;
-import org.openide.util.lookup.Lookups;
 
 /**
  *
@@ -132,7 +122,7 @@
         IssueProperty property = new RendererNode(rendererIssue, "some 
value", rendererRepository, new ChangesProvider()).createProperty();
         rendererQuery.containsIssue = true;
         boolean selected = false;
-        setEntryValues(rendererRepository, rendererIssue, 
IssueCache.Status.ISSUE_STATUS_SEEN, true);
+        setIssueValues(rendererRepository, rendererIssue, Status.SEEN, true);
         TableCellStyle defaultStyle = 
QueryTableCellRenderer.getDefaultCellStyle(table, issueTable, property, 
selected, 0);
         TableCellStyle result = QueryTableCellRenderer.getCellStyle(table, 
query.getQuery(), issueTable, property, selected, 0);
         assertEquals(defaultStyle.getBackground(), result.getBackground());
@@ -145,7 +135,7 @@
         rendererIssue = new RendererIssue(rendererRepository, "");
         property = new RendererNode(rendererIssue, "some value", 
rendererRepository, new ChangesProvider()).createProperty();
         selected = true;
-        setEntryValues(rendererRepository, rendererIssue, 
IssueCache.Status.ISSUE_STATUS_SEEN, true);
+        setIssueValues(rendererRepository, rendererIssue, Status.SEEN, true);
         defaultStyle = QueryTableCellRenderer.getDefaultCellStyle(table, 
issueTable, property, selected, 0);
         result = QueryTableCellRenderer.getCellStyle(table, 
query.getQuery(), issueTable, property, selected, 0);
         assertEquals(defaultStyle.getBackground(), result.getBackground());
@@ -182,7 +172,7 @@
         selected = false;
         rendererIssue = new RendererIssue(rendererRepository, "changed");
         property = new RendererNode(rendererIssue, "some value", 
rendererRepository, new ChangesProvider()).createProperty();
-        setEntryValues(rendererRepository, rendererIssue, 
IssueCache.Status.ISSUE_STATUS_MODIFIED, false);
+        setIssueValues(rendererRepository, rendererIssue, 
Status.INCOMING_MODIFIED, false);
         result = QueryTableCellRenderer.getCellStyle(table, 
query.getQuery(), issueTable, property, selected, 0);
         defaultStyle = QueryTableCellRenderer.getDefaultCellStyle(table, 
issueTable, property, selected, 0);
         assertEquals(defaultStyle.getBackground(), result.getBackground());
@@ -196,7 +186,7 @@
         selected = true;
         rendererIssue = new RendererIssue(rendererRepository, "changed");
         property = new RendererNode(rendererIssue, "some value", 
rendererRepository, new ChangesProvider()).createProperty();
-        setEntryValues(rendererRepository, rendererIssue, 
IssueCache.Status.ISSUE_STATUS_MODIFIED, false);
+        setIssueValues(rendererRepository, rendererIssue, 
Status.INCOMING_MODIFIED, false);
         result = QueryTableCellRenderer.getCellStyle(table, 
query.getQuery(), issueTable, property, selected, 0);
         defaultStyle = QueryTableCellRenderer.getDefaultCellStyle(table, 
issueTable, property, selected, 0);
         assertEquals(modifiedHighlightColor, result.getBackground());
@@ -209,7 +199,7 @@
         selected = false;
         rendererIssue = new RendererIssue(rendererRepository, "");
         property = new RendererNode(rendererIssue, "some value", 
rendererRepository, new ChangesProvider()).createProperty();
-        setEntryValues(rendererRepository, rendererIssue, 
IssueCache.Status.ISSUE_STATUS_NEW, false);
+        setIssueValues(rendererRepository, rendererIssue, 
Status.INCOMING_NEW, false);
         result = QueryTableCellRenderer.getCellStyle(table, 
query.getQuery(), issueTable, property, selected, 0);
         defaultStyle = QueryTableCellRenderer.getDefaultCellStyle(table, 
issueTable, property, selected, 0);
         assertEquals(defaultStyle.getBackground(), result.getBackground());
@@ -223,7 +213,7 @@
         selected = true;
         rendererIssue = new RendererIssue(rendererRepository, "");
         property = new RendererNode(rendererIssue, "some value", 
rendererRepository, new ChangesProvider()).createProperty();
-        setEntryValues(rendererRepository, rendererIssue, 
IssueCache.Status.ISSUE_STATUS_NEW, false);
+        setIssueValues(rendererRepository, rendererIssue, 
Status.INCOMING_NEW, false);
         result = QueryTableCellRenderer.getCellStyle(table, 
query.getQuery(), issueTable, property, selected, 0);
         defaultStyle = QueryTableCellRenderer.getDefaultCellStyle(table, 
issueTable, property, selected, 0);
         assertEquals(newHighlightColor, result.getBackground());
@@ -347,6 +337,8 @@
         private static int id = 0;
         private String recentChanges;
         private final RendererRepository repo;
+        private IssueStatusProvider.Status status;
+        private IssueStatusProvider.Status prevStatus;
         public RendererIssue(RendererRepository repo, String recentChanges) {
             id++;
             this.recentChanges = recentChanges;
@@ -372,81 +364,41 @@
             return recentChanges;
         }
         
+        public void setStatus(IssueStatusProvider.Status status) {
+            this.status = status;
+        }
+        
         @Override
         public IssueStatusProvider.Status getStatus() {
-            IssueCache.Status s = repo.cache.getStatus(getID());
-            switch(s) {
-                case ISSUE_STATUS_NEW:
-                    return IssueStatusProvider.Status.INCOMING_NEW;
-                case ISSUE_STATUS_MODIFIED:
-                    return IssueStatusProvider.Status.INCOMING_MODIFIED;
-                case ISSUE_STATUS_SEEN:
-                    return IssueStatusProvider.Status.SEEN;
-            }
-            return null;
+            return status;
         }
 
         @Override
         public void setSeen(boolean seen) {
-            try {
-                repo.cache.setSeen(getID(), seen);
-            } catch (IOException ex) {
-                Exceptions.printStackTrace(ex);
+            if(seen) {
+                prevStatus = status;
+                status = Status.SEEN;
+            } else if(prevStatus != null) {
+                status = prevStatus;
             }
         }
     }
 
     private class RendererRepository extends TestRepository {
-        private RepositoryInfo info;
-        private IssueCache<TestIssue> cache;
-        private Lookup lookup;
+        private final RepositoryInfo info;
         public RendererRepository() {
             info = new RepositoryInfo("testrepo", "testconnector", null, 
null, null, null, null, null, null);
-            lookup = Lookups.singleton(getCache());
-        }
-
-        public IssueCache<TestIssue> getCache() {
-            if(cache == null) {
-                IssueAccessor<TestIssue> issueAccessor = new 
IssueCache.IssueAccessor<TestIssue>() {
-                    @Override
-                    public Map<String, String> getAttributes(TestIssue 
issue) {
-                        return Collections.EMPTY_MAP;
-                    }
-                    @Override
-                    public long getLastModified(TestIssue issue) {
-                        return System.currentTimeMillis() - 10 * 60 * 1000;
-                    }
-                    @Override
-                    public long getCreated(TestIssue issue) {
-                        return System.currentTimeMillis() - 15 * 60 * 1000;
-                    }
-                };
-                cache = new IssueCache<TestIssue>("test", issueAccessor);
-            }
-            return cache;
         }
         
         @Override
         public RepositoryInfo getInfo() {
             return info;
         }
-        
-        public Lookup getLookup() {
-            return lookup; 
-        }
-
     };
 
-    private void setEntryValues(RendererRepository repository, RendererIssue 
rendererIssue, IssueCache.Status status, boolean seen) throws 
NoSuchMethodException, IllegalAccessException, IllegalArgumentException, 
InvocationTargetException {
-        IssueCache cache = repository.getCache();
-        try {
-            cache.setIssueData(rendererIssue.getID(), rendererIssue); // 
ensure issue is cached
-        } catch (IOException ex) {
-            Exceptions.printStackTrace(ex);
-        }
-        Method m = cache.getClass().getDeclaredMethod("setEntryValues", 
String.class, IssueCache.Status.class, boolean.class);
-        m.setAccessible(true);
-        m.invoke(cache, rendererIssue.getID(), status, seen);
+    private void setIssueValues(RendererRepository repository, RendererIssue 
rendererIssue, Status status, boolean seen) throws NoSuchMethodException, 
IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+        rendererIssue.setStatus(status);
+        rendererIssue.setSeen(seen);
     }
     

[hg] main-silver: removed archived issues functionality

Tomas Stupka 10/14/2013

Project Features

About this Project

ConnectedDeveloper was started in November 2009, is owned by tpavek, and has 66 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close