A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / actions / FoldingToggleRulerAction.java
index 21f8a1b..49502ea 100644 (file)
@@ -23,37 +23,42 @@ import org.eclipse.ui.texteditor.AbstractRulerActionDelegate;
 import org.eclipse.ui.texteditor.ITextEditor;
 import org.eclipse.ui.texteditor.TextOperationAction;
 
-
 /**
  * Groups the JDT folding actions.
- *  
+ * 
  * @since 3.0
  */
 public class FoldingToggleRulerAction extends AbstractRulerActionDelegate {
 
        private IAction fUIAction;
+
        private TextOperationAction fAction;
+
        private ITextEditor fTextEditor;
 
        /*
-        * @see org.eclipse.ui.texteditor.AbstractRulerActionDelegate#createAction(org.eclipse.ui.texteditor.ITextEditor, org.eclipse.jface.text.source.IVerticalRulerInfo)
+        * @see org.eclipse.ui.texteditor.AbstractRulerActionDelegate#createAction(org.eclipse.ui.texteditor.ITextEditor,
+        *      org.eclipse.jface.text.source.IVerticalRulerInfo)
         */
-       protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) {
-               fTextEditor= editor;
-               fAction= new TextOperationAction(ActionMessages.getResourceBundle(), "Projection.Toggle.", editor, ProjectionViewer.TOGGLE, true); //$NON-NLS-1$
+       protected IAction createAction(ITextEditor editor,
+                       IVerticalRulerInfo rulerInfo) {
+               fTextEditor = editor;
+               fAction = new TextOperationAction(ActionMessages.getResourceBundle(),
+                               "Projection.Toggle.", editor, ProjectionViewer.TOGGLE, true); //$NON-NLS-1$
                fAction.setActionDefinitionId(IFoldingCommandIds.FOLDING_TOGGLE);
 
                return fAction;
        }
-       
+
        /*
-        * @see org.eclipse.ui.texteditor.AbstractRulerActionDelegate#setActiveEditor(org.eclipse.jface.action.IAction, org.eclipse.ui.IEditorPart)
+        * @see org.eclipse.ui.texteditor.AbstractRulerActionDelegate#setActiveEditor(org.eclipse.jface.action.IAction,
+        *      org.eclipse.ui.IEditorPart)
         */
        public void setActiveEditor(IAction callerAction, IEditorPart targetEditor) {
-               fUIAction= callerAction;
+               fUIAction = callerAction;
                super.setActiveEditor(callerAction, targetEditor);
        }
-       
+
        /*
         * @see org.eclipse.ui.texteditor.AbstractRulerActionDelegate#menuAboutToShow(org.eclipse.jface.action.IMenuManager)
         */
@@ -61,12 +66,13 @@ public class FoldingToggleRulerAction extends AbstractRulerActionDelegate {
                update();
                super.menuAboutToShow(manager);
        }
-       
+
        private void update() {
                if (fTextEditor instanceof PHPEditor) {
-                       ISourceViewer viewer= ((PHPEditor) fTextEditor).getViewer();
+                       ISourceViewer viewer = ((PHPEditor) fTextEditor).getViewer();
                        if (viewer instanceof ProjectionViewer) {
-                               boolean enabled= ((ProjectionViewer) viewer).getProjectionAnnotationModel() != null;
+                               boolean enabled = ((ProjectionViewer) viewer)
+                                               .getProjectionAnnotationModel() != null;
                                fUIAction.setChecked(enabled);
                        }
                }