Giter Club home page Giter Club logo

i-pascal's Introduction

Intellij IDEA Object Pascal plugin

Description

Project homepage: http://www.siberika.com/ipascal.htm

A free Object Pascal language plugin for excellent IntelliJ IDEA

Supports integration with Delphi compiler (dcc32) and Free Pascal compilers.

Compatible with IDEA Community Edition as well as Ultimate Edition from version 13.xx and above.

Pascal-specific features currently implemented

  • code insight features
    • identifier declaration, references and usages search and highlight
    • context-aware completion
    • statements completion
    • compiler defines and directives completion
    • used units usage check with quick fix
  • code analysis
    • undeclared identifiers highlighting with quick fix
    • syntax errors highlighting
    • missing method declaration/implementation highlight with quick fix
    • missing routine implementation highlight with quick fix
    • probably bad code warnings with quick fix
    • unused identifiers highlighting
    • error insight via compiler
    • inherited call in destructor
    • function result assignment check
  • refactoring
    • rename identifier
    • introduce variable
    • override inherited methods
  • code navigation
    • to super methods/classes
    • to implementations/descendants
    • between unit routine interface definition and implementation
    • between class method definition and implementation
  • run and debug right in the IDE
    • GDB and LLDB debug backends
  • compiled unit interface decompilation
  • on-the-fly code formatting
  • Lazarus and Delphi project files import
  • routine parameters hint
  • braces matcher
  • code commenter
  • Free Pascal compiler integration
  • Delphi compiler integration
  • full Object Pascal parser
  • Object Pascal syntax highlighting
  • conditional compilation support
  • folding support

As well as other features provided by IDEA

  • full-text find/replace with regular expressions
  • version control systems integration (SVN, Git, Mercurial, ...)
  • other languages support, such as XML and SQL
  • spell checking
  • TODO support

to name a few.

Planned in future releases

  • more code analysis
  • more code inspections
  • more statements completion
  • more refactorings
  • extended includes support
  • full error insight with quick fixes
  • test frameworks support

Developer environment configuration

Instructions https://www.jetbrains.com/help/idea/2016.3/plugin-development-guidelines.html

Lexer is generated using IDEA JFlex modification.

Parser classes are generated with Grammar Kit plugin.

To generate _PascalLexer class open pascal.flex, right click and choose "Run JFlex generator".

To generate parser classes open pascal.bnf, right click and choose "Generate parser code".

There are JUnit tests. Please ensure the tests passing before creating pull requests.

Other information

Information on how to install and use the plugin is available at I-Pascal homepage.

i-pascal's People

Contributors

casteng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

i-pascal's Issues

ClassCastException

I just upgrade to latest plugin version (using IJ 2019.2.1)
And now I get a bunch of stacktraces, even though I'm not even having any pascal files in the project:

java.lang.ClassCastException: class com.intellij.psi.search.searches.SuperMethodsSearch$SearchParameters cannot be cast to class com.siberika.idea.pascal.lang.search.GotoSuper$OptionsRoutine (com.intellij.psi.search.searches.SuperMethodsSearch$SearchParameters is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @66b2fc7a; com.siberika.idea.pascal.lang.search.GotoSuper$OptionsRoutine is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @70d3b9d1)
	at com.siberika.idea.pascal.lang.search.PascalSuperMethodSearch.processQuery(PascalSuperMethodSearch.java:8)
	at com.intellij.openapi.application.QueryExecutorBase.execute(QueryExecutorBase.java:77)
	at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:31)
	at com.intellij.util.AbstractQuery.doProcessResults(AbstractQuery.java:91)
	at com.intellij.util.AbstractQuery.delegateProcessResults(AbstractQuery.java:114)
	at com.intellij.util.UniqueResultsQuery.processResults(UniqueResultsQuery.java:40)
	at com.intellij.util.AbstractQuery.doProcessResults(AbstractQuery.java:91)
	at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:83)
	at com.intellij.util.AbstractQuery.findAll(AbstractQuery.java:27)
	at com.intellij.psi.impl.PsiSuperMethodImplUtil.findSuperMethodSignatures(PsiSuperMethodImplUtil.java:78)
	at com.intellij.psi.impl.PsiSuperMethodImplUtil.findSuperMethodsInternal(PsiSuperMethodImplUtil.java:62)
	at com.intellij.psi.impl.PsiSuperMethodImplUtil.findSuperMethods(PsiSuperMethodImplUtil.java:56)
	at com.intellij.psi.impl.PsiSuperMethodImplUtil.findSuperMethods(PsiSuperMethodImplUtil.java:44)
	at com.intellij.psi.impl.source.PsiMethodImpl.findSuperMethods(PsiMethodImpl.java:91)
	at com.intellij.codeInsight.AnnotationUtil.isAnnotated(AnnotationUtil.java:343)
	at com.intellij.codeInsight.AnnotationUtil.isAnnotated(AnnotationUtil.java:293)
	at com.theoryinpractice.testng.util.TestNGUtil.hasTest(TestNGUtil.java:197)
	at com.theoryinpractice.testng.inspection.TestNGEntryPoint.isEntryPoint(TestNGEntryPoint.java:58)
	at com.intellij.codeInspection.deadCode.UnusedDeclarationInspectionBase.isEntryPoint(UnusedDeclarationInspectionBase.java:347)
	at com.intellij.codeInsight.daemon.impl.analysis.RefCountHolder$3.isEntryPoint(RefCountHolder.java:142)
	at com.intellij.codeInsight.daemon.impl.analysis.RefCountHolder$3.lambda$$1(RefCountHolder.java:122)
	at com.intellij.util.containers.FactoryMap$1.create(FactoryMap.java:186)
	at com.intellij.util.containers.FactoryMap.get(FactoryMap.java:60)
	at com.intellij.codeInsight.daemon.impl.analysis.RefCountHolder$3.shouldCheckUsages(RefCountHolder.java:138)
	at com.intellij.util.containers.ContainerUtil.process(ContainerUtil.java:908)
	at com.intellij.util.containers.JBIterable.processEach(JBIterable.java:219)
	at com.intellij.codeInsight.daemon.impl.analysis.RefCountHolder$3.lambda$$1(RefCountHolder.java:131)
	at com.intellij.util.containers.FactoryMap$1.create(FactoryMap.java:186)
	at com.intellij.util.containers.FactoryMap.get(FactoryMap.java:60)
	at com.intellij.codeInsight.daemon.impl.analysis.RefCountHolder$3.shouldCheckUsages(RefCountHolder.java:138)
	at com.intellij.codeInsight.daemon.impl.UnusedSymbolUtil.weAreSureThereAreNoUsages(UnusedSymbolUtil.java:161)
	at com.intellij.codeInsight.daemon.impl.UnusedSymbolUtil.isReallyUsed(UnusedSymbolUtil.java:311)
	at com.intellij.codeInsight.daemon.impl.UnusedSymbolUtil.isClassUsed(UnusedSymbolUtil.java:294)
	at com.intellij.codeInsight.daemon.impl.analysis.PostHighlightingVisitor.processClass(PostHighlightingVisitor.java:446)
	at com.intellij.codeInsight.daemon.impl.analysis.PostHighlightingVisitor.processIdentifier(PostHighlightingVisitor.java:225)
	at com.intellij.codeInsight.daemon.impl.analysis.PostHighlightingVisitor.collectHighlights(PostHighlightingVisitor.java:146)
	at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.lambda$analyze$2(HighlightVisitorImpl.java:170)
	at com.intellij.codeInsight.daemon.impl.analysis.RefCountHolder.analyze(RefCountHolder.java:366)
	at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.analyze(HighlightVisitorImpl.java:166)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:314)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:314)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:70)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:314)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:281)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:225)
	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
	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:1106)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:422)
	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.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:164)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:204)
	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)

