Bug 305823 - views doesn't become updated in multiple perspectives
Summary: views doesn't become updated in multiple perspectives
Status: NEW
Alias: None
Product: Data Tools
Classification: Tools
Component: SQL Results View (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major with 1 vote (vote)
Target Milestone: future   Edit
Assignee: dtp.sqldevtools-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: ui, usability
Depends on:
Blocks: 288247
  Show dependency tree
 
Reported: 2010-03-15 03:31 EDT by Vitaly Hryb CLA
Modified: 2010-09-16 18:20 EDT (History)
3 users (show)

See Also:


Attachments
buggy situation with SQL Results view in 2 perspectives (264.79 KB, image/tiff)
2010-03-16 03:35 EDT, Vitaly Hryb CLA
no flags Details
annotated image that shows problem (315.30 KB, image/tiff)
2010-03-19 03:50 EDT, Vitaly Hryb CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly Hryb CLA 2010-03-15 03:31:02 EDT
Build Identifier: 20090920-1017, 20100218-1602

I got this issue while working in IDE with option "Window->Preferences->Perspectives->Open a New Perspective->[selected]In a new window".
It happens with "SQL results" and "JUnit view" views and happens starting from version 3.5.

While working with different perspectives in different windows the first opened perspective always contains updated views, if first perspective have not such view it will open automatically, but perspective in which you working on stays not updated.


Reproducible: Always

Steps to Reproduce:
1. Open Java perspective
2. Sett up option "Perspectives->In a new window"
3. Open Data tools perspective ( or JUnit )
4. Do something that will change view status in a second perspective. For example execute SQL query or start JUnit test application.
5. Nothing happens in current perspective (particular in SQL results view or JUnit view ) it stays intact but first one (Java perspective) will contains opened views with updated results.
Comment 1 Remy Suen CLA 2010-03-15 07:48:47 EDT
They are two completely separate workbench part objects. I'm not sure if there's anything we can do here from the framework.
Comment 2 Paul Webster CLA 2010-03-15 08:01:18 EDT
I had the java perspective open and ran junit tests ... that worked.

I then opened the debug perspective in a new window and from debug I ran different junit tests using Run>Run Configurations.  The java perspective junit was *not* updated but the debug perspective junit was.

This is the correct behaviour.

Your usecase seemed to imply that running the junit tests from the Junit perspective would update the Junit view in the Java perspective, but I could not reproduce that.

Could you write your steps to reproduce in terms of the java perspective and debug perspective (or CVS explorer perspective/Team)?

PW
Comment 3 Vitaly Hryb CLA 2010-03-16 03:35:37 EDT
Created attachment 162142 [details]
buggy situation with SQL Results view in 2 perspectives
Comment 4 Vitaly Hryb CLA 2010-03-16 03:36:22 EDT
HI!

to Remy Suen: I agree, they are separate workbench part objects but why these views  reflect changes that happen in another perspective?
If SQL Results View opened in a Database Development perspective and I am working with such view so I expect that I will get results in SQL Result View of Database Development perspective and not in Java perspective.
Instead I have updated view in Java perspective and nothing happens in Java Database Development perspective which I currently using.

to Paul Webster: Yes, you are right I supposed that running the junit tests will update Junit views in both perspectives, but it happens only for active perspective. So therefore I had decide that pointed issues have the same origin.
Probably it not so, but which result must show JUnit view in Java perspective if I working in Debug perspective, there are no result to show!?
Any way situation with JUnit I understand - it show results of last operation in current perspective, but for Database Development it looks unacceptable.

May be the problem situation with SQL Result view is a particular for Eclipse Data Tools Platform Project only?

I make screen shot buggy situation. I is clear to understand. If any question or help need from my side, please send me what I should to do!

test_db.tiff - shows wrong behavior of SQL Results view in Database Development perspective.

P.S. I can not found any problems with views in CVS or Team synchronization perspectives.
Comment 5 Paul Webster CLA 2010-03-16 07:53:03 EDT
Hi Vitaly,

Unfortunately, we're having trouble following what your issue is.


(In reply to comment #4)
> HI!
> 
> to Remy Suen: I agree, they are separate workbench part objects but why these
> views  reflect changes that happen in another perspective?

You have the same view in 2 perspectives, Java and SQL.  you execute a query in the SQL perspective.  Which behaviour do you see?

1) SQL view updated only in SQL perspective
2) SQL view updated only in Java perspective (which would be wrong)
3) SQL view updated in both perspectives.

