Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java')
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java26
1 files changed, 10 insertions, 16 deletions
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java
index 2bda1c4fca9..846f7a73423 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java
@@ -25,38 +25,32 @@ public class AutoconfPartitioner extends FastPartitioner {
// TODO Auto-generated constructor stub
super(scanner, legalContentTypes);
}
-
+
public void connect(IDocument document, int blah) {
super.connect(document);
}
-
+
// To optionally show partitions, we must do so by overriding the computePartitioning
// method. We cannot do it at connect time because the document may be zero length
// at the time and we will end up getting default partitioning from then on.
@Override
- public ITypedRegion[] computePartitioning(int offset, int length,
- boolean includeZeroLength) {
+ public ITypedRegion[] computePartitioning(int offset, int length, boolean includeZeroLength) {
ITypedRegion[] regions = super.computePartitioning(offset, length, includeZeroLength);
// Uncomment the following line to see partitioning.
-// printPartitions(regions);
+ // printPartitions(regions);
return regions;
}
-
- public void printPartitions(ITypedRegion[] partitions)
- {
- for (int i = 0; i < partitions.length; i++)
- {
- try
- {
+
+ public void printPartitions(ITypedRegion[] partitions) {
+ for (int i = 0; i < partitions.length; i++) {
+ try {
System.out.print("Partition type: " + partitions[i].getType() //$NON-NLS-1$
+ ", offset: " + partitions[i].getOffset() //$NON-NLS-1$
+ ", length: " + partitions[i].getLength() //$NON-NLS-1$
- +"\nText:\n" //$NON-NLS-1$
+ + "\nText:\n" //$NON-NLS-1$
+ super.fDocument.get(partitions[i].getOffset(), partitions[i].getLength())
+ "\n---------------------------\n\n\n"); //$NON-NLS-1$
- }
- catch (BadLocationException e)
- {
+ } catch (BadLocationException e) {
e.printStackTrace();
}
}

Back to the top