Skip to content

Conversation

ogorodnik
Copy link
Contributor

Using the corresponding project that a file belongs to
get the options.

Using the corresponding project that a file belongs to get the options.
@ogorodnik ogorodnik requested a review from reznikmm July 22, 2021 13:01
Value => Options,
Is_Default_Value => Default);

-- Initialize an gnatpp command line object
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Initialize the gnatpp command line"


-- Initialize an gnatpp command line object
Last := Options'First - 1;
for Item of Options.all loop
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lacking comments. Put a comment to say that we are counting valid options here for instance, people don't want to analyze each loop in your code

end if;
end loop;

Validated := new GNAT.Strings.String_List (Options'First .. Last);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Validated_Options" would be even better

-- A reference to the file reader created for this context
end record;

procedure Get_PP_Options
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment

URI : LSP.Types.LSP_String) return LSP.Types.LSP_String;
-- Turn URI into path

function Get_Project
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LSP.Ada_Documents seems a better package to put that function (might be reused somewhere else in the future)

(Self : access Message_Handler;
Uri : LSP.Messages.DocumentUri)
return GNATCOLL.Projects.Project_Type;
-- Retrieve the project that the file belongs to. Root project is returned
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should say what it does for aggregate projects (that's the purpose of your function)

@reznikmm
Copy link
Member

reznikmm commented Sep 8, 2021

closing till we get real issue with this

@reznikmm reznikmm closed this Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants