editorconfig-core-java icon indicating copy to clipboard operation
editorconfig-core-java copied to clipboard

Introduce StreamProvider

Open kounoike opened this issue 7 years ago • 5 comments

Hi! I'm GitBucket developer. GitBucket is open source Git platform powered by Scala. It looks like as GitHub. It has online git repository browser and online file editor.

I was interested in making GitBucket correspond to Editorconfig. But, current implementation is based on local filesystem's file. So I introduced StreamProvider by this PR. I also wrote JGitProvider in my branch of GitBucket. see here

If this PR is merged and it released to maven, I can make EditorConfig support PR to GitBucket.

kounoike avatar Apr 21 '18 01:04 kounoike

Hi @kounoike , in case you look around and decide this project is not lively enough, you may want to look at the alternative Java editorconfig parser called https://github.com/ec4j/ec4j that I wrote together with @angelozerr . In ec4j, we already have an abstraction of a Resource that would allow you to implement the Git backed kind of resource tree you need. We already have ClassPath resource, java.nio.Path resource and a plain string resource. I think especially the ClassPathResource very much resembles what you'd do for Git: https://github.com/ec4j/ec4j/blob/master/core/src/main/java/org/ec4j/core/Resource.java#L77 Feel free to file an issue at https://github.com/ec4j/ec4j/issues if our API is not flexible enough for you.

ppalaga avatar Apr 21 '18 14:04 ppalaga

@ppalaga Thanks! I changed dependency from editorconfig-core to ec4j. I wrote JGitResource and JGitResourcePath in here. It doesn't require ec4j-core changes.

kounoike avatar Apr 21 '18 17:04 kounoike

Nice to hear that, @kounoike ! Could you please add GitBucket to "who is using ec4j" section of our README, once your change is merged? https://github.com/ec4j/ec4j#who-is-using-ec4j

ppalaga avatar Apr 21 '18 19:04 ppalaga

@ppalaga Hi! gitbucket/gitbucket#1966 is merged! Thanks for your suggestion and proposal. @takezoe what do you think of this proposal?

kounoike avatar Jul 01 '18 14:07 kounoike

No problem at all about adding GitBucket to the list of ec4j users. Thanks for the useful library. :-)

takezoe avatar Jul 01 '18 17:07 takezoe