Variadics support

Hello masters,

It would be nice to i-pascal to allow the varargs keyword.

Thank you!

undeclared identifiers inside with statement

unit Unit1;

interface

type
  TFoo = class
  public
    constructor Create; overload;
    procedure Fa();
  end;

procedure Test();

implementation

procedure Test();
begin
  with TFoo.Create do
  try
    Fa; //undeclared identifier
  finally
    Free; //undeclared identifier
  end;
end;


{ TFoo }

constructor TFoo.Create;
begin

end;

procedure TFoo.Fa;
begin

end;

end.

Problem with generics

I have a problem with FPC built-in fgl library.

If I add fgl source to Classpath, I-Pascal can't parse it correctly:
fgl

Also, I tried to add compiled fgl unit. But FPC compiles TFPGMap generic to TFPGMap$2 class, so I-Pascal can't recognize compiled TFPGMap$2 as TFPGMap.

Undeclared identifier in nested IFDEF macros

Hello,

Consider the following code:

...
uses
  csize_t =
{$IFDEF FPC}
 {$IFDEF UNIX}
    BaseUnix
 {$ELSE}
    System
 {$ENDIF}
{$ELSE}
 {$IFDEF MSWINDOWS}
    Windows
 {$ELSE}
    SysTypes
 {$ENDIF}
{$ENDIF}.size_t;
...

Unfortunately i-pascal can't understand that, returning the error "Undeclared identifier", with red highlighting in two lines as showed in the picture below:

screenshot_2017-04-12_15-53-31

Includes through $I

Hi George.

What are your plans about includes? I'm working on legacy project which uses a lot of includes to prevent circular references. And it's only one reason why I need to use Lazarus instead of IDEA with your plugin.

PS
I take my hat off, you did a great job alone. It seems that it's only one solution which helps to concentrate on code, not on GUI.

PPS
It's not possible to make a donation, "The payment you initiated has been blocked because PayPal can only facilitate payments between Russian residents when they transact in Russian Ruble. Please go back to the merchant website and choose to pay in Russian Ruble, or alternatively choose another payment method."

Best Regards,
Alexey

some autocomplete weirdness

i have function (Delphi 2009, idea 2018.1.2 - cache cleared and rebuilded and all types bellow are properly resolved)

func foo(); 
var
  wc: TWinControl;
begin
  wc. // autocomplete will give me suggestions only from TWinControl, TControl, TObject but not from TComponent and TPersistant 
  // as well 
  wc.FindComponent('foo') // FindComponent undeclared identifier

inheritence tree is TWinControl > TControl > TComponent > TPersistant > TObject

is there any inheritence limit?

some generics marked as error

unit Unit1;

interface

uses
  Generics.Collections, Generics.Defaults;

type
  Foo<T> = class
  public
    constructor Create; overload; //missing implementation
    constructor Create(const AComparer: IComparer<T>); overload; //missing implementation
    constructor Create(Collection: TEnumerable<T>); overload; //missing implementation
  end;

implementation

{ Foo<T> }

constructor Foo<T>.Create; // missing method declaration
begin

end;

constructor Foo<T>.Create(Collection: TEnumerable<T>); // missing method declaration
begin

end;

constructor Foo<T>.Create(const AComparer: IComparer<T>); // missing method declaration
begin

end;

end.

Run/Debug plugin

Hello
I'm trying to tinker with plugin but i cant figure out how to run and debug it.

After importing the plugin project i'm trying to run and debug it.
But Run/Debug configuration for plugin does not have Use classpath of module .
Am i missing something?

PByte is missing

Hello,

PByte is missing in the i-pascal $builtins.

Thank you!

Class Helpers

Properties/Methods from base class are not resolved inside helper functions

btw really nice work

CLion: infinite "Loading ..." status

Hello,

I'm trying to use i-Pascal in my CLion, however, it can't show any source kind, locked in the "Loading ..." status. Please see attached picture.

Thank you!
screenshot_2017-01-17_13-50-57

Code Format

Not sure if this is a real issue.

But whenever i use code format in IntelliJ my "smaller equal" comparator is ripped apart from "<=" to "< =". Then afterwards the compiler complains about this.

This is highly annoying when u are used to code format every now and then.

Is there a hidden setting somewhere for that ?

Class templates errors

code blocks below are valid

type
  TPairs<TKey, TValue> = class(TList<TPair<TKey, TValue>>) // TPair unexpected, ';' expected got ')'

  TPriorityPair<TKey, TValue, TPriority> = record // ',' unexpected
    Key: TKey;
    Value: TValue;
    Priority: TPriority;
  end;

  TPriorityPairs<TKey, TValue, TPriority> = class(TList<TPriorityPair<TKey, TValue, TPriority>>)

whole unit at https://gist.github.com/Sorien/8884e403f6caeb301a525f24e521b54f

Dependencies setup

Following your nice development of I-Pascal for some time, but I can't get it really to work.

How can I get my Lazarus project work with I-Pascal with all the dependencies like LCL or other packages (.lpk) files. I simply don't understand how I set up these dependencies as their own modules or libraries so all required units are found.

I guess that's what the previous issue is actually about.

A guide on how to setup all project dependencies in a structured way would be great.

Unable to build code from repository and contribute

The provided source is not enough to build the plugin, a lot of classes missing.
No build instruction provided. So for this time, unfortunately, I unable to contribute. Please provide missing sources and build files.

For me:
Packages for whole plugin sub dir classes were incorrect due it's placement.
Unfortunately, after that compilation failed with bunch of:

/Users/user/Workspace/i-pascal/plugin/src/com/siberika/idea/pascal/lang/psi/impl/PasField.java:8: error: cannot find symbol
import com.siberika.idea.pascal.lang.psi.PasTypeDecl;
                                        ^
  symbol:   class PasTypeDecl
  location: package com.siberika.idea.pascal.lang.psi
/Users/user/Workspace/i-pascal/plugin/src/com/siberika/idea/pascal/lang/psi/impl/PasField.java:224: error: cannot find symbol
        public SmartPsiElementPointer<PasTypeDecl> declaration;
                                      ^
  symbol:   class PasTypeDecl
  location: class ValueType
