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

Combine "Update and Refresh" button on the target platform editor #852

Closed
vogella opened this issue Nov 1, 2023 · 18 comments
Closed

Combine "Update and Refresh" button on the target platform editor #852

vogella opened this issue Nov 1, 2023 · 18 comments

Comments

@vogella
Copy link
Contributor

vogella commented Nov 1, 2023

After > 10 years of using PDE target editor I still do not know the difference of "Update" and "Refresh" on the target editor.

Can we combine these buttons and just do both if the user presses these instead of having two similar named buttons?

image

cc @HannesWell

@laeubi
Copy link
Contributor

laeubi commented Nov 1, 2023

After > 10 years of using PDE target editor I still do not know the difference of "Update" and "Refresh" on the target editor.

Update - updates to the latest available version of that location
Refresh - throw a way any cached content and initiate a reload

Can we combine these buttons and just do both if the user presses these instead of having two similar named buttons?

They do different things that make no sense to combine as one usually don't want to have both actions.

If it is is unclear one might want to add a comprehensive tooltip to the button.

@merks
Copy link
Contributor

merks commented Nov 1, 2023

Note that Update enables/disables based on the selection and also note that the buttons are already self-documenting:

image

@vogella
Copy link
Contributor Author

vogella commented Nov 1, 2023

Thanks for the replies and the hints.

@vogella vogella closed this as completed Nov 1, 2023
@vogella
Copy link
Contributor Author

vogella commented Nov 1, 2023

Btw. if version="0.0.0" is used, Update does nothing. I guess this is fine, but one of the reason why I did not know what this button is supposed to be doing, as I prefer to use 0.0.0 in my target files.

@laeubi
Copy link
Contributor

laeubi commented Nov 1, 2023

Btw. if version="0.0.0" is used, Update does nothing.

0.0.0 already means latest version, one might want to replace it with a fixed version but actually 0.0.0 is a bit of a hidden hack and not officially supported e.g. in the UI at all.

@merks
Copy link
Contributor

merks commented Nov 1, 2023

I actually didn't know about the Update button at all and have been manually fixing things, e.g., when there are new EMF versions. I will try this button in the future when updating the Platform target platform...

I've just now been working on feature for Oomph targlets which can generate a *.target where one can run into the exceptional case that one needs more than one version of a given symbolic name. In that case one must specify a version (because otherwise you get the highest version not both versions), which is annoying because if an updated version becomes available, one must Update the version in the *.target (or regenerate the target platform in the targlets case). I just wanted to point out that 0.0.0 does not always just work...

@vogella
Copy link
Contributor Author

vogella commented Nov 1, 2023

I actually didn't know about the Update button at all and have been manually fixing things,

Great to hear that I'm not the only veteran that did miss knowledge about these buttons. :-)

@laeubi
Copy link
Contributor

laeubi commented Nov 1, 2023

You can always use a target-file-reference and has the "older" version defined there, then you can update all other versions if you like in the main target.

As you noted already "Update" is actually context sensitive, you can even have update for an individual item (even though I'm not sure if IU locations implement that yet).

@HannesWell
Copy link
Member

I just wanted to point out that 0.0.0 does not always just work...

That's right.
But usually one does not have main interest in two Version of the same Plugin/Feature.
But of multiple different Versions of a bundle are required due to version ranges, the Planner can handle this.
But at least to me it happend very rarely that I needed to define two versions of my 'root' IUs.

@merks
Copy link
Contributor

merks commented Nov 1, 2023

I really have two such issues in the BIRT target platform and hence I implemented the following so that the generator produces a correct result without hand modification of that generated result:

eclipse-oomph/oomph#40

But I digress and I am hijacking this issue. 😱

@vogella vogella reopened this Nov 21, 2024
@vogella
Copy link
Contributor Author

vogella commented Nov 21, 2024

What does "Reload Target Platform" do in this context? My assumption always have been that is does the same as "Update". Is that correct? If yes, can we name it the same.

Currently we seem to offer three ways of updating the target platform:

  • Update
  • Refresh
  • Reload Target Platform

@merks
Copy link
Contributor

merks commented Nov 21, 2024

I think this was already answered:

#852 (comment)

To be even more explicit:

With update, if I have say version 1.0.0.xxx specified explicitly, it will change to version 1.1.0.x. E.g., I use this when I update the EMF or Orbit URL and there are new/updated versions. It will edit the file.

The refresh it will just load the site and if there are 0.0.0 versions it will maybe get a new latest. It will not edit the file.

I'm not sure to which Reload you are referring. The one in the preferences?

@vogella
Copy link
Contributor Author

vogella commented Nov 21, 2024

If you look at the first screenshot, right top corner you see the new option which I think we did not discuss so far. It is the link in the form, which is "Activate" if the target is not active.

@laeubi
Copy link
Contributor

laeubi commented Nov 21, 2024

What does "Reload Target Platform" do in this context? My assumption always have been that is does the same as "Update". Is that correct?

No, all it does is throw away your "Active Targetplatform State" and set the current target platform (again).

@merks
Copy link
Contributor

merks commented Nov 21, 2024

FYI, mine looked like this because it's no the active one:

image

@merks
Copy link
Contributor

merks commented Nov 21, 2024

The issue subject suggesting to Combine "Update and Refresh" seems like a no go for the reasons explained, i.e., one is an editing operation the other is not.

@merks merks closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2024
@HannesWell
Copy link
Member

What does "Reload Target Platform" do in this context? My assumption always have been that is does the same as "Update". Is that correct?

No, all it does is throw away your "Active Targetplatform State" and set the current target platform (again).

Yes. It's like the similar Code-Mining action displayed in the Source tab.
But if it isn't clear, we should add a tool-tip to the action.

@merks
Copy link
Contributor

merks commented Nov 21, 2024

Tool tips are a good idea. 👍

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

No branches or pull requests

4 participants