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

Add execFunction : functions can now be ran on clients #802

Merged
merged 2 commits into from
Oct 18, 2019

Conversation

Merudo
Copy link
Member

@Merudo Merudo commented Oct 17, 2019


This change is Reviewable

@cwisniew
Copy link
Member

The context source should not be "Gm", can you change to something else "execFunction" or "remote" is fine. Also can you modify source to follow the formatting standards used throughout the code (like {} braces for if/else) please.

@Phergus
Copy link
Contributor

Phergus commented Oct 17, 2019

As Craig noted above, this call in runExecFunction should be changed to not use "Gm" as context source:
MapTool.getParser().runMacroBlock(null, functionText, "execFunction", "Gm", true);

Also a number of if statements without {}.

@Merudo
Copy link
Member Author

Merudo commented Oct 17, 2019

What should be the context source, then?

@Phergus
Copy link
Contributor

Phergus commented Oct 17, 2019

Craig suggested "execFunction" or "remote".

@Merudo
Copy link
Member Author

Merudo commented Oct 18, 2019

Also can you modify source to follow the formatting standards used throughout the code (like {} braces for if/else) please.

What are these formatting standards? I can't find them in the github directory.

@cwisniew
Copy link
Member

Also can you modify source to follow the formatting standards used throughout the code (like {} braces for if/else) please.

What are these formatting standards? I can't find them in the github directory.

It seems they are not specifically mentioned (but only in the eclipse file for some reason ugh).

In any case we are using the google java style guide standards with 2 spaces.
https://google.github.io/styleguide/javaguide.html

And I am off to raise an issue about outdated/missing style guide information in the coding standards link on github

@Merudo
Copy link
Member Author

Merudo commented Oct 18, 2019

Is there a way to add this to spotlessapply, so it is automatically formatted with the braces?

@Phergus
Copy link
Contributor

Phergus commented Oct 18, 2019

I thought it did that already but apparently not.

@cwisniew
Copy link
Member

I thought it did to...
but apparently not, google/google-java-format#51
might be time to look for a better way

@Phergus
Copy link
Contributor

Phergus commented Oct 18, 2019

Well most IDEs include a code formatting option to handle the if() braces issue.

- Add execFunction(functionName,args,defer, targets, delim)
- args is a json array containing the arguments to the function
- defer, targets and delim work as in execLink
- Close RPTools#790
@Merudo Merudo reopened this Oct 18, 2019
@Merudo
Copy link
Member Author

Merudo commented Oct 18, 2019

I changed the PR and implemented the changes.

Copy link
Contributor

@Phergus Phergus left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 8 of 9 files at r1, 1 of 1 files at r3.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@Phergus Phergus merged commit 304508f into RPTools:develop Oct 18, 2019
@Merudo Merudo deleted the execFunction branch October 18, 2019 19:04
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

Successfully merging this pull request may close these issues.

3 participants