Bug 240363 - [Viewers] [open type] Problem with Open Type filtering
Summary: [Viewers] [open type] Problem with Open Type filtering
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Linux-GTK
: P3 major (vote)
Target Milestone: 3.5 M1   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-10 13:09 EDT by Paul Webster CLA
Modified: 2008-09-16 13:58 EDT (History)
5 users (show)

See Also:


Attachments
Showing the MenuManager case (23.82 KB, image/png)
2008-07-10 13:09 EDT, Paul Webster CLA
no flags Details
MenuManager check take 2 (23.81 KB, image/png)
2008-07-14 07:59 EDT, Paul Webster CLA
no flags Details
Sample handler project (4.23 KB, application/octet-stream)
2008-07-14 12:31 EDT, Paul Webster CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2008-07-10 13:09:16 EDT
Created attachment 107108 [details]
Showing the MenuManager case

I have org.eclipse.jface checked out in my workspace.

Typing MenuManage shows a random type and MenuManagerTest, but not MenuManager (which is definitely there).  Menu*er will leave MenuManager in your Open Type choices (just way down).

IMenuC will show the random type and IMenuCreator, but adding the r (so IMenuCr) makes IMenuCreator disappear.

PW
Comment 1 Paul Webster CLA 2008-07-10 13:11:04 EDT
This is build I20080708-0830

PW
Comment 2 Dani Megert CLA 2008-07-14 06:40:24 EDT
>Typing MenuManage shows a random type and MenuManagerTest
Why do you say "random"? Note that the Open Type always appends a '*' internally unless you add a '<' or ' ' at the end.

Can you reproduce? If so, please perform a Java search for "MenuManage" and check whether it finds MenuManager. To me this looks like the search index got corrupted.
Comment 3 Paul Webster CLA 2008-07-14 07:59:20 EDT
Created attachment 107320 [details]
MenuManager check take 2
Comment 4 Paul Webster CLA 2008-07-14 08:02:54 EDT
(In reply to comment #2)
> >Typing MenuManage shows a random type and MenuManagerTest
> Why do you say "random"?

If I select a type in between tests, it shows up as a valid selection for "MenuManage" ... even though Action does not match :-)  See my second attachment.

> Can you reproduce? If so, please perform a Java search for "MenuManage" and
> check whether it finds MenuManager. To me this looks like the search index got
> corrupted.

Yes, this is reproducible after a restart.

Is there an index I can delete to force it to recreate? I can try that out as well.

PW
Comment 5 Paul Webster CLA 2008-07-14 08:03:48 EDT
(In reply to comment #4)
> > Can you reproduce? If so, please perform a Java search for "MenuManage" and
> > check whether it finds MenuManager. To me this looks like the search index got
> > corrupted.
> 
> Yes, this is reproducible after a restart.

And the second part of the question, it just won't find MenuManager.

PW
Comment 6 Dani Megert CLA 2008-07-14 08:12:45 EDT
>Is there an index I can delete to force it to recreate? 
0. make sure the workspace is not used (running)
1. go to <workspace>/.metadata/.plugins/org.eclipse.jdt.core
2. delete *.index plus savedIndexNames.txt
Comment 7 Paul Webster CLA 2008-07-14 10:27:25 EDT
(In reply to comment #6)
> >Is there an index I can delete to force it to recreate? 
> 0. make sure the workspace is not used (running)
> 1. go to <workspace>/.metadata/.plugins/org.eclipse.jdt.core
> 2. delete *.index plus savedIndexNames.txt

I exited eclipse, "rm *.index savedIndexNames.txt" and then restarted.  It appears to have rebuilt all of the .index files (all new timestamps).

I still have the same problem, however.  "MenuManage" now finds AbstractUIPlugin and MenuManagerTest.

PW
Comment 8 Dani Megert CLA 2008-07-14 10:32:28 EDT
Best would be if you could give us your workspace. Otherwise I guess we won't be able to track this down.
Comment 9 Paul Webster CLA 2008-07-14 10:42:30 EDT
I did some tests with Olivier.  It seems to do with the open type history.  In my example, my open type has MenuManager already in the history.  It is incorrectly returning my "random type" (like the blank inner class, Action, or now AbstractUIPlugin :-) instead of MenuManager.

If I now open MenuManagerTest, and then go back to open type, "MenuManage" shows AbstractUIPlugin in the history (instead of MenuManager) and MenuManagerTest (correctly).

With no filer, open type correctly shows MenuManager (down the list quite a ways) and MenuManagerTest.

PW
Comment 10 Olivier Thomann CLA 2008-07-14 10:46:50 EDT
I think it would be worth providing the workspace to Daniel. I could not reproduce the same filtering problem on my side.
Comment 11 Paul Webster CLA 2008-07-14 10:59:19 EDT
I was able to reproduce this on I20080708-0830 in a clean workspace.

1) get rid of welcome
2) check out platform-ui, platform-ui-tests, platform-ui-examples
3) use Open Type to get AbstractContributionFactory
4) use Open Type: type in MenuManage

I get "m", some internal ibm crypto class, and MenuManagerTest (but no MenuManager).

Typing in only "Menu" will show MenuManager and MenuManagerTest in what the search engine returned (not in the history yet).

For some of the returned matches, like MenuActivation, I see 2 entries: one in org.eclipse.ui.workbench/Eclipse UI/... and one in /opt/local/eclipse/I0708-0830/eclipse/plugins/org.eclipse.ui.workbench_*.jar

PW
Comment 12 Paul Webster CLA 2008-07-14 12:31:02 EDT
Created attachment 107347 [details]
Sample handler project

Better usecase:

1) new workspace
2) File>Import...>Existing projects into workspace.  Import the Sample Handler project
3) Open Type:  "Sam" shows SampleHandler, type 'p' and it disappears

PW
Comment 13 Dani Megert CLA 2008-07-15 06:31:07 EDT
>For some of the returned matches, like MenuActivation, I see 2 entries:
This is expected and comes from how PDE container resolves the dependencies.

The other (main) bug can neither be reproduced by Markus nor me on WindowsXP using the steps from comment 11 or comment 12. Olivier, can you reproduce with these steps?

Paul, could you try on a WindowsXP box to check whether this is Linux specific? We have similar bug 208028 which we can't reproduce on WindowsXP either.

Also: are you sure you are running plain Eclipse SDK without any other plug-ins that might cause this?
Comment 14 Markus Keller CLA 2008-07-15 06:43:15 EDT
I just tried it on our Linux box, but I couldn't reproduce a problem there.
Comment 15 Paul Webster CLA 2008-07-15 08:43:46 EDT
Eric, can you help me try this out?
PW
Comment 16 Paul Webster CLA 2008-07-15 09:14:51 EDT
(In reply to comment #13)
> Also: are you sure you are running plain Eclipse SDK without any other plug-ins
> that might cause this?

right, no extra plugins (and I just ran the tests with clean install to make sure).  I'm on OpenClient 2.2, and I've run the tests with IBM SDKs:

java.vm.info=J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20080315 (JIT enabled)
J9VM - 20080314_17962_lHdSMr
JIT  - 20080130_0718ifx2_r8
GC   - 200802_08

and
java.vm.info=J2RE 1.4.2 IBM build cxia32142-20080515 (SR11) (JIT enabled: jitc)

With the new install, new workspace, and the steps from comment #12 I can still reproduce this with both 1.4.2 and 1.5.  I'll try it on Eric's box when he arrives.

PW
Comment 17 Eric Moffatt CLA 2008-07-15 10:14:56 EDT
Just tried it on my XP box and it seems to work fine for me...I see the 'Sample...' classes but not SameShellProvider when I type the 'p'.
Comment 18 Dani Megert CLA 2008-07-15 10:21:36 EDT
>Just tried it on my XP box and it seems to work fine for me
That's what I expected (we really tried hard to reproduce here).

Paul, can you test other filtering dialogs (e.g. Open Resource, pref dialog, Quick Outline). Do they filter OK?

I guess the only way to attack this is to debug it on Paul's machine as we are also not able to reproduce on our Linux machine (via VNC).
Comment 19 Paul Webster CLA 2008-07-15 11:36:24 EDT
On my box it also fails with the Sun JDK  1.5.0, and I wasn't able to reproduce it in the filtered resource dialogs.  But it does show up in the other type dialogs (i.e. called from PDEEditor Browse button).

OK, some debugging and the ContentProvider is always returning the correct 3 items for my usecase:

gen: SampleHandler
gen: SampleModel
gen: SamplerTask


They're simply not displayed correctly on linux (I have some Ubuntu users also reporting the same problem).  Reverting the change to AbstractTableViewer for bug 238901 makes this problem go away.

Off to the viewers with you.

PW
Comment 20 Paul Webster CLA 2008-07-15 11:37:10 EDT
JDT, sorry about the traffic :-)

PW
Comment 21 Dani Megert CLA 2008-07-15 11:41:53 EDT
>JDT, sorry about the traffic :-)
np. good we nailed it!
Comment 22 Boris Bokowski CLA 2008-07-15 12:01:19 EDT
Fixed by reverting to previous revision of AbstractTableViewer.
Comment 23 Boris Bokowski CLA 2008-09-16 13:58:27 EDT
Verified by code inspection using I20080915-1800.