]> git.uio.no Git - ifi-stolz-refaktor.git/commitdiff
Software: moving stuff around
authorErlend Kristiansen <erlenkr@ifi.uio.no>
Mon, 7 Apr 2014 17:21:46 +0000 (19:21 +0200)
committerErlend Kristiansen <erlenkr@ifi.uio.no>
Mon, 7 Apr 2014 17:21:46 +0000 (19:21 +0200)
35 files changed:
software/no.uio.ifi.refaktor.tests/src/no/uio/ifi/refaktor/tests/LongestCommonPrefixAnalyzerTest.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/ReturnStatementFinder.java [deleted file]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/analyzers/ExtractAndMoveMethodAnalyzer.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/analyzers/LongestCommonPrefixAnalyzer.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/analyzers/SelectionValidator.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/collectors/SelectionValidator.java with 96% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/checkers/AmbiguousReturnValueChecker.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/checkers/CallToProtectedOrPackagePrivateMethodChecker.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/checkers/Checker.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/checkers/EnclosingInstanceReferenceChecker.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/checkers/IllegalReturnStatementChecker.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/collectors/IllegalReturnStatementChecker.java with 71% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/checkers/IllegalStatementsChecker.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/checkers/InstantiationOfNonStaticInnerClassChecker.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/checkers/LastStatementFinder.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/LastStatementFinder.java with 90% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/checkers/LastStatementOfSelectionEndsInReturnOrThrowChecker.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/collectors/LastStatementOfSelectionEndsInReturnOrThrowChecker.java with 95% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/checkers/LegalStatementsChecker.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/checkers/ReturnOrThrowStatementFinder.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/collectors/ReturnOrThrowStatementFinder.java with 83% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/checkers/ReturnStatementsChecker.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/collectors/ReturnStatementsChecker.java with 86% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/exceptions/SelectionInvalidException.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/collectors/SelectionInvalidException.java with 88% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/CompilationUnitTextSelection.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/ParseUtils.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/RefaktorHandleUtils.java
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/caching/CompilationUnitCache.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/CompilationUnitCache.java with 87% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/caching/CompilationUnitCacheManager.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/CompilationUnitCacheManager.java with 92% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/caching/CompilationUnitCacheUtils.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/CacheCompilationUnitUtils.java with 84% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/caching/CompilationUnitHashCache.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/CompilationUnitHashCache.java with 87% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/caching/CompilationUnitNullCache.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/CompilationUnitNullCache.java with 91% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/caching/CompilationUnitRecentlyUsedCache.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/CompilationUnitRecentlyUsedCache.java with 86% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/caching/CompilationUnitSoftReferencesCache.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/CompilationUnitSoftReferencesCache.java with 90% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/caching/RefaktorCacheException.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/RefaktorCacheException.java with 89% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/nullobjects/NullCompilationUnit.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/NullCompilationUnit.java with 99% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/nullobjects/NullMethodHandle.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/NullMethodHandle.java with 99% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/nullobjects/NullPackageFragmentHandle.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/NullPackageFragmentHandle.java with 99% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/nullobjects/NullSoftReference.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/NullSoftReference.java with 76% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/nullobjects/UnsupportedNullObjectOperationException.java [moved from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/UnsupportedNullObjectOperationException.java with 85% similarity]
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/views/PrefixView.java

index 338a7c0dcc032ea0debab255870a67acaa5e4f5c..00babc6d6c00a77bdd190c82baf7019d52172fbc 100644 (file)
@@ -3,7 +3,7 @@ package no.uio.ifi.refaktor.tests;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 import no.uio.ifi.refaktor.analyze.analyzers.LongestCommonPrefixAnalyzer;
-import no.uio.ifi.refaktor.analyze.collectors.SelectionInvalidException;
+import no.uio.ifi.refaktor.analyze.exceptions.SelectionInvalidException;
 import no.uio.ifi.refaktor.examples.manager.ExampleCodeManager;
 import no.uio.ifi.refaktor.utils.CompilationUnitTextSelection;
 import no.uio.ifi.refaktor.utils.RefaktorHandleUtils;
