From 3f46ccb3f2fa4af034e7e65d5a1e0414d3e1d229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Spo=CC=88nemann?= Date: Mon, 13 Jun 2016 16:46:25 +0200 Subject: [PATCH] [splitting] Use '/bin/' etc. as search strings instead of 'bin' when adding removal paths --- .../src/org/eclipse/xtext/splitting/GenerateRemovals.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/splitting/src/org/eclipse/xtext/splitting/GenerateRemovals.java b/splitting/src/org/eclipse/xtext/splitting/GenerateRemovals.java index f863cdf46..ad3dc7602 100644 --- a/splitting/src/org/eclipse/xtext/splitting/GenerateRemovals.java +++ b/splitting/src/org/eclipse/xtext/splitting/GenerateRemovals.java @@ -67,13 +67,13 @@ public class GenerateRemovals { while ((line = reader.readLine()) != null) { String file = line.replaceAll("\"|\\\\.", ""); for (String genDir : REMOVE_DIRS) { - int genDirIndex = file.indexOf(genDir); - if (genDirIndex > 0) { + int genDirIndex = file.indexOf("/" + genDir + "/"); + if (genDirIndex >= 0) { for (String targetRepo : ValidateSplitting.REPOSITORIES) { Set repoRemovals = removalPaths.get(targetRepo); Matcher matcher = segmentPattern.matcher(file); boolean foundRemoval = false; - int genDirEndIndex = genDirIndex + genDir.length(); + int genDirEndIndex = genDirIndex + genDir.length() + 1; while (!foundRemoval && matcher.find() && matcher.start() <= genDirEndIndex) { if (repoRemovals.contains(file.substring(0, matcher.start()))) foundRemoval = true;