Bug 98800 - [Workbench] Ant buildfile removed from fast view Ant View after restart
Summary: [Workbench] Ant buildfile removed from fast view Ant View after restart
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P2 major with 2 votes (vote)
Target Milestone: 3.1.1   Edit
Assignee: Paul Webster CLA Friend
QA Contact:
URL:
Whiteboard:
Keywords:
: 100210 103137 106667 108462 109122 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-07 15:06 EDT by Benjamin Pasero CLA Friend
Modified: 2005-09-20 13:18 EDT (History)
16 users (show)

See Also:


Attachments
Patch unopened view state v01 (2.44 KB, patch)
2005-08-17 13:43 EDT, Paul Webster CLA Friend
no flags Details | Diff
Session tests for the view state (7.45 KB, patch)
2005-08-18 09:47 EDT, Paul Webster CLA Friend
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Pasero CLA Friend 2005-06-07 15:06:30 EDT
I am running Eclipse 3.1 RC but but noticed this behaviour in previous versions
too. From time to time, the ANT view is no longer showing my single build.xml
Script. Unfortunately I am not able to post a scenario how this happens. 

It is always that I am working some time on my different projects then shutting
down Eclipse and the next day opening Eclipse and the Ant view, the script is no
longer added.

I am not closing any project. So is there another reason why an Ant Script could
be removed from the Ant view?

Ben
Comment 1 Darin Swanson CLA Friend 2005-06-07 15:15:30 EDT
Ant buildfiles should only be removed when the user removes the enclosing 
project from Eclipse (closing the project included) or explictly removes the 
buildfile from the view.

Any information in the .log file that could pertain?
Comment 2 Benjamin Pasero CLA Friend 2005-06-07 16:07:21 EDT
So the ".log" file is showing when going to "About Eclipse Platform" >
"Configuration Details" > "View Error Log"? Or is there another place.

Ben
Comment 3 Darin Swanson CLA Friend 2005-06-07 17:32:16 EDT
I use Window>Show View>Other>Pde Runtime>Error Log
Comment 4 Benjamin Pasero CLA Friend 2005-06-08 03:00:53 EDT
Allright, I will have a look as soon as the problem re-occurs.

Ben
Comment 5 Darin Swanson CLA Friend 2005-06-09 16:11:12 EDT
Please reopen when more information is available. Thanks.
Comment 6 Benjamin Pasero CLA Friend 2005-06-21 03:46:31 EDT
FYI I can reproduce this issue every day, both at home and from work with RC3.
The projects are completly different. I am not seeing any Error in the Logs so far.

Will see if I can nail it down to some reproducable steps.

Ben

Comment 7 Darin Swanson CLA Friend 2005-06-21 10:21:25 EDT
A reproduceable test case would be greatly appreciated.
Comment 8 Benjamin Pasero CLA Friend 2005-06-22 02:48:32 EDT
Version: 3.1.0
Build id: I20050617-1618

Steps to reproduce:

1.) Start Eclipse
2.) Open ANT and have it as Fast View
3.) Add a build.xml file to the View
4.) Exit Eclipse
5.) Start Eclipse
6.) Directly exit Eclipse, without opening the ANT view
7.) Start Eclipse again

Actual Results:
The build.xml is no longer added to the view

Ben
Comment 9 Benjamin Pasero CLA Friend 2005-06-22 03:41:40 EDT
Reproducable here at work using same Eclipse version, but different Projects /
ANT Scripts.

Ben
Comment 10 Benjamin Pasero CLA Friend 2005-06-22 03:48:04 EDT
Also reproducable using a clean Workspace. No difference if "Toggle Auto
Reconcile" is activated or not.

Ben
Comment 11 Darin Swanson CLA Friend 2005-06-22 10:40:30 EDT
Thanks Ben
Comment 12 Darin Swanson CLA Friend 2005-06-22 10:40:34 EDT
*** Bug 100210 has been marked as a duplicate of this bug. ***
Comment 13 Darin Swanson CLA Friend 2005-06-22 10:41:15 EDT
Deferred to be fixed post 3.1
Comment 14 Benjamin Pasero CLA Friend 2005-06-22 15:46:25 EDT
Oh, sad :|

Ben
Comment 15 Darin Swanson CLA Friend 2005-07-01 11:01:29 EDT
Reopening for post 3.1 work
Comment 16 Darin Swanson CLA Friend 2005-07-08 10:58:40 EDT
*** Bug 103137 has been marked as a duplicate of this bug. ***
Comment 17 Darin Swanson CLA Friend 2005-08-03 16:54:18 EDT
 This appears to be a general problem with views that are not fully realized in
