Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2013-02-02 17:35:58 +0000
committerStephan Herrmann2013-02-02 17:35:58 +0000
commitac72852be92166b2f1bf098a60ae00aa0346d2c1 (patch)
tree09de0f1dd81d71e935a1c922fabf6292e3c65ff4
parentd9b4424fdbfe544b6a2ae84b09e99d6cf3c753be (diff)
downloadorg.eclipse.objectteams-ac72852be92166b2f1bf098a60ae00aa0346d2c1.tar.gz
org.eclipse.objectteams-ac72852be92166b2f1bf098a60ae00aa0346d2c1.tar.xz
org.eclipse.objectteams-ac72852be92166b2f1bf098a60ae00aa0346d2c1.zip
Fixed regression in AddImportQuickFixTest.testAddBaseImportForRofi2()
due to Bug 378024 - Ordering of comments between imports not preserved
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ImportRewriteAnalyzer.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ImportRewriteAnalyzer.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ImportRewriteAnalyzer.java
index 11b9c5e0b..6dcb85d1e 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ImportRewriteAnalyzer.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ImportRewriteAnalyzer.java
@@ -931,6 +931,12 @@ public final class ImportRewriteAnalyzer {
} else if (lastPackage.isComment() && pack.isSameGroup(lastPackage)) {
// the last pack may be a dummy for a comment which doesn't belong to any extended range
stringsToInsert.add(lineDelim);
+//{ObjectTeams: space between regular imports and base import:
+ } else if (!lastPackage.isComment() && !pack.isComment() && pack.isBase() != lastPackage.isBase()) {
+ for (int k= spacesBetweenGroups; k > 0; k--) {
+ stringsToInsert.add(lineDelim);
+ }
+// SH}
}
}
lastPackage= pack;

Back to the top