@Override protected String compute() { AppNameAnnotationModel annotationModel = appNameAnnotationModel.getValue(); attachListener(annotationModel); if (annotationModel != null) { AppNameAnnotation a = annotationModel.getSelectedAppAnnotation(); if (a != null) { return a.getText(); } } return null; }
@Override protected List<String> compute() { AppNameAnnotationModel annotationModel = appNameAnnotationModel.getValue(); attachListener(annotationModel); if (annotationModel != null) { List<String> applicationNames = new ArrayList<>(); for (Iterator<Annotation> itr = annotationModel.getAnnotationIterator(); itr.hasNext(); ) { Annotation next = itr.next(); if (next instanceof AppNameAnnotation) { AppNameAnnotation a = (AppNameAnnotation) next; applicationNames.add(a.getText()); } } return applicationNames; } return Collections.emptyList(); }