/Users/user/Workspace/i-pascal/plugin/src/com/siberika/idea/pascal/lang/psi/impl/PasField.java:226: error: cannot find symbol
        public ValueType(PasField field, Kind kind, ValueType baseType, PasTypeDecl declaration) {
                                                                        ^
  symbol:   class PasTypeDecl
  location: class ValueType
/Users/user/Workspace/i-pascal/plugin/src/com/siberika/idea/pascal/editor/completion/PascalBraceMatcher.java:9: error: cannot find symbol
import com.siberika.idea.pascal.lang.psi.PasTypes;
                                        ^
  symbol:   class PasTypes
  location: package com.siberika.idea.pascal.lang.psi
/Users/user/Workspace/i-pascal/plugin/src/com/siberika/idea/pascal/editor/completion/PascalCompletionConfidence.java:9: error: cannot find symbol
import com.siberika.idea.pascal.lang.psi.PasTypes;
                                        ^
  symbol:   class PasTypes
  location: package com.siberika.idea.pascal.lang.psi
/Users/user/Workspace/i-pascal/plugin/src/com/siberika/idea/pascal/lang/psi/impl/PascalRoutineImpl.java:13: error: cannot find symbol
import com.siberika.idea.pascal.lang.psi.PasClassQualifiedIdent;
                                        ^
  symbol:   class PasClassQualifiedIdent
  location: package com.siberika.idea.pascal.lang.psi
/Users/user/Workspace/i-pascal/plugin/src/com/siberika/idea/pascal/lang/psi/impl/PascalRoutineImpl.java:15: error: cannot find symbol
import com.siberika.idea.pascal.lang.psi.PasExportedRoutine;
                                        ^
  symbol:   class PasExportedRoutine
  location: package com.siberika.idea.pascal.lang.psi
/Users/user/Workspace/i-pascal/plugin/src/com/siberika/idea/pascal/lang/psi/impl/PascalRoutineImpl.java:16: error: cannot find symbol
import com.siberika.idea.pascal.lang.psi.PasFormalParameterSection;
                                        ^
  symbol:   class PasFormalParameterSection
  location: package com.siberika.idea.pascal.lang.psi
/Users/user/Workspace/i-pascal/plugin/src/com/siberika/idea/pascal/lang/psi/impl/PascalRoutineImpl.java:17: error: cannot find symbol
import com.siberika.idea.pascal.lang.psi.PasNamedIdent;
                                        ^
  symbol:   class PasNamedIdent
  location: package com.siberika.idea.pascal.lang.psi
/Users/user/Workspace/i-pascal/plugin/src/com/siberika/idea/pascal/lang/psi/impl/PascalRoutineImpl.java:18: error: cannot find symbol
import com.siberika.idea.pascal.lang.psi.PasRoutineImplDecl;
                                        ^
  symbol:   class PasRoutineImplDecl
  location: package com.siberika.idea.pascal.lang.psi
/Users/user/Workspace/i-pascal/plugin/src/com/siberika/idea/pascal/lang/psi/impl/PascalRoutineImpl.java:19: error: cannot find symbol
import com.siberika.idea.pascal.lang.psi.PasTypeDecl;
                                        ^
  symbol:   class PasTypeDecl
  location: package com.siberika.idea.pascal.lang.psi
/Users/user/Workspace/i-pascal/plugin/src/com/siberika/idea/pascal/lang/psi/impl/PascalRoutineImpl.java:20: error: cannot find symbol
import com.siberika.idea.pascal.lang.psi.PasTypeID;
                                        ^
  symbol:   class PasTypeID
  location: package com.siberika.idea.pascal.lang.psi
/Users/user/Workspace/i-pascal/plugin/src/com/siberika/idea/pascal/lang/psi/impl/PascalRoutineImpl.java:21: error: cannot find symbol
import com.siberika.idea.pascal.lang.psi.PasTypes;
                                        ^
  symbol:   class PasTypes
  location: package com.siberika.idea.pascal.lang.psi
/Users/user/Workspace/i-pascal/plugin/src/com/siberika/idea/pascal/lang/psi/impl/PasScopeImpl.java:13: error: cannot find symbol
import com.siberika.idea.pascal.lang.psi.PasClassQualifiedIdent;
                                        ^
  symbol:   class PasClassQualifiedIdent
  location: package com.siberika.idea.pascal.lang.psi
/Users/user/Workspace/i-pascal/plugin/src/com/siberika/idea/pascal/lang/psi/impl/PasScopeImpl.java:15: error: cannot find symbol
import com.siberika.idea.pascal.lang.psi.PasGenericTypeIdent;
                                        ^
  symbol:   class PasGenericTypeIdent
  location: package com.siberika.idea.pascal.lang.psi
/Users/user/Workspace/i-pascal/plugin/src/com/siberika/idea/pascal/lang/psi/impl/PasScopeImpl.java:16: error: cannot find symbol
import com.siberika.idea.pascal.lang.psi.PasNamedIdent;

long long error list.....

How to Import Delphi Project

How to Import Delphi Project,

I've tested a lot of solutions, and using the default configuration has the following problems

  1. Unit1 in'Unit1. pas'{Form1}; such a syntax would prompt Unit1. DCU can't find

  2. How to import existing dcu, such as vcl, does not seem to be able to parse dcu.

Can you come up with a tutorial to configure the Delphi project, preferably in Delphi 7 or Delphi Xe or Delphi 10.3

ReadLn processed out of order in IntelliJ IDEA

I use the IPascal plugin to write and test console programs. In general, this has proven successful. However, "readln" and "writeln" do not behave properly for code run in the IntelliJ IDEA console. Regardless of the relative positions of these commands, readlns are collected and run early, before writeln commands are processed. Thus, it is impossible to enable user input in a logical way. However, the compiled binaries work perfectly if run in an external console (e.g., in OS X Terminal.app).

java.lang.NullPointerException upon startup of IDEA CE

IntelliJ IDEA 2018.3.4 (Community Edition)
Build #IC-183.5429.30, built on January 29, 2019
JRE: 1.8.0_152-release-1343-b26 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

java.lang.NullPointerException
	at com.siberika.idea.pascal.run.PascalRunContextConfigurationProducer.isConfigurationFromContext(PascalRunContextConfigurationProducer.java:46)
	at com.siberika.idea.pascal.run.PascalRunContextConfigurationProducer.isConfigurationFromContext(PascalRunContextConfigurationProducer.java:28)
	at com.intellij.execution.actions.RunConfigurationProducer.findExistingConfiguration(RunConfigurationProducer.java:200)
	at com.intellij.execution.actions.ConfigurationContext.findExisting(ConfigurationContext.java:238)
	at com.intellij.execution.actions.BaseRunConfigurationAction.update(BaseRunConfigurationAction.java:190)
	at com.intellij.execution.lineMarker.ExecutorAction.update(ExecutorAction.kt:73)
	at com.intellij.execution.lineMarker.LineMarkerActionWrapper.update(LineMarkerActionWrapper.java:85)
	at com.intellij.codeInsight.daemon.impl.GutterIntentionAction.isAvailable(GutterIntentionAction.java:65)
	at com.intellij.codeInsight.daemon.impl.GutterIntentionMenuContributor.addActions(GutterIntentionMenuContributor.java:87)
	at com.intellij.codeInsight.daemon.impl.GutterIntentionMenuContributor.addActions(GutterIntentionMenuContributor.java:67)
	at com.intellij.codeInsight.daemon.impl.GutterIntentionMenuContributor.collectActions(GutterIntentionMenuContributor.java:47)
	at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.getActionsToShow(ShowIntentionsPass.java:299)
	at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.getActionsToShow(ShowIntentionsPass.java:254)
	at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.doCollectInformation(ShowIntentionsPass.java:220)
	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)

Selected directory is not valid SDK for Free pascal

