/** * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc * --> */ public String getText(Object object) { String md = CommonEditResourceHandler.getString("MessageDestination_UI_"); //$NON-NLS-1$ String label = ((MessageDestination) object).getName(); return label == null || label.length() == 0 ? md : md + " " + label; //$NON-NLS-1$ }
/** * @param ref * @return */ private boolean isExistMessageDestinationLink(String link, ModuleRef moduleRef) { if (link == null) return false; int index = link.indexOf('#'); String destinationName; if (index == -1) { destinationName = link; } else { String moduleName = link.substring(0,index); destinationName = link.substring(index+1); moduleRef = getModuleRefByName(moduleName); if (moduleRef == null) return false; } List destinations = getMessageDestinations(moduleRef); for (int i = 0; i < destinations.size(); i++) { MessageDestination messageDestination = (MessageDestination) (destinations.get(i)); if (destinationName.equals(messageDestination.getName())) return true; } return false; }