X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.indexing%2Fsrc%2Forg%2Fsimantics%2Fdb%2Findexing%2FIndexedRelationsMemorySearcher.java;fp=bundles%2Forg.simantics.db.indexing%2Fsrc%2Forg%2Fsimantics%2Fdb%2Findexing%2FIndexedRelationsMemorySearcher.java;h=8fc0ce911b32fe5f012463a8f7796fc80d0dee45;hp=ac0918ea52e9eb9e33bc4c0c6a27a3becbfd7d79;hb=8b8630b93f8e4ec88a8a4eb53b55031407deedc0;hpb=0242b51bcb69c03ea15aa785abc39ed70c9dbbd7 diff --git a/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsMemorySearcher.java b/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsMemorySearcher.java index ac0918ea5..8fc0ce911 100644 --- a/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsMemorySearcher.java +++ b/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsMemorySearcher.java @@ -36,6 +36,8 @@ import org.simantics.db.Session; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.adapter.GenericRelation; import org.simantics.utils.datastructures.Pair; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @author Tuukka Lehtonen @@ -43,6 +45,8 @@ import org.simantics.utils.datastructures.Pair; */ public class IndexedRelationsMemorySearcher extends IndexedRelationsSearcherBase { + private static final Logger LOGGER = LoggerFactory.getLogger(IndexedRelationsMemorySearcher.class); + final IndexedRelationsSearcher backend; final GenericRelation r; @@ -173,19 +177,16 @@ public class IndexedRelationsMemorySearcher extends IndexedRelationsSearcherBase @Override Directory getDirectory(Session session) throws IOException { MemoryIndexing mem = MemoryIndexing.getInstance(session); - String path = indexPath.getAbsolutePath(); + String path = indexPath.toAbsolutePath().toString(); return mem.getDirectory(path, Queries.getAnalyzer()); } @Override Throwable bestEffortClear(IProgressMonitor monitor, Session session) { - - setProblem(null); - MemoryIndexing mem = MemoryIndexing.getInstance(session); changed.clear(); - String path = indexPath.getAbsolutePath(); + String path = indexPath.toAbsolutePath().toString(); mem.remove(path); return null; @@ -196,5 +197,10 @@ public class IndexedRelationsMemorySearcher extends IndexedRelationsSearcherBase protected boolean requireChangeInfoOnReplace() { return false; } + + @Override + protected Logger getLogger() { + return LOGGER; + } }