Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'rpm/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitioner.java')
-rw-r--r--rpm/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitioner.java45
1 files changed, 0 insertions, 45 deletions
diff --git a/rpm/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitioner.java b/rpm/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitioner.java
deleted file mode 100644
index 1e789c348e..0000000000
--- a/rpm/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitioner.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.eclipse.linuxtools.rpm.ui.editor;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jface.text.rules.FastPartitioner;
-import org.eclipse.jface.text.rules.IPartitionTokenScanner;
-
-public class SpecfilePartitioner extends FastPartitioner {
-
- public SpecfilePartitioner(IPartitionTokenScanner scanner, String[] legalContentTypes) {
- super(scanner, legalContentTypes);
- }
-
- public void connect(IDocument document, boolean delayInitialization) {
- super.connect(document, delayInitialization);
-// printPartitions(document);
- }
-
- public ITypedRegion[] computePartitioning(int offset, int length, boolean includeZeroLengthPartitions) {
- return super.computePartitioning(offset, length, includeZeroLengthPartitions);
- };
-
- public void printPartitions(IDocument document) {
- StringBuffer buffer = new StringBuffer();
- ITypedRegion[] partitions = computePartitioning(0, document.getLength());
- for (int i = 0; i < partitions.length; i++) {
- try {
- buffer.append("Partition type: "
- + partitions[i].getType()
- + ", offset: " + partitions[i].getOffset()
- + ", length: " + partitions[i].getLength());
- buffer.append("\n");
- buffer.append("Text:\n");
- buffer.append(document.get(partitions[i].getOffset(),
- partitions[i].getLength()));
- buffer.append("\n---------------------------------------\n\n\n");
- } catch (org.eclipse.jface.text.BadLocationException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- System.out.println(buffer);
- };
-
-}

Back to the top