I freshly installed the plugin and the compiler for pascal and restarted my computer. The plugin does not recognize the directory as home. Tried with different directories (parent and every children) and it did not seem to work.
Screenshot: Imgur

I'm on Windows 7 64 bits. What should I do next to find what's causing the issue?

Can't index when open project.

I got this error. how can I do?

Error while indexing D:\fpc\3.0.4\units\i386-win32\rtl-objpas\fmtbcd.ppu
To reindex this file IDEA has to be restarted

com.google.common.util.concurrent.ExecutionError: java.lang.AssertionError: Reentrant indexing
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2048)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3973)
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4957)
	at com.siberika.idea.pascal.lang.compiled.PPUDecompilerCache.getContents(PPUDecompilerCache.java:165)
	at com.siberika.idea.pascal.lang.compiled.PPUDecompilerCache.decompile(PPUDecompilerCache.java:67)
	at com.siberika.idea.pascal.lang.compiled.PPUFileDecompiler.decompileText(PPUFileDecompiler.java:34)
	at com.siberika.idea.pascal.lang.compiled.PPUFileDecompiler.decompile(PPUFileDecompiler.java:26)
	at com.intellij.openapi.fileEditor.impl.LoadTextUtil.loadText(LoadTextUtil.java:492)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.getDocument(FileDocumentManagerImpl.java:187)
	at com.intellij.psi.AbstractFileViewProvider.getDocument(AbstractFileViewProvider.java:197)
	at com.intellij.psi.AbstractFileViewProvider$VirtualFileContent.getText(AbstractFileViewProvider.java:479)
	at com.intellij.psi.AbstractFileViewProvider.getContents(AbstractFileViewProvider.java:177)
	at com.intellij.psi.impl.source.PsiFileImpl.loadTreeElement(PsiFileImpl.java:208)
	at com.intellij.psi.impl.source.PsiFileImpl.calcTreeElement(PsiFileImpl.java:712)
	at com.intellij.psi.impl.source.PsiFileImpl.calcStubTree(PsiFileImpl.java:940)
	at com.siberika.idea.pascal.lang.compiled.PascalCompiledStubBuilder.buildFileStub(PascalCompiledStubBuilder.java:35)
	at com.intellij.psi.impl.compiled.ClassFileStubBuilder.buildStubTree(ClassFileStubBuilder.java:45)
	at com.intellij.psi.impl.compiled.ClassFileStubBuilder.buildStubTree(ClassFileStubBuilder.java:25)
	at com.intellij.psi.stubs.StubTreeBuilder.buildStubTree(StubTreeBuilder.java:61)
	at com.intellij.psi.stubs.StubUpdatingIndex$2.lambda$computeValue$0(StubUpdatingIndex.java:130)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:932)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:57)
	at com.intellij.psi.stubs.StubUpdatingIndex$2.computeValue(StubUpdatingIndex.java:112)
	at com.intellij.psi.stubs.StubUpdatingIndex$2.computeValue(StubUpdatingIndex.java:108)
	at com.intellij.util.indexing.SingleEntryIndexer.map(SingleEntryIndexer.java:40)
	at com.intellij.util.indexing.SingleEntryIndexer.map(SingleEntryIndexer.java:30)
	at com.intellij.util.indexing.impl.MapReduceIndex.mapInput(MapReduceIndex.java:312)
	at com.intellij.util.indexing.VfsAwareMapReduceIndex.mapInput(VfsAwareMapReduceIndex.java:109)
	at com.intellij.util.indexing.impl.MapReduceIndex.calculateUpdateData(MapReduceIndex.java:268)
	at com.intellij.util.indexing.impl.MapReduceIndex.update(MapReduceIndex.java:250)
	at com.intellij.util.indexing.FileBasedIndexImpl.updateSingleIndex(FileBasedIndexImpl.java:1673)
	at com.intellij.util.indexing.FileBasedIndexImpl.lambda$doIndexFileContent$28(FileBasedIndexImpl.java:1603)
	at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyIn(FileTypeManagerImpl.java:656)
	at com.intellij.util.indexing.FileBasedIndexImpl.doIndexFileContent(FileBasedIndexImpl.java:1562)
	at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1549)
	at com.intellij.util.indexing.UnindexedFilesUpdater.lambda$indexFiles$0(UnindexedFilesUpdater.java:109)
	at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.lambda$run$0(CacheUpdateRunner.java:219)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1106)
	at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.lambda$run$1(CacheUpdateRunner.java:235)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:169)
	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.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:156)
	at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.run(CacheUpdateRunner.java:232)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.AssertionError: Reentrant indexing
	at com.intellij.util.indexing.FileBasedIndexImpl.updateSingleIndex(FileBasedIndexImpl.java:1667)
	at com.intellij.util.indexing.FileBasedIndexImpl.doInvalidateIndicesForFile(FileBasedIndexImpl.java:1799)
	at com.intellij.util.indexing.FileBasedIndexImpl.access$2600(FileBasedIndexImpl.java:99)
	at com.intellij.util.indexing.FileBasedIndexImpl$ChangedFilesCollector.lambda$null$1(FileBasedIndexImpl.java:2036)
	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.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:197)
	at com.intellij.util.indexing.FileBasedIndexImpl$ChangedFilesCollector.lambda$null$2(FileBasedIndexImpl.java:2030)
	at com.intellij.util.ConcurrencyUtil.withLock(ConcurrencyUtil.java:229)
	at com.intellij.util.indexing.FileBasedIndexImpl$ChangedFilesCollector.lambda$processFilesInReadAction$3(FileBasedIndexImpl.java:2028)
	at com.intellij.util.indexing.VfsEventsMerger.processChanges(VfsEventsMerger.java:95)
	at com.intellij.util.indexing.FileBasedIndexImpl$ChangedFilesCollector.processFilesInReadAction(FileBasedIndexImpl.java:2027)
	at com.intellij.util.indexing.FileBasedIndexImpl$ChangedFilesCollector.ensureUpToDate(FileBasedIndexImpl.java:1980)
	at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:710)
	at com.intellij.util.indexing.FileBasedIndexImpl.processExceptions(FileBasedIndexImpl.java:892)
	at com.intellij.util.indexing.FileBasedIndexImpl.processValueIterator(FileBasedIndexImpl.java:968)
	at com.intellij.util.indexing.FileBasedIndexImpl.processValuesInScope(FileBasedIndexImpl.java:939)
	at com.intellij.util.indexing.FileBasedIndexImpl.getContainingFiles(FileBasedIndexImpl.java:811)
	at com.siberika.idea.pascal.util.ModuleUtil$2.compute(ModuleUtil.java:101)
	at com.siberika.idea.pascal.util.ModuleUtil$2.compute(ModuleUtil.java:97)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:918)
	at com.siberika.idea.pascal.util.ModuleUtil.getCompiledByNameNoCase(ModuleUtil.java:97)
	at com.siberika.idea.pascal.lang.compiled.PPUDecompilerCache.retrieveXml(PPUDecompilerCache.java:111)
	at com.siberika.idea.pascal.lang.compiled.PPUDecompilerCache$Loader.load(PPUDecompilerCache.java:78)
	at com.siberika.idea.pascal.lang.compiled.PPUDecompilerCache$Loader.load(PPUDecompilerCache.java:71)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2276)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
	... 51 more

