Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/LineComparator.java')
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/LineComparator.java53
1 files changed, 0 insertions, 53 deletions
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/LineComparator.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/LineComparator.java
deleted file mode 100644
index 9647b1a854e..00000000000
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.text/src/org/eclipse/papyrus/uml/alf/text/representation/compare/LineComparator.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jeremie Tatibouet (CEA LIST)
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.alf.text.representation.compare;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.compare.rangedifferencer.IRangeComparator;
-
-public class LineComparator implements IRangeComparator {
-
- private List<String> lines;
-
- public LineComparator(final String content) {
- this.lines = new ArrayList<String>();
- for (String line : content.split("\n")) {
- lines.add(line);
- }
- }
-
- public String getLine(int index) {
- return this.lines.get(index);
- }
-
- @Override
- public int getRangeCount() {
- return this.lines.size();
- }
-
- @Override
- public boolean rangesEqual(int thisIndex, IRangeComparator other, int otherIndex) {
- String l1 = this.lines.get(thisIndex);
- String l2 = ((LineComparator) other).lines.get(otherIndex);
- return l1.equals(l2);
- }
-
- @Override
- public boolean skipRangeComparison(int length, int maxLength, IRangeComparator other) {
- return false;
- }
-
-}

Back to the top