-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Allow quick label change #1733
Merged
PHPirates
merged 9 commits into
Hannah-Sten:master
from
fberlakovich:allow-quick-label-change
Jan 12, 2021
Merged
Allow quick label change #1733
PHPirates
merged 9 commits into
Hannah-Sten:master
from
fberlakovich:allow-quick-label-change
Jan 12, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…s also for environments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for implementing this :) Looks good! Just one thing:
I get the following crash when I execute the intention in an lstlisting environment.
Write access is allowed inside write-action only
java.lang.Throwable:` Assertion failed: Write access is allowed inside write-action only (see com.intellij.openapi.application.Application.runWriteAction())
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:195)
at com.intellij.openapi.application.impl.ApplicationImpl.assertWriteAccessAllowed(ApplicationImpl.java:1311)
at com.intellij.openapi.vfs.newvfs.impl.CachedFileType.clearCache(CachedFileType.java:38)
at com.intellij.openapi.vfs.newvfs.impl.CachedFileType$PsiListener.modificationCountChanged(CachedFileType.java:49)
at jdk.internal.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:652)
at com.intellij.util.messages.impl.MessageBusImpl.deliverMessage(MessageBusImpl.java:426)
at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:401)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:383)
at com.intellij.util.messages.impl.MessageBusImpl.access$100(MessageBusImpl.java:33)
at com.intellij.util.messages.impl.MessageBusImpl$MessagePublisher.invoke(MessageBusImpl.java:189)
at com.sun.proxy.$Proxy38.modificationCountChanged(Unknown Source)
at com.intellij.psi.impl.PsiModificationTrackerImpl.fireEvent(PsiModificationTrackerImpl.java:81)
at com.intellij.psi.impl.PsiModificationTrackerImpl.incCountersInner(PsiModificationTrackerImpl.java:86)
at com.intellij.psi.impl.PsiModificationTrackerImpl.treeChanged(PsiModificationTrackerImpl.java:96)
at com.intellij.psi.impl.PsiManagerImpl.fireEvent(PsiManagerImpl.java:338)
at com.intellij.psi.impl.PsiManagerImpl.childrenChanged(PsiManagerImpl.java:298)
at com.intellij.pom.core.impl.PomModelImpl.sendAfterChildrenChangedEvent(PomModelImpl.java:370)
at com.intellij.pom.core.impl.PomModelImpl.commitTransaction(PomModelImpl.java:199)
at com.intellij.pom.core.impl.PomModelImpl.lambda$runTransaction$1(PomModelImpl.java:152)
at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:567)
at com.intellij.pom.core.impl.PomModelImpl.lambda$runTransaction$2(PomModelImpl.java:104)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:218)
at com.intellij.pom.core.impl.PomModelImpl.runTransaction(PomModelImpl.java:93)
at com.intellij.psi.impl.source.tree.ChangeUtil.prepareAndRunChangeAction(ChangeUtil.java:142)
at com.intellij.psi.impl.source.tree.CompositeElement.addChild(CompositeElement.java:579)
at com.intellij.psi.impl.source.tree.CompositeElement.addChildren(CompositeElement.java:673)
at com.intellij.psi.impl.source.codeStyle.CodeEditUtil.addChildren(CodeEditUtil.java:53)
at com.intellij.extapi.psi.ASTDelegatePsiElement.addInternal(ASTDelegatePsiElement.java:306)
at com.intellij.extapi.psi.ASTDelegatePsiElement.addInnerBefore(ASTDelegatePsiElement.java:279)
at com.intellij.extapi.psi.ASTDelegatePsiElement.addBefore(ASTDelegatePsiElement.java:273)
at nl.hannahsten.texifyidea.psi.LatexPsiHelper.setOptionalParameter(LatexPsiHelper.kt:139)
at nl.hannahsten.texifyidea.intentions.LatexAddLabelIntention.createLabelAndStartRename(LatexAddLabelIntention.kt:99)
at nl.hannahsten.texifyidea.intentions.LatexAddLabelToEnvironmentIntention.invoke(LatexAddLabelToEnvironmentIntention.kt:48)
at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.invoke(IntentionActionWrapper.java:66)
at com.intellij.codeInsight.intention.impl.IntentionActionWithTextCaching$MyIntentionAction.invoke(IntentionActionWithTextCaching.java:208)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.invokeIntention(ShowIntentionActionsHandler.java:252)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.lambda$chooseActionAndInvoke$3(ShowIntentionActionsHandler.java:225)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:220)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:177)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:167)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:153)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseActionAndInvoke(ShowIntentionActionsHandler.java:224)
at com.intellij.codeInsight.intention.impl.IntentionListStep.lambda$applyAction$3(IntentionListStep.java:128)
at com.intellij.util.ui.EdtInvocationManager.invokeLaterIfNeeded(EdtInvocationManager.java:88)
at com.intellij.util.ui.UIUtil.invokeLaterIfNeeded(UIUtil.java:2194)
at com.intellij.ide.IdeEventQueue.ifFocusEventsInTheQueue(IdeEventQueue.java:188)
at com.intellij.ide.IdeEventQueue.executeWhenAllFocusEventsLeftTheQueue(IdeEventQueue.java:140)
at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:173)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.doWhenFocusSettlesDown(IdeFocusManagerImpl.java:36)
at com.intellij.codeInsight.intention.impl.IntentionListStep.lambda$applyAction$4(IntentionListStep.java:127)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:216)
at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:24)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:199)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:324)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:85)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:134)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:190)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:976)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:843)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:454)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:453)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:501)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Document:
\begin{document}
\begin{lstlisting}
I
\end{lstlisting}
\end{document}
src/nl/hannahsten/texifyidea/intentions/LatexAddLabelIntention.kt
Outdated
Show resolved
Hide resolved
HannahSchellekens
approved these changes
Jan 11, 2021
…t has an unexpected structure
PHPirates
approved these changes
Jan 12, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #1725
Summary of additions and changes
How to test this pull request