newest quantum CVS sources
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / JavaSourceViewer.java
index 2c2f4f4..e3e75ac 100644 (file)
@@ -38,7 +38,7 @@ import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
 
 
 public class JavaSourceViewer extends ProjectionViewer implements IPropertyChangeListener {
-
+    
        /** 
         * Text operation code for requesting the outline for the current input.
         */
@@ -134,6 +134,12 @@ public class JavaSourceViewer extends ProjectionViewer implements IPropertyChang
                        case SHOW_HIERARCHY:
 //                             fHierarchyPresenter.showInformation();
                                return; 
+                   case FORMAT:
+                     Point point = getSelectedRange();
+                     if (point.y==0) {
+                       setSelectedRange(0, getDocument().getLength());
+                     }
+                     break;
                }
                
                super.doOperation(operation);