> to Paul Webster: Yes, you are right I supposed that running the junit tests
> will update Junit views in both perspectives, but it happens only for active
> perspective.

Sorry, this is the *opposite* of what I said.  The JUnit view will only update in one perspective (that you ran the tests from), and will not update in the other.  In our case, this is design intent.

PW
Comment 6 Vitaly Hryb CLA 2010-03-17 06:00:29 EDT
Hi Paul!

>You have the same view in 2 perspectives, Java and SQL.  you execute a query in
>the SQL perspective.  Which behaviour do you see?

>1) SQL view updated only in SQL perspective
>2) SQL view updated only in Java perspective (which would be wrong)
>3) SQL view updated in both perspectives.

case 2)! and more if such view absent in a Java perspective it will open!!
Comment 7 Vitaly Hryb CLA 2010-03-17 06:06:52 EDT
look at the picture in attachment (test_db.TIF),
I did execution of SQL script in SQL perspective but SQL results view stay intact and instead new SQL result view opened in Java perspective with executing SQL query.
Comment 8 Paul Webster CLA 2010-03-17 08:23:13 EDT
(In reply to comment #7)
> look at the picture in attachment (test_db.TIF),

I did ... it's a picture with 2 windows and views open in both of them, and no annotations to indicate the order they were opened, or even which view isn't supposed to be there or is doing something it is not supposed to do.  In the future, please use a program like Paint or GIMP to draw numbers or colour arrows that you can refer to in your text descriptions.

PW
Comment 9 Paul Webster CLA 2010-03-17 08:32:56 EDT
This works correctly with JUnit and 2 windows, so maybe the SQL results view is not scoped to the window it is in.

PW
Comment 10 Vitaly Hryb CLA 2010-03-18 04:00:40 EDT
Sorry I did not provide any annotations to picture, but if you pay attention to this picture you will find that it shows the one SQL query in SQL Scrapbook of Database development perspective where I had execute the query and it currently is executing. And the status of this execution shows in Java perspective with value of date '16.03.10' - look at "running man" and on the progress bar in Java perspective.
After execution complete, all results appears only in Java perspective but must be in Database Development perspective.

> This works correctly with JUnit and 2 windows,
Yes it works correctly! My expectation was that JUnit view will be updated in both perspective - but 

> so maybe the SQL results view is not scoped to the window it is in.
Database development perspective contains SQL Result view it easy to check, so what do you mean is not scoped?
Comment 11 Paul Webster CLA 2010-03-18 08:15:24 EDT
(In reply to comment #10)
> Sorry I did not provide any annotations to picture, but if you pay attention to
> this picture you will find that it shows the one SQL

You can see this because you know what you are looking for ... I've never seen the SQL snippet editor or SQL view before.  I cannot know what is wrong, hence the need for annotations of some kind.

> 
> > This works correctly with JUnit and 2 windows,
> Yes it works correctly! My expectation was that JUnit view will be updated in
> both perspective - but 

but JUnit is not supposed to work that way.

> > so maybe the SQL results view is not scoped to the window it is in.
> Database development perspective contains SQL Result view it easy to check, so
> what do you mean is not scoped?

This comment was to the implementor, as an SQL view in each window is a separate instance of that view.

PW
Comment 12 Vitaly Hryb CLA 2010-03-19 03:50:21 EDT
Created attachment 162497 [details]
annotated image that shows problem