int selectionOffset= selection.getOffset();
int selectionEndOffset= selectionOffset + selection.getLength();
List edits= new LinkedList();
- ITypedRegion partition= docExtension.getPartition(IPHPPartitions.PHP_PARTITIONING, selectionOffset, false);
-
+ //ITypedRegion partition= docExtension.getPartition(IPHPPartitions.PHP_PARTITIONING, selectionOffset, false);
+ ITypedRegion partition= docExtension.getPartition(IDocumentExtension3.DEFAULT_PARTITIONING, selectionOffset, false);
+
handleFirstPartition(partition, edits, factory, selectionOffset);
while (partition.getOffset() + partition.getLength() < selectionEndOffset) {
Assert.isTrue(partOffset <= offset, "illegal partition"); //$NON-NLS-1$
// first partition: mark start of comment
- if (partType == IDocument.DEFAULT_CONTENT_TYPE) {
+// if (partType == IDocument.DEFAULT_CONTENT_TYPE)
+ if (partType == IPHPPartitions.PHP_PARTITIONING) {
// Java code: right where selection starts
edits.add(factory.createEdit(offset, 0, getCommentStart()));
} else if (isSpecialPartition(partType)) {
String partType= partition.getType();
- if (partType == IDocument.DEFAULT_CONTENT_TYPE) {
+// if (partType == IDocument.DEFAULT_CONTENT_TYPE) {
+ if (partType == IPHPPartitions.PHP_PARTITIONING) {
// normal java: end comment where selection ends
edits.add(factory.createEdit(endOffset, 0, getCommentEnd()));
} else if (isSpecialPartition(partType)) {