Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexLandau committed Dec 27, 2015
2 parents daea381 + a03bc8d commit 614eafa
Show file tree
Hide file tree
Showing 93 changed files with 99 additions and 5,336 deletions.
41 changes: 24 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,51 @@
# griddle
GDL validation and Eclipse GDL editor plugin.
Eclipse GDL editor and static validation plugin.

Griddle is an Eclipse plugin offering a lightweight editor for the Game Description Language (GDL) used in General Game Playing. It uses its own library for parsing and validating GDL to keep its dependencies (and memory footprint) minimal.
Griddle is an Eclipse plugin offering a lightweight editor for the Game Description Language (GDL) used in General Game Playing. It uses the gdl-validation library for parsing and validating GDL to keep its dependencies (and memory footprint) minimal.

The Griddle editor offers the following features:

- Syntax highlighting
- Errors and warnings for syntax mistakes and other potential problems
- Indentation assistance
- One-step whitespace reformatting for the entire file

Additional features that may be included in the future:

- Configuration of errors and warnings, including support for GDL-II and other proposed changes to GDL
- One-step reformatting or indentation correction for the entire file
- Build system improvements (see "Building from source" below)

Other possible features that won't happen unless there's evidence of demand:

- Improved support for the validation library as a stand-alone library
- CLI for validation and error detection
- Build system improvements (see "Building from source" below)
- Customization of syntax highlighting colors

Installation
------------

The plugin can be applied to an existing Eclipse installation using the following steps (older versions of Eclipse may need a different approach):
The plugin requires Eclipse Luna or a later version. (Eclipse versions are ordered alphabetically.)

### Using the Eclipse install site (recommended)

Using this method, Eclipse will be able to automatically detect future available updates for the Griddle plugin.

1. If you have previously installed Griddle via the dropins folder method (below), remove the Griddle jar from the dropins folder and restart Eclipse.
2. In the Eclipse menus, select Help -> Install New Software...
3. Enter http://alexlandau.github.io/griddle/eclipse/ as the site location at the top of the dialog.
4. Select the "Griddle GDL Editor" feature that appears.
5. Continue through the installation process as prompted.

### Older installation method

Alternatively, Griddle can be added to an existing Eclipse installation using the following steps:

1. Download the .jar file containing the plugin from the Github repository's Releases section: https://github.com/AlexLandau/griddle/releases
2. Locate the directory containing your Eclipse installation; this should include files like eclipse.ini and folders like features, plugins, and dropins.
3. Add a folder named plugins to the dropins folder (or use an existing one if it's already there).
4. Put the .jar file into the dropins folder.
5. Restart Eclipse.

### Post-installation

If the installation was successful, .kif and .gdl files will be displayed with a black chess knight icon and can be opened in a "GDL Editor" that includes syntax highlighting. However, errors and warnings will not work until enabled:

1. Right-click on the project containing the GDL files.
Expand All @@ -53,23 +67,16 @@ Griddle supports the indentation method of four spaces per level of parenthetica
Working on the source files
---------------------------

There are two separate projects: the "net.alloyggp.griddle" project, which is an Eclipse plugin project (developed using Eclipse PDE), and the validation project, which is an ordinary Java project.

The net.alloyggp.griddle project contains Eclipse project files, and can be imported into Eclipse as an existing project. It may not function correctly or may appear to be missing referenced classes until additional Eclipse components have been installed, such as the Eclipse Plug-in Development Environment and Eclipse Platform SDK.

Eclipse project files for the validation project can be generated by running "./gradlew eclipse" or, on Windows, ".\gradlew.bat eclipse".
There are multiple projects for the different required aspects of the Eclipse plugin. They contain Eclipse project files, and can be imported into Eclipse as existing projects. They may not function correctly or may appear to be missing referenced classes until additional Eclipse components have been installed, such as the Eclipse Plug-in Development Environment and Eclipse Platform SDK.

The GdlScanner and GdlParser classes are generated by the JFlex and CUP libraries, respectively. Modifications to these classes should be made by modifying the appropriate file in the schemas directory and then running the runCup or runFlex script file (in the main project directory).

Building from source
--------------------

This is a process that needs to be improved and automated eventually. For now:
Currently this requires a lot of manual steps in Eclipse, too many to be worth documenting here.

1. Build the validation project using "./gradlew build" (on Windows, ".\gradlew.bat build").
2. Copy the validation-<version>.jar file from validation/build/libs to the net.alloyggp.griddle directory.
3. Refresh the net.alloyggp.griddle project folder in Eclipse.
4. Export the project in Eclipse with the "Plug-in Development/Deployable plug-ins and fragments" wizard.
If you are interested in using the GDL parsing and validation logic exposed by Griddle, that is available by itself in the [gdl-validation project](https://github.com/AlexLandau/gdl-validation), which can easily be consumed as a library.

Authorship
----------
Expand Down
17 changes: 17 additions & 0 deletions net.alloyggp.griddle.feature/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>net.alloyggp.griddle.feature</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.pde.FeatureBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>
1 change: 1 addition & 0 deletions net.alloyggp.griddle.feature/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin.includes = feature.xml
7 changes: 7 additions & 0 deletions net.alloyggp.griddle.feature/category.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/net.alloyggp.griddle.feature_0.2.1.jar" id="net.alloyggp.griddle.feature" version="0.2.1">
<category name="griddle"/>
</feature>
<category-def name="griddle" label="Griddle GDL Editor"/>
</site>
46 changes: 46 additions & 0 deletions net.alloyggp.griddle.feature/feature.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="net.alloyggp.griddle.feature"
label="Griddle GDL Editor"
version="0.2.1">

<description url="https://github.com/AlexLandau/griddle">
Griddle is an Eclipse editor for Game Description Language (GDL) files. GDL files are used to specify the rules of games for General Game Playing.
</description>

<copyright>
Copyright (c) 2015 Alex Landau
</copyright>

<license url="">
The MIT License (MIT)

Copyright (c) 2015 Alex Landau

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the &quot;Software&quot;), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
</license>

<plugin
id="net.alloyggp.griddle"
download-size="0"
install-size="0"
version="0.2.1"
unpack="false"/>

</feature>
2 changes: 1 addition & 1 deletion net.alloyggp.griddle/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="validation-0.2.0.jar"/>
<classpathentry exported="true" kind="lib" path="gdl-validation-0.2.2.jar"/>
<classpathentry exported="true" kind="lib" path="java-cup-11b-runtime.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
Expand Down
4 changes: 2 additions & 2 deletions net.alloyggp.griddle/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Griddle
Bundle-SymbolicName: net.alloyggp.griddle;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.2.1
Bundle-Activator: net.alloyggp.griddle.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
Expand All @@ -11,6 +11,6 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.core.resources;bundle-version="3.9.1"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: validation-0.2.0.jar,
Bundle-ClassPath: gdl-validation-0.2.2.jar,
java-cup-11b-runtime.jar,
.
2 changes: 1 addition & 1 deletion net.alloyggp.griddle/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ bin.includes = plugin.xml,\
.,\
icons/,\
java-cup-11b-runtime.jar,\
validation-0.2.0.jar
gdl-validation-0.2.2.jar
jars.compile.order = .
Binary file not shown.
Binary file modified net.alloyggp.griddle/icons/knight.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions validation/.gitignore

This file was deleted.

24 changes: 0 additions & 24 deletions validation/build.gradle

This file was deleted.

Binary file removed validation/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 0 additions & 6 deletions validation/gradle/wrapper/gradle-wrapper.properties

This file was deleted.

164 changes: 0 additions & 164 deletions validation/gradlew

This file was deleted.

0 comments on commit 614eafa

Please sign in to comment.