Bug 38689 - Code Completion and "open types" don't show all Types
Summary: Code Completion and "open types" don't show all Types
Status: CLOSED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows NT
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2003-06-10 06:45 EDT by Goetz Markgraf CLA
Modified: 2009-08-30 02:07 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Goetz Markgraf CLA 2003-06-10 06:45:53 EDT
In the Code Completion for the Types or the Dialogbox "Open Type" not alle 
Types in the current project are displayed. The Types are also not found 
with "organize imports".

Possible reason could be the number of Types / Java-Files in the Project that 
might create the problem. We have several JAR-Files included (including 
tools.jar from the JDK and JH from JavaHelp) and about 1.500 JAVA-Files in the 
project.

I did not find any scheme which Types Eclipse doesn't show. It look random to 
me. (Ordered by Hash-Code?)

We tried to pack a lot of Java-Classes that we do not edit right now into a JAR-
File but that did not change a thing (except that there are other Types missing 
now.)

Is there a size-limit of the eclipse JDT-Repository?
Comment 1 Philipe Mulet CLA 2003-06-10 07:09:54 EDT
No, this should work in theory. Steps to reproduce would be necessary to 
investigate this issue. 

I am suspecting some incorrect refresh at some stage. 

Things to try:
1. close all Java projects in navigator, and reopen them. Ask to open types 
again, does this work ?