an Eclipse session. I can reproduce the problem with the debug Display view as well.

The view is never initalized nor is the state saved on shutdown via the memento.
Therefore on the next Eclipse session when the view is used by the user, the
memento for the view is null and the old session state cannot be restored. 
Will need to check with the UI guys to see if this is working by design and if
so what, if any means are provided for this kind of support.
Comment 18 Darin Swanson CLA Friend 2005-08-03 17:03:06 EDT
This is the same reason the Breakpoints view will lose the users settings of
breakpoint organizers if the view is not activated by the user in an Eclipse
session.
Comment 19 Darin Swanson CLA Friend 2005-08-03 17:46:31 EDT
Moving to UI for comment.
Comment 20 Benjamin Pasero CLA Friend 2005-08-04 05:54:26 EDT
I see. Not sure, but could'nt this problem be fixed using IDialogSettings for
storing settings? They should exist all the time, even if the View was not opened. 
The PackageExplorerPart is using IDialogSettings to store settings.

Ben
Comment 21 Nick Edgar CLA Friend 2005-08-04 15:18:25 EDT
Paul, can you please investigate for 3.1.1?

This must have been a regression late in 3.1.
We previously held onto the memento for lazy views, and re-saved them if the
view had not been materialized during the session.
Comment 22 Nick Edgar CLA Friend 2005-08-04 15:18:59 EDT
Just chatted with DarinS, who agrees this should be a 3.1.1 candidate.
Comment 23 Olivier Thomann CLA Friend 2005-08-05 10:49:54 EDT
This has also a side-effect on the JUnit view when set as a fast view. It loses
its orientation settings if not used in a session. On the next start, the view
is initialized using the default. I always use the vertical orientation and I
need to set it myself again if I don't run JUnit tests in a session.
Comment 24 Marcus Vinicius Freitas Margarites CLA Friend 2005-08-17 11:12:26 EDT
*** Bug 106667 has been marked as a duplicate of this bug. ***
Comment 25 Paul Webster CLA Friend 2005-08-17 13:43:37 EDT
Created attachment 26208 [details]
Patch unopened view state v01

The view's last session state was loaded into the ViewFactory, and then moved
into the ViewReference as it was created.

To save the state, if the ViewPart was instantiated it is used.  If it wasn't
instantiated, the ViewFactory needed to put the last session state (as saved in
the ViewReference) back into the IMemento.

PW
Comment 26 Paul Webster CLA Friend 2005-08-17 13:44:24 EDT
Kim, could you submit to 3.1.1 and HEAD (with Tod's help, if you need it).

Thanx
PW
Comment 27 Kim Horne CLA Friend 2005-08-17 13:52:36 EDT
Do you think we could get a session test that could confirm this behavior? 
Comment 28 Darin Swanson CLA Friend 2005-08-17 14:00:18 EDT
I am not sure what you are asking for...a test case? See comment #8.
Comment 29 Paul Webster CLA Friend 2005-08-17 14:15:20 EDT
(In reply to comment #28)
> I am not sure what you are asking for...a test case? See comment #8.

I think that's for me ... I'm going to try and put together a session test 
case tomorrow.

PW
Comment 30 Kim Horne CLA Friend 2005-08-17 14:17:34 EDT
Awesome.  I think our WorkbenchSessionTest class will need to be changed in order to run a multistage 
test.  I have some ideas on how we can do this if you want to drag me in on it.  
Comment 31 Paul Webster CLA Friend 2005-08-18 09:47:34 EDT
Created attachment 26225 [details]
Session tests for the view state

Added some session tests:

session 1. open my view, set it's state, and then open a second view.
session 2. check that my view hasn't been activated.
session 3. activate my view and check the state.

PW
Comment 32 Kim Horne CLA Friend 2005-08-18 10:52:52 EDT
Patches applied to 3.2.  3.1.1 forthcoming...
Comment 33 Kim Horne CLA Friend 2005-08-18 11:48:35 EDT
Submitted into 3.1.1.
Comment 34 Darin Wright CLA Friend 2005-08-31 09:09:56 EDT
*** Bug 108462 has been marked as a duplicate of this bug. ***
Comment 35 Darin Swanson CLA Friend 2005-09-09 10:54:09 EDT
*** Bug 109122 has been marked as a duplicate of this bug. ***
Comment 36 Paul Webster CLA Friend 2005-09-20 13:18:16 EDT
verified in 3.2