satamas / fortran-plugin Goto Github PK
View Code? Open in Web Editor NEWFortran language plugin for IntelliJ Idea
License: Apache License 2.0
Fortran language plugin for IntelliJ Idea
License: Apache License 2.0
e.g. the code
if (dabs(rat - 1d0) > 1d-8) then
select case(np)
case(0:)
rat = radii_ratio_chebyshev(np)
case (-1) ! oblate/prolate spheroids
rat = radii_ratio_spheroid()
case (-2) ! oblate/prolate cylinder
rat = radii_ratio_cylinder()
case (-3) ! distorted chebyshev droplet
rat = radii_ratio_droplet()
case (-9) ! nanorod
rat = radii_ratio_nanorod()
end select
end if
has folding signs for if
and each case
, but no one for the whole select case
I'm unable to open an existing Fortran file in CLion. In trying to debug the issue, I went through the following steps:
This led to an AssertionError
in the Fortran plugin:
java.lang.AssertionError: (598,598), text: , language = Language: Fortran
at com.intellij.lang.folding.FoldingDescriptor.<init>(FoldingDescriptor.java:111)
at com.intellij.lang.folding.FoldingDescriptor.<init>(FoldingDescriptor.java:92)
at com.intellij.lang.folding.FoldingDescriptor.<init>(FoldingDescriptor.java:77)
at com.intellij.lang.folding.FoldingDescriptor.<init>(FoldingDescriptor.java:60)
at org.jetbrains.fortran.ide.folding.FortranFoldingBuilder$FoldingVisitor.foldBetweenStatements(FortranFoldingBuilder.kt:145)
at org.jetbrains.fortran.ide.folding.FortranFoldingBuilder$FoldingVisitor.visitDeclarationConstruct(FortranFoldingBuilder.kt:101)
at org.jetbrains.fortran.lang.psi.FortranVisitor.visitInterfaceBlock(FortranVisitor.java:692)
at org.jetbrains.fortran.lang.psi.impl.FortranInterfaceBlockImpl.accept(FortranInterfaceBlockImpl.java:27)
at org.jetbrains.fortran.lang.psi.impl.FortranInterfaceBlockImpl.accept(FortranInterfaceBlockImpl.java:31)
at org.jetbrains.fortran.ide.folding.FortranFoldingBuilder$buildFoldRegions$1.execute(FortranFoldingBuilder.kt:24)
at com.intellij.psi.util.PsiTreeUtil$4.visitElement(PsiTreeUtil.java:882)
at com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:274)
at org.jetbrains.fortran.lang.psi.impl.FortranInterfaceBlockImpl.accept(FortranInterfaceBlockImpl.java:32)
at com.intellij.psi.PsiWalkingState.visit(PsiWalkingState.java:70)
at com.intellij.psi.PsiWalkingState.visit(PsiWalkingState.java:27)
at com.intellij.util.WalkingState.walkChildren(WalkingState.java:65)
at com.intellij.util.WalkingState.elementStarted(WalkingState.java:52)
at com.intellij.psi.PsiWalkingState.elementStarted(PsiWalkingState.java:79)
at com.intellij.psi.PsiRecursiveElementWalkingVisitor.visitElement(PsiRecursiveElementWalkingVisitor.java:48)
at com.intellij.psi.util.PsiTreeUtil$4.visitElement(PsiTreeUtil.java:883)
at com.intellij.psi.PsiElementVisitor.visitFile(PsiElementVisitor.java:34)
at com.intellij.psi.PsiRecursiveElementWalkingVisitor.visitFile(PsiRecursiveElementWalkingVisitor.java:70)
at com.intellij.extapi.psi.PsiFileBase.accept(PsiFileBase.java:70)
at com.intellij.psi.util.PsiTreeUtil.processElements(PsiTreeUtil.java:878)
at org.jetbrains.fortran.ide.folding.FortranFoldingBuilder.buildFoldRegions(FortranFoldingBuilder.kt:24)
at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptors(LanguageFolding.java:71)
at com.intellij.codeInsight.folding.impl.FoldingUpdate.a(FoldingUpdate.java:239)
at com.intellij.codeInsight.folding.impl.FoldingUpdate.getFoldingsFor(FoldingUpdate.java:225)
at com.intellij.codeInsight.folding.impl.FoldingUpdate.a(FoldingUpdate.java:97)
at com.intellij.codeInsight.folding.impl.FoldingUpdate.a(FoldingUpdate.java:86)
at com.intellij.psi.impl.PsiParameterizedCachedValue.doCompute(PsiParameterizedCachedValue.java:45)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:60)
at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.java:35)
at com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:96)
at com.intellij.codeInsight.folding.impl.FoldingUpdate.updateFoldRegions(FoldingUpdate.java:82)
at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.a(CodeFoldingManagerImpl.java:298)
at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.updateFoldRegionsAsync(CodeFoldingManagerImpl.java:284)
at com.intellij.codeInsight.daemon.impl.CodeFoldingPass.doCollectInformation(CodeFoldingPass.java:42)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:69)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:423)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1161)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.e(PassExecutorService.java:416)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:580)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:415)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.d(PassExecutorService.java:391)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:147)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:222)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:389)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:161)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
The issue appears to be related to the include
statement, and I've attached a minimal working example to replicate the issue.
I was debugging a Fortran program and CLion told me an error occurred and I should report it to the developers. Not sure if it is a real error if it is just being noisy.
Steps to reproduce:
Again not sure it's a real error because I would not expect to not be able to access the variable from outside the module.
Stacktrace:
java.lang.Throwable: Empty PSI elements must not be passed to createDescriptor. Start: NONSTANDARD_KIND_SELECTOR, end: NONSTANDARD_KIND_SELECTOR, startContainingFile: FILE
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:145)
at com.intellij.codeInspection.ProblemDescriptorBase.<init>(ProblemDescriptorBase.java:61)
at com.intellij.codeInspection.InspectionManagerBase.createProblemDescriptor(InspectionManagerBase.java:83)
at com.intellij.codeInspection.InspectionManagerBase.createProblemDescriptor(InspectionManagerBase.java:72)
at com.intellij.codeInspection.ProblemsHolder.registerProblem(ProblemsHolder.java:66)
at org.jetbrains.fortran.ide.inspections.FortranNonstandardKindInspection$buildVisitor$1.visitNonstandardKindSelector(FortranNonstandardKindInspection.kt:31)
at org.jetbrains.fortran.lang.psi.impl.FortranNonstandardKindSelectorImpl.accept(FortranNonstandardKindSelectorImpl.java:20)
at org.jetbrains.fortran.lang.psi.impl.FortranNonstandardKindSelectorImpl.accept(FortranNonstandardKindSelectorImpl.java:24)
at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:75)
at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:63)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.runToolOnElements(LocalInspectionsPass.java:295)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$null$5(LocalInspectionsPass.java:263)
at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:156)
at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:148)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$null$6(LocalInspectionsPass.java:260)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:127)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:116)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$7(LocalInspectionsPass.java:260)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:133)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1166)
at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:105)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:586)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:86)
at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:116)
at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:96)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:164)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:218)
at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
program a
forall (i = 1 : 10 : 2)
forall (j = 2 : 20 : 4, i = 1 : 10 : 2, j /= i) a = 2
1 forall (i = 1 : 10 : 2)
2 v = 1
3 endforall
where (l < 0) b = 1
where (k < 0)
c = 4
elsewhere (k < 3)
c = 5
elsewhere
c = 6
endwhere
endforall
endprogram
The exception below gets raised periodically when working in the JetBrains IDE. I have identified that it is raised when the source code contains a pointer declaration, such as:
integer, pointer :: variable_name
This is the stacktrace.txt content:
java.lang.StringIndexOutOfBoundsException: begin 0, end 9, length 7
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
at java.base/java.lang.String.substring(String.java:1874)
at org.jetbrains.fortran.lang.types.infer.FortranInferenceContext.processTypeDeclarationStatement(TypeInference.kt:37)
at org.jetbrains.fortran.lang.types.infer.FortranInferenceContext.infer(TypeInference.kt:28)
at org.jetbrains.fortran.lang.types.infer.TypeInferenceKt.inferTypesIn(TypeInference.kt:10)
at org.jetbrains.fortran.lang.types.ExtensionsKt$inference$1.compute(Extensions.kt:12)
at com.intellij.psi.util.CachedValuesManager.lambda$getCachedValue$0(CachedValuesManager.java:148)
at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:54)
at com.intellij.util.CachedValueBase.lambda$getValueWithLock$1(CachedValueBase.java:240)
at com.intellij.openapi.util.RecursionManager$1.doPreventingRecursion(RecursionManager.java:113)
at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:71)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:241)
at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:43)
at com.intellij.util.CachedValuesManagerImpl.getCachedValueFromExHolder(CachedValuesManagerImpl.java:72)
at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:45)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:147)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:129)
at org.jetbrains.fortran.lang.types.ExtensionsKt.getInference(Extensions.kt:11)
at org.jetbrains.fortran.ide.inspections.FortranTypeCheckInspection.collectDiagnostics(FortranTypeCheckInspection.kt:16)
at org.jetbrains.fortran.ide.inspections.FortranTypeCheckInspection.access$collectDiagnostics(FortranTypeCheckInspection.kt:10)
at org.jetbrains.fortran.ide.inspections.FortranTypeCheckInspection$buildVisitor$1.visitMainProgram(FortranTypeCheckInspection.kt:12)
at org.jetbrains.fortran.lang.psi.impl.FortranMainProgramImpl.accept(FortranMainProgramImpl.java:27)
at org.jetbrains.fortran.lang.psi.impl.FortranMainProgramImpl.accept(FortranMainProgramImpl.java:31)
at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:75)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$null$8(LocalInspectionsPass.java:321)
at com.intellij.util.AstLoadingFilter.lambda$toComputable$2(AstLoadingFilter.java:169)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:127)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:116)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:111)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitRestElementsAndCleanup$9(LocalInspectionsPass.java:320)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:133)
at com.intellij.concurrency.ApplierCompleter.tryToExecAllList(ApplierCompleter.java:231)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:159)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1106)
at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:105)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:116)
at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:96)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:164)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:204)
at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
First of all, thanks for the great plugin! Yesterday I updated Intellj PyCharm and also the fortran-plugin.
Now I experience that the find usages and all other referencing of modules, files and procedure does not work if my project contains multiple folders with source files.
I have Python projects with multiple source file folders, there it works. I have a single source folder Fortran project, there it works.
I invalidated the caches and restarted, checked and unchecked the relevant sources roots and played around with different scopes, to no avail. So, I assume that the indexing process, that usually happens in the beginning does somehow not work properly anymore.
My stats:
macOS Mojave 10.14.1
I use PyCharm 2018.3 PC-183.4248.139
fortran-plugin v2018.3.1
Also I got a bug report at a restart of PyCharm, I don't know if it is of any help:
java.lang.ClassCastException: org.jetbrains.fortran.lang.psi.impl.FortranInterfaceStmtImpl cannot be cast to org.jetbrains.fortran.lang.psi.FortranTypeDeclarationStmt
at org.jetbrains.fortran.lang.types.infer.FortranInferenceContext.inferFortranDesignatorType(TypeInference.kt:411)
at org.jetbrains.fortran.lang.types.infer.FortranInferenceContext.inferType(TypeInference.kt:83)
at org.jetbrains.fortran.lang.types.infer.FortranInferenceContext.inferBinaryExprType(TypeInference.kt:105)
at org.jetbrains.fortran.lang.types.infer.FortranInferenceContext.inferType(TypeInference.kt:76)
at org.jetbrains.fortran.lang.types.infer.FortranInferenceContext.inferType$default(TypeInference.kt:73)
at org.jetbrains.fortran.lang.types.infer.FortranInferenceContext.processActionStatement(TypeInference.kt:67)
at org.jetbrains.fortran.lang.types.infer.FortranInferenceContext.infer(TypeInference.kt:22)
at org.jetbrains.fortran.lang.types.infer.TypeInferenceKt.inferTypesIn(TypeInference.kt:10)
at org.jetbrains.fortran.lang.types.ExtensionsKt$inference$1.compute(Extensions.kt:12)
at com.intellij.psi.util.CachedValuesManager.lambda$getCachedValue$0(CachedValuesManager.java:140)
at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:60)
at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:88)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:139)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:126)
at org.jetbrains.fortran.lang.types.ExtensionsKt.getInference(Extensions.kt:11)
at org.jetbrains.fortran.ide.inspections.FortranTypeCheckInspection.collectDiagnostics(FortranTypeCheckInspection.kt:16)
at org.jetbrains.fortran.ide.inspections.FortranTypeCheckInspection.access$collectDiagnostics(FortranTypeCheckInspection.kt:10)
at org.jetbrains.fortran.ide.inspections.FortranTypeCheckInspection$buildVisitor$1.visitMainProgram(FortranTypeCheckInspection.kt:12)
at org.jetbrains.fortran.lang.psi.impl.FortranMainProgramImpl.accept(FortranMainProgramImpl.java:27)
at org.jetbrains.fortran.lang.psi.impl.FortranMainProgramImpl.accept(FortranMainProgramImpl.java:31)
at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:75)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$null$7(LocalInspectionsPass.java:316)
at com.intellij.util.AstLoadingFilter.lambda$toComputable$2(AstLoadingFilter.java:168)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:126)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:115)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:110)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitRestElementsAndCleanup$8(LocalInspectionsPass.java:315)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:133)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1163)
at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:105)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:116)
at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:96)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:147)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:222)
at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.pollAndExecCC(ForkJoinPool.java:1190)
at java.util.concurrent.ForkJoinPool.helpComplete(ForkJoinPool.java:1879)
at java.util.concurrent.ForkJoinPool.awaitJoin(ForkJoinPool.java:2045)
at java.util.concurrent.ForkJoinTask.doJoin(ForkJoinTask.java:390)
at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:719)
at java.util.concurrent.ForkJoinPool.invoke(ForkJoinPool.java:2616)
at com.intellij.concurrency.JobLauncherImpl.invokeConcurrentlyUnderProgress(JobLauncherImpl.java:65)
at com.intellij.concurrency.JobLauncher.invokeConcurrentlyUnderProgress(JobLauncher.java:56)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.visitRestElementsAndCleanup(LocalInspectionsPass.java:328)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.inspect(LocalInspectionsPass.java:199)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:115)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:69)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:423)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1168)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:416)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:415)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:391)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:147)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:222)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:389)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:161)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
.f95 is not the standard file extension for free form fortran source. In fact, there is no standard really, but the accepted extension is .f90 and some compilers will not accept .f95 (like Intel's compiler).
This plugin creates new fortran files with the extension .f95. It should be .f90.
null
java.lang.NullPointerException
at org.jetbrains.fortran.ide.structure.FortranStructureViewElement.getPresentation(FortranStructureViewElement.kt:45)
at com.intellij.ide.util.treeView.smartTree.TreeElementWrapper.update(TreeElementWrapper.java:41)
at com.intellij.ide.util.treeView.PresentableNodeDescriptor.getUpdatedPresentation(PresentableNodeDescriptor.java:88)
at com.intellij.ide.util.treeView.PresentableNodeDescriptor.update(PresentableNodeDescriptor.java:41)
at com.intellij.ide.util.treeView.AbstractTreeBuilder.updateNodeDescriptor(AbstractTreeBuilder.java:577)
at com.intellij.ide.util.treeView.AbstractTreeUi$22.perform(AbstractTreeUi.java:935)
at com.intellij.ide.util.treeView.TreeRunnable.run(TreeRunnable.java:36)
at com.intellij.ide.util.treeView.AbstractTreeUi.execute(AbstractTreeUi.java:1856)
at com.intellij.ide.util.treeView.AbstractTreeUi.update(AbstractTreeUi.java:931)
at com.intellij.ide.util.treeView.AbstractTreeUi.update(AbstractTreeUi.java:883)
at com.intellij.ide.util.treeView.AbstractTreeUi.processExistingNode(AbstractTreeUi.java:3004)
at com.intellij.ide.util.treeView.AbstractTreeUi.access$4900(AbstractTreeUi.java:64)
at com.intellij.ide.util.treeView.AbstractTreeUi$32$1.run(AbstractTreeUi.java:1718)
at com.intellij.ide.util.treeView.AbstractTreeUi.execute(AbstractTreeUi.java:1835)
at com.intellij.ide.util.treeView.AbstractTreeUi.access$5200(AbstractTreeUi.java:64)
at com.intellij.ide.util.treeView.AbstractTreeUi$33.perform(AbstractTreeUi.java:1801)
at com.intellij.ide.util.treeView.TreeRunnable.run(TreeRunnable.java:36)
at com.intellij.ide.util.treeView.AbstractTreeUi.executeYieldingRequest(AbstractTreeUi.java:2090)
at com.intellij.ide.util.treeView.AbstractTreeUi.access$5800(AbstractTreeUi.java:64)
at com.intellij.ide.util.treeView.AbstractTreeUi$36$1.perform(AbstractTreeUi.java:2002)
at com.intellij.ide.util.treeView.TreeRunnable.run(TreeRunnable.java:36)
at com.intellij.ide.util.treeView.AbstractTreeBuilder.runOnYeildingDone(AbstractTreeBuilder.java:433)
at com.intellij.ide.util.treeView.AbstractTreeUi.runOnYieldingDone(AbstractTreeUi.java:2185)
at com.intellij.ide.util.treeView.AbstractTreeUi$36.perform(AbstractTreeUi.java:1997)
at com.intellij.ide.util.treeView.TreeRunnable.run(TreeRunnable.java:36)
at com.intellij.ide.util.treeView.AbstractTreeBuilder.lambda$new$0(AbstractTreeBuilder.java:51)
at com.intellij.util.containers.TransferToEDTQueue.processNext(TransferToEDTQueue.java:102)
at com.intellij.util.containers.TransferToEDTQueue.access$300(TransferToEDTQueue.java:37)
at com.intellij.util.containers.TransferToEDTQueue$1.run(TransferToEDTQueue.java:57)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.g(IdeEventQueue.java:821)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:649)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
java.lang.NullPointerException
at org.jetbrains.fortran.ide.structure.FortranStructureViewElement.getPresentation(FortranStructureViewElement.kt:45)
at com.intellij.ide.util.treeView.smartTree.TreeElementWrapper.update(TreeElementWrapper.java:41)
at com.intellij.ide.util.treeView.PresentableNodeDescriptor.getUpdatedPresentation(PresentableNodeDescriptor.java:88)
at com.intellij.ide.util.treeView.PresentableNodeDescriptor.update(PresentableNodeDescriptor.java:41)
at com.intellij.ide.util.treeView.AbstractTreeBuilder.updateNodeDescriptor(AbstractTreeBuilder.java:577)
at com.intellij.ide.util.treeView.AbstractTreeUi$22.perform(AbstractTreeUi.java:935)
at com.intellij.ide.util.treeView.TreeRunnable.run(TreeRunnable.java:36)
at com.intellij.ide.util.treeView.AbstractTreeUi.execute(AbstractTreeUi.java:1856)
at com.intellij.ide.util.treeView.AbstractTreeUi.update(AbstractTreeUi.java:931)
at com.intellij.ide.util.treeView.AbstractTreeUi.update(AbstractTreeUi.java:883)
at com.intellij.ide.util.treeView.AbstractTreeUi.processExistingNode(AbstractTreeUi.java:3004)
at com.intellij.ide.util.treeView.AbstractTreeUi.access$4900(AbstractTreeUi.java:64)
at com.intellij.ide.util.treeView.AbstractTreeUi$32$1.run(AbstractTreeUi.java:1718)
at com.intellij.ide.util.treeView.AbstractTreeUi.execute(AbstractTreeUi.java:1835)
at com.intellij.ide.util.treeView.AbstractTreeUi.access$5200(AbstractTreeUi.java:64)
at com.intellij.ide.util.treeView.AbstractTreeUi$33.perform(AbstractTreeUi.java:1801)
at com.intellij.ide.util.treeView.TreeRunnable.run(TreeRunnable.java:36)
at com.intellij.ide.util.treeView.AbstractTreeUi.executeYieldingRequest(AbstractTreeUi.java:2090)
at com.intellij.ide.util.treeView.AbstractTreeUi.access$5800(AbstractTreeUi.java:64)
at com.intellij.ide.util.treeView.AbstractTreeUi$36$1.perform(AbstractTreeUi.java:2002)
at com.intellij.ide.util.treeView.TreeRunnable.run(TreeRunnable.java:36)
at com.intellij.ide.util.treeView.AbstractTreeBuilder.runOnYeildingDone(AbstractTreeBuilder.java:433)
at com.intellij.ide.util.treeView.AbstractTreeUi.runOnYieldingDone(AbstractTreeUi.java:2185)
at com.intellij.ide.util.treeView.AbstractTreeUi$36.perform(AbstractTreeUi.java:1997)
at com.intellij.ide.util.treeView.TreeRunnable.run(TreeRunnable.java:36)
at com.intellij.ide.util.treeView.AbstractTreeBuilder.lambda$new$0(AbstractTreeBuilder.java:51)
at com.intellij.util.containers.TransferToEDTQueue.processNext(TransferToEDTQueue.java:102)
at com.intellij.util.containers.TransferToEDTQueue.access$300(TransferToEDTQueue.java:37)
at com.intellij.util.containers.TransferToEDTQueue$1.run(TransferToEDTQueue.java:57)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.g(IdeEventQueue.java:821)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:649)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Dear satamas,
I am very interested in your fortran-plugin project since I am a heavy fortran user.
So I download the source and compile it by myself. Then I did a little test and found that the parser did not work for the following case.
`module test_mod
implicit none
type ty1 !define a class including a procedure
contains
procedure:: sub => sub1
end type
contains
subroutine sub1(this)
class(ty1):: this
print*,"sub1"
end subroutine
subroutine test1()
type(ty1):: t1
call t1%sub() !call class procedure; parser error: '%' or '[' expected, got ''
end subroutine
end module`
I hope that this message will help you improve the parser.
Best,
yours
Hi,
in CLion 2018.1.2 with the Fortran plugin version 2018.1-1 on Linux the whole IDE hangs forever (100% CPU utilizations on one thread) when the Fortran code contains a nested subroutine (this has affected all CLion/Fortran Plugin versions I tested over the last few months).
On my machine this can be triggered every time using the Fortran module code in test.txt (rename to test.f90, GH refuses to attach f90 files).
When placing the cursor as illustrated in the screenshot and pressing enter, the IDE freezes.
test.txt
screenshot_20180510_094844
Would be great if anyone could look into this. Thanks!
Thanks for the great plugin! The go to definition (ctrl-click) is a great feature. It would be nice if it understood that some variables are defined in include files. E.g.
sub.f90
subroutine sub
include 'const.inc'
write(*,*) pi
end subroutine
const.inc
real, parameter :: pi = 3.14
Ctrl-click on pi
in sub.f90
and it says that there are no usages/definition in the project. I would expect it to open const.inc
and jump to the line where pi is declared.
I know new code should use modules and the use
statement instead of include files, but older code uses include files because modules were not invented yet.
Example:
real (8), allocatable, dimension(:), target :: x
real (8), dimension(:), pointer :: px
integer, dimension (1 : 1000), intent (in) :: y
integer, dimension (9, 0 : 99, -99 : 99) :: i
endprogram arraystest
Platform: Windows Server 2008R2
Clion Version: 2017.3.1
Plugin Version: 2017.3.4
Error during pretty printers setup: Error while executing Python code.
Some features and performance optimizations will not be available.
python import sys; sys.path.insert(0, "D:/Users/user/.CLion2017.3/config/plugins/fortran-plugin/classes/gdb/renderers"); from default.printers import register_default_printers; register_default_printers(None); from libstdcxx.v6.printers import register_libstdcxx_printers; register_libstdcxx_printers(None);
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named default.printers
Error while executing Python code.
When a fixed form fortran file is translated to free form fortran file, the last character on the last line is missing.
Not sure what is causing this:
kotlin.TypeCastException: null cannot be cast to non-null type org.jetbrains.fortran.lang.psi.ext.FortranNamedElement
at org.jetbrains.fortran.lang.psi.mixin.FortranBlockDataImplMixin.getUnit(FortranBlockDataImplMixin.kt:27)
at org.jetbrains.fortran.lang.resolve.FortranPathReferenceImpl.resolveInProjectFiles(FortranPathReferenceImpl.kt:219)
at org.jetbrains.fortran.lang.resolve.FortranPathReferenceImpl.resolveName(FortranPathReferenceImpl.kt:164)
at org.jetbrains.fortran.lang.resolve.FortranPathReferenceImpl.resolveWithoutFiltering(FortranPathReferenceImpl.kt:59)
at org.jetbrains.fortran.lang.resolve.FortranPathReferenceImpl.resolveInner(FortranPathReferenceImpl.kt:23)
at org.jetbrains.fortran.lang.resolve.FortranReferenceBase$multiResolve$1.resolve(FortranReferenceBase.kt:24)
at org.jetbrains.fortran.lang.resolve.FortranReferenceBase$multiResolve$1.resolve(FortranReferenceBase.kt:13)
at org.jetbrains.fortran.lang.resolve.FortranReferenceBase$multiResolve$1.resolve(FortranReferenceBase.kt:23)
at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolve$0(ResolveCache.java:150)
at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:99)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:149)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:180)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:172)
at org.jetbrains.fortran.lang.resolve.FortranReferenceBase.multiResolve(FortranReferenceBase.kt:23)
at com.intellij.psi.PsiPolyVariantReferenceBase.resolve(PsiPolyVariantReferenceBase.java:47)
at com.intellij.codeInsight.TargetElementUtil.a(TargetElementUtil.java:382)
at com.intellij.codeInsight.TargetElementUtil.b(TargetElementUtil.java:359)
at com.intellij.codeInsight.TargetElementUtil.a(TargetElementUtil.java:231)
at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:203)
at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:81)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:69)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.e(PassExecutorService.java:423)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1161)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:416)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:580)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.d(PassExecutorService.java:415)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:391)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:147)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:222)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:389)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:161)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
In my project, I use cpp directives to detect build configuration. When formatting code, there directives were not handled correctly.
PROGRAM TEST
#ifdef DEBUG
PRINT*, "DEBUG"
#else
PRINT*, "RELEASE"
#endif
END
interface operator( +)
procedure :: foo_plus, fooo_plus
end interface
Space in ( +)
There is a minor spelling error here that shows up in the associate block tab completion. It should be "associate"
rather than "asociate"
Once again, thanks for maintaining this fantastic plugin! I use it daily.
It's me again ^v^. And sorry for my poor English.
Sometime, I use loop in anther loop. And I think I'm not alone. when the same statement is used, the autocompletion of the inner statement does not as expected. The tested commands are if
and do
. Sample code is also provided here.
subroutine print_array_r1()
implicit none
integer :: i,j,k
!Autocompletion works properly
if(i .eq. 1)then
do j=1,3
if(j==2)then
do k=1,3
print*,i,j,k
end do
end if
end do
end if
!Autocompletion does not works
if(i .eq. 1)then
if (j .eq. i)then
!end if is expected but not show up
end if
do i=1,2
do j=1,3
!end do is expected but not show up
end do
end subroutine
And many thanks to your effort!
sincerely!
In macOS Mojave there are some problems with the apparently supported GDB debugger (as mentioned by JetBrains) and is not working for me at all.
Surprisingly, the LLDB debugger is almost working and I can go to a breakpoint and do steps but evaluating variables and expressions is not working at all.
It will be nice if at least one of these debugger is working under macOS and evaluating is working.
This plugin seems to struggle with the associate
block, like one in the following snippet.
program associateTest
implicit none
integer :: a=1,b=1
associate( x => a*b )
print *, x ! yields: 1
a=10
print *, x ! yields: 1
end associate
end program associateTest
It produces the following errors at associate(
and highlights the leading (
ERROR '%', '(', ':', '[' or identifier expected, got '('
ERROR '%', '(', ':', , , , , , '[', eol, identifier or integerliteral expected, got '('
Other than this, I absolutely love this plugin! So thank you for creating and maintaining it!
Any ideas as to whats going on?
java.lang.ClassCastException: class org.jetbrains.fortran.lang.parser.FortranPreprocessorAwareBuilderAdapter cannot be cast to class com.intellij.lang.impl.PsiBuilderImpl (org.jetbrains.fortran.lang.parser.FortranPreprocessorAwareBuilderAdapter is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @49ef8196; com.intellij.lang.impl.PsiBuilderImpl is in unnamed module of loader com.intellij.util.lang.UrlClassLoader @36d4b5c) at com.intellij.lang.parser.GeneratedParserUtilBase.isWhitespaceOrComment(GeneratedParserUtilBase.java:414) at com.intellij.lang.parser.GeneratedParserUtilBase.reportFrameError(GeneratedParserUtilBase.java:821) at com.intellij.lang.parser.GeneratedParserUtilBase.enter_section_(GeneratedParserUtilBase.java:461) at com.intellij.lang.parser.GeneratedParserUtilBase.enter_section_(GeneratedParserUtilBase.java:453) at org.jetbrains.fortran.lang.parser.FortranParserUtil.enter_section_(FortranParserUtil.kt:152) at org.jetbrains.fortran.lang.parser.FortranParser.expr_0(FortranParser.java:14302) at org.jetbrains.fortran.lang.parser.FortranParser.expr(FortranParser.java:14293) at org.jetbrains.fortran.lang.parser.FortranParser.subscript_triplet_0_0(FortranParser.java:12279) at org.jetbrains.fortran.lang.parser.FortranParser.subscript_triplet_0(FortranParser.java:12270) at org.jetbrains.fortran.lang.parser.FortranParser.subscript_triplet(FortranParser.java:12259) at org.jetbrains.fortran.lang.parser.FortranParser.section_subscript(FortranParser.java:11535) at org.jetbrains.fortran.lang.parser.FortranParser$66.parse(FortranParser.java:14876) at org.jetbrains.fortran.lang.parser.FortranParser.list(FortranParser.java:9021) at org.jetbrains.fortran.lang.parser.FortranParser.data_reference_element_1_0_1(FortranParser.java:3275) at org.jetbrains.fortran.lang.parser.FortranParser.data_reference_element_1_0(FortranParser.java:3266) at org.jetbrains.fortran.lang.parser.FortranParser.data_reference_element_1(FortranParser.java:3256) at org.jetbrains.fortran.lang.parser.FortranParser.data_reference_element(FortranParser.java:3247) at org.jetbrains.fortran.lang.parser.FortranParser.data_path_start(FortranParser.java:3181) at org.jetbrains.fortran.lang.parser.FortranParser.data_path(FortranParser.java:3135) at org.jetbrains.fortran.lang.parser.FortranParser.designator_0(FortranParser.java:14463) at org.jetbrains.fortran.lang.parser.FortranParser.designator(FortranParser.java:14452) at org.jetbrains.fortran.lang.parser.FortranParser.assignment_stmt(FortranParser.java:941) at org.jetbrains.fortran.lang.parser.FortranParser.action_stmt(FortranParser.java:333) at org.jetbrains.fortran.lang.parser.FortranParser.execution_part_construct_1(FortranParser.java:6497) at org.jetbrains.fortran.lang.parser.FortranParser.execution_part_construct(FortranParser.java:6463) at org.jetbrains.fortran.lang.parser.FortranParser.block_0(FortranParser.java:1400) at org.jetbrains.fortran.lang.parser.FortranParser.block(FortranParser.java:1387) at org.jetbrains.fortran.lang.parser.FortranParser.nonlabel_do_construct(FortranParser.java:9684) at org.jetbrains.fortran.lang.parser.FortranParser.executable_construct(FortranParser.java:6442) at org.jetbrains.fortran.lang.parser.FortranParser.execution_part_construct_1(FortranParser.java:6499) at org.jetbrains.fortran.lang.parser.FortranParser.execution_part_construct(FortranParser.java:6463) at org.jetbrains.fortran.lang.parser.FortranParser.block_0(FortranParser.java:1400) at org.jetbrains.fortran.lang.parser.FortranParser.block(FortranParser.java:1387) at org.jetbrains.fortran.lang.parser.FortranParser.if_construct(FortranParser.java:7451) at org.jetbrains.fortran.lang.parser.FortranParser.executable_construct(FortranParser.java:6444) at org.jetbrains.fortran.lang.parser.FortranParser.execution_part_construct_1(FortranParser.java:6499) at org.jetbrains.fortran.lang.parser.FortranParser.execution_part_construct(FortranParser.java:6463) at org.jetbrains.fortran.lang.parser.FortranParser.block_0(FortranParser.java:1400) at org.jetbrains.fortran.lang.parser.FortranParser.block(FortranParser.java:1387) at org.jetbrains.fortran.lang.parser.FortranParser.subroutine_subprogram(FortranParser.java:12224) at org.jetbrains.fortran.lang.parser.FortranParser.module_subprogram_1(FortranParser.java:9413) at org.jetbrains.fortran.lang.parser.FortranParser.module_subprogram(FortranParser.java:9365) at org.jetbrains.fortran.lang.parser.FortranParser.module_subprogram_part_2_0(FortranParser.java:9465) at org.jetbrains.fortran.lang.parser.FortranParser.module_subprogram_part_2(FortranParser.java:9453) at org.jetbrains.fortran.lang.parser.FortranParser.module_subprogram_part(FortranParser.java:9428) at org.jetbrains.fortran.lang.parser.FortranParser.module_3(FortranParser.java:9316) at org.jetbrains.fortran.lang.parser.FortranParser.module(FortranParser.java:9292) at org.jetbrains.fortran.lang.parser.FortranParser.program_unit_1(FortranParser.java:11144) at org.jetbrains.fortran.lang.parser.FortranParser.program_unit(FortranParser.java:11124) at org.jetbrains.fortran.lang.parser.FortranParser.program_0(FortranParser.java:11056) at org.jetbrains.fortran.lang.parser.FortranParser.program(FortranParser.java:11044) at org.jetbrains.fortran.lang.parser.FortranParser.file(FortranParser.java:6742) at org.jetbrains.fortran.lang.parser.FortranParser.parse_root_(FortranParser.java:35) at org.jetbrains.fortran.lang.parser.FortranParser.parse_root_(FortranParser.java:31) at org.jetbrains.fortran.lang.parser.FortranParser.parseLight(FortranParser.java:26) at org.jetbrains.fortran.lang.parser.FortranParser.parse(FortranParser.java:18) at org.jetbrains.fortran.lang.parser.FortranFileParser.parse(FortranFileParser.kt:22) at org.jetbrains.fortran.lang.stubs.FortranFileStub$Type.parseContents(FortranFileStub.kt:18) at com.intellij.psi.impl.source.tree.LazyParseableElement.lambda$ensureParsed$0(LazyParseableElement.java:189) at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:564) at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:188) at com.intellij.psi.impl.source.tree.LazyParseableElement.getLastChildNode(LazyParseableElement.java:243) at com.intellij.psi.impl.source.tree.LazyParseableElement.getLastChildNode(LazyParseableElement.java:40) at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.pushChildren(DefaultStubBuilder.java:112) at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.visitNode(DefaultStubBuilder.java:82) at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.buildStubTree(DefaultStubBuilder.java:72) at com.intellij.psi.stubs.DefaultStubBuilder.buildStubTreeFor(DefaultStubBuilder.java:50) at com.intellij.psi.stubs.DefaultStubBuilder.buildStubTree(DefaultStubBuilder.java:39) at com.intellij.psi.stubs.StubTreeBuilder.buildStubTree(StubTreeBuilder.java:84) at com.intellij.psi.stubs.StubTreeLoaderImpl.lambda$readOrBuild$0(StubTreeLoaderImpl.java:70) at com.intellij.openapi.util.RecursionManager$1.doPreventingRecursion(RecursionManager.java:113) at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:71) at com.intellij.psi.stubs.StubTreeLoaderImpl.readOrBuild(StubTreeLoaderImpl.java:70) at com.intellij.psi.impl.source.PsiFileImpl.getStubTree(PsiFileImpl.java:608) at com.intellij.psi.impl.source.PsiFileImpl.getStub(PsiFileImpl.java:570) at org.jetbrains.fortran.lang.psi.FortranFile$programUnits$$inlined$runReadAction$1.compute(actions.kt:79) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:807) at org.jetbrains.fortran.lang.psi.FortranFile.getProgramUnits(FortranFile.kt:25) at org.jetbrains.fortran.lang.resolve.FortranPathReferenceImpl.programUnitsFromFile(FortranPathReferenceImpl.kt:312) at org.jetbrains.fortran.lang.resolve.FortranPathReferenceImpl.resolveInProjectFiles(FortranPathReferenceImpl.kt:218) at org.jetbrains.fortran.lang.resolve.FortranPathReferenceImpl.resolveName(FortranPathReferenceImpl.kt:164) at org.jetbrains.fortran.lang.resolve.FortranPathReferenceImpl.resolveWithoutFiltering(FortranPathReferenceImpl.kt:59) at org.jetbrains.fortran.lang.resolve.FortranPathReferenceImpl.resolveInner(FortranPathReferenceImpl.kt:23) at org.jetbrains.fortran.lang.resolve.FortranReferenceBase$multiResolve$1.resolve(FortranReferenceBase.kt:24) at org.jetbrains.fortran.lang.resolve.FortranReferenceBase$multiResolve$1.resolve(FortranReferenceBase.kt:13) at org.jetbrains.fortran.lang.resolve.FortranReferenceBase$multiResolve$1.resolve(FortranReferenceBase.kt:23) at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolve$1(ResolveCache.java:147) at com.intellij.openapi.util.RecursionManager$1.doPreventingRecursion(RecursionManager.java:113) at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:71) at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:146) at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:177) at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:169) at org.jetbrains.fortran.lang.resolve.FortranReferenceBase.multiResolve(FortranReferenceBase.kt:23) at com.intellij.psi.PsiPolyVariantReferenceBase.resolve(PsiPolyVariantReferenceBase.java:47) at com.intellij.codeInsight.TargetElementUtil.doGetReferenceOrReferencedElement(TargetElementUtil.java:387) at com.intellij.codeInsight.TargetElementUtil.getReferenceOrReferencedElement(TargetElementUtil.java:365) at com.intellij.codeInsight.TargetElementUtil.doFindTargetElement(TargetElementUtil.java:237) at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:209) at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:83) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:55) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:429) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:997) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:422) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:585) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:531) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:421) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:397) at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:167) at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:157) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:395) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:161) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Hi,
I've installed the latest plugin on CLion 2019.1, and I've noticed that variables are not available in the debugger.
If I use the standard LLDB I can debug, stepping into functions, however, I am unable to see variables as you can see from the screenshot.
If I switch to GDB, I have the following error:
BFD: /Users/.../Desktop/untitled/cmake-build-debug-gdb/untitled: unknown load command 0x32
BFD: /Users/.../Desktop/untitled/cmake-build-debug-gdb/untitled: unknown load command 0x32
com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver$GDBCommandException: "/Users/.../Desktop/untitled/cmake-build-debug-gdb/untitled": not in executable format: File format not recognized
Process finished with exit code 0
The program has been compiled and works, running from the console works:
% file Desktop/untitled/cmake-build-debug-gdb/untitled
Desktop/untitled/cmake-build-debug-gdb/untitled: Mach-O 64-bit executable x86_64
% Desktop/untitled/cmake-build-debug-gdb/untitled
Hello, World! 0
Am I missing something in my project configuration?
Thanks!
Fixed form
PROGRAM TEST
LOGICAL L
L = .FALSE.
WRITE (*, *) L
IF (L) T H E N
L = .FALSE.
E L S E
L = .TRUE.
E N D I F
WRITE (*, *) L
END
compiles and runs correctly.
after conversion to f90 free-form with the plugin:
PROGRAM TEST
LOGICAL L
L = .FALSE.
WRITE (*, *) L
IF (L)
T H E N
L = .FALSE.
E L S E
L = .TRUE.
E N D I F
WRITE (*, *) L
END
it does not compile and should be fixed manually.
$ gfortran test.f $ gfortran test.f90 test.f90:5:10: IF (L) 1 Error: Cannot assign to a named constant at (1) test.f90:6:8: T H E N 1 Error: Unclassifiable statement at (1) test.f90:8:8: E L S E 1 Error: Unclassifiable statement at (1) test.f90:10:8: E N D I F 1 Error: Unclassifiable statement at (1)
Atm, there is no code completion for Fortran. Will code completion be added to this plugin?
Of course intelligent code completion, that knows scope and type and everything would be wonderful.
But I'd also prefer stupid code completion - that simply suggests all strings found in the code (as in text editors like sublime) - over no completion at all.
In any case: thanks for the great plugin!
Best
Libavius
Pycharm 2019.3 Professional on macOS Catalina: a project with .f90 files gets stuck when indexing when I load the project.
I have to force-quit pycharm and remove the plugin manually from the filesystem as detailed here: https://intellij-support.jetbrains.com/hc/en-us/articles/206544519
Without the plugin, pycharm operates fine - the problem returns when I reinstall the plugin.
After searching the source code, I found that this issue is caused by misspelling the word, it should be 'non_overridable' but in the source code it is 'nonoverridable', (tested by ifort and gfortran).
Hello,
I would like to use IntelliJ (community version) with Fortran plugin to run Fortran.
I managed to import the Fortran plugin somehow but when I want to run a test file in Fortran, I cannot compile/run it:
In the Run/Debug configurations, there are only Python settings. How do I 'add' a Fortran debugger?
(only having imported the Fortran plugin does not seem sufficient to be able to run a Fortran code, and I have no idea how to proceed).
I would be grateful for help.
Thanks!
module types
type :: person
character(len = 20) :: forename
integer :: age
integer :: some
end type person
endmodule
Dear satamas,
I found a F77 parser error as following:
`module test_mod2
implicit none
double complex:: var1 !parser error: '(', ':', '=', '=>' or precision expected, got 'complex'
end module`
Best,
yours
The fixed format code:
subroutine test
#(a,
#b, !c,
#d)
will be translated into
subroutine test&
(a, &
b, !c,&
d)
integer a, b, d
end subroutine
In this case, the continuation should be before the ! instead of at the end of line
CLion 2018.2.2
Build #CL-182.4129.51 built Aug 22, 2018
JRE 1.8.0_152-release-1248-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
induced.txt
stacktrace.txt
The following variable declaration
REAL*8 Q1
is parsed incorrectly: the whole "8 Q1" string is considered as an expr
in nonstandard_kind_selector
because of the parser considers it as a double-precision number (note that DOUBLE_PRECISION_EXPONENT_PART
allows spaces around [dDqQ]
). I've locally replaced nonstandard_kind_selector
by just
unsigned_int_literal ::= integerliteral
nonstandard_kind_selector ::= '*' unsigned_int_literal { pin = 1 }
but it looks like FortranNonstandardKindInspection
takes into account possibility of non-integer kind value for complex data type. Is there some a rare Fortran dialect where it is actually possible?
__LINE__
and __FILE__
causing issues (I think).
There may also be issues with #ifdef
s. Here is an example Fortran file that triggers the issue: https://gist.github.com/bekozi/044a8b92fd238c4ee3d05035f3401a97#file-esmf_devlognetcdferror-f90-L16.
Using version 1.0
!
(100,100), text: contains
procedure :: hi
end type a
contains
subroutine hi(this)
implicit none
class(a) :: this
write(*, ) "hi"
end subroutine
end module mod_test2, language = Language: Fortran
java.lang.AssertionError: (100,100), text: contains
procedure :: hi
end type a
contains
subroutine hi(this)
implicit none
class(a) :: this
write(, *) "hi"
end subroutine
end module mod_test2, language = Language: Fortran
at com.intellij.lang.folding.FoldingDescriptor.(FoldingDescriptor.java:111)
at com.intellij.lang.folding.FoldingDescriptor.(FoldingDescriptor.java:92)
at com.intellij.lang.folding.FoldingDescriptor.(FoldingDescriptor.java:77)
at com.intellij.lang.folding.FoldingDescriptor.(FoldingDescriptor.java:60)
at org.jetbrains.fortran.ide.folding.FortranFoldingBuilder$FoldingVisitor.foldAfterContains(FortranFoldingBuilder.kt:96)
at org.jetbrains.fortran.ide.folding.FortranFoldingBuilder$FoldingVisitor.visitInternalSubprogramPart(FortranFoldingBuilder.kt:90)
at org.jetbrains.fortran.lang.psi.impl.FortranInternalSubprogramPartImpl.accept(FortranInternalSubprogramPartImpl.java:27)
at org.jetbrains.fortran.lang.psi.impl.FortranInternalSubprogramPartImpl.accept(FortranInternalSubprogramPartImpl.java:31)
at org.jetbrains.fortran.ide.folding.FortranFoldingBuilder$buildFoldRegions$1.execute(FortranFoldingBuilder.kt:24)
at com.intellij.psi.util.PsiTreeUtil$3.visitElement(PsiTreeUtil.java:839)
at com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:274)
at org.jetbrains.fortran.lang.psi.impl.FortranInternalSubprogramPartImpl.accept(FortranInternalSubprogramPartImpl.java:32)
at com.intellij.psi.PsiWalkingState.visit(PsiWalkingState.java:70)
at com.intellij.psi.PsiWalkingState.visit(PsiWalkingState.java:27)
at com.intellij.util.WalkingState.walkChildren(WalkingState.java:65)
at com.intellij.util.WalkingState.elementStarted(WalkingState.java:52)
at com.intellij.psi.PsiWalkingState.elementStarted(PsiWalkingState.java:79)
at com.intellij.psi.PsiRecursiveElementWalkingVisitor.visitElement(PsiRecursiveElementWalkingVisitor.java:48)
at com.intellij.psi.util.PsiTreeUtil$3.visitElement(PsiTreeUtil.java:840)
at com.intellij.psi.PsiElementVisitor.visitFile(PsiElementVisitor.java:34)
at com.intellij.psi.PsiRecursiveElementWalkingVisitor.visitFile(PsiRecursiveElementWalkingVisitor.java:70)
at com.intellij.extapi.psi.PsiFileBase.accept(PsiFileBase.java:70)
at com.intellij.psi.util.PsiTreeUtil.processElements(PsiTreeUtil.java:835)
at org.jetbrains.fortran.ide.folding.FortranFoldingBuilder.buildFoldRegions(FortranFoldingBuilder.kt:24)
at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptors(LanguageFolding.java:90)
at com.intellij.codeInsight.folding.impl.FoldingUpdate.a(FoldingUpdate.java:238)
at com.intellij.codeInsight.folding.impl.FoldingUpdate.getFoldingsFor(FoldingUpdate.java:224)
at com.intellij.codeInsight.folding.impl.FoldingUpdate.a(FoldingUpdate.java:109)
at com.intellij.codeInsight.folding.impl.FoldingUpdate.a(FoldingUpdate.java:98)
at com.intellij.psi.impl.PsiParameterizedCachedValue.doCompute(PsiParameterizedCachedValue.java:45)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:60)
at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.java:35)
at com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:96)
at com.intellij.codeInsight.folding.impl.FoldingUpdate.updateFoldRegions(FoldingUpdate.java:94)
at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.a(CodeFoldingManagerImpl.java:319)
at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.updateFoldRegionsAsync(CodeFoldingManagerImpl.java:305)
at com.intellij.codeInsight.daemon.impl.CodeFoldingPass.doCollectInformation(CodeFoldingPass.java:42)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.d(PassExecutorService.java:437)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1127)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:430)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:534)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:479)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:429)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:405)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:143)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:229)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:403)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:170)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Hi,
I've recently updated PyCharm to build #PY-181.4203.547 (built on March 26, 2018) and it seems as if the plugin is no longer working properly.
Best,
Manav
The code formatting is a great feature! Currently the spacing around a :
is configured to be same regardless of the context where is is used. It would be nice to configure different space whether it is used as a range operator, e.g. 1:5
, or in a use statement, e.g. only:
. For examle:
subroutine sub
use constants, only: pi
real, dimension(5) :: a
a(2:4) = pi
end subroutine
Note a single space after the only:
and no spaces around the :
in the array slice.
Here is the sample code:
module mod_tecvar
implicit none
type :: tecvar
character(64) :: name
logical :: lcopy_data ! should alway be false
class(*), dimension(:), pointer :: pdata
contains
procedure :: write_tecvar
generic :: write(formatted) => write_tecvar
end type tecvar
contains
subroutine write_tecvar(dtv, unit, iotype, vlist, iostat, iomsg)
class(tecvar), intent(in) :: dtv
integer, intent(in) :: unit
character(*), intent(in) :: iotype
integer, intent(in) :: vlist(:)
integer, intent(out) :: iostat
character(*), intent(inout) :: iomsg
integer :: i
select type(pdata => dtv%pdata)
type is (integer)
write(unit,'(3A10, 100I18)',iostat=iostat, iomsg=iomsg) &
"name: ",trim(dtv%name), ", pdata: ", pdata
type is (real(4))
write(unit,'(3A10, 100F18.6 )',iostat=iostat, iomsg=iomsg) &
"name: ",trim(dtv%name), ", pdata: ", pdata
type is (real(8))
write(unit,'(3A10, 100F18.14)',iostat=iostat, iomsg=iomsg) &
"name: ",trim(dtv%name), ", pdata: ", pdata
type is (character(*))
write(unit,'(3A10, 100A18)',iostat=iostat, iomsg=iomsg) &
"name: ",trim(dtv%name), ", pdata: ", (trim(pdata(i)),i=lbound(pdata,1),ubound(pdata,1))
class default
write(unit,'(3A10, A)',iostat=iostat, iomsg=iomsg) &
"name: ",trim(dtv%name), ", pdata: ", "unknown data type"
end select
end subroutine
end module
Hi,
I'm using clion 2019.2, I installed this plugin and open some source files of vasp 5.4.1.
Then I find the this plugin crashed with the following info:
IDE: IntelliJ IDEA Community 2017.3.4 (build IC-173.4548.28)
Error message: org.jetbrains.fortran.lang.psi.impl.FortranUnitDeclImpl cannot be cast to org.jetbrains.fortran.lang.psi.impl.FortranLabelDeclImpl
Details:
org.jetbrains.fortran.lang.psi.impl.FortranUnitDeclImpl cannot be cast to org.jetbrains.fortran.lang.psi.impl.FortranLabelDeclImpl
java.lang.ClassCastException: org.jetbrains.fortran.lang.psi.impl.FortranUnitDeclImpl cannot be cast to org.jetbrains.fortran.lang.psi.impl.FortranLabelDeclImpl
at org.jetbrains.fortran.ide.findUsages.FortranLabelDeclFindUsagesHandler$createSearcher$1$buildTaskList$1.invoke(FortranLabelDeclFindUsagesHandler.kt:81)
at org.jetbrains.fortran.ide.findUsages.FortranLabelDeclFindUsagesHandler$createSearcher$1$buildTaskList$1.invoke(FortranLabelDeclFindUsagesHandler.kt:76)
at org.jetbrains.fortran.ide.findUsages.FortranLabelDeclFindUsagesHandler$Searcher.executeTasks(FortranLabelDeclFindUsagesHandler.kt:57)
at org.jetbrains.fortran.ide.findUsages.FortranLabelDeclFindUsagesHandler.searchReferences(FortranLabelDeclFindUsagesHandler.kt:32)
at org.jetbrains.fortran.ide.findUsages.FortranLabelDeclFindUsagesHandler.findReferencesToHighlight(FortranLabelDeclFindUsagesHandler.kt:39)
at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.getUsages(IdentifierHighlighterPass.java:163)
at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.getHighlightUsages(IdentifierHighlighterPass.java:140)
at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.highlightTargetUsages(IdentifierHighlighterPass.java:196)
at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:107)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:437)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1127)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:430)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:543)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:429)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:405)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:143)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:229)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:403)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:170)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Hello and thank you for working on this! Is this plugin ready for testing?
Please refer:
Where to put implicit none
in Fortran
module mod_abstract_list
type, abstract :: list
end type list
abstract interface
subroutine print_values(this)
import list
implicit none
class(list) :: this
end subroutine
end interface
end module
it seems that the grammar check does not support operator overload(using ver. 1.5.1).
for example:
interface operator(+)
procedure :: foo_plus, fooo_plus
end interface
This code compiles and works well, however, T H E N end E L S E statements are not detected\colored\folded.
ALPHA=SQRT(DFLOAT((L-M)*(L+M+1)))/2.D0
BETA =SQRT(DFLOAT((L+M)*(L-M+1)))/2.D0
IF(ABS(M+1).LE.L) T H E N
I=L*L+L+M+2
Z1=YLM(I)
E L S E
Z1=CZERO
E N D I F
IF(ABS(M-1).LE.L) T H E N
I=L*L+L+M
Z2=YLM(I)
E L S E
Z2=CZERO
E N D I F
I=L*L+L+M+1
Z3=YLM(I)
DLMH(1,II)=COEF*(BETA*CT*CF*Z2-DFLOAT(M)*ST*Z3
Thanks again for adding code completion, in many cases, it works like a charm!
However, code completion does for me not trigger at the beginning of a line, if no call or write statement precedes the name of the variable/function. (If the variable is given to a function as an argument, the completion works)
thanks a lot for your work!
Iam usina Version 2017.3-5 intellij when I make a variable name and use Refactor => Rename I get a window where I can rename the Entity. But If you press Refactor nothing happens.
Also wenn a use Preview then everything seems ok, but the "Do Refactor" button has no effect
The result after code format
module mod_test2
implicit none
integer :: i
type a
integer :: j
contains
procedure :: hi
end type a
contains
subroutine hi(this)
implicit none
class(a) :: this
write(*, *) "hi"
end subroutine
end module mod_test2
Expected
module mod_test2
implicit none
integer :: i
type a
integer :: j
contains
procedure :: hi
end type a
contains
subroutine hi(this)
implicit none
class(a) :: this
write(*, *) "hi"
end subroutine
end module mod_test2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.