Skip to content

Commit

Permalink
Added IntelliJ plugin dev docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtlink committed Mar 2, 2016
1 parent f476ae7 commit dd1560d
Show file tree
Hide file tree
Showing 7 changed files with 168 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ Table of Contents
Bootstrap <source/dev/bootstrap>
Release <source/dev/release>
Contribute <source/dev/contribute>

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

Building <source/intellijdev/building>
Releasing <source/intellijdev/releasing>
Contributing <source/intellijdev/contributing>
Architecture <source/intellijdev/architecture>

.. toctree::
:maxdepth: 3
Expand Down
5 changes: 5 additions & 0 deletions source/intellijdev/architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Architecture of Spoofax for IntelliJ IDEA

```eval_rst
.. todo:: This part of the documentation has not been written yet.
```
66 changes: 66 additions & 0 deletions source/intellijdev/building.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Building Spoofax for IntelliJ IDEA
We did our best to make building the Spoofax plugin for IntelliJ IDEA as easy and painless as
possible.


## Building
To build the IntelliJ IDEA Spoofax plugin locally, you first need to get the
source [from GitHub][1]. Choose one of the branches:

* [`master` branch][2]: stable build of current release. ([ZIP][4])
* [`develop` branch][3]: unstable build for next release. ([ZIP][5])

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 (that is `org.metaborg.intellij/`):

```
./gradlew clean build
```
(On Windows simply `gradlew clean build`.)

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



## Running
To run the built plugin inside a special sandbox-instance of IntelliJ IDEA, execute the following
command:

```
./gradlew runIdea
```

Alternatively, in IntelliJ IDEA you can invoke the _IntelliJ Plugin_ run/debug configuration. You
can use this to run or debug the IntelliJ IDEA plugin code. However, this cannot be used to debug
the JPS Spoofax build process.



## Debugging JPS
To debug the JPS Spoofax build process, you need to execute the following command:

```
./gradlew debugJps
```

or invoke the _IntelliJ Plugin (Debug JPS)_ run configuration (_not debug_) from IntelliJ.

Then from the sandbox IntelliJ IDEA instance you start a build. IntelliJ will wait for a debugger
to be attached to port 5005. Attach a debugger, and the build will continue. From the Spoofax
plugin's IntelliJ IDEA project, you can invoke the _JPS Plugin_ debug configuration to attach the
debugger.








[1]: https://github.com/metaborg/spoofax-intellij
[2]: https://github.com/metaborg/spoofax-intellij/tree/master
[3]: https://github.com/metaborg/spoofax-intellij/tree/develop
[4]: https://github.com/metaborg/spoofax-intellij/archive/master.zip
[5]: https://github.com/metaborg/spoofax-intellij/archive/develop.zip
69 changes: 69 additions & 0 deletions source/intellijdev/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Contributing to Spoofax for IntelliJ IDEA
Thank you for your interest in contributing to the Spoofax plugin for IntelliJ IDEA! We appreciate
any way in which you contribute.



## 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 accidently submit a duplicate bug report.

[Please file your issue here][2].

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. You may
ignore the issue template.

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



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

```
git checkout develop
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]: https://github.com/metaborg/spoofax-intellij/search?q=&type=Issues&utf8=%E2%9C%93
[2]: https://github.com/metaborg/spoofax-intellij/issues/new
[3]: https://help.github.com/articles/using-pull-requests/
[4]: https://github.com/metaborg/spoofax-intellij
[5]: building.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
11 changes: 11 additions & 0 deletions source/intellijdev/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
===========================
IntelliJ Plugin Development
===========================

.. toctree::
:maxdepth: 1

Building <building>
Releasing <releasing>
Contributing <contributing>
Architecture <architecture>
5 changes: 5 additions & 0 deletions source/intellijdev/releasing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Releasing Spoofax for IntelliJ IDEA

```eval_rst
.. todo:: This part of the documentation has not been written yet.
```
3 changes: 3 additions & 0 deletions source/langdev/manual/env/intellij.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# IntelliJ Environment

This is a quick start guide into developing and using languages with
Spoofax for IntelliJ.

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

0 comments on commit dd1560d

Please sign in to comment.