Skip to content

Implemented transformation of delimited value lists#80

Merged
krasa merged 2 commits into
krasa:masterfrom
pmenke-de:feature/delimited-string-transformation
Jul 20, 2019
Merged

Implemented transformation of delimited value lists#80
krasa merged 2 commits into
krasa:masterfrom
pmenke-de:feature/delimited-string-transformation

Conversation

@pmenke-de
Copy link
Copy Markdown
Contributor

Implements: #32

Basic implementation. Requests for changes welcome ;-)

Copy link
Copy Markdown
Owner

@krasa krasa left a comment

Choose a reason for hiding this comment

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

looks good, few details...

Comment thread src/osmedile/intellij/stringmanip/transform/DelimitedListDialog.java Outdated
Comment thread src/osmedile/intellij/stringmanip/transform/DelimitedListDialog.java Outdated
Comment thread src/osmedile/intellij/stringmanip/transform/DelimitedListDialog.java Outdated
 - Use already existing preview editor; also refactored
   existing usages to remove code duplication
 - Removed type-prefixes from field names
 - Added handling to process large inputs in the CommonPool instead
   of the UI-Thread
@pmenke-de
Copy link
Copy Markdown
Contributor Author

Hi, sorry for the late reply. Haven't got much time in the last couple weeks.
I think, i've reworked all points you mentioned. Thanks for the suggestions :-)

@krasa krasa merged commit 2a90aa2 into krasa:master Jul 20, 2019
@krasa
Copy link
Copy Markdown
Owner

krasa commented Jul 20, 2019

Thanks!

Is it just me, or it the async stuff totally unreadable? :) I simplified it, check it out.
Also it seems that limiting is needed after all, Editor cannot handle millions of characters very well.

krasa added a commit that referenced this pull request Jul 20, 2019
krasa added a commit that referenced this pull request Jul 20, 2019
krasa added a commit that referenced this pull request Jul 20, 2019
krasa added a commit that referenced this pull request Jul 20, 2019
@krasa
Copy link
Copy Markdown
Owner

krasa commented Jul 20, 2019

@pmenke-de if it should transform to/from CSV, then it need to be way smarter, for CSV containing:

"aaa","b,bb","ccc"
"aaa","b""bb","ccc"

https://www.mkyong.com/java/how-to-read-and-parse-csv-file-in-java/

It also does not handle the original requirement:

"Ford|Chevy|Honda|Toyota" --> ["Ford", "Chevy", "Honda", "Toyota"]
["Ford", "Chevy", "Honda", "Toyota"] --> "Ford|Chevy|Honda|Toyota"

Maybe it would be better to use some parser library, and choose between that and the current processing.

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.

2 participants