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

Preliminary test case for refactoring pull members up functionality #214

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

as3boyan
Copy link
Contributor

@as3boyan as3boyan commented Apr 8, 2015

Preliminary test case for refactoring pull members up functionality
(not yet ready to pull, just to save this commit and solve issue with running tests)

@as3boyan
Copy link
Contributor Author

as3boyan commented Apr 8, 2015

Depends on #216

@as3boyan
Copy link
Contributor Author

Push Members Down: again some formatting issues when I try to do reformatting

  private void reformat(final PsiMember movedElement) {
    ApplicationManager.getApplication().runWriteAction(new Runnable() {
      @Override
      public void run() {
        final TextRange range = movedElement.getTextRange();
        final PsiFile file = movedElement.getContainingFile();

        PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance(myProject);
        psiDocumentManager.doPostponedOperationsAndUnblockDocument(psiDocumentManager.getDocument(file));

        final PsiFile baseFile = file.getViewProvider().getPsi(file.getViewProvider().getBaseLanguage());
        CodeStyleManager.getInstance(myProject).reformatText(baseFile, range.getStartOffset(), range.getEndOffset());
      }
    });
  }

Same code works somehow for Pull Members Up.

…ationPart, then move parent (HaxeVarDeclaration)

 Fix Test Cases for Push Members Down #11
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.

1 participant