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

Formatting: Remove white space before formatting #208

Open
jflin404 opened this issue Mar 14, 2019 · 2 comments
Open

Formatting: Remove white space before formatting #208

jflin404 opened this issue Mar 14, 2019 · 2 comments
Labels
BQL Formatter Items related to BQL Formatter bug Something isn't working

Comments

@jflin404
Copy link

Sample code ,with whitespace minimal:
public PXFilteredProcessingJoin< MQMJVegDet, ProcessFilterSend, InnerJoin<MQMJVegHdr, On<MQMJVegHdr.vegID, Equal<MQMJVegDet.vegID>>>, Where2< Where<MQMJVegHdr.strainID, Equal<Current<ProcessFilterSend.strainID>>, Or<Current<ProcessFilterSend.strainID>, IsNull>>, And<MQMJVegDet.sentDateTime, IsNull, And<MQMJVegHdr.status, Equal<StatusList.closed>>>>> Records;

Duplicate by:
Paste code in editor, run format
Add a return between two > (your choice which)
Re-Format, now looks different

Since formatting is "Fixed"
Single Space -> Character 9
CR/LF -> 78

Format 1:
public9PXFilteredProcessingJoin<78999999999999999999999999999999999999999999999999999999999999MQMJVegDet,789999999999999999999999999999999999999999ProcessFilterSend,78999999999999999999999999999999999999999999999999999999999999InnerJoin<MQMJVegHdr,9789999999999999999999999999999999999999999999999999999999999999999On<MQMJVegHdr.vegID,9Equal<MQMJVegDet.vegID>>>,78999999999999999999999999999999999999999999999999999999999999Where2<789999999999999999999999999999999999999999999999999999999999999999Where<MQMJVegHdr.strainID,9Equal<Current<ProcessFilterSend.strainID>>,7899999999999999999999999999999999999999999999999999999999999999999999Or<Current<ProcessFilterSend.strainID>,9IsNull>>,789999999999999999999999999999999999999999999999999999999999999999And<MQMJVegDet.sentDateTime,9IsNull,789999999999999999999999999999999999999999999999999999999999999999And<MQMJVegHdr.status,9Equal<StatusList.closed>>>>78999999999999999999999999999999999999999999999999999999>78999999999999999999999999999999999999999999999999999999999999Records;

Add ONE carriage return after Closed:
99999999public9PXFilteredProcessingJoin<78999999999999999999999999999999999999999999999999999999999999MQMJVegDet,789999999999999999999999999999999999999999ProcessFilterSend,78999999999999999999999999999999999999999999999999999999999999InnerJoin<MQMJVegHdr,9789999999999999999999999999999999999999999999999999999999999999999On<MQMJVegHdr.vegID,9Equal<MQMJVegDet.vegID>>>,78999999999999999999999999999999999999999999999999999999999999Where2<789999999999999999999999999999999999999999999999999999999999999999Where<MQMJVegHdr.strainID,9Equal<Current<ProcessFilterSend.strainID>>,7899999999999999999999999999999999999999999999999999999999999999999999Or<Current<ProcessFilterSend.strainID>,9IsNull>>,789999999999999999999999999999999999999999999999999999999999999999And<MQMJVegDet.sentDateTime,9IsNull,789999999999999999999999999999999999999999999999999999999999999999And<MQMJVegHdr.status,9Equal<StatusList.closed>>>789999999999999999999999999999999999999999999999999999999999999999>78999999999999999999999999999999999999999999999999999999>78999999999999999999999999999999999999999999999999999999999999Records;

Manually remove whitespace:
public9PXFilteredProcessingJoin<78999999999999999999999999999999999999999999999999999999999999MQMJVegDet,9ProcessFilterSend,78999999999999999999999999999999999999999999999999999999999999InnerJoin<MQMJVegHdr,789999999999999999999999999999999999999999999999999999999999999999On<MQMJVegHdr.vegID,9Equal<MQMJVegDet.vegID>>>,78999999999999999999999999999999999999999999999999999999999999Where2<789999999999999999999999999999999999999999999999999999999999999999Where<MQMJVegHdr.strainID,9Equal<Current<ProcessFilterSend.strainID>>,97899999999999999999999999999999999999999999999999999999999999999999999Or<Current<ProcessFilterSend.strainID>,9IsNull>>,9789999999999999999999999999999999999999999999999999999999999999999And<MQMJVegDet.sentDateTime,9IsNull,9789999999999999999999999999999999999999999999999999999999999999999And<MQMJVegHdr.status,9Equal<StatusList.closed>>>>>978999999999999999999999999999999999999999999999999999999999999Records;

@SENya1990
Copy link
Contributor

@jflin404 I have created a bug for this issue. I'm not sure that I have correctly understood your problem. Do you have a problem with the BQL Formatter when you format this query:

public PXFilteredProcessingJoin< MQMJVegDet, ProcessFilterSend, InnerJoin<MQMJVegHdr, On<MQMJVegHdr.vegID, Equal<MQMJVegDet.vegID>>>, Where2< Where<MQMJVegHdr.strainID, Equal<Current<ProcessFilterSend.strainID>>, Or<Current<ProcessFilterSend.strainID>, IsNull>>, And<MQMJVegDet.sentDateTime, IsNull, And<MQMJVegHdr.status, Equal<StatusList.closed>>>>> Records;

And the bug is reproduced by following these steps?

Paste code in editor, run format
Add a return between two > (your choice which)
Re-Format, now looks different

I can't understand the text that goes after. Could you please provide more details?

@jflin404
Copy link
Author

jflin404 commented Mar 15, 2019 via email

@SENya1990 SENya1990 added bug Something isn't working BQL Formatter Items related to BQL Formatter labels Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BQL Formatter Items related to BQL Formatter bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants