Bug 272076 - [launching] always validate prior to launching
Summary: [launching] always validate prior to launching
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 enhancement with 10 votes (vote)
Target Milestone: 4.6.2   Edit
Assignee: Lars Vogel CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted, noteworthy
Depends on: 512528
Blocks: 376061
  Show dependency tree
 
Reported: 2009-04-13 15:58 EDT by Lars Vogel CLA
Modified: 2017-02-21 14:37 EST (History)
12 users (show)

See Also:
Lars.Vogel: pmc_approved+
simon.scholz: review+


Attachments
Patch for default behaviour of "Validate" (1.15 KB, text/plain)
2009-04-13 15:58 EDT, Lars Vogel CLA
no flags Details
PluginStatusDialog_patch.txt (3.03 KB, text/plain)
2009-12-16 22:50 EST, Lars Vogel CLA
no flags Details
AbstractPluginBlock patch (1.11 KB, text/plain)
2009-12-16 22:52 EST, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2009-04-13 15:58:15 EDT
Created attachment 131698 [details]
Patch for default behaviour of "Validate"

Personally I would find it much better if the default for a run configuration would have the flag "Validate plug-in automatically prio to launching" set.

I believe the performance overhead is minimal and this would help to prevent lots and lots of stupid errors. 

Patch attached.
Comment 1 Chris Aniszczyk CLA 2009-07-27 10:43:51 EDT
I'm mixed on this as it comes up frequently. In the past, we have not had this as the default because if you have a large target (think of a large IBM RAD-like product), launching would take significantly longer. However, in most cases, I don't think this is a problem.

We should revisit this in 3.6
Comment 2 Lars Vogel CLA 2009-07-27 10:46:19 EDT
Chris: I also think is is easier for the expert who develops RAD-like products to turn it off then for the new developer starter to find this setting and to turn it on. 
Comment 3 Chris Aniszczyk CLA 2009-07-27 10:47:24 EDT
(In reply to comment #2)
> Chris: I also think is is easier for the expert who develops RAD-like products
> to turn it off then for the new developer starter to find this setting and to
> turn it on. 

That assumes you have experts building on top of RAD-like products which isn't always the case :)

First impressions are important, when self-hosting is really slow it leaves a bad taste in people's mouth.

It's just something we have to balance.
Comment 4 michael kearney CLA 2009-08-11 14:26:27 EDT
(In reply to comment #0)
> Created an attachment (id=131698) [details]
> Patch for default behaviour of "Validate"
> 
> Personally I would find it much better if the default for a run configuration
> would have the flag "Validate plug-in automatically prio to launching" set.
> 
> I believe the performance overhead is minimal and this would help to prevent
> lots and lots of stupid errors. 
> 
> Patch attached.
> 

I agree. 
How about some sort of visual cue somewhere to indicate the state of the option w/o digging through windows? Of course, then there is the risk of visual clutter, as people add their favorite problematic option for display. 
-m
Comment 5 Darin Wright CLA 2009-09-16 11:37:55 EDT
Removing M2 milestone
Comment 6 Lars Vogel CLA 2009-12-01 13:36:05 EST
@Curtis: I believe this bug is similar to https://bugs.eclipse.org/bugs/show_bug.cgi?id=284704

Do you have an opinion on this proposed change?
Comment 7 Curtis Windatt CLA 2009-12-01 14:04:50 EST
(In reply to comment #6)
> Do you have an opinion on this proposed change?

My vote would be against this change.  My target and workspace included a large number of bundles which may not validate correctly but do not affect my self hosting scenarios.  For example, if I validate one of my current launch configs it fails because of a p2 testing bundle that I do not directly interact with.

I know RCP developers are much more interested in the feature because they are far more careful when crafting targets.  My targets may include far more bundles than I am actually using/extending.
Comment 8 Lars Vogel CLA 2009-12-01 14:26:21 EST
Good point. Thanks for the explanation.
Comment 9 Darin Wright CLA 2009-12-01 16:00:56 EST
Removing milestone.
Comment 10 Dani Megert CLA 2009-12-10 07:21:15 EST
I agree with this bug. Comment 7 is about a more experienced setup in which it's simple to disable the option. For normal users it's better to warn by default like we do when there are e.g. open files.

Optionally, the dialog that reports validation issues could have a "Don't validate again" checkbox which would then uncheck the option in the launch config.
Comment 11 Lars Vogel CLA 2009-12-10 13:53:07 EST
I personally also would like to see this change (I mainly do RCP development).
Comment 12 Chris Aniszczyk CLA 2009-12-10 18:15:03 EST
(In reply to comment #10)
> Optionally, the dialog that reports validation issues could have a "Don't
> validate again" checkbox which would then uncheck the option in the launch
> config.

I will support this enhancement if this is added.
Comment 13 Al B CLA 2009-12-10 18:21:03 EST
I concur with Chris.
Comment 14 Lars Vogel CLA 2009-12-10 18:35:24 EST
Some notes for this change (additional flag):

Requires adjustment of PluginStatusDialog from package org.eclipse.pde.internal.ui.launcher and of method handleValidate() from AbstractLauncherTab
Comment 15 Lars Vogel CLA 2009-12-16 18:46:52 EST
Update: I adjusted the dialog and is this dialog is called via the "Validate Plug-ins" button I update also the launch configuration 

The Dialog is also used in displayValidationError of PluginValidationStatusHandler. Does anyone have a tip how can I update the launch configuration from displayValidationError?
Comment 16 Lars Vogel CLA 2009-12-16 22:50:25 EST
Created attachment 154623 [details]
PluginStatusDialog_patch.txt

This is the first attempt to bring this field on the dialog.
Comment 17 Lars Vogel CLA 2009-12-16 22:52:36 EST
Created attachment 154624 [details]
AbstractPluginBlock patch

This will get the selection from the dialog and update the launch configuration if you are in the launch configuration dialog.
Comment 18 Lars Vogel CLA 2009-12-16 22:54:36 EST
The update of the launch configuration during "normal" launch of the application is not included in the patches. Not sure how to do this, see comment 15.
Comment 19 Bernhard Merkle CLA 2010-03-12 02:15:59 EST
there are pros and cons. I would offer the following:
- let it turned off because of the performance issue but then
- the stack trace/exception should give a hint that you should turn on the option temporarily or resolve the dependencies and then turn it off again.

it that possible ?

I think it is especially important that it works with and inital setup as it is a bit frustrating for a user if he gets an application launch error always or often in the first place ;-)
Comment 20 Darin Wright CLA 2010-04-27 10:26:30 EDT
Removing milestone as feature freeze has passed.
Comment 21 Dani Megert CLA 2010-05-18 10:45:07 EDT
This should get fixed.
Comment 22 Lars Vogel CLA 2012-03-01 04:06:52 EST
Would be great to have this in Eclipse 4.2.

I deliver frequently Eclipse plug-in and RCP trainings and this is the number one issue new people face and get frustrated about.
Comment 23 Dani Megert CLA 2012-03-01 10:03:31 EST
(In reply to comment #22)
> Would be great to have this in Eclipse 4.2.
> 
> I deliver frequently Eclipse plug-in and RCP trainings and this is the number
> one issue new people face and get frustrated about.

I looked at the patches.
- Depending on the JRE, one has always validation issues when starting an
  'Eclipse Application' (the SDK in my case). Hence, people might want to have 
  validation disabled when creating new launch configs.
- The change in the dialog is not needed (people can read the launch config
  dialog).
- When launching, the validation dialog must have a checkbox:
  [ ] Do not show this dialog again (see comment 10).
- The validation dialog needs better wording. It's not 100% clear what happens
  when I click 'OK'. I know, it's not directly related to this RFE, but if the 
  dialog is seen more often, it also needs more love ;-).

We should add a preference to the 'Plug-in Development' preference page and use that one when creating a new launch config. The launch dialog should have a link that points to the preference. Some comments mentioned a performance impact without providing any data. We have to measure the performance impact in order to decide whether it will be OK to enable the new preference by default.


Lars, I'm willing to accept a patch implementing the above comments and review it for 3.8.
Comment 24 Lars Vogel CLA 2012-03-02 04:28:32 EST
@Dani: You increasing the scope of this request. ;-)

I personally think an additional preference would be overdesign. Eclipse is already full of settings which normal user never see / change. The expert will not create new launch configs every day. 

Are you ok with a patch without the preference setting? If yes, what would be the timeline for this?
Comment 25 Dani Megert CLA 2012-03-02 04:48:26 EST
(In reply to comment #24)
> @Dani: You increasing the scope of this request. ;-)
> 
> I personally think an additional preference would be overdesign. Eclipse is
> already full of settings which normal user never see / change. The expert will
> not create new launch configs every day. 
> 
> Are you ok with a patch without the preference setting?

It depends on the performance numbers/impact.


> If yes, what would be the timeline for this?
Since no API is involved we can target M7.
Comment 26 Lars Vogel CLA 2012-03-02 04:53:17 EST
@Dani: sounds good, thanks. I try to draft something up in the next weeks.

What would be your proposed way to measuring the performance impact?
Comment 27 Dani Megert CLA 2012-03-02 05:57:54 EST
(In reply to comment #26)
> @Dani: sounds good, thanks. I try to draft something up in the next weeks.
> 
> What would be your proposed way to measuring the performance impact?

I would create an 'Eclipse Application' launch config that starts the SDK and measure inside LaunchPluginValidator. I suspect that the performance hit will be small.
Comment 28 Curtis Windatt CLA 2012-03-02 09:18:29 EST
(In reply to comment #27)
> I would create an 'Eclipse Application' launch config that starts the SDK and
> measure inside LaunchPluginValidator. I suspect that the performance hit will
> be small.

If you happen to have a larger target platform to test against I would also compare performance of that launch.  Our launcher (and launch config tab) performance is typically only a noticeable issue when starting >1000 plug-ins. The performance of the dependency validator is probably O(n^2).

If we don't have a preference, should we consider turning off validate before launch for new JUnit Plug-in launch configs?  It's more common for me to create new launch configs to run a certain subset of tests.
Comment 29 Dani Megert CLA 2012-03-12 09:10:31 EDT
> If we don't have a preference, should we consider turning off validate before
> launch for new JUnit Plug-in launch configs? 

I'd say no. I don't want to introduce different behavior for normal and test runs.
Comment 30 Lars Vogel CLA 2012-04-02 08:09:46 EDT
My current schedule is really tight. I might not be able to deliver a patch for this release.
Comment 31 Lars Vogel CLA 2014-03-25 07:46:45 EDT
With the recent improvements in the OSGi error messages by Tom Watson, I'm OK with the current behavior. Marking my own bug as WONTFIX.
Comment 32 Lars Vogel CLA 2016-09-08 06:40:31 EDT
Reopening this. Enabling this will new starters with platform development and (without yet measuring it), I cannot really tell a difference for this setting for platform UI. 

Measurements are still planned, just have not been done yet.
Comment 33 Eclipse Genie CLA 2016-09-21 08:03:19 EDT
New Gerrit change created: https://git.eclipse.org/r/81573
Comment 34 Simon Scholz CLA 2016-09-23 04:12:22 EDT
+ 1 for merging this.

I´d rather be informed if some plugins would not be started due to missing dependencies. Lots of our customers come accross the problem not having validated their run configurations and therefore missing some plugins during runtime, which leads to a bad user experience! Especially for new users.

And in case everything´s resolved the validation doesn´t seem to really harm and it won´t bother the user with a dialog or anything else, but gives feedback when appropriate.
Comment 35 Lars Vogel CLA 2016-09-23 09:21:40 EDT
I tested the patch with various workspaces and on my human stopwatch, I cannot note a different in starttime. 

If there are no objections against this patch, I plan to merge it early next week.
Comment 36 Eclipse Genie CLA 2016-09-23 09:32:37 EDT
New Gerrit change created: https://git.eclipse.org/r/81792
Comment 39 Eclipse Genie CLA 2016-10-14 03:47:05 EDT
New Gerrit change created: https://git.eclipse.org/r/83182
Comment 40 Dani Megert CLA 2016-10-14 04:07:47 EDT
(In reply to Eclipse Genie from comment #39)
> New Gerrit change created: https://git.eclipse.org/r/83182

Please ignore. That was a mistake.
Comment 41 Eclipse Genie CLA 2016-10-25 10:15:59 EDT
New Gerrit change created: https://git.eclipse.org/r/83867
Comment 42 Eclipse Genie CLA 2016-10-25 10:16:14 EDT
New Gerrit change created: https://git.eclipse.org/r/83866
Comment 43 Eclipse Genie CLA 2016-10-25 10:20:57 EDT
New Gerrit change created: https://git.eclipse.org/r/83868
Comment 44 Eclipse Genie CLA 2016-10-25 10:21:05 EDT
New Gerrit change created: https://git.eclipse.org/r/83869
Comment 45 Eclipse Genie CLA 2016-10-25 14:33:17 EDT
Gerrit change https://git.eclipse.org/r/83868 was merged to [R4_6_maintenance].
Commit: http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=fbb9d01a54426c29e8edbb15ab276d4219e6465e
Comment 46 Eclipse Genie CLA 2016-10-25 14:37:01 EDT
Gerrit change https://git.eclipse.org/r/83869 was merged to [R4_6_maintenance].
Commit: http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=5858922a53d528b980e34ad039ceb7af4b7c45e6
Comment 48 Vikas Chandra CLA 2016-10-26 09:41:26 EDT
I think we should wait for its effects ( performance ? ) in 4.7 before hurrying this in 4.6.2.
Comment 49 Lars Vogel CLA 2016-10-26 10:43:59 EDT
(In reply to Vikas Chandra from comment #48)
> I think we should wait for its effects ( performance ? ) in 4.7 before
> hurrying this in 4.6.2.

PMC approved to backport.
Comment 50 Vikas Chandra CLA 2016-10-27 03:44:12 EDT
> PMC approved to backport.

Do you have any concrete data of performance impact?
Comment 51 Lars Vogel CLA 2016-10-27 05:19:36 EDT
(In reply to Vikas Chandra from comment #50)
> > PMC approved to backport.
> 
> Do you have any concrete data of performance impact?

I could not note a difference in startup, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=272076#c35.

I did not update the data as it was the same plus some random noise by me operating a stop watch.
Comment 52 Vikas Chandra CLA 2016-11-10 07:36:31 EST
verified on
Version: Neon.2 (4.6.2)
Build id: M20161110-0200
Comment 53 Markus Keller CLA 2017-02-21 14:37:38 EST
Automatic validation doesn't work for the first launch via "Debug As > Eclipse Application", see bug 512528.