Recent

Author Topic: IntelliJ IDEA + Pascal  (Read 87413 times)

argb32

  • Jr. Member
  • **
  • Posts: 89
    • Pascal IDE based on IntelliJ platform
Re: IntelliJ IDEA + Pascal
« Reply #45 on: March 26, 2015, 09:49:20 pm »
ok I get it but with attaching it to Android it can be serious product and not just a developer tools.

Can you please elaborate on it? How can it be attached to Android in your opinion?

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: IntelliJ IDEA + Pascal
« Reply #46 on: March 26, 2015, 10:32:18 pm »
Use it like AS but for FPC,As I saw before there are many works on making Andoid apps with Lazarus,you can move libraries that have futures to your IDE and also get together all Android development libraries in one place so it can be choice for Delphi an Pascal and also other developers who interst in Android to choose this new IDE.
Many pepole may disagree but Lazarus IDE seems old in compare of IntellJ and maybe developers like us that know pascal for years like this but new developers and also many others dont like a old school IDE.
So this can be field for this new one.

Kuci

  • Newbie
  • Posts: 6
Re: IntelliJ IDEA + Pascal
« Reply #47 on: April 19, 2015, 02:14:47 pm »
I have problems with completion. It does not work, for example with TStringList, and I get 'Undeclared identifier' message.

I use Arch Linux, fpc 2.6.4 and IntelliJ Idea 14 Community Edition, both installed from official repositories.

argb32

  • Jr. Member
  • **
  • Posts: 89
    • Pascal IDE based on IntelliJ platform
Re: IntelliJ IDEA + Pascal
« Reply #48 on: April 19, 2015, 06:50:27 pm »
TStringList is from classes unit i guess?
It's RTL. To decompile RTL libraries FPC 2.7.1 or later is needed.
You can also try to add RTL sources to SDK's source path. (in File -> Project Structure -> SDKs).

Kuci

  • Newbie
  • Posts: 6
Re: IntelliJ IDEA + Pascal
« Reply #49 on: April 19, 2015, 07:02:23 pm »
TStringList is from classes unit i guess?
It's RTL. To decompile RTL libraries FPC 2.7.1 or later is needed.
You can also try to add RTL sources to SDK's source path. (in File -> Project Structure -> SDKs).
Adding /usr/lib/fpc/src/rtl/inc and /usr/lib/fpc/src/rtl/x86_64 did not help.
« Last Edit: April 19, 2015, 07:04:29 pm by Kuci »

argb32

  • Jr. Member
  • **
  • Posts: 89
    • Pascal IDE based on IntelliJ platform
Re: IntelliJ IDEA + Pascal
« Reply #50 on: April 19, 2015, 10:48:18 pm »
classes.pp is from /rtl/unix
But it's almost entirely in included classes.inc so adding it in source will not help much.
For FPC RTL the only way is to use a recent FPC version.
However I can see no point in using older versions.

Kuci

  • Newbie
  • Posts: 6
Re: IntelliJ IDEA + Pascal
« Reply #51 on: April 20, 2015, 06:40:29 pm »
classes.pp is from /rtl/unix
But it's almost entirely in included classes.inc so adding it in source will not help much.
For FPC RTL the only way is to use a recent FPC version.
However I can see no point in using older versions.
Upgraded to 3.1.1 from svn, nothing changed. Please, could you tell, what exactly am I supposed to add to source path  ?

argb32

  • Jr. Member
  • **
  • Posts: 89
    • Pascal IDE based on IntelliJ platform
Re: IntelliJ IDEA + Pascal
« Reply #52 on: April 20, 2015, 10:35:03 pm »
After upgrading FPC you need to recreate SDK in File -> Project Structure -> SDKs.
After creating SDK with version 3.1.1, make sure that it is used as Module SDK in dependencies of your IDEA module.
It will take some time to reindex the new files.
If classes is still highlighted with red, use File => Invalidate caches / Restart to clear cache and restart the IDE.
Also I recommend to download latest version of the plugin from site.

Kuci

  • Newbie
  • Posts: 6
Re: IntelliJ IDEA + Pascal
« Reply #53 on: April 21, 2015, 07:57:02 am »
After upgrading FPC you need to recreate SDK in File -> Project Structure -> SDKs.
After creating SDK with version 3.1.1, make sure that it is used as Module SDK in dependencies of your IDEA module.
It will take some time to reindex the new files.
If classes is still highlighted with red, use File => Invalidate caches / Restart to clear cache and restart the IDE.
Also I recommend to download latest version of the plugin from site.
Did so. Now, the classes and units are being recognized, but completion still does not work and it does not recognize constructors and destructors.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: IntelliJ IDEA + Pascal
« Reply #54 on: April 21, 2015, 10:35:11 am »
I am a new user of your plugin.
Compiling a simple (Lazarus) project works 100%. Thanks !!

But how to include a source library ?
I have tried everything.
But the library does not show up in the compiler includes (under messagess when compiling)

Could you tell me how to include an external (pascal) library.
In my case : synaser ? Located in a separate directory somewhere ?

Thanks, Alfred.

argb32

  • Jr. Member
  • **
  • Posts: 89
    • Pascal IDE based on IntelliJ platform
Re: IntelliJ IDEA + Pascal
« Reply #55 on: April 21, 2015, 11:18:22 pm »
DonAlfredo, currently the plugin doesn't allow to create libraries with pascal sources.
You can create a module with content root pointing to library source root and with that source root directory marked as source in module settings.

You also need to update the plugin with latest version from the plugin's homepage as previous ones can find units in .pas files only (not .pp).

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: IntelliJ IDEA + Pascal
« Reply #56 on: April 22, 2015, 08:26:55 am »
Thanks for the explanation ! I will try to get it to work this way.

But then I would like to extend my question to a feature request:

It would be (very) nice to be able to include source libraries (like synapse) into a FPC IntelliJ project as a normal (pascal source) library.

Thanks.

Kuci

  • Newbie
  • Posts: 6
Re: IntelliJ IDEA + Pascal
« Reply #57 on: April 22, 2015, 04:57:21 pm »
argb32, could you react to my post, please ?

argb32

  • Jr. Member
  • **
  • Posts: 89
    • Pascal IDE based on IntelliJ platform
Re: IntelliJ IDEA + Pascal
« Reply #58 on: April 22, 2015, 10:19:35 pm »
Kuci, can you please elaborate what means completion doesn't work?
There is a problem with resolving methods of a class which is parent of a class from RTL (TStringList seems to be the case). This will be fixed.
Methods and fields from TStringList itself should be recognized and included in completion.

Kuci

  • Newbie
  • Posts: 6
Re: IntelliJ IDEA + Pascal
« Reply #59 on: April 23, 2015, 12:00:07 pm »
Kuci, can you please elaborate what means completion doesn't work?
There is a problem with resolving methods of a class which is parent of a class from RTL (TStringList seems to be the case). This will be fixed.
Methods and fields from TStringList itself should be recognized and included in completion.
Methods and fields do not work as well.

 

TinyPortal © 2005-2018