Esempio n. 1
0
 private String getDisplayString(IBinding binding) {
   switch (binding.getKind()) {
     case IBinding.TYPE:
       return FixMessages.INSTANCE.UnusedCodeFix_RemoveUnusedType_description();
     case IBinding.METHOD:
       if (((IMethodBinding) binding).isConstructor()) {
         return FixMessages.INSTANCE.UnusedCodeFix_RemoveUnusedConstructor_description();
       } else {
         return FixMessages.INSTANCE.UnusedCodeFix_RemoveUnusedPrivateMethod_description();
       }
     case IBinding.VARIABLE:
       if (((IVariableBinding) binding).isField()) {
         return FixMessages.INSTANCE.UnusedCodeFix_RemoveUnusedField_description();
       } else {
         return FixMessages.INSTANCE.UnusedCodeFix_RemoveUnusedVariabl_description();
       }
     default:
       return ""; //$NON-NLS-1$
   }
 }