Skip to content

Conversation

nburnwal09
Copy link

@nburnwal09 nburnwal09 commented Aug 7, 2025

Added a button to show launch bundles: #1850
It has filter option and shows number of bundles selected(attached screenshot)

Screenshot 2025-08-08 at 2 37 23 PM Screenshot 2025-08-08 at 2 37 49 PM

Copy link

github-actions bot commented Aug 7, 2025

Test Results

   752 files   -  13     752 suites   - 13   52m 3s ⏱️ - 1m 57s
 3 611 tests ±  0   3 552 ✅  -   1   54 💤 ±0   4 ❌ +1  1 🔥 ±0 
10 639 runs   - 194  10 470 ✅  - 188  157 💤  - 6  10 ❌ +1  2 🔥  - 1 

For more details on these failures and errors, see this check.

Results for commit 0f5e757. ± Comparison against base commit 9213517.

♻️ This comment has been updated with latest results.

@nburnwal09
Copy link
Author

@laeubi kindly review this PR

PluginsTabToolBar_validate=&Validate {0}
PluginsTabToolBar_validate_plugins=&Validate Plug-ins
PluginsTabToolBar_validate_bundles=&Validate Bundles
PluginsTabToolBar_show_launch_bundles=&Show launch bundles
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your screen shot is however showing "Show plug-ins", how is that possible? was this modified later?

Copy link
Author

@nburnwal09 nburnwal09 Aug 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh yes I renamed it later. Thanks for pointing that out
I will update the screenshot now

@laeubi laeubi requested a review from HannesWell August 8, 2025 09:05
Copy link
Member

@HannesWell HannesWell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this proposal.

I have a few remarks below, but there are two more points:

  1. The button should also be available for Eclipse-apps based on features (at least personally I'm hardly using bundle-based apps). This can be done easily by repeating the same code of the AbstractPluginBlock in the FeatureBlock, around here:
    fAutoValidate.addSelectionListener(fListener);
    Composite rightAlignComp = SWTFactory.createComposite(validatecomp, 1, 1, SWT.NONE, 0, 0);
    rightAlignComp.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, true));

    Ideally features would then also be listed (in addition to bundles), but I assume the currently used dialog is not capable of that.
  2. While using the PluginSelectionDialog is certainly a quick solution, I'm not sure if it's really suitable. At least the title of the dialog should be changed to something more meaningful in this use-case.
    What I'm currently missing is the ability to copy the list of plugins (ideally just the selected sub-set) and being able to past it e.g. into a text- or diff-editor. This way I often try to figure what has changed in the full application. But that's not working at the moment.
    For #1850 I initially thought about a separate tab or something like that.
    Maybe we could instead also re-use the selection tree in the center and just have a check-box on the right to list all included (features and) bundles. Of course selecting them should then not be possible.
grafik But yes that would probably be more work and I'm not sure if that's overall much better in the end. It's currently just an idea.

private Label fCounter;

private Button fValidateButton;
private Button fShowPlugin;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the button is used in only one method, this field is not necessary and the button can just be a local variable.

Suggested change
private Button fShowPlugin;

Comment on lines 455 to 460
fShowPlugin.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent evt) {
handleShowPluginsPressed();
}
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fShowPlugin.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent evt) {
handleShowPluginsPressed();
}
});
fShowPlugin.addSelectionListener(
SelectionListener.widgetSelectedAdapter(e -> handleShowPluginsPressed(fLaunchConfig)));

}

// Dialog to Show the launch bundles
protected void handleShowPluginsPressed() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method should be static and have the launch config as parameter so that it can be called from the FeatureBlock too.

Suggested change
protected void handleShowPluginsPressed() {
static void handleShowPluginsPressed(ILaunchConfiguration launchConfig) {

models.toArray(new IPluginModelBase[0]), true) {
@Override
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The close label is more suitable here.

Suggested change
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CLOSE_LABEL, false);

try {
models = BundleLauncherHelper.getMergedBundleMap(fLaunchConfig, false).keySet();
PluginSelectionDialog dialog = new PluginSelectionDialog(PDEPlugin.getActiveWorkbenchShell(),
models.toArray(new IPluginModelBase[0]), true) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
models.toArray(new IPluginModelBase[0]), true) {
models.toArray(IPluginModelBase[]::new), true) {

Comment on lines 490 to 487
@Override
protected void handleDoubleClick() {
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment would clarify the situation here:

Suggested change
@Override
protected void handleDoubleClick() {
}
@Override
protected void handleDoubleClick() {
// disable super-class behavior
}

@nburnwal09
Copy link
Author

For #1850 I initially thought about a separate tab or something like that.

thanks @HannesWell . I have these questions:

  1. What would be an added benefit of having a separate tab as opposed to the current checkbox? is it to accommodate more scenarios than just the bundles view, or to improve the user experience, or something else?

In case we add a new separate tab:

  1. are you suggesting to have a single view (in the new tab) for both features and plugins? and the tab embedding the tree view / list view in itself, as opposed to a popup dialog? and in the tree / list view, selection of one ore more features in the left shows the associated plugins? (with a default of all features and all plugins in the launch configuration displayed)
  2. Can you please clarify on what you mean by re using the selection tree in the centre? if we want a feature-to-plugin mapping to be displayed, shouldn't the features be in the left, as opposed to be in the center?
  3. What would happen about the unbounded plug-ins which doesn't correspond to any features? should we list them as is
  4. > Maybe we could instead also re-use the selection tree in the center and just have a check-box on the right to list all included (features and) bundles. Of course selecting them should then not be possible. - can you pls clarify why selecting them should not be possible?

@nburnwal09
Copy link
Author

nburnwal09 commented Aug 13, 2025

@HannesWell

  1. The button should also be available for Eclipse-apps based on features (at least personally I'm hardly using bundle-based apps). This can be done easily by repeating the same code of the AbstractPluginBlock in the FeatureBlock, around here:

I added the same for Eclipse-apps based on features. Also, with current changes, if we select one/more features and click on 'show launch bundles', it is showing the list of plug-ins(direct and transitive dependent plug-ins both) respective to the features selected.
image

  1. While using the PluginSelectionDialog is certainly a quick solution, I'm not sure if it's really suitable. At least the title of the dialog should be changed to something more meaningful in this use-case.

Yeah I missed that. I have changed the title to 'Launch Plug-ins list'

What I'm currently missing is the ability to copy the list of plugins (ideally just the selected sub-set) and being able to past it e.g. into a text- or diff-editor. This way I often try to figure what has changed in the full application. But that's not working at the moment.

Yeah I have that in my mind(based on our conversation in #1850 (comment)). I will be taking the copy/paste option in another PR.

@laeubi
Copy link
Contributor

laeubi commented Aug 21, 2025

Ideally features would then also be listed (in addition to bundles), but I assume the currently used dialog is not capable of that.

Features are exploded and do not remain in the final runtime, so I would say this is not really useful here. One might want to show what a feature pulls in but then we need a tree to represent the data and it would possibly complicate things a lot.

So I would vote for starting simple and improve on that iteratively.

@nburnwal09
Copy link
Author

@laeubi

Features are exploded and do not remain in the final runtime, so I would say this is not really useful here. One might want to show what a feature pulls in but then we need a tree to represent the data and it would possibly complicate things a lot.

With my changes, we will still be able to see what a feature pulls in(the direct and indirect dependent plug-in).

I added the same for Eclipse-apps based on features. Also, with current changes, if we select one/more features and click on 'show launch bundles', it is showing the list of plug-ins(direct and transitive dependent plug-ins both) respective to the features selected.

@laeubi
Copy link
Contributor

laeubi commented Aug 21, 2025

While this can be interesting I don't think the selection should matter and would expect to always see the final result of what will happen when I click Run

@nburnwal09
Copy link
Author

Hi @HannesWell
Please have a look at this PR whenever you get sometime.

@nburnwal09
Copy link
Author

Hi @HannesWell
Kindly have a look at this PR.

@gireeshpunathil
Copy link
Contributor

@HannesWell - do you still have outstanding suggestions on this?

@HannesWell
Copy link
Member

@HannesWell - do you still have outstanding suggestions on this?

Sorry for the delay. I'll look into the new state tomorrow.

@HannesWell
Copy link
Member

For #1850 I initially thought about a separate tab or something like that.
1. What would be an added benefit of having a separate tab as opposed to the current checkbox? is it to accommodate more scenarios than just the bundles view, or to improve the user experience, or something else?

Good question. I cannot answer this clearly, but I would say that it would allow to support more scenarios or 'tools' (later).
This could also be a general UI/UX questions: Why are things located in tabs and not just a wizard or preferences like page that opens when you click a button. I would say it 'feels' better from what I'm used to, but I'd need to ask an UX expert for a more clear and scientific answer.

But to come back to the current proposal and as my counter-suggestion from #1922 (review), is indeed much more complex, what about re-using the approach used for the Show Command Line button?
This button just uses a not editable, but selectable text block/field to show the resolved command line:

If we use that to show the list of resolved bundles in CSV style (if we want to have more then the name) and also add a search field to for the text, then we would have, what would be provided with your proposal plus the ability to copy (parts) of the list.
Plus you could easily add start-level infos or the file-system path to the jar using a CSV style.

To feed the content of that text field you could actually use what's generated into the <configuration-path>/org.eclipse.equinox.simpleconfigurator/bundles.info nowadays (if the app contains P2). Otherwise you could use the value of the osgi.bundles field in the <configuration-path>/config.ini. Or you just use the current approach and add the suggested additional information from it (this would avoid the need to check two possible files, with different format.

Overall I think it should still be not too complicated to achieve and should provide more information than today.

What do you think?

@nburnwal09
Copy link
Author

But to come back to the current proposal and as my counter-suggestion from #1922 (review), is indeed much more complex, what about re-using the approach used for the Show Command Line button? This button just uses a not editable, but selectable text block/field to show the resolved command line:

If we use that to show the list of resolved bundles in CSV style (if we want to have more then the name) and also add a search field to for the text, then we would have, what would be provided with your proposal plus the ability to copy (parts) of the list. Plus you could easily add start-level infos or the file-system path to the jar using a CSV style.

To feed the content of that text field you could actually use what's generated into the <configuration-path>/org.eclipse.equinox.simpleconfigurator/bundles.info nowadays (if the app contains P2). Otherwise you could use the value of the osgi.bundles field in the <configuration-path>/config.ini. Or you just use the current approach and add the suggested additional information from it (this would avoid the need to check two possible files, with different format.

Overall I think it should still be not too complicated to achieve and should provide more information than today.

What do you think?

Sure Hannes, that sounds better given that we will have selected text block/field. I will check this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants