spring-projects / sts4

The next generation of tooling for Spring Boot, including support for Cloud Foundry manifest files, Concourse CI pipeline definitions, BOSH deployment manifests, and more... - Available for Eclipse, Visual Studio Code, and Theia
https://spring.io/tools
Eclipse Public License 1.0
876 stars 206 forks source link

Possible Bug: "Boot Dashboard" view opens the "dialog window configurations" as Debug mode #1081

Open manueljordan opened 1 year ago

manueljordan commented 1 year ago

For:

Spring Tool Suite 4 

Version: 4.17.2.RELEASE
Build Id: 202301310704
Revision: 4c43862ec9482cb5c289960e5514998e59d2f1fe

For any Spring Boot project, if is executed the app through:

The app runs as expected. And if is need it to do some editions, is enough do

The dialog window opened has the title with the name: Run Configurations

If is used the Boot Dashboard view, and is selected the same Spring Boot project, and through the top menu is done click in the pencil icon it opens the same dialog window but it has the title with the name: Debug Configurations.

Observe here that now is Debug Configurations and not Run Configurations. Is it expected?

Of course, if is used

Then is possible open the same dialog window but according if is selected either Run Configurations... or Debug Configurations...

martinlippert commented 1 year ago

I observe the same behavior, but I am wondering whether it makes a difference or not. The launch configurations that appear in the launch dialog are all the same, including the same editing options, etc. So would you prefer a title called Run Configurations instead of Debug Configurations and if so, why?

We could, of course, have two pencil-like icons in the dashboard to either open the Run Configurations dialog or the Debug Configurations dialog, but what would be the difference?

The idea behind the pencil icon is really only to configure and modify the launch configurations, if needed. It is not meant to be the place to actually launch the app in run or debug mode. For that purpose, you don't even need to open the launch config dialog, but you can use the run/debug buttons in the dashboard directly - which we assume is the standard case.

WDYT?

manueljordan commented 1 year ago

Sorry for the delay

but I am wondering whether it makes a difference or not

The point is run the app, right? so why confuse the developer with the "debug" term?

The launch configurations that appear in the launch dialog are all the same, including the same editing options, etc

I understand. But the purpose to use the Boot Dashboard view, it about execution, is mostly in mode run. Am I correct? Furthermore, take in consideration that the perspective is keep it in run mode and non-debug mode

So would you prefer a title called Run Configurations instead of Debug Configurations and if so, why?

At a first glance yes. But if the perspective is changed to debug mode, therefore the title should be Debug Configurations. Here has more sense to define the title of the dialog window according with the perspective, java or debug. WDYT

We could, of course, have two pencil-like icons in the dashboard to either open the Run Configurations dialog or the Debug Configurations dialog, but what would be the difference?

It would be more confuse for the developer - I think the perspective applied should define the correct title

The idea behind the pencil icon is really only to configure and modify the launch configurations, if needed

Agree

It is not meant to be the place to actually launch the app in run or debug mode

Agree

For that purpose, you don't even need to open the launch config dialog, but you can use the run/debug buttons in the dashboard directly - which we assume is the standard case

Agree

Even if you are not agree with the idea to define the title according with the perspective - the current Boot Dashboard view practically always execute the app as run mode.

Note I did not test it, but if the debug perspective is currently activated: Does the Boot Dashboard appear as a default view to be selected? Such as the Console view when the java perspective is currently activated

martinlippert commented 1 year ago

Do you mean to open the run or the debug version of the launch config dialog depending on the perspective that is active when pressing that button?

in the Boot Dashboard - as well as the default toolbar of Eclipse - there are two different buttons to either run an application in run mode or in debug mode, independent of the perspective that is active at the moment.

The inconsistency that I see is that there is only one button to edit the launch configuration (which opens the debug variant of the dialog). To have consistency, we could add another button to open the launch config in run mode, but I am not sure whether that adds real value, since you always edit the same launch configurations.

Another option would be to have either run/run launch config buttons or debug/debug launch config buttons, depending on the perspective. But having the same view (the Boot Dashboard) with different icons depending on the active perspective is also something that doesn't fit well with other Eclipse UI behavior.

Not sure why the best answer to your suggestion here is, but I don't see the one best way to do things here.

manueljordan commented 1 year ago

Sorry by the delay

Do you mean to open the run or the debug version of the launch config dialog depending on the perspective that is active when pressing that button?

At a first glance, it seems it is the "correct/obvious" approach

in the Boot Dashboard - as well as the default toolbar of Eclipse - there are two different buttons to either run an application in run mode or in debug mode, independent of the perspective that is active at the moment.

But what should be the default one? I think the run mode

The inconsistency that I see is that there is only one button to edit the launch configuration (which opens the debug variant of the dialog). To have consistency, we could add another button to open the launch config in run mode, but I am not sure whether that adds real value, since you always edit the same launch configurations.

I understand the situation, but seems here is used/took as default the debug mode ... it seems it is the origin the confusion from the beginning.

Another option would be to have either run/run launch config buttons or debug/debug launch config buttons, depending on the perspective

Sorry I don't understand this point, could you share a kind a draft? perhaps on paper with pencil? a drawing

But having the same view (the Boot Dashboard) with different icons depending on the active perspective is also something that doesn't fit well with other Eclipse UI behavior.

For this scenario, seems the solution is offer the two buttons, run and debug, so when one of them is clicked the dialog window should have the correct title.

Not sure why the best answer to your suggestion here is, but I don't see the one best way to do things here.

Open to share and polish more ideas ...

martinlippert commented 4 days ago

Looking at this again, I don't see us making any changes here. I totally see the point of the pencil icon (to edit the launch config) is also allowing the user to not only edit the launch config, but also to launch the app - and that the implementation of this made the choice to pick "debug" as the way to launch the app instead of "run". But I don't see us spending the time to change this in the foreseeable future, especially given the situation that there is no "obvious" solution here. Sorry.

manueljordan commented 4 days ago

You are the expert in this IDE. If you want proceed to close this issue.