Goto line/Goto Matching Bracket Shortcuts should work
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / actions / AddBlockCommentAction.java
index 2da463d..28fc336 100644 (file)
@@ -53,8 +53,9 @@ public class AddBlockCommentAction extends BlockCommentAction {
                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) {
@@ -82,7 +83,8 @@ public class AddBlockCommentAction extends BlockCommentAction {
                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)) {
@@ -162,7 +164,8 @@ public class AddBlockCommentAction extends BlockCommentAction {
 
                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)) {