Build instructions

Can you write more detailed build instructions? This is just not enough:

Instructions https://www.jetbrains.com/help/idea/2016.3/plugin-development-guidelines.html

Lexer is generated using IDEA JFlex modification.

Parser classes are generated with Grammar Kit plugin.

To generate _PascalLexer class open pascal.flex, right click and choose "Run JFlex generator".

To generate parser classes open pascal.bnf, right click and choose "Generate parser code".

There are JUnit tests. Please ensure the tests passing before creating pull requests.

Form Designer

Any plans to support a form designer? Even if it's extremely basic.

Thanks so much for this effort, by the way!

Type errors are not detected

When you try to compile this code you'll get a type error. However, there are no inspections available that could catch it.

program MyProgram;
var
  Str: string;
begin
  Str := 1.0;
end.

fpc detects such issues at compile time so technically it would be possible to parse compiler output and mark errors in the editor.

Rename refactor broken when only case changed

Take this test unit:

unit Unit3;

interface

type
  TBug = class
    procedure Test;
  end;

implementation

{ TBug }

procedure TBug.Test;
begin

end;

end.

Put caret on declaration of Test, do Refactor -> Rename, and rename to "test". The implementation will loose the class name.

Breakpoints are ignored when running in debug mode

Whenever I add breakpoints within my program file and run the project in debug mode, the debugger runs through the whole program without suspension.

  • The suspension checkbox is ticked in the breakpoint configuration
  • The Free-Pascal SDK is set up properly (3.0.2)
  • I made sure I am really running it in debug- instead of default mode

The console says

~"(no debugging symbols found) ...done.\n"

SDK setup not working on Linux

A newly added SDK does neither find the compiler nor the classpath:
ipascal_emptycompiler

So I manually set the compiler and class path:
ipascal_compilerset

Yet all relevant units (Classes, SysUtils, etc.) are still not found ("undeclared identifier").

How is the SDK supposed to be setup?

Unit scopes

pls could you add support for unit scopes http://docwiki.embarcadero.com/RADStudio/Rio/en/Unit_Scope_Names

uses
 Vcl.Forms; // undeclared identifier

in delphi you can specify default unit scopes like Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;WinAPI.Foundation;System.Win;FMX

in JB Idea project settings you have something named Unit namespaces but when I try
System;Vcl or System,Vcl it seems to not be working

uses
 Forms; // undeclared identifier

Idea 2019.2
I-Pascal 2.40

Error parsing PPU with string which contains line break

constunit.pas

unit constunit;
interface
{$mode delphi}
const
  ProblemConst  = 'Line1' + #13#10 +'Line2';
implementation
end.

ppudump:

