-
Notifications
You must be signed in to change notification settings - Fork 14
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
Use Different appName Values for the different EPP packages #253
Comments
I'm on Windows, so this is not a problem for me, but I have literally dozens of desktop links to various installations specialized to work with specific project setups. But most are the Committers package so if I were on Linux, just changing the app name wouldn't really help with that regard either... |
@merks not sure if your use case would be easily solvable on linux anyhow. At least the way I proposed is mostly for linking desktop files to running instances. With the My use case, and I hope that is similar to others, is, that I have a few epp packages installed (in my case, Eclipse contributor, CDT, PhP) and would like to see in the overview (task bar) the different ones. By just changing the one line in all of the EPPs this works out of the box. I'm happy to do a sample PR for CDT or PhP. |
The product catalog generator in Oomph would need to know the new app names to produce correct *.desktop files and that's not information that's easily available from the p2 metadata. What else might make assumptions about the current names? I forget exactly how link handlers are registered... A more general solution for dealing with multiple installations, even of the same product, would be better. Perhaps something as simple as a system property to control what |
I realize I have no clue what you mean by In Oomph we generate a *.desktop file like this: |
There are two things that need to be check for the *.desctop file. The first is the I googled a bit and it seems to be a common practice that applications should allow to change the wmclass value through a command line parameter called
PS: what you also can see is that I have my own cdt icon. I have no problem that all eclipse products have an icon named eclipse.xpm but it is extremely bad that they also have all the same image. This is also something that I wanted to contribute to epp if there are no objections. |
Firstly, I would prefer we not change the default app name for all the EPP products. That just seems disruptive. What will stop working if we do that? E.g., people will update their existing installation and suddenly their desktop file doesn't work properly anymore because the StartupWMClass needs to be changed to some new value. Of course --class doesn't work because that's specific to Linux and the launcher hasn't implemented support for that; implementing things in the launcher is a lot of work but if you want support for that, that's where it should be implemented. Maybe it's possible to implement it downstream from the launcher, I'm not sure. This is why I draw attention to org.eclipse.swt.widgets.Display.setAppName(String) and org.eclipse.ui.internal.Workbench.createDisplay() because I think it would be simple to support something like this via a few lines of code in createDisplay():
I think that would solve the problem in a general way, including support multiple different installations of the same EPP product. To my thinking, that's better than a solution that creates new problems. I.e., provide a solution that gives users more flexibility without forcing everyone to make changes to adapt to a new choice we make for them. |
I understand that changing the default app name for EPP products seems disruptive. But I want to point out that this was IMHO from a branding perspective a bad decision. If I download, for example, CDT, I don't see anywhere that I have CDT. I get an eclipse executable, I get the default Eclipse icon, the window has Eclipse IDE in its title bar. I you look on our market companion, when I download CLion I see that its CLion. I strongly belive that this should also happen sooner then later with EPPs. And yes this is a disruption. I'm happy to look into the launcher and Workbench to check how to best handle such an option. FYI @jonahgraham |
Your comments about the name of the executable and the branding icons are expanding beyond the scope of this issue as stated in the title. Furthermore, given that I can install CDT, PHP, and whatever feature into any Eclipse Package, it's not entirely clear we need a name that excludes things, but I really don't want to digress here, because we go down into a topic where everyone is likely to have an opinion. I would rather focus on finding a solution that helps you, solves the problem in the most general way possible, and isn't disruptive to everyone else (who have not ask for change). |
Sorry @merks. You are right I'm expanding here way to much. |
I'm not sure how we could quickly test and confirm that providing a way to override the default app name here would be sufficient: That's certainly the least amount of work... Definitely a digression, but even for BIRT we do the branding thing: |
I spent some time today on digging deeper and also to understand better what options and how. But first things first. Using a different name in What I looked furhter is what parameter to use. The The drawback would be it would be some Eclipse specific parameter. If you would search for it or ask any LLM all answers that you get to solve the problem described above will tell you use the So I searched further. If chatgpt didn't betrayed me I can access all command line options in IApplication's start method via: '`Map<String, String[]> arguments = context.getArguments(); Is this correct? If yes we could also take in the PS: regarding the digression. It seems I was just unlucky with the Eclipse packages I use. Will follow up with the specific projects in their repos. |
FWIW I don't think adding As for renaming all the EPP IDEs, there used to be more branding per package and that has slowly been removed over time so that they share branding. I am all in favour of making it easier to customize wm_class (easier than editing xml files deep in install) |
I think an option like --class, if not consumed by the launcher, would end up being passed to the application and that could consume it set a system property, i.e., I don't think the launcher necessarily needs to be specialized. But like Jonah, I'm not a big fan of adding a special command line option simply because it's a standard Linux thing. It seems to me that folks who want to solve a problem will be happy if there exists a solution and won't get to fussed out about the nature of that solution... |
I'm not sure if I was clear enough but I was also strongly in favor of adding --class support. I also would only accept that option if we are on Linux. I did a quick test and --class command line option would be forwarded to IDEApplication. So there I could check for that. Set a property before invoking createDisplay(). The correct way of doing this would be to set the appName property. However from the code I don't see a away of setting it. I guess that is not for seen in the branding API or? @jonahgraham what should --name do differently? Or what property would you set with it? |
IIUC --name is to override the name for the window manager, but my point was more that there are a handful of gtk options and we use gtk in a non-standard way in Eclipse. See https://manpages.org/gtk-options/7 - most gtk apps have a
Its too bad that it isn't there already, and I don't know exactly what it would take to expose this out. But having the appName be a overridable by some external method that you can connect to a command line option (or a preference?) seems like a reasonable thing to do. I am not particularly keen on changing the appName in EPP itself, but then I don't use gnome desktop (I use xfc4e desktop). The reason I am not keen is that this type of grouping seems to always be wrong for some users, so changing it now seems disruptive. IIUC VS Code windows all get grouped together and when I use Windows which has similar grouping features I often find it does the wrong thing, but that seems like a personal preference issue. PS does xdotool work as a simpler workaround than editing xml files? See for example https://stackoverflow.com/a/70198417 |
Doing more of that gtk options would mean we need to do that in the gtk swt port. Because for these we would need access to the the gtk/X11/Wayland API.
That I found no way does not mean there is no. One option would be to call Display.setAppName() already in the application and add a checkin workbench to not set a name if there is already a none default one.
I get that. For me this is mostly a workaround or when we want to have branded groups. Please see also the discussion I started in CDT (I hope I'm not overdoing it).
For that we would need separate names per window which we don't have as most eclipse EPP instances have Eclipse as name. |
Sorry - my point was going in the opposite direction. That we don't do need to support any of the gtk special command line options using the gtk standard naming scheme. On a quick play around on my Linux system, many of the GUI programs don't support |
The --class commmand line parameter allows Linux user to give applications per instance identifiers to be used by window managers and desktop environments for identification and grouping. This is helpful to distinguish Eclipse instances (e.g., JDT vs CDT) as per default these all are using the same identifier. eclipse-packaging/packages#253
I have a first working version using the What do you think? It was very little code and for me it is less ugly then expected. |
It would need some documentation here eventually: Having an option that is specific to an OS would be a new thing and I'm not convinced that's a good thing. It also made me wonder if on Windows the icons are all grouped into a single group because of the app name and that even for Windows one might want to configure that differently. Certainly when I run the birt.exe it's a different group on my task bar, even if I rename it to eclipse.exe, so I think that's the case. A system property would do the trick for this as well... |
I also didn't like the the os check in IDE application and I'm open to suggestions. Birt is a bad example because Birt is a fully branded RCP and has set an app name in its product defining plugin.xml: https://github.com/eclipse-birt/birt/blob/master/UI/org.eclipse.birt.report.designer.ui.rcp/plugin.xml |
To be honest I don't care to much how we do it. This solution looks cleaner for all platforms supported by Eclipse. How about |
Yes, |
The eclipse.appName sytem property allows users to specify on the command line the appName to be used for a specific Eclipse instance. The appName Display property is used by window managers and desktop environments for identification and grouping. This is helpful to distinguish Eclipse instances (e.g., JDT vs CDT) as per default these all are using the same identifier. eclipse-packaging/packages#253
Did a first pull request. This contains now only the code. I was not smart enough to find the location where the documentation is maintained. Happy for any pointers. |
I added doc links in eclipse-platform/eclipse.platform.ui#2631 (comment) |
thx |
The eclipse.appName sytem property allows users to specify on the command line the appName to be used for a specific Eclipse instance. The appName Display property is used by window managers and desktop environments for identification and grouping. This is helpful to distinguish Eclipse instances (e.g., JDT vs CDT) as per default these all are using the same identifier. Eclipse UI PR: eclipse-platform/eclipse.platform.ui#2631 Root Issue: eclipse-packaging/packages#253
The eclipse.appName sytem property allows users to specify on the command line the appName to be used for a specific Eclipse instance. The appName Display property is used by window managers and desktop environments for identification and grouping. This is helpful to distinguish Eclipse instances (e.g., JDT vs CDT) as per default these all are using the same identifier. eclipse-packaging/packages#253
Given this changes in the Platform to accommodate this, I think we can close this issue here as addressed upstream. |
The eclipse.appName sytem property allows users to specify on the command line the appName to be used for a specific Eclipse instance. The appName Display property is used by window managers and desktop environments for identification and grouping. This is helpful to distinguish Eclipse instances (e.g., JDT vs CDT) as per default these all are using the same identifier. Eclipse UI PR: eclipse-platform/eclipse.platform.ui#2631 Root Issue: eclipse-packaging/packages#253
Currently the different EPP packages define in their
plugin.xml
theappName
property with the valueEclipse
. This is problematic on Linux machines as this property is to my understanding used for distinguishing different application instances.So if you have as I have several EPP versions installed and for each a dedicated desktop file, Gnome Shell (not sure for KDE), can not associated any running instance with the according launcher. This is rather annoying.
The problem was already some time ago reported at the Eclipse bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=500571
the proposed solution was that the Eclipse launcher would correctly handle the
--class
command line option. Then the desktop file could provide an own name and the problem would be solved. As I don't know how much effort it is to implement that in the launcher, and yes I know I'm in the wrong github project here, I also found a simpler workaround: https://medium.com/@gayanper/installing-multiple-eclipse-in-gnome-29db46f57401, which is the one proposed above.I currently do this every-time when I update my different Eclipse instances. For me this works nicely, however I don't know if there is any reason that all app packages have the same
appName
property value.The text was updated successfully, but these errors were encountered: