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

fix SingleBreakOrContinue #746

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,8 @@ public class PackageFilter extends AbstractFilter {

@Override
public boolean accept(Object object) {

boolean goesThrough = true;

if (object instanceof IResource) {

IResource resource = (IResource) object;

IContainer folder = null;

if (object instanceof IResource resource) {
IContainer folder;
if (resource instanceof IContainer) {
folder = (IContainer) resource;
} else {
Expand All @@ -68,24 +61,20 @@ public boolean accept(Object object) {

int size = mData != null ? mData.size() : 0;
for (int i = 0; i < size; i++) {

String element = mData.get(i);

if (RECURSE_OFF_MARKER.equals(element)) {
continue;
}

IPath filteredPath = new Path(element);
if (mExcludeSubPackages && filteredPath.isPrefixOf(projRelativPath)) {
goesThrough = false;
break;
} else if (!mExcludeSubPackages && filteredPath.equals(projRelativPath)) {
goesThrough = false;
break;
if (mExcludeSubPackages && filteredPath.isPrefixOf(projRelativPath)
|| !mExcludeSubPackages && filteredPath.equals(projRelativPath)) {
return false;
}
}
}
return goesThrough;
return true;
}

@Override
Expand Down
Loading