diff options
Diffstat (limited to 'org.eclipse.jface.text/src/org/eclipse/jface/text/formatter/MultiPassContentFormatter.java')
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/text/formatter/MultiPassContentFormatter.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/formatter/MultiPassContentFormatter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/formatter/MultiPassContentFormatter.java index be8d549897c..7abacbb4a89 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/formatter/MultiPassContentFormatter.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/formatter/MultiPassContentFormatter.java @@ -20,6 +20,7 @@ import org.eclipse.core.runtime.Assert; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.DefaultPositionUpdater; import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IDocumentPartitioner; import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.ITypedRegion; import org.eclipse.jface.text.TextUtilities; @@ -103,7 +104,7 @@ public class MultiPassContentFormatter implements IContentFormatter, IContentFor /** The partitioning of this content formatter */ private final String fPartitioning; /** The slave formatting strategies */ - private final Map fSlaves= new HashMap(); + private final Map<String, IFormattingStrategy> fSlaves= new HashMap<>(); /** The default content type */ private final String fType; @@ -240,7 +241,7 @@ public class MultiPassContentFormatter implements IContentFormatter, IContentFor */ protected void formatSlaves(final IFormattingContext context, final IDocument document, final int offset, final int length) { - Map partitioners= new HashMap(0); + Map<String, IDocumentPartitioner> partitioners= new HashMap<>(0); try { final ITypedRegion[] partitions= TextUtilities.computePartitioning(document, fPartitioning, offset, length, false); |