<commit_before>Ceylon Formatter
================

The goal of this project is to provide a formatter for Ceylon source code that can be embedded in the Eclipse and IntelliJ IDE, as well as directly called from the command line.

Current status
--------------

I'm currently working out the architecture: How the formatting works in general, how formatting options are kept and passed, etc.
At the end of this phase, I should have a formatter with support for only a few language features and formatting options, but with that support being very generic and easily expandable.
When I'm comfortable with the architecture, all there's left to do is implementing more language features and formatting options.

Building and running
--------------------

### Environment

You'll need a *very* recent version of Ceylon and the compiler (unless 1.0.0 is already out when you're reading this).
For this, you need to build both your Ceylon and your Ceylon IDE from source.

    mkdir ceylon && cd ceylon
    git clone https://github.com/ceylon/ceylon-dist
    cd ceylon-dist
    ant setup publish-all
    cd ..
    git clone https://github.com/ceylon/ceylon-sdk
    cd ceylon-sdk
    ant publish
    cd ..
    git clone https://github.com/ceylon/ceylon-ide-eclipse
    cd ceylon-ide-eclipse
    mvn install -Dmaven.test.skip
    # now install it into your Eclipse from the update site ceylon/ceylon-ide-eclipse/site/target/site
    cd ..

### The formatter

    git clone https://github.com/lucaswerkmeister/ceylon.formatter

Open Eclipse and choose Import -> Existing projects into workspaces, select the `ceylon.formatter` repository and import the project

Then compile and run the `source_gen.ceylon.formatter` module (in folder `source-gen`), which generates a few sources for the formatter;
then you can finally compile `ceylon.formatter`.
To check if everything went well, you can run the tests in `test.ceylon.formatter` (in folder `source-test`).

### Too complicated?

One of my goals ([issue #3](https://github.com/lucaswerkmeister/ceylon.formatter/issues/3)) is to automate the build process.
If these instructions were too much for you, poke that issue, say that I should make that a priority, and then watch and wait.

License
-------

The content of this repository is released under the ASL v2.0
as provided in the LICENSE file that accompanied this code.

By submitting a "pull request" or otherwise contributing to 
this repository, you agree to license your contribution under 
the license mentioned above.<commit_msg>README.md: Update "Building" section<commit_after>Ceylon Formatter
================

The goal of this project is to provide a formatter for Ceylon source code that can be embedded in the Eclipse and IntelliJ IDE, as well as directly called from the command line.

Current status
--------------

I'm currently working out the architecture: How the formatting works in general, how formatting options are kept and passed, etc.
At the end of this phase, I should have a formatter with support for only a few language features and formatting options, but with that support being very generic and easily expandable.
When I'm comfortable with the architecture, all there's left to do is implementing more language features and formatting options.

Building
--------------------

1. Install the Ceylon IDE, following [these instructions](http://ceylon-lang.org/documentation/1.0/ide/install/)
2. Clone the repository locally
3. In Eclipse, go to File -> Import... -> Existing Projects into Workspace, then choose the location of the `ceylon.formatter` repository and import the `ceylon.formatter` project
4. Run `source_gen.ceylon.formatter.run()` (ignore the warning that the project has build errors, that’s exactly what this is going to fix)
5. Right-click the `test.ceylon.formatter` module and choose Run As -> Ceylon Test to test if everything works

Due to some quirks in the Ceylon IDE, you might have to clean the project a few times during this process.

License
-------

The content of this repository is released under the ASL v2.0
as provided in the LICENSE file that accompanied this code.

By submitting a "pull request" or otherwise contributing to 
this repository, you agree to license your contribution under 
the license mentioned above.
{'fraction_non_alphanumeric': 0.08087891538101917, 'fraction_numerical': 0.0037400654511453952, 'mean_word_length': 3.8241262683201804, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '156362', 'n_tokens_mistral': 1121, 'n_tokens_neox': 1048, 'n_words': 581}