Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Includes through $I #10

Open
megahertz opened this issue May 30, 2017 · 4 comments
Open

Includes through $I #10

megahertz opened this issue May 30, 2017 · 4 comments

Comments

@megahertz
Copy link

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

@casteng
Copy link
Owner

casteng commented May 30, 2017

Alexey,

IDEA doesn't directly support including part of code from one file to another. So I haven't figured out yet a general solution for includes which will not hit performance.
Therefore it's likely that there will be some partial solution. For example, threat includes as some kind of "units". In that case the includes should have some reasonable syntax. E.g. balanced begin/end blocks, full declarations etc.
If you can provide some examples of your include files it will help to decide what restrictions is suitable.
Thanks for pointing out the problem with Paypal.

@megahertz
Copy link
Author

Thank you for the response. It's sad news.

In my case, it's something like

type
  TClass1 = class;
  ...
  TClass10 = class;

{$I Class1Header.inc}
 ...
{$I Class10Header.inc}

implementation

{$I Class1Body.inc}
...
{$I Class10Body.inc}

where Class1Header.inc is like:

TClass1 = class
public
...
end; 

and Class1Body.inc is like:

procedure Class1.Proc1;
begin
end;
...

Unfortunately, there are a lot of cycle references between classes both in interface and implementation and it's not possible to do refactoring in the near future.

@casteng
Copy link
Owner

casteng commented May 31, 2017

I have similar code of my own. It seems possible to support such declarations in includes.

@megahertz
Copy link
Author

It sounds promising.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants