1) Moved net.sourceforge.phpeclipse.ui\src\net\sourceforge\phpdt back to net.sourcefo...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / JavaSelectMarkerRulerAction2.java
index 78e6932..0e9b0bc 100644 (file)
@@ -26,49 +26,56 @@ import org.eclipse.ui.texteditor.ITextEditorActionConstants;
 import org.eclipse.ui.texteditor.IUpdate;
 import org.eclipse.ui.texteditor.SelectAnnotationRulerAction;
 
-//import net.sourceforge.phpdt.internal.ui.IJavaHelpContextIds;
-//import net.sourceforge.phpdt.internal.ui.text.correction.JavaCorrectionProcessor;
-//import net.sourceforge.phpdt.internal.ui.text.correction.QuickAssistLightBulbUpdater.AssistAnnotation;
-//import net.sourceforge.phpdt.internal.ui.text.java.hover.JavaExpandHover;
+// import net.sourceforge.phpdt.internal.ui.IJavaHelpContextIds;
+// import
+// net.sourceforge.phpdt.internal.ui.text.correction.JavaCorrectionProcessor;
+// import
+// net.sourceforge.phpdt.internal.ui.text.correction.QuickAssistLightBulbUpdater.AssistAnnotation;
+// import net.sourceforge.phpdt.internal.ui.text.java.hover.JavaExpandHover;
 
 /**
- * A special select marker ruler action which activates quick fix if clicked on a quick fixable problem.
+ * A special select marker ruler action which activates quick fix if clicked on
+ * a quick fixable problem.
  */
 public class JavaSelectMarkerRulerAction2 extends SelectAnnotationRulerAction {
 
-       public JavaSelectMarkerRulerAction2(ResourceBundle bundle, String prefix, ITextEditor editor) {
+       public JavaSelectMarkerRulerAction2(ResourceBundle bundle, String prefix,
+                       ITextEditor editor) {
                super(bundle, prefix, editor);
-               PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.JAVA_SELECT_MARKER_RULER_ACTION);
+               PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
+                               IJavaHelpContextIds.JAVA_SELECT_MARKER_RULER_ACTION);
        }
 
        /*
         * @see org.eclipse.ui.texteditor.IVerticalRulerListener#annotationDefaultSelected(org.eclipse.ui.texteditor.VerticalRulerEvent)
         */
        public void annotationDefaultSelected(VerticalRulerEvent event) {
-               Annotation annotation= event.getSelectedAnnotation();
-               IAnnotationModel model= getAnnotationModel();
+               Annotation annotation = event.getSelectedAnnotation();
+               IAnnotationModel model = getAnnotationModel();
 
-//             if (isOverrideIndicator(annotation)) {
-//                     ((OverrideIndicatorManager.OverrideIndicator)annotation).open();
-//                     return;
-//             }
+               // if (isOverrideIndicator(annotation)) {
+               // ((OverrideIndicatorManager.OverrideIndicator)annotation).open();
+               // return;
+               // }
 
                if (isBreakpoint(annotation))
                        triggerAction(ITextEditorActionConstants.RULER_DOUBLE_CLICK);
 
-               Position position= model.getPosition(annotation);
+               Position position = model.getPosition(annotation);
                if (position == null)
                        return;
 
-//             if (isQuickFixTarget(annotation)) {
-//                     ITextOperationTarget operation= (ITextOperationTarget) getTextEditor().getAdapter(ITextOperationTarget.class);
-//                     final int opCode= PHPUnitEditor.CORRECTIONASSIST_PROPOSALS;
-//                     if (operation != null && operation.canDoOperation(opCode)) {
-//                             getTextEditor().selectAndReveal(position.getOffset(), position.getLength());
-//                             operation.doOperation(opCode);
-//                             return;
-//                     }
-//             }
+               // if (isQuickFixTarget(annotation)) {
+               // ITextOperationTarget operation= (ITextOperationTarget)
+               // getTextEditor().getAdapter(ITextOperationTarget.class);
+               // final int opCode= PHPUnitEditor.CORRECTIONASSIST_PROPOSALS;
+               // if (operation != null && operation.canDoOperation(opCode)) {
+               // getTextEditor().selectAndReveal(position.getOffset(),
+               // position.getLength());
+               // operation.doOperation(opCode);
+               // return;
+               // }
+               // }
 
                // default:
                super.annotationDefaultSelected(event);
@@ -76,13 +83,15 @@ public class JavaSelectMarkerRulerAction2 extends SelectAnnotationRulerAction {
 
        /**
         * Tells whether the given annotation is an override annotation.
-        *
-        * @param annotation the annotation
+        * 
+        * @param annotation
+        *            the annotation
         * @return <code>true</code> iff the annotation is an override annotation
         */
-       private boolean isOverrideIndicator(Annotation annotation) {
-               return false; //annotation instanceof OverrideIndicatorManager.OverrideIndicator;
-       }
+//     private boolean isOverrideIndicator(Annotation annotation) {
+//             return false; // annotation instanceof
+//                                             // OverrideIndicatorManager.OverrideIndicator;
+//     }
 
        /**
         * @param annotation
@@ -90,22 +99,25 @@ public class JavaSelectMarkerRulerAction2 extends SelectAnnotationRulerAction {
         */
        private boolean isBreakpoint(Annotation annotation) {
                return annotation.getType().equals("org.eclipse.debug.core.breakpoint");
-               //|| annotation.getType().equals(JavaExpandHover.NO_BREAKPOINT_ANNOTATION); //$NON-NLS-1$
+               // ||
+               // annotation.getType().equals(JavaExpandHover.NO_BREAKPOINT_ANNOTATION);
+               // //$NON-NLS-1$
 
        }
 
-       private boolean isQuickFixTarget(Annotation a) {
-               return false; //JavaCorrectionProcessor.hasCorrections(a) || a instanceof AssistAnnotation;
-       }
+//     private boolean isQuickFixTarget(Annotation a) {
+//             return false; // JavaCorrectionProcessor.hasCorrections(a) || a
+//                                             // instanceof AssistAnnotation;
+//     }
 
        private void triggerAction(String actionID) {
-               IAction action= getTextEditor().getAction(actionID);
+               IAction action = getTextEditor().getAction(actionID);
                if (action != null) {
                        if (action instanceof IUpdate)
                                ((IUpdate) action).update();
                        // hack to propagate line change
                        if (action instanceof ISelectionListener) {
-                               ((ISelectionListener)action).selectionChanged(null, null);
+                               ((ISelectionListener) action).selectionChanged(null, null);
                        }
                        if (action.isEnabled())
                                action.run();