2. does it work better if you exit Eclipse and manually discard its index files 
(located at <workspace>/.metadata/.plugins/org.eclipse.jdt.core/*.index) ? Then 
restart Eclipse and request open type again (will cause to reindex completely).
Comment 2 Philipe Mulet CLA 2003-06-10 07:43:41 EDT
From reporter:

I tried the first one and it did not change a thing.

I will try the second, as soon as I discover a new missing Type (as I said,
Types sometimes come and go...)

Thanx in advance, I will contact you.
Comment 3 Goetz Markgraf CLA 2003-06-12 07:25:02 EDT
Deleting the indexfiles seems zu work!
After reindexing alle the Types, the missing types reappeared.

I hope, that there are no other Types missing, but so far I do not have a 
hint...
Comment 4 Philipe Mulet CLA 2003-06-12 07:36:02 EDT
Then it indicates that indexes did not get properly updated along the road. 
Some incremental changes you did perform did not get reflected in indexes, thus 
fooling further search action (open type searches for all type declarations).

If you can remember what you did before you got there, this would be quite 
informative. Do you remember some addition/deletion of source folders to the 
classpath, or a few things like that ...

Were missing types located in a certain package ?
Comment 5 Goetz Markgraf CLA 2003-06-12 10:53:55 EDT
The missing Types were located in one package. Actually these had been the 
Types hat I had created/added at that very day.
I do not know any more, if I have ever seen these Types in the List at all.
Comment 6 Philipe Mulet CLA 2003-06-13 09:13:14 EDT
Which exact build number are you using ? 
Comment 7 Goetz Markgraf CLA 2003-06-16 02:48:24 EDT
Version: 2.1.0
Build id: 200303272130
Comment 8 Goetz Markgraf CLA 2003-07-09 04:46:56 EDT
Problem still exists.
We delete the *.index-files once every day and can work, however, the problem 
still exists.
Comment 9 Philipe Mulet CLA 2003-07-09 05:34:41 EDT
Does it still occur with a more recent 3.0 integration build ? (is this what 
you meant by it still happens?).

Since it seems quite reproducible, you should try to provide steps to 
reproduce. Once we understand the pattern, a fix should be quite quick to occur.

When JDT/Core monitors resource changes, it will induce some indexing work, 
which will update our indexes. When indexes are out of sync, then what you are 
observing is quite expectable. So it seems that some operations you performed 
on certain types did bypass our index update mechanism.

Can you figure how you did add/modify the files you are missing in the end ?
Comment 10 Goetz Markgraf CLA 2003-07-09 05:42:46 EDT
We still work with Eclipse 2.1.0.

With "still" I mean, that the problem could not be fixed by reindexing once. It 
has to be done continiously.

Our Developers work like this:
The current "build" in included in a JAR file on a central fileserver. From 
there, the developers copy it locally to a space that is within the buildpath 
as an external library.
Only the sources, that the developers are changing, they have as sourcefiles 
within the projekt. After they change something, they check-in the file in our 
Source code config tool. From that, we create a new JAR-File, that replaces the 
JAR-file on the fileserver.

Maybe important: the developers copy the file to the local path WHILE eclipse 
is running. After that, they call "refresh" on the project.

There is always different files missing. We did not discover by now a "sheme". 
Therefore it is not really reproducible, it just occurs every day or two.

Sorry, that I cannot provide more information. I know how frustrating it must 
be for you.
Comment 11 Philipe Mulet CLA 2003-07-09 06:48:35 EDT
No problem, thanks for keeping faith. Having to discard index files everyday 
seems very painful to me, we want to solve this issue (and possibly issue a 
patch you will be able to download separately).

[You may want to switch to 2.1.1, it has a few critical fixes, unfortunately, I 
don't think this one would be solved in there]

Just to clarify, your are usually developping against a build JAR, and only 
patch a few sources when necessary:

Project
 +- src
 |     a few 'better' sources which are hiding build JAR entries
 +- external build JAR

Are you using the refresh action from the navigator or from the package 
explorer ? The action from package explorer should trigger an external JAR 
refresh when these are changing (inducing appropriate index actions), 
unfortunately the navigator doesn't provide a hook (yet) so as to do the full 
refresh.

Does it work better if the JAR is actually stored inside the workspace ?

One more thing to try, is to activate the indexing consle trace so as to figure 
exactly what is going on.

- exit Eclipse
- edit/create text file located at <eclipse-install>/.options
  and add the following 2 lines:
    org.eclipse.jdt.core/debug=true
    org.eclipse.jdt.core/debug/indexmanager=true
- restart Eclipse with options '-debug -consoleLog -vm <jre-
install>\jre\bin\java.exe', for it to consider this .options file, and open a 
Java console (also cause .log entries to be echoed to Java console).
- now all indexing activity should be printed to the console, and if you have 
steps reproducing the issue, then in combination with the trace we can probably 
figure what is going on.
Comment 12 John Mysak CLA 2004-01-07 13:31:31 EST
Has there been any activity on this bug since the last thread on 2003-07-09?  
We are still having this problem with WSAD 5.1.1 (Eclipse 2.1.1) and it is 
quite frustrating having to recycle WSAD each time it occurs.  

Unfortunately, I don't have any clues to add that might help you reproduce the 
problem, but am hoping that loads of people have reported the problem by now 
and that a fix might be on the way.??  I can tell you that restarting WSAD 
temporarily fixes the problem for us - without deleting the index files since 
it seems that the types are reindexed after every restart and upon first use of 
the Open Type/Browse dialog. 

We are running WSAD 5.1.1 on Windows 2000 (SP3) and we have approx. 9,000 java 
classes, resources, etc. that are under ClearCase version control.  The 
classes, etc. are organized into separate projects for EJB groups, Web files, 
and other classes.  Last time I had this problem, I was adding a new EJB and 
cancelled out of the Add Enterprise Bean wizard a couple of times and then when 
I tried to set the super class for the EJB, I clicked on the browse button, 
lots of Java classes were missing from the type selection dialog.  We also see 
this problem with the Open Types dialog, usually after WSAD/Eclipse has been 
running for at least 3 hours.
Comment 13 John Mysak CLA 2004-01-21 15:11:25 EST
Hi, I would appreciate a response to my previous comment on 1-7-04. Thanks!
Comment 14 Philipe Mulet CLA 2004-01-22 18:14:55 EST
In 2.1 stream, we did make changes, but not for this particular problem, which 
we haven't been able to reproduce. In 3.0 stream, we made quite a number of 
changes in search area, and it would be interesting to check whether you can 
reproduce this issue on 3.0 M6. 

Your setup must have something special, we haven't heard lately of such issues. 
If we had got tons of similar reports, this would have been addressed for sure.

Also, you never provided the requested information with indexer traces... these 
could show something we could need.

Clearly, testing 3.0 behavior with your test case is important for us.
Comment 15 Philipe Mulet CLA 2004-01-23 15:58:03 EST
Please reopen if you can find reproduceable steps or assess that the bug still 
exists in 3.0M6.
Comment 16 Frederic Fusier CLA 2005-02-17 09:32:00 EST
Closing as never reproduced in a long time
Comment 17 Denis Roy CLA 2009-08-30 02:07:09 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.