make sure that the VariableHover for the debugPlugin is the first to show
authorcperkonig <cperkonig>
Sun, 28 Mar 2004 08:30:30 +0000 (08:30 +0000)
committercperkonig <cperkonig>
Sun, 28 Mar 2004 08:30:30 +0000 (08:30 +0000)
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/java/hover/JavaEditorTextHoverDescriptor.java
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java

index 7f8148f..410463d 100644 (file)
@@ -309,4 +309,14 @@ public class JavaEditorTextHoverDescriptor implements Comparable {
        public boolean isEnabled() {
                return fIsEnabled;
        }
+       
+       /**
+        * Returns this hover descriptors configuration element.
+        * 
+        * @return the configuration element
+        * @since 3.0 
+        */
+       public IConfigurationElement getConfigurationElement() {
+               return fElement;
+       }
 }
index 4511487..e748758 100644 (file)
@@ -54,6 +54,7 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdapterManager;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IPluginDescriptor;
+import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
@@ -79,6 +80,7 @@ import org.eclipse.ui.ide.IDE;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.eclipse.ui.texteditor.IDocumentProvider;
 import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.ConfigurationElementSorter;
 /**
  * The main plugin class to be used in the desktop.
  */
@@ -162,8 +164,13 @@ public class PHPeclipsePlugin extends AbstractUIPlugin
    */
   public JavaEditorTextHoverDescriptor[] getJavaEditorTextHoverDescriptors() {
     if (fJavaEditorTextHoverDescriptors == null)
-      fJavaEditorTextHoverDescriptors = JavaEditorTextHoverDescriptor
-          .getContributedHovers();
+      fJavaEditorTextHoverDescriptors = JavaEditorTextHoverDescriptor.getContributedHovers();
+                       ConfigurationElementSorter sorter= new ConfigurationElementSorter() {
+                         public IConfigurationElement getConfigurationElement(Object object) {
+                           return ((JavaEditorTextHoverDescriptor)object).getConfigurationElement();
+                         }
+                       };
+                       sorter.sort(fJavaEditorTextHoverDescriptors);    
     return fJavaEditorTextHoverDescriptors;
   }
   /**