Skip to content

Commit e00fe5a

Browse files
committed
[#1417] Plug-in editor: Runtime tab should show selected package
The simplest solution would be to use the section description
1 parent 03ff9fb commit e00fe5a

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExportPackageVisibilitySection.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
import static org.eclipse.swt.events.SelectionListener.widgetSelectedAdapter;
2020

2121
import java.util.ArrayList;
22+
import java.util.Arrays;
2223
import java.util.List;
24+
import java.util.Objects;
25+
import java.util.Optional;
26+
import java.util.stream.Collectors;
2327

2428
import org.eclipse.jface.action.Action;
2529
import 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() {

0 commit comments

Comments
 (0)