eclipse-pde / eclipse.pde

Eclipse Public License 2.0
24 stars 58 forks source link

Adding SWT + JFace when creating a plugin that "makes contribution to the UI" #1306

Open laeubi opened 1 week ago

laeubi commented 1 week ago

Currently if one creates a new plugin project and chooses in the wizard grafik

One of the first things I usually then do is adding swt + jface as required bundles, because otherwise it is hard to really "contribute to the UI".

As these are dependencies of any Eclipse IDE anyways and easy to remove in rare cases where it is not desired, I like to suggest we simply add them by default.

vogella commented 1 week ago

Currently this flag is only used to select the templates. I would dislike having plug-in dependencies automatically added. Maybe you can better provide a JFace and SWT template in the template section if that flag is set?

laeubi commented 1 week ago

Currently this flag is only used to select the templates.

It marks this plugin as a singelton also

I would dislike having plug-in dependencies automatically added.

Why?

Maybe you can better provide a JFace and SWT template in the template section if that flag is set?

It seems odd to require an additional step, beside that what should such "template" offer?

vogella commented 1 week ago

Why

Because I may want to make a menu contribution via model elements and in this case I do not need SWT and JFace.

laeubi commented 1 week ago

Why

Because I may want to make a menu contribution via model elements and in this case I do not need SWT and JFace.

That's what I mean with "and easy to remove in rare cases where it is not desired", having only a menu contribution without defining any handler that do not reference anything (e.g. shells, dialogs, ...) is likely seldom. And even in that case there is a high chance one later adds new features to the plugin that still require SWT/JFace.

vogella commented 1 week ago

Its is also easy to add dependencies, if you need it.

-1 from me for such adjustments.

laeubi commented 1 week ago

Its is also easy to add dependencies, if you need it.

No one questions it, but if I have two "easy" options and I need Option 1 in 99% of the time and Option 2 in 1% of cases it is clear what should be the obvious default... currently it is the reverse...

vogella commented 1 week ago

You could add a template for your 99% use case.

vogella commented 1 week ago

@laeubi if you want this, please ask a PDE project lead to resolve our conflict.

laeubi commented 1 week ago

You could add a template for your 99% use case.

Using a template is simply over engineered here and more complex, first it needs another step, then I need to find it (not to mention that I need to know about this).

Also it is simply bad UX if I need to take action for the most common usecase ... from my point of view real problem of Eclipse IDE is not darkmode, startup times or fancy new feature, the main problem is that we make it extremely hard for users to perform their (common) task because we hide everything behind options multi-page wizards and insider knowledge ...

HannesWell commented 1 week ago

Its is also easy to add dependencies, if you need it.

No one questions it, but if I have two "easy" options and I need Option 1 in 99% of the time and Option 2 in 1% of cases it is clear what should be the obvious default... currently it is the reverse...

Although I'm not sure if the numbers are that clear (in fact I can only guess from my own experience), I also assume that in the majority of cases where that option is enabled one also uses SWT/Jface.

Currently this flag is only used to select the templates. I would dislike having plug-in dependencies automatically added. Maybe you can better provide a JFace and SWT template in the template section if that flag is set?

If that option is without effect if no template is selected, would it then be a solution to only add these dependencies if no template is selected later? If one doesn't want those dependencies then one should simply not check this box. The existing templates are then not changed.

IIRC that option also has an effect if an activator is generated, which then extends UIPlugin instead of Plugin? I have to check it when I get back home. But wouldn't that be acceptable?

vogella commented 1 week ago

Strange behaviour, I saw my comment twice now both are gone....

To repeat: if @HannesWell is fine with the proposal to add SWT and jface if the UI flag is set that is fine for me.

HannesWell commented 1 week ago

Strange behaviour, I saw my comment twice now both are gone....

I got one mail for the previous comment (which is also gone for me) and this one.

To repeat: if @HannesWell is fine with the proposal to add SWT and jface if the UI flag is set that is fine for me.

Great. Assuming everything is as I described in my last post, I don't see a real drawback.