1 11 12 package org.eclipse.jdt.internal.ui.viewsupport; 13 14 import org.eclipse.jdt.core.IJavaElement; 15 import org.eclipse.jdt.core.dom.IBinding; 16 17 import org.eclipse.jdt.internal.corext.dom.Bindings; 18 19 import org.eclipse.jdt.ui.JavaElementLabels; 20 21 import org.eclipse.jdt.internal.ui.JavaPlugin; 22 23 public class BindingLabels { 24 25 26 public static String getFullyQualified(IBinding binding) { 27 IJavaElement javaElement; 28 try { 29 javaElement= binding.getJavaElement(); 30 } catch (IllegalArgumentException e) { 31 JavaPlugin.log(e); 33 javaElement= null; 34 } 35 if (javaElement != null) 36 return JavaElementLabels.getElementLabel(javaElement, JavaElementLabels.ALL_FULLY_QUALIFIED | JavaElementLabels.ALL_DEFAULT); 37 else 38 return Bindings.asString(binding); } 40 41 } 42 | Popular Tags |