* * *

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

Graeme

  • Hero Member
  • *****
  • Posts: 1388
    • Graeme on the web
Re: IntelliJ IDEA + Pascal
« Reply #15 on: November 20, 2013, 05:44:35 am »
Fantastic contribution - well done!
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

argb32

  • Jr. Member
  • **
  • Posts: 70
    • Pascal IDE based on IntelliJ platform
Re: IntelliJ IDEA + Pascal
« Reply #16 on: November 21, 2013, 03:27:32 pm »
Liquid, Fred vS: You should choose the directory containing "bin" directory of FPC. As well as "units" directory where compiled RTL units are located.
Usally it's something like "/usr/share/fpc".
I have CodeTyphoon installed and the directory is "/usr/lib/codetyphon/fpc".
One of the directories above suggested by default during SDK setup. Depending on which one exists.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5640
Re: IntelliJ IDEA + Pascal
« Reply #17 on: November 21, 2013, 04:02:24 pm »
Any idea how you are going to tackle help?

argb32

  • Jr. Member
  • **
  • Posts: 70
    • Pascal IDE based on IntelliJ platform
Re: IntelliJ IDEA + Pascal
« Reply #18 on: November 21, 2013, 04:27:55 pm »
Any idea how you are going to tackle help?

Could you please restate? I'm not sure I understood this post correctly.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5640
Re: IntelliJ IDEA + Pascal
« Reply #19 on: November 21, 2013, 04:44:51 pm »
Any idea how you are going to tackle help?

Could you please restate? I'm not sure I understood this post correctly.

How do you think about providing Pascal context sensitive help in IntelliJ? Help on keywords, API functions etc? Can you reuse the CHMs that lazarus uses ?
« Last Edit: November 21, 2013, 04:53:37 pm by marcov »

argb32

  • Jr. Member
  • **
  • Posts: 70
    • Pascal IDE based on IntelliJ platform
Re: IntelliJ IDEA + Pascal
« Reply #20 on: November 21, 2013, 06:16:09 pm »
How do you think about providing Pascal context sensitive help in IntelliJ? Help on keywords, API functions etc? Can you reuse the CHMs that lazarus uses ?

I hadn't thought on this yet.
I definitely have no plans to convert any help to IDEA-compatible format.
From the other side, it's not a problem to bind a hotkey to some external call with any context from the editor.
For API functions a javadoc-style comments will be supported.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5640
Re: IntelliJ IDEA + Pascal
« Reply #21 on: November 21, 2013, 08:03:53 pm »
to bind a hotkey to some external call with any context from the editor.

Since LHelp is fairly self contained, that could work that way.

For API functions a javadoc-style comments will be supported.

That won't work with the main targets, the FPC/Lazarus codebases, since they practice out-of-source documentation principles

Fred vS

  • Hero Member
  • *****
  • Posts: 1663
    • miXimum is the DJ's best friend
Re: IntelliJ IDEA + Pascal
« Reply #22 on: November 22, 2013, 01:16:37 pm »
Quote
"You should choose the directory containing "bin" directory of FPC."

With classical install of Lazarus the "default" directory containing "binaries" of FPC (fpc, fpcmake, fpcres,...) is :
/usr/bin

Quote
"As well as "units" directory where compiled RTL units are located.
Usally it's something like "/usr/share/fpc""

With a clasical Lazarus install, RTL units are located in :

/usr/lib/fpc/$fpcversion/units/$fpctarget/

So i have created :

/usr/lib/fpc/$fpcversion/bin/

and copy into all fpc binaries from /usr/bin

Now i get that message :
Quote
"The selected directory is not a valid home for Free Pascal SDK"

 :-\
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

argb32

  • Jr. Member
  • **
  • Posts: 70
    • Pascal IDE based on IntelliJ platform
Re: IntelliJ IDEA + Pascal
« Reply #23 on: November 22, 2013, 03:24:02 pm »
With classical install of Lazarus the "default" directory containing "binaries" of FPC (fpc, fpcmake, fpcres,...) is :
/usr/bin

It looks like placing files in c:\windows\system32. :(
The better setup would be to place binaries in some directory, e.g. /usr/lib/fpc/$fpcversion/bin.
And create symlinks from /usr/bin if this is really needed.

/usr/lib/fpc/$fpcversion/units/$fpctarget/

So i have created :

/usr/lib/fpc/$fpcversion/bin/

and copy into all fpc binaries from /usr/bin

Now i get that message :
Quote
"The selected directory is not a valid home for Free Pascal SDK"

Did you selected the /usr/lib/fpc/$fpcversion directory? This one should work.
And even /usr should work.
Home directory validation only checks if $SDK_HOME/bin/fpc is an executable file.

May be there is a problem with file permissions. Is FPC executable permitted under user running IDEA?

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5640
Re: IntelliJ IDEA + Pascal
« Reply #24 on: November 22, 2013, 04:09:07 pm »
Keep in mind that "fpc" is only a frontend binary. It will call the real ppc* ( ppc386,ppcx64 etc) compiler, after a search in the path.

Fred vS

  • Hero Member
  • *****
  • Posts: 1663
    • miXimum is the DJ's best friend
Re: IntelliJ IDEA + Pascal
« Reply #25 on: November 22, 2013, 07:18:15 pm »
Quote
It looks like placing files in c:\windows\system32. :(
The better setup would be to place binaries in some directory, e.g. /usr/lib/fpc/$fpcversion/bin.
And create symlinks from /usr/bin if this is really needed.

Hum, it is not me, chief, it is sudo dpkg -i fpc.deb and sudo dpkg -i fpc_src.deb who did all the work... :-X

Quote
Is FPC executable permitted under user running IDEA?

Did not understood, IDEA has his own  permitted users list ?  :-[
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 1663
    • miXimum is the DJ's best friend
Re: IntelliJ IDEA + Pascal
« Reply #26 on: November 24, 2013, 12:35:28 am »
Quote
I have CodeTyphoon installed and the directory is "/usr/lib/codetyphon/fpc".

OK, i have install last version of CodeTyphoon and everything is working now.

(But it could be great if we can use fpc 2.6.2 too, it seems that only fpc 2.7.1. is accepted... :-[ )

I gonna try to load one of my Lazarus project to test it...


PS : Could it be possible that you give a source-project-Idea-FPC example ( a simple one, like a Hello World ) ?

Many thanks for that super project..
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

argb32

  • Jr. Member
  • **
  • Posts: 70
    • Pascal IDE based on IntelliJ platform
Re: IntelliJ IDEA + Pascal
« Reply #27 on: November 25, 2013, 03:01:15 pm »
FPC 2.6.x should work and even earlier ones.
Quote
Could it be possible that you give a source-project-Idea-FPC example
There is no any specific project-like entities. Any .pas (.pp, .lpr) single file can be compiled and ran.
RTL library path is not saved in IDEA project file (.iml) as it's a SDK's setting.
If compiler can't find RTL units the path wasn't added automatically and should be added manually.
Menu File->Project structure->SDKs
Than select a FPC SDK and in source path tab add directory where FPC RTL is located (/usr/lib/codetyphon/fpc/units/<target>)

Fred vS

  • Hero Member
  • *****
  • Posts: 1663
    • miXimum is the DJ's best friend
Re: IntelliJ IDEA + Pascal
« Reply #28 on: November 25, 2013, 03:22:31 pm »
Quote
Than select a FPC SDK and in source path tab add directory where FPC RTL is located (/usr/lib/codetyphon/fpc/units/<target>)

Ok, thanks.

Hum, it seems that your pluggin is working only for fpc-console code.
So, if i want to compile a Lazarus app, i have to add the /lcl and /pluggin dir from Lazarus ?  :-[

If i do so, it works but, because it add also sub-directories, it take much more time to index all.

Is there a way to configure your pluggin to do it work for code using lcl (Lazarus) ?
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

argb32

  • Jr. Member
  • **
  • Posts: 70
    • Pascal IDE based on IntelliJ platform
Re: IntelliJ IDEA + Pascal
« Reply #29 on: November 27, 2013, 01:25:49 pm »
Quote
If i do so, it works but, because it add also sub-directories, it take much more time to index all.

Are you talking about directories with source code?
You can add directories containing compiled code (.ppu) which not indexed.
Is indexing problematic? It should process only once.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus