Recent

Author Topic: [Solved] How can I read specific Ide settings ?  (Read 4729 times)

balazsszekely

  • Guest
Re: How can I read specific Ide settings ?
« Reply #15 on: February 07, 2022, 09:49:47 pm »
@loaded

See attached package and project.
1. Install package
2. Rebuild IDE
3. Open then run test project

PS: Sometimes when unit ufpcpath is open in the IDE, the editor doesn't get refreshed. But the path is there and valid. If you close and reopen ufpcpath the path is visible again.

loaded

  • Hero Member
  • *****
  • Posts: 878
Re: How can I read specific Ide settings ?
« Reply #16 on: February 08, 2022, 06:08:47 am »
Once again I am grateful to you. Thanks a lot.
I would like to point out that I think it was a very professional work.
Mr. GetMem, the man who whispered the codes.
The more memory computers have, the less memory people seem to use. 😅

balazsszekely

  • Guest
Re: [Solved] How can I read specific Ide settings ?
« Reply #17 on: February 08, 2022, 06:44:55 am »
@loaded

I'm glad it's working. One small correction though is needed in unit fpcsource_intf.pas, please change:
Code: Pascal  [Select][+][-]
  1. if (P > 0) then
to:
Code: Pascal  [Select][+][-]
  1. if (P > 0) and (Str <> 'var FPCSource: String = ' + QuotedStr(IDEEnvironmentOptions.GetParsedCompilerFilename) + ';') then
Once the FPC path is there, the package does not rewrite the variable each time you open the project and does not trigger the "Some files has changed" dialog.

loaded

  • Hero Member
  • *****
  • Posts: 878
Re: [Solved] How can I read specific Ide settings ?
« Reply #18 on: February 08, 2022, 07:01:14 am »
It's understood, actually this was also very good because;
it is better to have such corrections in terms of understanding the issue.
The more memory computers have, the less memory people seem to use. 😅

PascalDragon

  • Hero Member
  • *****
  • Posts: 6322
  • Compiler Developer
Re: How can I read specific Ide settings ?
« Reply #19 on: February 08, 2022, 09:35:48 am »
Can you elaborate on the use case you are trying to work with?

https://forum.lazarus.freepascal.org/index.php/topic,58173.msg433271.html#msg433271  As I mentioned in the link, I'm thinking of doing a study that will add units automatically. I hope this work will improve me a lot. In fact, I've already made a few clicks of progress.  :)

If your endgoal is to have something that can be used within the IDE you should familiarize yourself with creating an IDE package (e.g. something that extends or uses Cody) and then you'll have access to the IDE settings (and other functionality like adding a unit to the uses clause) anyway without going through hurdles as those mentioned in this thread. Cause what would be the use of your study if you'll need to use completely different functionality in the end?

loaded

  • Hero Member
  • *****
  • Posts: 878
Re: [Solved] How can I read specific Ide settings ?
« Reply #20 on: February 08, 2022, 12:24:05 pm »
PascalDragon,As I mentioned above, I am currently in the development phase of myself.
If possible, I will try to implement what you said in the future.
The more memory computers have, the less memory people seem to use. 😅

 

TinyPortal © 2005-2018