initial implementation of VariableHover
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / PHPeclipsePlugin.java
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;
   }
   /**