Skip to content

Add Java projects to classpath container org.eclipse.pde.core.externaJavaSearch#2270

Open
trancexpress wants to merge 1 commit intoeclipse-pde:masterfrom
trancexpress:gh2269
Open

Add Java projects to classpath container org.eclipse.pde.core.externaJavaSearch#2270
trancexpress wants to merge 1 commit intoeclipse-pde:masterfrom
trancexpress:gh2269

Conversation

@trancexpress
Copy link
Contributor

The classpath container org.eclipse.pde.core.externalJavaSearch skips adding plug-ins if a respective project is found in the workspace. This can result in unexpected behavior when browsing code from the container, such as wrong syntax highlighting, navigation and search results.

This change adjusts the classpath container to contain also projects found in the workspace.

Fixes: #2269

@trancexpress
Copy link
Contributor Author

Are there tests for this container? I'm not sure what to search for, I'm not finding any.

@github-actions
Copy link

github-actions bot commented Mar 23, 2026

Test Results

  147 files  ±0    147 suites  ±0   38m 13s ⏱️ + 3m 7s
3 496 tests +1  3 442 ✅ +1   54 💤 ±0  0 ❌ ±0 
9 309 runs  +3  9 179 ✅ +3  130 💤 ±0  0 ❌ ±0 

Results for commit 2b3ddd1. ± Comparison against base commit 95c57fb.

♻️ This comment has been updated with latest results.

@laeubi
Copy link
Contributor

laeubi commented Mar 24, 2026

The classpath container org.eclipse.pde.core.externalJavaSearch skips adding plug-ins if a respective project is found in the workspace.

From the naming and from the code it looks like it is intentional... So I think you should do some research what was the reason for this. At a minimum one need to revise the javadoc of the class (and possible other documentations as well).

@trancexpress
Copy link
Contributor Author

From the naming and from the code it looks like it is intentional... So I think you should do some research what was the reason for this.

The project is used to be able to browse target platform code, search in it and so on. I'm sure its intentional, otherwise you woyld e.g. get double search results - one for the project in the workspace, one for the External Plug-in Libraries project.

I'll see if I can find something in the git history, maybe there is a Bugzilla ticket.

@trancexpress
Copy link
Contributor Author

trancexpress commented Mar 24, 2026

The source plug-in was omitted for: https://bugs.eclipse.org/bugs/show_bug.cgi?id=197817

I20070724-0800

Has already been reported as fixed in bug 56501, but apparently, no regression test caught the reappearance of this problem.

  • new workspace
  • Plug-ins view
  • Select All
  • Add to Java Search
  • import org.eclipse.core.expressions as source
  • Navigate > Open Type, enter "AndExpression"
    => two matches for same class (from source and from External Plug-in Libraries)

With this PR, I don't see multiple matches for: org.eclipse.core.expressions.AndExpression

image

Unfortunately no test was added for the problem: https://bugs.eclipse.org/bugs/attachment.cgi?id=75349&action=diff

I'm not sure how complicated a test is... I'll check if there are tests for the PDE plug-in container, maybe we can mimic those.

…lJavaSearch

The classpath container org.eclipse.pde.core.externalJavaSearch
skips adding plug-ins if a respective project is found in the workspace.
This can result in unexpected behavior when browsing code from the container,
such as wrong syntax highlighting, navigation and search results.

This change adjusts the classpath container to contain
also projects found in the workspace.

A test is also added for the initial bug fix, due to which workspace projects are skipped:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=197817

Fixes: eclipse-pde#2269
@trancexpress
Copy link
Contributor Author

trancexpress commented Mar 24, 2026

I added a test, unfortunately its quite slow... ~18 seconds on my laptop. Most of the time is spent indexing the container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Navigation problems in IDEApplication from External Plug-in Libraries project

2 participants