replaced a lot of deprecated code; if someone runs into a commit conflict afterwards...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / JavaSelectMarkerRulerAction.java
index c01b0de..ec3ed89 100644 (file)
@@ -1,10 +1,10 @@
 /*******************************************************************************
  * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials 
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -26,7 +26,7 @@ import org.eclipse.jface.text.source.Annotation;
 import org.eclipse.jface.text.source.IVerticalRulerInfo;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.help.WorkbenchHelp;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel;
 import org.eclipse.ui.texteditor.ITextEditor;
 import org.eclipse.ui.texteditor.ITextEditorExtension;
@@ -44,9 +44,9 @@ public class JavaSelectMarkerRulerAction extends SelectMarkerRulerAction {
        public JavaSelectMarkerRulerAction(ResourceBundle bundle, String prefix, ITextEditor editor, IVerticalRulerInfo ruler) {
                super(bundle, prefix, editor, ruler);
                fTextEditor= editor;
-               WorkbenchHelp.setHelp(this, IJavaHelpContextIds.JAVA_SELECT_MARKER_RULER_ACTION);
+               PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.JAVA_SELECT_MARKER_RULER_ACTION);
        }
-       
+
        public void run() {
 //             if (PHPeclipsePlugin.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_ANNOTATION_ROLL_OVER))
 //                     return;
@@ -63,7 +63,7 @@ public class JavaSelectMarkerRulerAction extends SelectMarkerRulerAction {
                }
                super.run();
        }
-       
+
        public void update() {
                // Begin Fix for http://dev.eclipse.org/bugs/show_bug.cgi?id=20114
                if (!(fTextEditor instanceof ITextEditorExtension) || ((ITextEditorExtension) fTextEditor).isEditorInputReadOnly()) {
@@ -78,7 +78,7 @@ public class JavaSelectMarkerRulerAction extends SelectMarkerRulerAction {
                else
                        super.update();
        }
-       
+
        private Position getJavaAnnotationPosition() {
                AbstractMarkerAnnotationModel model= getAnnotationModel();
                IDocument document= getDocument();
@@ -88,10 +88,10 @@ public class JavaSelectMarkerRulerAction extends SelectMarkerRulerAction {
                if (cu == null) {
                        return null;
                }
-               
+
 //             boolean hasAssistLightbulb= PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.APPEARANCE_QUICKASSIST_LIGHTBULB);
                Annotation assistAnnotation= null;
-                       
+
                Iterator iter= model.getAnnotationIterator();
                while (iter.hasNext()) {
                        Annotation annotation= (Annotation) iter.next();
@@ -102,10 +102,10 @@ public class JavaSelectMarkerRulerAction extends SelectMarkerRulerAction {
 //                                     if (includesRulerLine(position, document) && JavaCorrectionProcessor.hasCorrections(javaAnnotation))
 //                                             return position;
                                }
-                       } 
+                       }
 //                     else if (hasAssistLightbulb && annotation instanceof AssistAnnotation) {
 //                             // there is only one AssistAnnotation at a time
-//                             assistAnnotation= annotation; 
+//                             assistAnnotation= annotation;
 //                     }
                }
                if (assistAnnotation != null) {
@@ -117,7 +117,7 @@ public class JavaSelectMarkerRulerAction extends SelectMarkerRulerAction {
                }
                return null;
        }
-       
+
        private ICompilationUnit getCompilationUnit() {
                IEditorInput input= fTextEditor.getEditorInput();
                if (input instanceof IFileEditorInput) {