Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApiModelFactory.isBinaryProject(String) wrongly assumes that a project is always named like its location #789

Closed
laeubi opened this issue Oct 8, 2023 · 0 comments · Fixed by #790

Comments

@laeubi
Copy link
Contributor

laeubi commented Oct 8, 2023

In the following code it is assumed that the last part of the location is suitable to find the project in the workspace:

private static boolean isBinaryProject(String location) throws CoreException {
IPath path = IPath.fromOSString(location);
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(path.lastSegment());
return project != null && (!project.exists() || Util.isBinaryProject(project));
}

but the method says:

returns a handle to the project resource with the given name

that is not always the same as the location (except fro projects directly located in the workspace).

HannesWell added a commit to HannesWell/eclipse.pde that referenced this issue Oct 8, 2023
HannesWell added a commit to HannesWell/eclipse.pde that referenced this issue Oct 8, 2023
HannesWell added a commit to HannesWell/eclipse.pde that referenced this issue Oct 8, 2023
laeubi added a commit to laeubi/tycho that referenced this issue Oct 8, 2023
laeubi added a commit to laeubi/tycho that referenced this issue Oct 8, 2023
HannesWell added a commit to HannesWell/eclipse.pde that referenced this issue Oct 8, 2023
HannesWell added a commit to HannesWell/eclipse.pde that referenced this issue Oct 8, 2023
HannesWell added a commit to HannesWell/eclipse.pde that referenced this issue Oct 8, 2023
laeubi added a commit to laeubi/tycho that referenced this issue Oct 8, 2023
HannesWell added a commit to HannesWell/eclipse.pde that referenced this issue Oct 8, 2023
HannesWell added a commit to HannesWell/eclipse.pde that referenced this issue Oct 8, 2023
laeubi added a commit to laeubi/tycho that referenced this issue Oct 8, 2023
laeubi added a commit to eclipse-tycho/tycho that referenced this issue Oct 9, 2023
github-actions bot pushed a commit to eclipse-tycho/tycho that referenced this issue Oct 9, 2023
laeubi added a commit to eclipse-tycho/tycho that referenced this issue Oct 9, 2023
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 a pull request may close this issue.

1 participant