> On Apr 23, 2020, at 10:07 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> Please post the last couple of lines, e.g. starting at the last
> ppcx64 call.
>
/bin/cp -f Makefile.compiled units/x86_64-darwin/nogui/IDEIntf.compiled
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C
co
OK, I just downloaded the laz sources and rebuilt from scratch (as usual) and
it's building with the 3.3.1 now.
I'm testing the server in Sublime Text and first thing I get is:
LSP: invalid response payload {'id': 1, 'result': {'capabilities':
{'completionProvider': {'triggerCharacters': None,
> On Apr 24, 2020, at 9:52 AM, Ryan Joseph wrote:
>
> LSP: invalid response payload {'id': 1, 'result': {'capabilities':
> {'completionProvider': {'triggerCharacters': None, 'allCommitCharacters':
> None, 'resolveProvider': False}, 'textDocumentSync': {'openClose': True,
> 'change': 1}}}, 'j
> On Apr 24, 2020, at 10:23 AM, Ryan Joseph wrote:
>
> Just tested on my language server and the problem is you provided a null
> error key, which is not in the protocol.
>
> I've never seen the fpjsonrpc unit before so I don't know where this got
> inserted but it needs to be removed.
I th
> On Apr 24, 2020, at 12:46 PM, Michael Van Canneyt
> wrote:
>
> I fixed TCustomJSONRPCDispatcher not to add a Null in case of V2. But V1
> needs it.
> see https://www.jsonrpc.org/specification_v1
>
> Committed in revision 45047.
Nice, it was a bug. :)
So the Sublime Text people explained
> On Apr 24, 2020, at 1:47 PM, Ryan Joseph wrote:
>
>end else begin
> if CodeToolBoss.ErrorMessage<>'' then
>writeln(stderr, 'Parse error: ',CodeToolBoss.ErrorMessage)
> else
>writeln(stderr, 'Error: no context');
>end;
In my test I'm getting an error at this
> On Apr 24, 2020, at 2:37 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> fpextres.ppu is installed by default on darwin.
> Maybe you didn't setup codetools for your fpc units. Because of the
> vast amount of fpc units, codetools needs to scan them once. There is a
> simple init function, th
> On Apr 24, 2020, at 2:54 PM, Michael Van Canneyt
> wrote:
>
> What do you want to omit exactly ?
For example, I'm not a lazarus user but I'm getting strange errors that don't
relate to my single file program. That's going to confuse users like it did me.
I'd like to omit the need to confi
> On Apr 24, 2020, at 3:32 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> Are there any ppu files left after "make distclean"?
I just trashed the entire thing and started over. It was easier that way, much
easier. It's working now so I'm happy. :)
I'm still getting that code tools error t
> On Apr 24, 2020, at 3:59 PM, Arjan Adriaanse wrote:
>
> FPCDIR="/usr/lib/fpc/3.2.0/source"
> LAZARUSDIR="/usr/share/lazarus"
I see now! I didn't know that but it's easy to document once we get that far.
btw, I'm having a problem with the fact that published un-set properties are
being set
> On Apr 24, 2020, at 4:25 PM, Arjan Adriaanse wrote:
>
> Indeed with the current way JSON streaming is handled, optional values
> are not considered. This needs more work and the issue is tracked
> here https://github.com/arjanadriaanse/pascal-language-server/issues/7
> [1].
We may need to r
When I hover over a function in Lazarus I get a function definition and unit
location. Is that coming from TCodeManager.FindSmartHint?
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org
> On Apr 24, 2020, at 4:35 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> codetools that scans Lazarus packages.
>
> In Short: You can omit LAZARUSDIR.
>
> Setting PP might be useful.
>
> You can add unit and include paths:
> https://wiki.freepascal.org/Codetools#Defining_search_paths_and
> On Apr 24, 2020, at 4:49 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
>> When I hover over a function in Lazarus I get a function definition
>> and unit location. Is that coming from TCodeManager.FindSmartHint?
>
> Yes
I'm not able to get this one working then. Is the buffer the current
> On Apr 24, 2020, at 5:28 PM, Joost van der Sluis wrote:
>
> I did not have a look at your code, but if you have serialization-issues, you
> might consider looking at Cerialization.
> (https://gitlab.freepascal.org/Joost/cerialization)
>
> It is what I use for my debugging-project. And it e
> On Apr 24, 2020, at 4:54 PM, Ryan Joseph wrote:
>
> I'm not able to get this one working then. Is the buffer the current file?
> This is what I'm doing:
>
>
>URI := ParseURI(textDocument.uri);
>Code := CodeToolBoss.FindFile(URI.Path + URI.Document);
>X := position.character;
>
> On Apr 24, 2020, at 9:28 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> Still FindFile instead of LoadFile?
>
> Do you get all mails from this list?
I don't know what the code buffer technically is but FindFile works after the
source was set previously. I assumed it was just a reference
> On Apr 24, 2020, at 9:44 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
>> I assumed it was just a
>> reference to the current file which corresponds to the line/column
>> numbers.
>>
>> Sorry, what do you want to see a demo of? The language server?
>
> Yes.
The first message has the Git
In the FPC streaming system with published properties, what type do I use for
an array of strings? I've tried TStringList and TCollection but they give me
errors like:
:: <~~ pascal-language-server 1: {'message': ' : Unsupported JSON type for
object property: "jtArray"', 'code': -32603}
"init
I have FindCodeContext working correctly I believe because ProcName from
TCodeContextInfo returns the correct name of the function. In
TCodeContextInfoItem the params string list is nil though. Shouldn't that
contain the list of parameters? Not sure how this intended to be used if that
list of
> On Apr 25, 2020, at 2:02 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
>> I have FindCodeContext working correctly I believe because ProcName
>> from TCodeContextInfo returns the correct name of the function. In
>> TCodeContextInfoItem the params string list is nil though. Shouldn't
>> that
> On Apr 25, 2020, at 6:51 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> Hmm. Maybe "make distclean" does not remove all files. I wish, you had
> kept a copy.
It'll probably happen again. ;)
Since we're so invested in code tools now what is actually required for users
in terms of Lazarus
Is the following line something which can be cached? Currently this is going to
be called very often but is it an expensive operation? Not sure what it does
exactly
Code := CodeToolBoss.FindFile(URI.Path + URI.Document);
Regards,
Ryan Joseph
> On Apr 25, 2020, at 7:48 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> It's gpl/lgpl. Feel free to use parts.
sure, but does it does it depend on other systems which are installed from
Lazarus or will a stand-alone binary run on a system that never installed
Lazarus?
Regards,
> On Apr 24, 2020, at 3:10 AM, Joost van der Sluis wrote:
>
> I'm working on the support of the debug-adapter-protocol for fpDebug. It's
> quite easy to implement, as there already is a json-based tcp/ip interface.
> (https://microsoft.github.io/debug-adapter-protocol)
I use the debugger in
> On Apr 25, 2020, at 8:49 PM, Michael Van Canneyt
> wrote:
>
> It will run on a server that never installed lazarus.
Excellent. Where are the caches kept btw? I thought they were in the Lazarus
directory but I guess not.
Regards,
Ryan Joseph
___
I'm still stuck on this problem. I can get the full proc head using
CodeTool.ExtractProcHead but I can't get the name/type parameter pairs in a
list (unless I do something stupid like parse the string from ExtractProcHead).
I need to return the parameters in discrete pairs in text that matches t
The other thing I'm stuck on with code tools. In TCodeManagerTool:
function FindReferences(IdentifierCode: TCodeBuffer;
X, Y: integer; SearchInCode: TCodeBuffer; SkipComments: boolean;
var ListOfPCodeXYPosition: TFPList;
var Cache: TFindIdentifierReferenceCache
> On Apr 26, 2020, at 4:46 PM, Ryan Joseph wrote:
>
> The other thing I'm stuck on with code tools. In TCodeManagerTool:
>
>function FindReferences(IdentifierCode: TCodeBuffer;
> X, Y: integer; SearchInCode: TCodeBuffer; SkipComments: boolean;
> var ListOfPCodeXYPosition:
> On Apr 28, 2020, at 4:36 AM, Zoë Peterson wrote:
>
> Ryan,
>
> Do you have a link to the LSP discord channel? I tried following the one you
> posted Friday, but I got an error that I either didn't have access to any
> text channels or there weren't any on the server.
>
> Thanks!
Here's
> On Apr 28, 2020, at 4:18 AM, Mattias Gaertner via fpc-pascal
> wrote:
>
> I added an example for FindReferences:
> lazarus/components/codetools/example/findreferences.lpi
I see now, there are more steps involved than I thought.
LSP doesn't have a concept of the "main file" but this seems
I've learned how to use FindBlockCounterPart but it would be preferable to get
the ranges which contain the identifiers that are the start/end of the blocks.
For example the ranges of "begin" and "end" instead of the entire range which
spans from the cursor to the end of the block.
Any sugges
> On Apr 28, 2020, at 3:06 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> You can add any number of files as start. Just call AddStartUnit
> for every starting module.
> For example add all Pascal modules of the workspace directory.
In TCodeToolsOptions we provide FPCOptions and ProjectDir
> On Apr 28, 2020, at 3:26 PM, Michael Van Canneyt
> wrote:
>
> That's a wrong approach. Pascal units are in a uses-tree. You need a starting
> point, the top of the tree: a single module.
I can make the user provide the program file and start from there but then the
references in other uni
> On Apr 28, 2020, at 3:45 PM, Michael Van Canneyt
> wrote:
>
> Why do you think so ? The codetools will find all referenced units that it
> finds in the unit search path.
You're right. I was thinking there are going to be units that aren't referenced
by the main program but why do
> On Apr 28, 2020, at 4:04 PM, Michael Van Canneyt
> wrote:
>
> You can do what most VSCode/Atom project managers seem to, add package.json
> or somesuch:
>
> {
> "pascal-lsp" : {
>"projectfile" : "yourproject.pas",
>"searchpath" : ["a","b"]
> }
> }
Yes, that's what the plugin for
> On Apr 28, 2020, at 7:47 PM, Michael Van Canneyt
> wrote:
>
> Incredibly looking forward to test-driving this in Atom... :-)
The biggest left is getting diagnostics working so we can see errors that popup.
Speaking of that is there a way in code tools to get a list of parsing errors
that
> On Apr 28, 2020, at 8:52 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> Codetoolboss.Error*
Not sure I'm understand the usage. When do I check for errors and are there
ever more than 1 or just the last error? I'm guessing maybe after:
URI := ParseURI(textDocument.uri);
Code := C
> On Apr 28, 2020, at 7:47 PM, Michael Van Canneyt
> wrote:
>
> Incredibly looking forward to test-driving this in Atom... :-)
Michael, do you actually know how to setup a language server in Atom? I've only
tested on Sublime Text but I do plan to learn how to setup VSCode also when I
find
> On Apr 28, 2020, at 10:01 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> Yes
This wasn't doing what I thought. It still doesn't give an error until I query
at another point in the unit. I thought it would pre-parse or something but it
seems to be on demand. I may have to handle the erro
> On Apr 29, 2020, at 3:23 PM, Michael Van Canneyt
> wrote:
>
> and then it should be a matter of creating a descendent of the language
> client.
> The C# one seems easy enough to convert :-)
Let me know if you can figure it out.
VSCode looks pretty difficult:
https://github.com/donaldpip
> On Apr 29, 2020, at 3:37 PM, Michael Van Canneyt
> wrote:
>
> if the Lazarus team can implement a LSP plugin for the editor, then we'd have
> instant language support
> for a whole bunch of languages. That would be awesome...
but language servers don't do any syntax styling so they're only
Testing this more I'm having a problem getting overwhelmed by completions for
classes because of methods from TObject (and other parents) so I'd like to add
some information about this.
Using this method:
if CodeToolBoss.GatherIdentifiers(Code,X + 1,Y + 1) then
begin
Count := Code
> On Apr 29, 2020, at 3:15 PM, Ryan Joseph wrote:
>
> This wasn't doing what I thought. It still doesn't give an error until I
> query at another point in the unit. I thought it would pre-parse or something
> but it seems to be on demand. I may have to handle the errors in another way.
>
>
Stuck on another code tools problem.
I've been using code like this to find words at node offsets and this works
well until there are $ifdefs in the file and then the text position getting
offset and fail to return the correct identifiers.
GetIdentifier(@Code.Source[Node.StartPos]);
How should
> On May 1, 2020, at 2:42 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> The Node.StartPos are referring to the Tool.Scanner.CleanedSrc, which is
> the code stripped of skipped $ifdef ranges and include files included.
That's what I was missing. Thanks again.
Regards,
Ryan Joseph
Ok, got things working now. Here's the basic pattern I'm using. I call explore
and then walk the root tree node to find what I need but i've noticed the 2nd
time I do this I get less results than the first time! What is happening? I
assume it's caching something but do I need to reference the ca
for the list.
>
> On Fri, 1 May 2020 16:27:46 +0700
> Ryan Joseph via fpc-pascal wrote:
>
>> Ok, got things working now. Here's the basic pattern I'm using. I
>> call explore and then walk the root tree node to find what I need but
>> i've noticed the 2
I've been starting to use the RTL so I'm not very familiar with it but I
thought TFPGMap was supposed to be a hash table for fast lookup, so why does
TFPSMap.Find using a binary search instead of computing a hash key and indexing
into the array like that? Is this not the type I should be using i
> On May 1, 2020, at 9:28 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> "Explore" checks if some files have changed and if so rebuilds the
> nodes.
so I missed something fundamental! I used Explore because I noticed that I was
able to get parser errors after calling it. When does the actu
> On May 1, 2020, at 10:18 PM, Sven Barth wrote:
>
> It is a map. It maps keys to values. Nowhere does it say how the map is
> implemented.
>
> If you need to decide which map to use I suggest you to look at this
> benchmark page: http://www.benibela.de/fpc-map-benchmark_en.html You can
> s
> On May 1, 2020, at 10:18 PM, Sven Barth wrote:
>
> If you need to decide which map to use I suggest you to look at this
> benchmark page: http://www.benibela.de/fpc-map-benchmark_en.html You can
> select various of the maps that FPC supports (both ones distributed with FPC
> and th
> On May 2, 2020, at 12:13 AM, Mattias Gaertner via fpc-pascal
> wrote:
>
> By many functions in CodetoolBoss. Explore, FindDeclaration,
> FindReferences, GatherIdentifiers. All of them checks if a file have
> changed and rebuilds nodes. If no file/setting has changed, nodes are
> kept.
Found
I have many TCollection's that I need to concat together into one larger
collection for streaming. Since it's just a list I thought I could add the
elements together but it appears TCollection requires that it allocate each
item.
Is there a way to do this without relocating each item of the col
> On May 3, 2020, at 4:04 PM, Michael Van Canneyt
> wrote:
>
> Just set the Collection property of the items to the concatenated collection
> instance.
>
> Note that this effectively moves the items.
That means I'll need to set it back later right? The original lists are being
kept alive b
I've been using scoped enums and noticed that I'm getting collisions with
reserved keywords. Shouldn't these be allowed in scoped enums since they are
required to be referenced using their type name as a prefix?
{$mode objfpc}
program test;
{$scopedenums on}
// error: Syntax error, "identif
Should generics accept empty sets as constants? I think they should and this is
a bug but I wanted to ask first.
{$mode objfpc}
program test;
type
TItem = (A, B, C);
TItems = set of TItem;
generic GType = class
end;
const
TOtherItems = []; // no problems h
> On May 4, 2020, at 12:40 PM, Sven Barth wrote:
>
> No, keywords have a higher priority than identifiers, their context doesn't
> matter (e.g. you can't have a method named "File" either though one could
> apply the same reasoning here). If you want to
> On May 4, 2020, at 2:12 PM, Michael Van Canneyt
> wrote:
>
> Methods can't be keywords either, unless prefixed with &.
>
> It's not safe to change this, that's why a keyword is a keyword: it
> supersedes all identifiers, it is part of the language.
Yes but methods can be used without thei
> On May 5, 2020, at 1:03 AM, Sven Barth wrote:
>
> Yes, they should indeed.
>
https://bugs.freepascal.org/view.php?id=37020
Found another one yesterday also but it's a crash
https://bugs.freepascal.org/view.php?id=37014
I think it's a PPU problem.
Regards,
Ryan Joseph
_
> On May 4, 2020, at 10:44 PM, Michael Van Canneyt
> wrote:
>
> That is how enums work by default in Pascal.
>
> If you don't force scoped enums, you can still scope them.
>
> if you use
> $scopedenums on then you simply force the use instead of having it optional.
But the names col
> On May 5, 2020, at 1:51 PM, Tomas Hajny wrote:
>
> Regarding coding style - apart from looking at the sources, you can find some
> guidelines in the Wiki - https://wiki.freepascal.org/Coding_style.
Someone on the compiler team should clarify spaces in parameter/variable lists.
I made a bun
> On May 5, 2020, at 12:19 PM, Sven Barth wrote:
>
> Right now it's clear what procedure is called, namely the one with the open
> array. If we'd allow scoped enums without their enum type then this would
> result in a "can't decide which method to call". This example might appear
> construc
As to be expected with new feature code tools now fails with constants in
generics. Should I make a bug report to fix this?
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/ma
Code tools completions are returning functions that don't appear related to the
current unit such as "fpc_Copy" from
/usr/local/share/fpcsrc/rtl/inc/compproc.inc.
Here's a snippet of the code I use to get identifiers.
if CodeToolBoss.GatherIdentifiers(Code,X + 1,Y + 1) then
begin
> On May 5, 2020, at 3:56 PM, Michael Van Canneyt
> wrote:
>
> They are in the system unit, so they're always related to any unit.
>
> They have a compilerproc modifier set, so I suppose there is some
> property/attribute of the identifier that indicates this modifier.
> You should check for
> On May 5, 2020, at 4:35 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> Yes, recording is a todo.
> If you want to check this you have to use the parsing functions like
> ProcNodeHasSpecifier or MoveCursorToProcSpecifier.
Why don't the nodes keep track of this information btw? That was the
> On May 5, 2020, at 3:54 PM, Michael Van Canneyt
> wrote:
>
> On Tue, 5 May 2020, Ryan Joseph via fpc-pascal wrote:
>
>> As to be expected with new feature code tools now fails with constants in
>> generics. Should I make a bug report to fix this?
>
> Y
Working on the language server it's become clear that JSON is going to be a
killer bottleneck, but that's what Microsoft decided to use. It's almost a deal
breaker just because of the sheer size of the data due to JSON's verbose plain
text formatting.
I've seen there is such thing as BSON (http
When using code tools I've found that it needs to start from a main unit
(otherwise other relevant macros may not be set) and then insert includes into
the source text. This is fine but when I inspect the node tree (TCodeTreeNode)
how do I know which include a node came from?
I need this inform
> On May 7, 2020, at 5:26 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> Nodes are always associated with a Tool. Tool.MainFilename gives the
> file, where parsing started.
>
Just curious, can you explain the reasoning of "tools"? I haven't exactly
figured out the delegation of tasks in y
> On May 7, 2020, at 4:44 PM, Michael Van Canneyt
> wrote:
>
> I'm not even sure BSON will be accepted for LSP.
I talked to them already and they're not keen to add extensions to the plugin
so I'll probably give up on this route. The spec from Microsoft doesn't say
anything about this eithe
> On May 7, 2020, at 9:11 PM, Michael Van Canneyt
> wrote:
>
> At least partial updates to a file should be there.
> Sending the whole file at essentially every few keystrokes is just
> braindead...
>
That's still happening but it's Sublime Texts fault for a bad API. It is fixed
in the cur
> On May 7, 2020, at 8:21 PM, Ryan Joseph wrote:
>
>>> I need this information so I can get navigate to the include file AND
>>> relative text offset into the include file text.
>>
>> There are plenty of functions for include files. Can you give an
>> example what you need?
>
> I start with
> On May 9, 2020, at 4:36 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> Use Tool.CleanPosToCaret(Node.StartPos,xyp) to get the file, line and
> column.
Thanks, I was just using the raw Node.StartPos location. Is there any flag in a
node to know if it came from an include? That would be he
> On May 10, 2020, at 1:20 AM, Mattias Gaertner via fpc-pascal
> wrote:
>
> CleanPosToCaret is using a binary search. Compared to the other
> operations like parsing, this is is hardly measurable.
Thanks, I got it working now.
Regards,
Ryan Joseph
___
I found out that setting TCodeToolsOptions.FPCOptions (-Fu and -Fi) was doing
something because it helped FindDeclaration to search for units not in the same
same directory as the main program. However now I've encountered problems with
FindReferences (the example Mattias made for me) which seem
> On May 10, 2020, at 4:47 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> TDefineTemplates.
> see for example
> lazarus/components/codetools/examples/setincludepath.pas
>
Ok, I'll move to this. What are the FPC options for then? I thought I could do
things like -Fu and -d with it.
Are in
> On May 11, 2020, at 10:56 AM, Ryan Joseph wrote:
>
> Ok, I'll move to this. What are the FPC options for then? I thought I could
> do things like -Fu and -d with it.
>
> Are include paths and unit paths the same? I just see TDefineTemplate which
> seems to do both.
Removing the FPCOptions
> On May 11, 2020, at 4:55 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> Yes, you can.
> They are treated like global options, i.e. as if added to the fpc.cfg.
Then I don't understand why those affect FindReferences but worked for other
areas. Using those were easier than what I'm doing w
> On May 11, 2020, at 6:41 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> This creates a node for directory Path. Path should be your program
> directory.
>
>
>> UnitPathTemplate := TDefineTemplate.Create('???','???',
>>UnitPathMacroName,
>>UnitPathMacro+';
> On May 11, 2020, at 8:02 PM, Ryan Joseph wrote:
>
> I wanted this to behave like the compiler normally does, that is you supply
> paths to the units with -Fu and includes with -Fi. What is the way to achieve
> that here?
>
> For example in my test project I have the directory that contains
When a file changes I get the full source text and update the version in code
tools by doing this:
Code := CodeToolBoss.FindFile(Path);
Code.Source := text;
This works but I'm having problems with include files now because I'm updating
the code buffer for the include file but the main code does
> On May 19, 2020, at 4:43 AM, Joost van der Sluis wrote:
>
> Hi all,
>
> As I wrote before I'm working on a fpDebug-extension for Visual Studio Code,
> based on the DAB (Debug Adapter Protocol).
Excellent, I applaud your efforts. I'm busy now but I'll be sure to test this
later. I'm using
Using objects in TFPGList is currently not possible because class operators are
not supported in objects. I tried using global scope operators but they don't
seem to work.
/usr/local/lib/fpc/3.3.1/units/x86_64-darwin/rtl/fgl.ppu:fgl.pp:988:50: error:
Operator is not overloaded: "TInvocation" =
> On May 29, 2020, at 3:29 AM, Sven Barth via fpc-pascal
> wrote:
>
> Am 28.05.2020 um 19:36 schrieb Vojtěch Čihák via fpc-pascal:
>> There is TFPGObjectList for objects.
>
> Ryan is talking about TP style objects.
I had an array of records and I wanted to subclass the record which means I
In the example below "callback" is assigned to a method of "obj", but is it
possible to get the class back from the variable? In the pseudo code I would
expect .GetClass to return "obj". I think "of object" must be a record which
keep both the class and method pointer but I don't know how to acc
> On May 29, 2020, at 2:15 PM, Michael Van Canneyt
> wrote:
>
> I think what you're looking for is:
>
> if TMethod(CallBack).Data=XXX then
TMethod is exactly what I was looking for. Thank you Michael.
Regards,
Ryan Joseph
___
fpc-pascal m
I got the Lazarus sources on svn and I'm not sure how to make a diff! Here are
changes I propose to allow generic constants (I believe this is Mattias's code
so he'll understand). It's just a few lines in a single function. Not sure
about the error message but I think this is more or less the ri
I'm finally revising this problem I had over a month ago with find references
not working. I'm going to just post this code here and see if you see anything
strange (most of it is from your example code).
What happens is that the unit graph seems to be incomplete if the units are in
another dir
I'm using CodeToolBoss.GatherIdentifiers to get completions but with some units
I'm getting 50k identifiers which is simply too much and too slow. Maybe of
these are coming from the RTL I think and I would be ok with limited some of
these results if possible.
Is there anyway to tell CodeTools t
> On Jul 2, 2020, at 2:04 AM, Mattias Gaertner via fpc-pascal
> wrote:
>
>> One option would be return
>> results in partial batches (Language Server Protocol) supports this
>> but again I'm not sure if CodeTools supports this or not.
>
> Codetools provide a list of identifiers. Since you loo
> On Jul 2, 2020, at 8:05 AM, Ryan Joseph wrote:
>
> The majority of the work takes place in GatherIdentifiers. This is because
> MacOSAll and CocoaAll units. They're just massive files so I'm not sure what
> we can do about them.
I think I was wrong about this being the root of the problem
> On Jul 2, 2020, at 4:04 PM, Mattias Gaertner via fpc-pascal
> wrote:
>
> Maybe something like this:
>
> List:=CodeToolBoss.IdentifierList;
> for i:=0 to List.GetFilteredCountCnt-1 do
> begin
> Item:=List.FilteredItems[i];
> if (Item.Tool<>nil) then begin
>if
>RightStr(Item.Tool.Ma
Currently I walk the node tree for a given unit and collect all the relevant
symbols into a list which represents the symbols in the current document. I'm
running into problems with include files because I'm getting symbols which
technically belong to another file which should not be displayed a
> On Jul 7, 2020, at 4:57 AM, Mattias Gaertner via fpc-pascal
> wrote:
>
> Something like this:
>
> Node:=AItem.Node;
> if Node<>nil then
> begin
> Scanner:=Tool.Scanner;
> LinkIndex:=Scanner.LinkIndexAtCleanPos(Node.StartPos);
> if LinkIndex<0 then
>// dangling node, e.g. syntax error
> On Jul 7, 2020, at 8:13 PM, Joost van der Sluis wrote:
>
>
> I am using this plugin: (Please install and give feedback)
> https://marketplace.visualstudio.com/items?itemName=CNOC.fpdebug
>
> Well, actually I wrote it:
> https://gitlab.freepascal.org/Joost/vscode-fpdebug
Joost, it sounds li
Given the code below and the 2 cases can anyone explain what exactly the
compiler does when the interfaces are assigned to? Does it copy a record like
structure, call some internal functions, do runtime checks? I'm curious if
they're doing more than I think they do.
> On Jul 10, 2020, at 12:23 AM, Sven Barth via fpc-pascal
> wrote:
>
> (so that it points to the VMT generated for the interface)
So, it sounds like what the interface actually is, is a pointer to VMT table.
The VMT is generated with the class that implements the interface? Does it have
to
> On Jul 10, 2020, at 12:31 PM, Sven Barth wrote:
>
> A lookup is only necessary if you use e.g. "SomeClass as SomeIntf".
so if I do:
DoSomething(c as IFoo);
then Supports() is called at runtime to return the IFoo interface? That's the
kind of thing I was really curious about, when
101 - 200 of 424 matches
Mail list logo