Bug 533962 - code assist result is not correct when *.jar file has the same subpackage
Summary: code assist result is not correct when *.jar file has the same subpackage
Status: CLOSED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.7.3   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.16 M3   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2018-04-23 20:16 EDT by SeongMo Yeon CLA
Modified: 2020-04-18 08:44 EDT (History)
1 user (show)

See Also:


Attachments
jar file is attached. (8.78 MB, application/gzip)
2018-04-25 08:07 EDT, SeongMo Yeon CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description SeongMo Yeon CLA 2018-04-23 20:16:12 EDT
I am writting a library for StarCCM+. the minimal code is as follows:

import java.util.*;

import star.common.*;

// mesh
import star.base.*;
import star.metrics.*;
import star.meshing.*;

public class core {

    static public void setMesh(Simulation sim, String name) {
        MeshContinuum meshContinuum = null;
        meshContinuum = sim.getContinuumManager().hasContinuum(MeshContinuum.class);
        meshContinuum.getReferenceValues().get(BaseSize.class).setValue(10.0);

        MaximumCellSize maximumCellSize = meshContinuum.getReferenceValues().get(MaximumCellSize.class);
        GenericRelativeSize genericRelativeSize = ((GenericRelativeSize) maximumCellSize.getRelativeSize());

        SurfaceGrowthRate surfaceGrowthRate = meshContinuum.getReferenceValues().get(SurfaceGrowthRate.class);

        SurfaceSize surfaceSize = meshContinuum.getReferenceValues().get(SurfaceSize.class);
        RelativeMinimumSize relativeMinimumSize = surfaceSize.getRelativeMinimumSize();
        RelativeTargetSize relativeTargetSize = surfaceSize.getRelativeTargetSize();
    }
}


The problem is that the above code is utilizing StarCCM+'s extension library.
starbase.jar, metrics.jar and mesh.jar

This code is compiled without any issue when I compile the code with Makefile and javac. However, as you can see in the attached file, code assistant marked several classes as unresolvable.

I digged into starbase.jar and mesh.jar and found that those two files has the same subpackage, star.meshing.

For example, the unresolvable class, BaseSize and MaximumCellSize is defined in star.meshing of mesh.jar.

So if I change the order of those two jar files in build path property, the unresolvable class is marked as resolvable but other classes defined in starbase.jar is marked as unresolvable instead.

I guess is eclipse's bug because just compile with javac and Makefile works.
Comment 1 Stephan Herrmann CLA 2018-04-24 05:14:08 EDT
Where can we find the necessary jar files? Please give precise links to the versions you use.
Comment 2 SeongMo Yeon CLA 2018-04-25 08:07:30 EDT
Created attachment 273773 [details]
jar file is attached.
Comment 3 SeongMo Yeon CLA 2018-04-26 09:17:58 EDT
(In reply to Stephan Herrmann from comment #1)
> Where can we find the necessary jar files? Please give precise links to the
> versions you use.

I added the jar files.
Comment 4 Eclipse Genie CLA 2020-04-18 07:35:01 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Stephan Herrmann CLA 2020-04-18 08:44:03 EDT
FWIW, trying ecj 4.7.3 as well as today's head, and independent of classpath order, the example reports only one unresolved type: SurfaceGrowthRate. This type is indeed nowhere to be found in the given jar files.