Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new "Upgrade" button to EE #1178

Open
laeubi opened this issue Mar 1, 2024 · 14 comments
Open

Add a new "Upgrade" button to EE #1178

laeubi opened this issue Mar 1, 2024 · 14 comments
Labels
good first issue Good for newcomers

Comments

@laeubi
Copy link
Contributor

laeubi commented Mar 1, 2024

Currently PDE only support adding and removing EEs:

grafik

but a more common thing is to upgrade to a new EE, currently this requires:

  1. remove the old EE
  2. add the new EE
  3. press the "Update Classpath settings"

There should be a new "Upgrade" button that allows to select the new EE, removes all old ones and updates the classpath in one go.

As part of this, this dialog should then be sorted by EE in descending order (highest EE first):
grafik

@laeubi laeubi added the good first issue Good for newcomers label Mar 1, 2024
@akurtakov
Copy link
Member

Even simpler from end user POV could be double click on the EE and be able to edit directly.

@laeubi
Copy link
Contributor Author

laeubi commented Mar 1, 2024

Yes but "discover" this might be problematic, so there should always be a "visible way" (aka button/link) to do this as well

@lathapatil
Copy link
Contributor

As part of this, this dialog should then be sorted by EE in descending order (highest EE first):

@laeubi Should the contents of the dialog be sorted as below ?

[JavaSE-21, JavaSE-20, JavaSE-19, JavaSE-18, JavaSE-17, JavaSE-16, JavaSE-15, JavaSE-14, JavaSE-13, JavaSE-12, JavaSE-11, JavaSE-10, JavaSE-9, JavaSE-1.8, JavaSE-1.7, JavaSE-1.6, J2SE-1.5, J2SE-1.4, J2SE-1.3-NO-SOUND, J2SE-1.3, OSGi/Minimum-1.2, J2SE-1.2, OSGi/Minimum-1.1, JRE-1.1, CDC-1.1/Foundation-1.1, OSGi/Minimum-1.0, CDC-1.0/Foundation-1.0]

@laeubi
Copy link
Contributor Author

laeubi commented Apr 14, 2024

@lathapatil yes that's correct, so "highest" java should be on top.

@lathapatil
Copy link
Contributor

@laeubi

There is a confusion in implementing this in the specified order (Highest Java to lowest). Which Approach is preferred ?

Problem : Even if we sort the list in the desired order and set the elements to dialog, the parent class (FilteredList) is sorting it back to its original form.

Approach 1:
Can I make changes in org.eclipse.ui.workbench where FilteredList and dialog's code is located to handle sorting based on the user's choice of comparator (In this case I might have to create 2 PRs for each repo)

Approach 2:
should I handle this within PDE itself by overriding the behavior from multiple classes of the UI workbench?

@laeubi
Copy link
Contributor Author

laeubi commented Apr 19, 2024

@lathapatil I think the best would be to enhance FilteredList first as it looks like something usefull for other consumers as well.

@lathapatil
Copy link
Contributor

@lathapatil I think the best would be to enhance FilteredList first as it looks like something usefull for other consumers as well.

My mistake. We already have the option to set our own comparator to FilteredList. The only thing missing was the ability to sort in descending order, which I managed to achieve within my comparator itself!

image

@lathapatil
Copy link
Contributor

removes all old ones

@laeubi Should it also remove OSGI/Minimum and CDC environments if multiple entries are there already ?
Example :
Replace below

Bundle-RequiredExecutionEnvironment: J2SE-1.3,
 J2SE-1.5,
 OSGi/Minimum-1.1,
 OSGi/Minimum-1.0,
 CDC-1.1/Foundation-1.1

with
Bundle-RequiredExecutionEnvironment: JavaSE-22

@laeubi
Copy link
Contributor Author

laeubi commented Apr 22, 2024

I would say yes, but if it makes any complications we can simply disable the functionality if multiple EEs are currently defined, that's a really rare case anyways and most likely incorrect anyways if one upgrades one of them..

@lathapatil
Copy link
Contributor

if it makes any complications we can simply disable the functionality if multiple EEs are currently defined,

@laeubi, Thanks for the clarification. I will consider this.

Could there be a scenario where either OSGi/Minimum-1.0 or CDC-1.0/Foundation-1.0 is exclusively present, and if a user is permitted to upgrade, it should be to the highest available version of either OSGi/Minimum or CDC?

I Just referred https://wiki.eclipse.org/Execution_Environments#What_are_Execution_Environments.3F, and if I'm not mistaken, OSGi or CDC cannot exist independently within the execution environment section.

@lathapatil
Copy link
Contributor

@laeubi I have received some concerns from my colleagues regarding the EEs displayed here, which are not grouped based on EE's name like before and are now scattered, especially the OSGI and CDC ones.

image

Can we have the sorted list as below or as shown in image above ?

CDC-1.1/Foundation-1.1
CDC-1.0/Foundation-1.0
JavaSE-23
JavaSE-22
JavaSE-21
JavaSE-20
JavaSE-19
JavaSE-18
JavaSE-17
JavaSE-16
JavaSE-15
JavaSE-14
JavaSE-13
JavaSE-12
JavaSE-11
JavaSE-10
JavaSE-9
JavaSE-1.8
JavaSE-1.7
JavaSE-1.6
J2SE-1.5
J2SE-1.4
J2SE-1.3-NO-SOUND
J2SE-1.3
J2SE-1.2
JRE-1.1
OSGi/Minimum-1.2
OSGi/Minimum-1.1
OSGi/Minimum-1.0

@laeubi
Copy link
Contributor Author

laeubi commented May 3, 2024

@lathapatil can you explain what concerns are expressed?

  • CDC-1.1/Foundation-1.1
  • CDC-1.0/Foundation-1.0

are almost always useless today showing them on the top feels not right.

@merks
Copy link
Contributor

merks commented May 3, 2024

I agree, they'd be better listed last probably.

@lathapatil
Copy link
Contributor

are almost always useless today showing them on the top feels not right.

Yes. Not necessarily listing CDC on top, but the concern was to group similar EEs together. To reduce complexity, we can proceed as agreed before, sorting versions in descending order regardless of the names of EEs.

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

No branches or pull requests

4 participants