File tree Expand file tree Collapse file tree
ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919import static org .eclipse .swt .events .SelectionListener .widgetSelectedAdapter ;
2020
2121import java .util .ArrayList ;
22+ import java .util .Arrays ;
2223import java .util .List ;
24+ import java .util .Objects ;
25+ import java .util .Optional ;
26+ import java .util .stream .Collectors ;
2327
2428import org .eclipse .jface .action .Action ;
2529import org .eclipse .jface .action .IMenuManager ;
@@ -373,6 +377,15 @@ private void update(ExportPackageObject[] objects) {
373377 getTablePart ().setButtonEnabled (1 , fInternalButton .getSelection () && isEditable ());
374378 fFriendViewer .setInput (object );
375379 fBlockChanges = false ;
380+ getSection ().setDescription (Optional .ofNullable (objects ).map (this ::description )
381+ .orElse (PDEUIMessages .ExportPackageVisibilitySection_default ));
382+ }
383+
384+ private String description (ExportPackageObject [] packages ) {
385+ return Arrays .stream (packages )//
386+ .filter (Objects ::nonNull )//
387+ .map (ExportPackageObject ::getName )
388+ .collect (Collectors .joining (", " )); //$NON-NLS-1$
376389 }
377390
378391 private BundleInputContext getBundleContext () {
You can’t perform that action at this time.
0 commit comments