<?xml version="1.0" encoding="utf-8"?>
<unit>
  <name>constunit</name>
  <version>173</version>
  <targetcpu>x86_64</targetcpu>
  <targetos>Linux-x86-64</targetos>
  <crc>250E1931</crc>
  <interfacecrc>71829538</interfacecrc>
  <uses>
    <unit>
      <name>System</name>
      <crc>4C377C4F</crc>
      <interfacecrc>46624366</interfacecrc>
    </unit>
    <unit>
      <name>objpas</name>
      <crc>F2084D63</crc>
      <interfacecrc>1FF9DA31</interfacecrc>
    </unit>
  </uses>
  <units>
    <value>system</value>
  </units>
  <files>
    <file>
      <name>constunit.pas</name>
      <time>2018-05-01 12:17:14</time>
    </file>
  </files>
  <interface>
    <array>
      <id>0</id>
      <eltype>
        <unit>0</unit>
        <id>21</id>
      </eltype>
      <rangetype>
        <unit>0</unit>
        <id>10</id>
      </rangetype>
      <low>0</low>
      <high>4</high>
    </array>
    <array>
      <id>1</id>
      <eltype>
        <unit>0</unit>
        <id>21</id>
      </eltype>
      <rangetype>
        <unit>0</unit>
        <id>10</id>
      </rangetype>
      <low>0</low>
      <high>1</high>
    </array>
    <array>
      <id>2</id>
      <eltype>
        <unit>0</unit>
        <id>21</id>
      </eltype>
      <rangetype>
        <unit>0</unit>
        <id>10</id>
      </rangetype>
      <low>0</low>
      <high>4</high>
    </array>
    <array>
      <id>3</id>
      <eltype>
        <unit>0</unit>
        <id>21</id>
      </eltype>
      <rangetype>
        <unit>0</unit>
        <id>10</id>
      </rangetype>
      <low>0</low>
      <high>6</high>
    </array>
    <array>
      <id>4</id>
      <eltype>
        <unit>0</unit>
        <id>21</id>
      </eltype>
      <rangetype>
        <unit>0</unit>
        <id>10</id>
      </rangetype>
      <low>0</low>
      <high>11</high>
    </array>
    <array>
      <id>5</id>
      <eltype>
        <unit>0</unit>
        <id>21</id>
      </eltype>
      <rangetype>
        <unit>0</unit>
        <id>12</id>
      </rangetype>
      <low>0</low>
      <high>11</high>
    </array>
    <const>
      <name>ProblemConst</name>
      <symid>6</symid>
      <pos>
        <line>8</line>
        <col>3</col>
      </pos>
      <valtype>string</valtype>
      <value>Line1&#x000D;&#x000A;Line2</value>
      <typeref>
        <id>5</id>
      </typeref>
    </const>
  </interface>
</unit>

Log:

2018-05-01 12:18:23,201 [   7811]  ERROR - i.fileEditor.impl.LoadTextUtil - Wrong line separators: '...t = 'Line1\r'#13#10'L...' at offset 319 
java.lang.AssertionError: Wrong line separators: '...t = 'Line1\r'#13#10'L...' at offset 319
	at com.intellij.openapi.util.text.StringUtil.assertValidSeparators(StringUtil.java:2688)
	at com.intellij.openapi.fileEditor.impl.LoadTextUtil.loadText(LoadTextUtil.java:507)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.getDocument(FileDocumentManagerImpl.java:193)
	at com.intellij.psi.AbstractFileViewProvider.getDocument(AbstractFileViewProvider.java:159)
	at com.intellij.psi.AbstractFileViewProvider$VirtualFileContent.getText(AbstractFileViewProvider.java:432)
	at com.intellij.psi.AbstractFileViewProvider.getContents(AbstractFileViewProvider.java:139)
	at com.intellij.psi.impl.source.PsiFileImpl.loadTreeElement(PsiFileImpl.java:191)
	at com.intellij.psi.impl.source.PsiFileImpl.calcTreeElement(PsiFileImpl.java:803)
	at com.intellij.psi.impl.source.PsiFileImpl.calcStubTree(PsiFileImpl.java:1032)
	at com.siberika.idea.pascal.lang.compiled.PascalCompiledStubBuilder.buildFileStub(PascalCompiledStubBuilder.java:30)
	at com.intellij.psi.impl.compiled.ClassFileStubBuilder.buildStubTree(ClassFileStubBuilder.java:45)
	at com.intellij.psi.impl.compiled.ClassFileStubBuilder.buildStubTree(ClassFileStubBuilder.java:25)
	at com.intellij.psi.stubs.StubTreeBuilder.buildStubTree(StubTreeBuilder.java:61)
	at com.intellij.psi.stubs.StubUpdatingIndex$3.lambda$map$0(StubUpdatingIndex.java:232)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:897)
	at com.intellij.psi.stubs.StubUpdatingIndex$3.map(StubUpdatingIndex.java:214)
	at com.intellij.psi.stubs.StubUpdatingIndex$3.map(StubUpdatingIndex.java:197)
	at com.intellij.util.indexing.impl.MapReduceIndex.mapInput(MapReduceIndex.java:273)
	at com.intellij.util.indexing.VfsAwareMapReduceIndex.calculateUpdateData(VfsAwareMapReduceIndex.java:98)
	at com.intellij.util.indexing.impl.MapReduceIndex.update(MapReduceIndex.java:213)
	at com.intellij.util.indexing.FileBasedIndexImpl.updateSingleIndex(FileBasedIndexImpl.java:1656)
	at com.intellij.util.indexing.FileBasedIndexImpl.lambda$doIndexFileContent$21(FileBasedIndexImpl.java:1584)
	at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyIn(FileTypeManagerImpl.java:523)
	at com.intellij.util.indexing.FileBasedIndexImpl.doIndexFileContent(FileBasedIndexImpl.java:1543)
	at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1531)
	at com.intellij.util.indexing.UnindexedFilesUpdater.lambda$indexFiles$0(UnindexedFilesUpdater.java:110)
	at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.lambda$run$0(CacheUpdateRunner.java:230)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1134)
	at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.lambda$run$1(CacheUpdateRunner.java:246)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(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.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
	at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.run(CacheUpdateRunner.java:243)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:305)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
2018-05-01 12:18:23,202 [   7812]  ERROR - i.fileEditor.impl.LoadTextUtil - IntelliJ IDEA 2018.1.1  Build #IC-181.4445.78 
2018-05-01 12:18:23,202 [   7812]  ERROR - i.fileEditor.impl.LoadTextUtil - JDK: 1.8.0_172 
2018-05-01 12:18:23,202 [   7812]  ERROR - i.fileEditor.impl.LoadTextUtil - VM: OpenJDK 64-Bit Server VM 
2018-05-01 12:18:23,202 [   7812]  ERROR - i.fileEditor.impl.LoadTextUtil - Vendor: Oracle Corporation 
2018-05-01 12:18:23,202 [   7812]  ERROR - i.fileEditor.impl.LoadTextUtil - OS: Linux 
2018-05-01 12:18:23,202 [   7812]  ERROR - i.fileEditor.impl.LoadTextUtil - Last Action:  
2018-05-01 12:18:23,202 [   7812]  ERROR - i.fileEditor.impl.LoadTextUtil - Current Command: Undefined 
2018-05-01 12:18:23,202 [   7812]  ERROR - napi.project.CacheUpdateRunner - Error while indexing /www/pas-test/ppu/constunit.ppu
To reindex this file IDEA has to be restarted 

constunit.ppu.zip

Problem with .ppu

Sometimes there is a problem with complex .ppu which contains a lot of classes. For example, accessing to the Name property is marked as "Undeclared identifier" in the following code:

WriteLn(User.GetProfile().Name)

It happens in situations, when in the decompiled .ppu the class TUser is defined before the class TProfile, like this:

models.ppu:

{Decompiled unit interface}
unit models;
...
type TUser = class(system.TObject)
  public function GetProfile(): TProfile; { Also, go to declaration on TProfile doesn't work too }
...
type TProfile = class(system.TObject)
...

A such .ppu can be maked when code uses forward declaration, like #10 (comment)

German DCC32 not detected

German installation of Delphi 2010 will not be detected. The difference to an English version is

Embarcadero Delphi für Win32 Compiler-Version 21.0

the german Word "für" and a minus sign between Compiler and Version

dcc (Embarcadero Delphi for Windows) 21.0
Embarcadero Delphi für Win32 Compiler-Version 21.0
Copyright (c) 1983,2009 Embarcadero Technologies, Inc.

[CRITICAL] Plugin breaks indexing on 2020.1

The plugin throws the following exception on 2020.1:

2020-04-14 16:49:44,216 [   1788]   INFO - il.indexing.FileBasedIndexImpl - com.intellij.psi.impl.compiled.ClassFileStubBuilder PluginClassLoader[com.siberika.idea.pascal, 2.61] com.intellij.ide.plugins.cl.PluginClassLoader@640f75e5 [Plugin: com.siberika.idea.pascal] 
com.intellij.diagnostic.PluginException: com.intellij.psi.impl.compiled.ClassFileStubBuilder PluginClassLoader[com.siberika.idea.pascal, 2.61] com.intellij.ide.plugins.cl.PluginClassLoader@640f75e5 [Plugin: com.siberika.idea.pascal]
	at com.intellij.serviceContainer.ComponentManagerImpl.instantiateExtensionWithPicoContainerOnlyIfNeeded(ComponentManagerImpl.kt:663)
	at com.intellij.serviceContainer.BaseKeyedLazyInstance.createInstance(BaseKeyedLazyInstance.java:57)
	at com.intellij.serviceContainer.BaseKeyedLazyInstance.getInstance(BaseKeyedLazyInstance.java:49)
	at com.intellij.openapi.fileTypes.FileTypeExtension.getAllRegisteredExtensions(FileTypeExtension.java:49)
	at com.intellij.psi.stubs.CompositeBinaryBuilderMap.<init>(CompositeBinaryBuilderMap.java:31)
	at com.intellij.psi.stubs.StubUpdatingIndex$MyIndex.<init>(StubUpdatingIndex.java:307)
	at com.intellij.psi.stubs.StubUpdatingIndex.createIndexImplementation(StubUpdatingIndex.java:292)
	at com.intellij.util.indexing.FileBasedIndexImpl.createIndex(FileBasedIndexImpl.java:445)
	at com.intellij.util.indexing.FileBasedIndexImpl.initIndexStorage(FileBasedIndexImpl.java:388)
	at com.intellij.util.indexing.FileBasedIndexImpl.registerIndexer(FileBasedIndexImpl.java:356)
	at com.intellij.util.indexing.FileBasedIndexDataInitialization.lambda$initAssociatedDataForExtensions$0(FileBasedIndexDataInitialization.java:64)
	at com.intellij.util.indexing.IndexInfrastructure$DataInitialization.executeNestedInitializationTask(IndexInfrastructure.java:177)
	at com.intellij.util.indexing.IndexInfrastructure$DataInitialization.runParallelNestedInitializationTasks(IndexInfrastructure.java:165)
	at com.intellij.util.indexing.IndexInfrastructure$DataInitialization.call(IndexInfrastructure.java:126)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:222)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:29)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:201)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:210)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:190)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: com.intellij.psi.impl.compiled.ClassFileStubBuilder PluginClassLoader[com.siberika.idea.pascal, 2.61] com.intellij.ide.plugins.cl.PluginClassLoader@640f75e5
	at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:115)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:398)
	at com.intellij.serviceContainer.ComponentManagerImpl.instantiateExtensionWithPicoContainerOnlyIfNeeded(ComponentManagerImpl.kt:660)
	... 22 more

As a result the whole index is broken and IDE is unusable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.