Skip to content

Finish Formatting #7

@steve-hickman-epistimis

Description

@steve-hickman-epistimis

Update QueryFormatter.xtend so that it properly formats everything.

To see how the formatter works, install everything per the setup instructions. Then start a second Eclipse.

In that second Eclipse,

  1. create a new blank project (File -> New -> Project or File->New->Other->General->Project) and click Next.
  2. Give it a name and click Finish.
  3. copy the following file from the first Eclipse to the new project:
    /com.epistimis.uddl.tests/src/com/epistimis/uddl/tests/UDDL_SDM_Min.uddl
  4. Open the UDDL file in the new project.
  5. Select the edit window, and use Cmd-Shift-F on Mac or Alt-Shift-F on Windows to format the file.

Modifying the code

The code that formats UDDL Queries can be found in

/com.epistimis.uddl.query/src/com/epistimis/uddl/query/formatting2/QueryFormatter.xtend

For examples of how to do this (and some generic functions you can use), see
/com.epistimis.uddl/src/com/epistimis/uddl/formatting2/UddlFormatter.xtend

The task is to use what you see as an example and extend the code to properly format every Query grammar element. You'll need to create one or more query files, each containing at least 3 of each of the things described in the Query.xtext file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions