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

Implement PsiFile.getAssociatedPsiHelper() #237

Open
arksap2002 opened this issue Jun 3, 2024 · 0 comments
Open

Implement PsiFile.getAssociatedPsiHelper() #237

arksap2002 opened this issue Jun 3, 2024 · 0 comments
Assignees
Labels
refactoring Refactor the project

Comments

@arksap2002
Copy link
Collaborator

Describe the bug
Froward from @Vladislav0Art:

This object may be removed completely if we implement the getPsiHelper as an extension method of PsiFile:

fun PsiFile.getAssociatedPsiHelper(): PsiHelperInterface {
  return when (this) {
            is PsiJavaFile -> JavaPsiHelper()
            // TODO: kotlin later
            else -> throw IllegalArgumentException("Unsupported file type")
        }
}

It is advisable to remove it, as it will reduce the number of entities in the application, especially since PsiHelperGetter is a one-method object.

@arksap2002 arksap2002 added the refactoring Refactor the project label Jun 3, 2024
@Frosendroska Frosendroska self-assigned this Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Refactor the project
Projects
None yet
Development

No branches or pull requests

2 participants