Skip to content

Commit

Permalink
Added remaining IntelliJ guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtlink committed Mar 15, 2016
1 parent 84349a2 commit f94ff49
Show file tree
Hide file tree
Showing 21 changed files with 164 additions and 99 deletions.
6 changes: 0 additions & 6 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ Table of Contents
Release <source/dev/release>
Internals <source/dev/internals/index>

.. toctree::
:maxdepth: 3
:caption: IntelliJ IDEA Plugin Development

Contributing <source/intellijdev/contributing>

.. toctree::
:maxdepth: 3
:caption: Releases
Expand Down
8 changes: 6 additions & 2 deletions source/dev/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ If updating or checking out a branch of submodule fails (because of unstaged or

If you get any weird compilation errors during the build, make sure that <span class='menuselection'>Project ‣ Build Automatically</span> is turned off in Eclipse.


## IntelliJ plugin

The IntelliJ plugin is currently built separately from the spoofax-releng repository and build scripts.
Expand All @@ -108,12 +109,15 @@ Choose one of the branches:
Either clone the repository locally or download and extract the ZIP archive.

Next you need to invoke Gradle to build the project.
Simply execute the following command from the main project's root folder (i.e. <span class='file'>org.metaborg.intellij/</span>):
Execute the following commands from the main project's root folder (i.e. <span class='file'>org.metaborg.intellij/</span>):

```bash
cd deps
./gradlew clean publishToMavenLocal
cd ..
./gradlew clean build
```
(On Windows `gradlew clean build`.)
(On Windows use `gradlew` instead of `./gradlew`.)

Alternatively, you can import the project in IntelliJ and build it from there.

Expand Down
62 changes: 60 additions & 2 deletions source/dev/contribute.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,63 @@
# Contributing to Spoofax
Thank you for your interest in contributing to Spoofax! We appreciate
any way in which you contribute.

```eval_rst
.. todo:: This part of the documentation has not been written yet.


## Bug Reports

> "If debugging is the process of removing bugs,
> then programming must be the process of putting them in."
> – Edsger W. Dijkstra
Unfortunately all but the most trivial software contains bugs. We'll try to fix them, but first
we need to know about them. Feel free to report bugs liberally, even if you're not sure if something
is a bug or not. If you can, please [search existing issues][1], as someone else may already have
reported the issue. However, we won't mind if you accidentally submit a duplicate bug report.

[Please file your issue here][2].

For an issue of Spoofax in IntelliJ IDEA, if you can, please include the `idea.log`
and `build-log/build.log` files. You can find them by clicking on menu _Help__Show Log in Files_
menu, or by executing the _Show Log in Explorer_ action.



## Feature Requests
To request a feature for the Spoofax for IntelliJ IDEA plugin, you can also file an issue.

[Please file your feature request here][2].



## Pull Requests
You are welcome to implement a feature or fix a bug in Spoofax. We use
the _fork, branch and pull_ model described in [GitHub's documentation][3] for pull requests. First
you need to [fork][6] the relevant repository and clone it locally. Then create a new
topic branch, for example:

```bash
git checkout -b fix-rtl-languages
```

Now you work in this branch. Once you're done, you need to build and test your changes. See the
chapter on [building][5] for more information. Once everything succeeds, file a pull request as
described in the [GitHub documentation][3].



## Writing Documentation
The documentation needs to be kept up-to-date, and any improvements are very welcome. The
documentation you're reading now is generated from the documentation source files in our
[documentation repository][7]. Documentation pull requests function in the same way as code
pull requests. You can see your changes to the documentation in action by building it locally.
Follow the instructions in the [documentation's Readme][8] for more information.


[1]: http://yellowgrass.org/project/Spoofax
[2]: http://yellowgrass.org/createIssue/Spoofax
[3]: https://help.github.com/articles/using-pull-requests/
[5]: build.md
[6]: https://help.github.com/articles/fork-a-repo/
[7]: https://github.com/metaborg/documentation
[8]: https://github.com/metaborg/documentation/blob/master/README.md
69 changes: 0 additions & 69 deletions source/intellijdev/contributing.md

This file was deleted.

10 changes: 9 additions & 1 deletion source/langdev/guide/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@

## As an Eclipse plugin

## As an IntelliJ plugin
## As an IntelliJ IDEA plugin
Spoofax for IntelliJ IDEA doesn't currently support Spoofax language plugins.
However, you can export your language to a `spoofax-language` artifact and
load it into IntelliJ IDEA. [Read more][1].


## As custom library/application using the core API

## With Sunshine



[1]: ../manual/env/intellij/load-and-unload-languages.md
5 changes: 0 additions & 5 deletions source/langdev/manual/env/intellij/build-language-spec.md

This file was deleted.

5 changes: 0 additions & 5 deletions source/langdev/manual/env/intellij/build-project.md

This file was deleted.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 25 additions & 3 deletions source/langdev/manual/env/intellij/existing-language-spec.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Importing an existing language specification
Follow this quick start guide to import an existing Spoofax language
specification into IntelliJ.

```eval_rst
.. todo:: This part of the documentation has not been written yet.
```
1. Choose _Import Project_ from the welcome dialog, or the _File__New_
_Project from Existing Sources..._ menu item, to open the _Import Project_
dialog.

2. Browse to the root folder of the project, and click _OK_.

![Browsing to the project](import_langspec.png)

3. Select _Create project from existing sources_ and click _Next_.

![Browsing to the project](import_langspec_existingsources.png)

4. Pick a project name, and ensure the location is correct. Click _Next_.

5. Ensure both the _Java_ and _Spoofax module_ roots are checked.

![Check the project roots](import_langspec_projectroots.png)

6. Click _Finish_.

The imported Spoofax language specification project has a `metaborg.yaml`
file, which specifies the configuration and language dependencies of the
specification.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions source/langdev/manual/env/intellij/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ IntelliJ IDEA Environment

new-project
existing-project
build-project
new-language-spec
existing-language-spec
build-language-spec

load-and-unload-languages
19 changes: 19 additions & 0 deletions source/langdev/manual/env/intellij/load-and-unload-languages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Load and unload languages
Spoofax for IntelliJ supports dynamic loading and unloading of languages.
Follow this quick start guide to load or unload a language from the IDE.
Note that alternatively you can edit the project's `metaborg.yaml` file to
alter the dependencies, and reload the project. Languages loaded through the
_Settings_ dialog are loaded for every instance of the application.

1. Choose the _File__Settings_ menu or press the
<kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>S</kbd> keyboard combination, to open
the _Settings_ dialog.

2. Go to the _Languages & Frameworks__Metaborg Languages_ page.

3. Use the ![Plus](button_plus.png) and ![Plus](button_minus.png) buttons
to load or unload a language.

![Changing the loaded languages](settings_metaborglanguages_add.png)

4. Click _OK_ to apply the changes.
16 changes: 16 additions & 0 deletions source/langdev/manual/env/intellij/new-langspec-sdk.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.. note:: If the *Project SDK* displays *<None>* and you can't select the
Metaborg SDK, then you need to add it first.

1. Click the *New...* button next to the *Project SDK* field.

.. image:: newproject_langspec_newsdk.png

2. You may get a warning if you have no Java JDK configured. Click *OK*
and configure the JDK's home location. The suggested home
directory is usually correct. Click *OK*.

3. Select a home directory for the Metaborg SDK. The default is the
Spoofax plugin's ``lib/`` folder, which is sufficient as it contains
all the core dependencies.

4. Click *OK*.
31 changes: 28 additions & 3 deletions source/langdev/manual/env/intellij/new-language-spec.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Creating a new language specification
Follow this quick start guide to create a new Spoofax language specification
project to define your own language.

```eval_rst
.. todo:: This part of the documentation has not been written yet.
```
1. Choose _Create New Project_ from the welcome dialog, or the _File__New_
_Project..._ menu item, to open the _New Project_ dialog.

2. Select the _Spoofax Language_ project type.

3. Select the _Metaborg SDK_ as the project's SDK.

![Select the "Metaborg SDK"](newprojectform_langspec_selectmetaborgsdk.png)

```eval_rst
.. include:: new-langspec-sdk.txt
```

4. Change the fields to suit your needs.

![Change the fields](newprojectform_langspec_inputfields.png)

5. Click _Next_.

6. Pick a project name and location, and click _Finish_.

![Pick a project name](newprojectform_langspec_projectname.png)

The created Spoofax language specification project will have a `metaborg.yaml`
file, which specifies the configuration and language dependencies of the
specification.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f94ff49

Please sign in to comment.