diff --git a/software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/ReturnStatementFinder.java b/software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/ReturnStatementFinder.java
deleted file mode 100644 (file)
index 3000ca9..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-package no.uio.ifi.refaktor.analyze;
-
-import org.eclipse.jdt.core.dom.ASTVisitor;
-import org.eclipse.jdt.core.dom.ReturnStatement;
-
-public class ReturnStatementFinder extends ASTVisitor {
-
-       private boolean returnFound = false;
-
-       @Override
-       public boolean visit(ReturnStatement node) {
-               returnFound = true;
-               return false;
-       }
-       
-       public boolean hasFoundReturnStatement() {
-               return returnFound;
-       }
-
-       public void reset() {
-               returnFound = false;
-       }
-
-}
index c697540e6513112f80fdf94173587510ed7971a5..aa41289c1183a5b9b3873ab02d637874f57fd12e 100644 (file)
@@ -8,7 +8,6 @@ import java.util.LinkedList;
 import no.uio.ifi.refaktor.analyze.CollectorManager;
 import no.uio.ifi.refaktor.analyze.checkers.LegalStatementsChecker;
 import no.uio.ifi.refaktor.analyze.collectors.PrefixesCollector;
-import no.uio.ifi.refaktor.analyze.collectors.SelectionValidator;
 import no.uio.ifi.refaktor.analyze.collectors.UnfixesCollector;
 import no.uio.ifi.refaktor.analyze.exceptions.NoTargetFoundException;
 import no.uio.ifi.refaktor.analyze.exceptions.RefaktorAnalyzerException;
index 918302fc875cb591e555b4b1183871df44fd5f6e..fcf6409cfdfa16107f107caa1afdb12a1a78d142 100644 (file)
@@ -2,7 +2,6 @@ package no.uio.ifi.refaktor.analyze.analyzers;
 
 import no.uio.ifi.refaktor.analyze.CollectorManager;
 import no.uio.ifi.refaktor.analyze.collectors.LongestCommonPrefixCollector;
-import no.uio.ifi.refaktor.analyze.collectors.SelectionValidator;
 import no.uio.ifi.refaktor.analyze.exceptions.RefaktorAnalyzerException;
 import no.uio.ifi.refaktor.utils.CompilationUnitTextSelection;
 
similarity index 96%
rename from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/collectors/SelectionValidator.java
rename to software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/analyzers/SelectionValidator.java
index af7731a391731332b8fc0b38fb55cfc23c044141..cbe46458e51a46867c1ca8e53c9eaa464adf2eb0 100644 (file)
@@ -1,9 +1,10 @@
-package no.uio.ifi.refaktor.analyze.collectors;
+package no.uio.ifi.refaktor.analyze.analyzers;
 
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.LinkedList;
 
+import no.uio.ifi.refaktor.analyze.exceptions.SelectionInvalidException;
 import no.uio.ifi.refaktor.utils.CompilationUnitTextSelection;
 
 import org.eclipse.jdt.core.dom.ASTNode;
index 0f966cb8fa8a0e50810b4a356fbd34c77d510112..36ab12d912662e9c619e11d716bb91336da31eb0 100644 (file)
@@ -17,7 +17,7 @@ import org.eclipse.jdt.core.dom.ReturnStatement;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 
-public class AmbiguousReturnValueChecker extends PropertyCollector implements Checker {
+class AmbiguousReturnValueChecker extends PropertyCollector implements Checker {
 
        private class AssigneesUsedOutsideSelectionChecker extends PropertyCollector {
                
index 73804477ad102a7fc0f74158ee0c3f01a9bd07c3..56d53d19dcfca25e7dfa876acc2d72869c4af003 100644 (file)
@@ -11,7 +11,7 @@ import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.Modifier;
 
 // TODO: file bug report
-public class CallToProtectedOrPackagePrivateMethodChecker extends PropertyCollector implements Checker {
+class CallToProtectedOrPackagePrivateMethodChecker extends PropertyCollector implements Checker {
 
        public CallToProtectedOrPackagePrivateMethodChecker(CompilationUnitTextSelection selection) {
                super(selection);
index 7d1bcd7c9338fe0df878d37b4bb6a7b708f60da3..adea7b31721df07f356bfebd347acd5bce32934c 100644 (file)
@@ -3,6 +3,6 @@ package no.uio.ifi.refaktor.analyze.checkers;
 import no.uio.ifi.refaktor.analyze.exceptions.IllegalExpressionFoundException;
 import no.uio.ifi.refaktor.analyze.exceptions.IllegalStatementFoundException;
 
-public interface Checker {
+interface Checker {
        void check() throws IllegalStatementFoundException, IllegalExpressionFoundException;
 }
index b8416df2cb8f2fc3b570edbacd3f43ca12994539..85f8c5b2b32328acaa66e23ba9b9bbeda2fb109d 100644 (file)
@@ -27,7 +27,7 @@ import org.eclipse.jdt.internal.corext.dom.Bindings;
  * with a few changes
  */
 @SuppressWarnings("restriction")
-public class EnclosingInstanceReferenceChecker extends PropertyCollector implements Checker {
+class EnclosingInstanceReferenceChecker extends PropertyCollector implements Checker {
 
        private final List<ITypeBinding> enclosingTypes= new ArrayList<ITypeBinding>(3);
 
similarity index 71%
rename from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/collectors/IllegalReturnStatementChecker.java
rename to software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/checkers/IllegalReturnStatementChecker.java
index df05f035103804762063c8437e3e7c80f9ba9ce0..76814585f0b260a43f1a97c676b21dfc955ecd41 100644 (file)
@@ -1,11 +1,11 @@
-package no.uio.ifi.refaktor.analyze.collectors;
+package no.uio.ifi.refaktor.analyze.checkers;
 
 import no.uio.ifi.refaktor.analyze.exceptions.IllegalStatementFoundException;
 
 import org.eclipse.jdt.core.dom.ASTVisitor;
 import org.eclipse.jdt.core.dom.ReturnStatement;
 
-public class IllegalReturnStatementChecker extends ASTVisitor {
+class IllegalReturnStatementChecker extends ASTVisitor {
 
        @Override
        public boolean visit(ReturnStatement node) {
index 853d0adb13637fd4ca78c6580bead02bf212a5ce..82823a35b0eef465f2a9c637460d509a1e270d72 100644 (file)
@@ -26,7 +26,7 @@ import org.eclipse.jdt.core.dom.SuperConstructorInvocation;
 import org.eclipse.jdt.core.dom.SuperFieldAccess;
 import org.eclipse.jdt.core.dom.SuperMethodInvocation;
 
-public class IllegalStatementsChecker extends PropertyCollector implements Checker {
+class IllegalStatementsChecker extends PropertyCollector implements Checker {
 
        public IllegalStatementsChecker(CompilationUnitTextSelection selection) {
                super(selection);
index 77886e1f56caff28bc0bb32529c434a734cdfb87..c3a1b80a70745eefb5f7d8983b7c90da48a5e497 100644 (file)
@@ -11,7 +11,7 @@ import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.Modifier;
 
 // TODO: file bug report
-public class InstantiationOfNonStaticInnerClassChecker extends PropertyCollector implements Checker {
+class InstantiationOfNonStaticInnerClassChecker extends PropertyCollector implements Checker {
 
        public InstantiationOfNonStaticInnerClassChecker(CompilationUnitTextSelection selection) {
                super(selection);
similarity index 90%
rename from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/LastStatementFinder.java
rename to software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/checkers/LastStatementFinder.java
index c31288d2b877f048285c0e48d9e4fd3d6b2f34d8..1a2d1b952aec74f7d1f7568e2662782c557eeb22 100644 (file)
@@ -1,10 +1,10 @@
-package no.uio.ifi.refaktor.utils;
+package no.uio.ifi.refaktor.analyze.checkers;
 
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.ASTVisitor;
 import org.eclipse.jdt.core.dom.Statement;
 
-public class LastStatementFinder extends ASTVisitor {
+class LastStatementFinder extends ASTVisitor {
        private final ASTNode parent;
        private Statement lastStatement;
 
@@ -1,12 +1,12 @@
-package no.uio.ifi.refaktor.analyze.collectors;
+package no.uio.ifi.refaktor.analyze.checkers;
 
 import java.util.List;
 
-import no.uio.ifi.refaktor.analyze.checkers.Checker;
+import no.uio.ifi.refaktor.analyze.collectors.LastStatementCollector;
+import no.uio.ifi.refaktor.analyze.collectors.PropertyCollector;
 import no.uio.ifi.refaktor.analyze.exceptions.IllegalExpressionFoundException;
 import no.uio.ifi.refaktor.analyze.exceptions.IllegalStatementFoundException;
 import no.uio.ifi.refaktor.utils.CompilationUnitTextSelection;
-import no.uio.ifi.refaktor.utils.LastStatementFinder;
 
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.Block;
@@ -21,7 +21,7 @@ import org.eclipse.jdt.core.dom.SynchronizedStatement;
 import org.eclipse.jdt.core.dom.ThrowStatement;
 import org.eclipse.jdt.core.dom.TryStatement;
 
-public class LastStatementOfSelectionEndsInReturnOrThrowChecker extends PropertyCollector implements Checker {
+class LastStatementOfSelectionEndsInReturnOrThrowChecker extends PropertyCollector implements Checker {
 
        public LastStatementOfSelectionEndsInReturnOrThrowChecker(CompilationUnitTextSelection selection) {
                super(selection);
index e96ae52dfb8fac2b72e61d5e8e86f158a713f910..3dae7aa59deb40fdc85baac2cf2357e972ee71f2 100644 (file)
@@ -3,7 +3,6 @@ package no.uio.ifi.refaktor.analyze.checkers;
 import java.util.LinkedList;
 import java.util.List;
 
-import no.uio.ifi.refaktor.analyze.collectors.ReturnStatementsChecker;
 import no.uio.ifi.refaktor.analyze.exceptions.CheckerException;
 import no.uio.ifi.refaktor.utils.CompilationUnitTextSelection;
 
similarity index 83%
rename from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/collectors/ReturnOrThrowStatementFinder.java
rename to software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/checkers/ReturnOrThrowStatementFinder.java
index f99a64adda6ae49f63883165312e78b2a07c5de3..49daa76e816aed66592c2439dfeb421278d290be 100644 (file)
@@ -1,10 +1,10 @@
-package no.uio.ifi.refaktor.analyze.collectors;
+package no.uio.ifi.refaktor.analyze.checkers;
 
 import org.eclipse.jdt.core.dom.ASTVisitor;
 import org.eclipse.jdt.core.dom.ReturnStatement;
 import org.eclipse.jdt.core.dom.ThrowStatement;
 
-public class ReturnOrThrowStatementFinder extends ASTVisitor {
+class ReturnOrThrowStatementFinder extends ASTVisitor {
 
        private boolean returnOrThrowFound = false;
 
similarity index 86%
rename from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/collectors/ReturnStatementsChecker.java
rename to software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/checkers/ReturnStatementsChecker.java
index 15369757373a339eb46046a125667e0287c68f27..91c5c9e7dee3dacc06813efea2e6f9e3ed625b09 100644 (file)
@@ -1,12 +1,12 @@
-package no.uio.ifi.refaktor.analyze.collectors;
+package no.uio.ifi.refaktor.analyze.checkers;
 
 import no.uio.ifi.refaktor.analyze.CollectorManager;
-import no.uio.ifi.refaktor.analyze.checkers.Checker;
+import no.uio.ifi.refaktor.analyze.collectors.ContainsReturnStatementCollector;
 import no.uio.ifi.refaktor.analyze.exceptions.IllegalExpressionFoundException;
 import no.uio.ifi.refaktor.analyze.exceptions.IllegalStatementFoundException;
 import no.uio.ifi.refaktor.utils.CompilationUnitTextSelection;
 
-public class ReturnStatementsChecker implements Checker {
+class ReturnStatementsChecker implements Checker {
 
        private final CompilationUnitTextSelection selection;
 
index 67455bb433a5830a03a3ecba8e0f66068cfb1700..2747c1ddfd0e66544883ffad90f155c2cfdf9c21 100644 (file)
@@ -3,6 +3,7 @@ package no.uio.ifi.refaktor.utils;
 import java.lang.ref.SoftReference;
 
 import no.uio.ifi.refaktor.analyze.collectors.LastStatementCollector;
+import no.uio.ifi.refaktor.utils.nullobjects.NullSoftReference;
 
 import org.eclipse.core.resources.IProject;
 import org.eclipse.jdt.core.ICompilationUnit;
index ea0cb00683d517015162363c14a9aca017b9d2d1..82fcb1e8f169821ac25ed571ea4c5b99f3c943b2 100644 (file)
@@ -1,5 +1,7 @@
 package no.uio.ifi.refaktor.utils;
 
+import no.uio.ifi.refaktor.utils.caching.CompilationUnitCacheManager;
+
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.dom.AST;
@@ -21,7 +23,7 @@ public class ParseUtils {
                return CompilationUnitCacheManager.getParsedCompilationUnitFor(unit);
        }
 
-       static CompilationUnit parseUncached(ICompilationUnit unit) {
+       public static CompilationUnit parseUncached(ICompilationUnit unit) {
                ASTParser parser = createParser();
                parser.setSource(unit);
                return (CompilationUnit) parser.createAST(null);
index f26c5e58865d09c750560f0150e3aa9a69d99def..1055c7b8874deaefa7bb9b7f3726304d6e7b66fc 100644 (file)
@@ -7,6 +7,8 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import no.uio.ifi.refaktor.exceptions.RefaktorException;
+import no.uio.ifi.refaktor.utils.nullobjects.NullCompilationUnit;
+import no.uio.ifi.refaktor.utils.nullobjects.NullPackageFragmentHandle;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
similarity index 87%
rename from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/CompilationUnitCache.java
rename to software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/caching/CompilationUnitCache.java
index 7981b789e60907ca3c182f703d86b29b47b6239c..9ade72609e73ea497c23c705dafb8e3b8c53f521 100644 (file)
@@ -1,4 +1,4 @@
-package no.uio.ifi.refaktor.utils;
+package no.uio.ifi.refaktor.utils.caching;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.dom.CompilationUnit;
similarity index 92%
rename from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/CompilationUnitCacheManager.java
rename to software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/caching/CompilationUnitCacheManager.java
index 8454270a9e53f68f1928355c117410f9e27d891b..e7257f7e04ef4dcfda8c9e16e54eb0dce9deca1a 100644 (file)
@@ -1,4 +1,6 @@
-package no.uio.ifi.refaktor.utils;
+package no.uio.ifi.refaktor.utils.caching;
+
+import no.uio.ifi.refaktor.utils.ParseUtils;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.dom.CompilationUnit;
similarity index 84%
rename from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/CacheCompilationUnitUtils.java
rename to software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/caching/CompilationUnitCacheUtils.java
index 3d594e949049fb0baa0379b044b5474c82149091..de8fdc3348fab694f9f3b62746628a78ac879c75 100644 (file)
@@ -1,10 +1,12 @@
-package no.uio.ifi.refaktor.utils;
+package no.uio.ifi.refaktor.utils.caching;
+
+import no.uio.ifi.refaktor.utils.RefaktorDebug;
 
 import org.eclipse.core.resources.IResource;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.JavaModelException;
 
-public class CacheCompilationUnitUtils {
+public class CompilationUnitCacheUtils {
 
        static boolean hasMatchingModificationStamp(ICompilationUnit unit, Long modificationStamp) {
                return getModificationStampOf(unit).equals(modificationStamp);
similarity index 87%
rename from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/CompilationUnitHashCache.java
rename to software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/caching/CompilationUnitHashCache.java
index a4269986f57d5c1f71ac13c9e4de11f7af94756f..e51ece0a60f90f289304fdfe7e31751092ab8ba9 100644 (file)
@@ -1,4 +1,4 @@
-package no.uio.ifi.refaktor.utils;
+package no.uio.ifi.refaktor.utils.caching;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -15,7 +15,7 @@ public class CompilationUnitHashCache implements CompilationUnitCache {
        public boolean contains(ICompilationUnit unit) {
                Long modificationStamp = modificationStamps.get(unit);
                if (modificationStamp != null) {
-                       boolean modificationStampMatches = CacheCompilationUnitUtils.hasMatchingModificationStamp(unit, modificationStamp);
+                       boolean modificationStampMatches = CompilationUnitCacheUtils.hasMatchingModificationStamp(unit, modificationStamp);
                        if (!modificationStampMatches)
                                cleanCache(unit);
                        return cache.containsKey(unit) && modificationStampMatches;
@@ -36,7 +36,7 @@ public class CompilationUnitHashCache implements CompilationUnitCache {
        @Override
        public void add(ICompilationUnit unit, CompilationUnit concreteCompilationUnit) {
                cache.put(unit, concreteCompilationUnit);
-               modificationStamps.put(unit, CacheCompilationUnitUtils.getModificationStampOf(unit));
+               modificationStamps.put(unit, CompilationUnitCacheUtils.getModificationStampOf(unit));
        }
 
 }
similarity index 86%
rename from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/CompilationUnitRecentlyUsedCache.java
rename to software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/caching/CompilationUnitRecentlyUsedCache.java
index 34314f13769d28134409b3e0bfabbb0abf8f6fcf..6c15c8a9ae496f92566735539900ca13122d88c7 100644 (file)
@@ -1,4 +1,4 @@
-package no.uio.ifi.refaktor.utils;
+package no.uio.ifi.refaktor.utils.caching;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.dom.CompilationUnit;
@@ -14,7 +14,7 @@ public class CompilationUnitRecentlyUsedCache implements CompilationUnitCache {
                if (!hasMatchingCompilationUnit(unit))
                        return false;
 
-               if (CacheCompilationUnitUtils.hasMatchingModificationStamp(unit, modificationStamp)) {
+               if (CompilationUnitCacheUtils.hasMatchingModificationStamp(unit, modificationStamp)) {
                        return true;
                }
 
@@ -41,7 +41,7 @@ public class CompilationUnitRecentlyUsedCache implements CompilationUnitCache {
        public void add(ICompilationUnit unit, CompilationUnit concreteCompilationUnit) {
                this.unit = unit;
                this.concreteCompilationUnit = concreteCompilationUnit;
-               modificationStamp = CacheCompilationUnitUtils.getModificationStampOf(unit);
+               modificationStamp = CompilationUnitCacheUtils.getModificationStampOf(unit);
        }
 
 }
similarity index 90%
rename from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/CompilationUnitSoftReferencesCache.java
rename to software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/caching/CompilationUnitSoftReferencesCache.java
index 2ceccc3687df8704988a44284b64e16d230ffc5a..2c85b0c3d673175beef94ceefdda8051c2c1c139 100644 (file)
@@ -1,4 +1,4 @@
-package no.uio.ifi.refaktor.utils;
+package no.uio.ifi.refaktor.utils.caching;
 
 import java.lang.ref.SoftReference;
 import java.util.HashMap;
@@ -23,7 +23,7 @@ public class CompilationUnitSoftReferencesCache implements CompilationUnitCache
                if (tmpStrongCURef != null) {
                        Long modificationStamp = modificationStamps.get(unit);
                        assert modificationStamp != null;
-                       boolean modificationStampMatches = CacheCompilationUnitUtils.hasMatchingModificationStamp(unit, modificationStamp);
+                       boolean modificationStampMatches = CompilationUnitCacheUtils.hasMatchingModificationStamp(unit, modificationStamp);
                        if (!modificationStampMatches)
                                cleanCache(unit);
                        return modificationStampMatches;
@@ -52,7 +52,7 @@ public class CompilationUnitSoftReferencesCache implements CompilationUnitCache
        @Override
        public void add(ICompilationUnit unit, CompilationUnit concreteCompilationUnit) {
                cache.put(unit, new SoftReference<CompilationUnit>(concreteCompilationUnit));
-               modificationStamps.put(unit, CacheCompilationUnitUtils.getModificationStampOf(unit));
+               modificationStamps.put(unit, CompilationUnitCacheUtils.getModificationStampOf(unit));
        }
 
 }
similarity index 99%
rename from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/NullCompilationUnit.java
rename to software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/nullobjects/NullCompilationUnit.java
index 3ccd6941afd567a1548109de2af4a99c6fa68480..f66d1e1bd696c823da1052464630e20de14323e4 100644 (file)
@@ -1,4 +1,4 @@
-package no.uio.ifi.refaktor.utils;
+package no.uio.ifi.refaktor.utils.nullobjects;
 
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IResource;
similarity index 99%
rename from software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/NullMethodHandle.java
rename to software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/nullobjects/NullMethodHandle.java
index 314710260ce718b0766282f8ae93759c340cd5a2..c544347afc61ed1e9c31f7974a26a772d6d32f0d 100644 (file)
@@ -1,4 +1,4 @@
-package no.uio.ifi.refaktor.utils;
+package no.uio.ifi.refaktor.utils.nullobjects;
 
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.IPath;
index 4cc63d26c3675d69a4c30b3763e35c4c8d3971c5..89ed3e30377a1923e976be96eb918964e2005762 100644 (file)
@@ -2,7 +2,7 @@ package no.uio.ifi.refaktor.views;
 
 
 import no.uio.ifi.refaktor.analyze.analyzers.PrefixViewAnalyzer;
-import no.uio.ifi.refaktor.analyze.collectors.SelectionValidator;
+import no.uio.ifi.refaktor.analyze.analyzers.SelectionValidator;
 import no.uio.ifi.refaktor.utils.CompilationUnitTextSelection;
 import no.uio.ifi.refaktor.utils.DocumentUtils;
 import no.uio.ifi.refaktor.utils.ParseUtils;