Skip to content

IDE Setup and Coding Standards

Vladimír Hudec edited this page Apr 17, 2019 · 47 revisions

The tutorial is updated for SQLP 3, SQLMEP/SQLMOP 2.6

Table of Contents

Eclipse / STS
Details of Eclipse settings
Build the SQL Processor (SQLP)
Build the Eclipse Plugin (SQLEP)

Eclipse / STS

STS for the SQLMOP/SQLMEP 2.6.0+

The best IDE for the new version of the SQL Processor development should be STS, this time in version 3.9.0.RELEASE

For the SQL Processor Eclipse plugins (SQLMEP and SQLMOP) usage or development (as it is based on Xtext 2.12), the next installation is also required:

  • Xtext Complete SDK 2.12.0
  • MWE 2 language SDK 2.9.1
  • MWE 2 runtime SDK 2.9.1
  • EMF Eclipse Modeling Framework SDK 2.13.0
  • and finally Java 8

For the release management the Buckminster is the best choice. The P2 repository is at http://download.eclipse.org/tools/buckminster/updates-4.5

STS for the SQLMOP/SQLMEP 2.4.3+

The best IDE for the new version of the SQL Processor development should be STS, this time in version 3.7.2.RELEASE

For the SQL Processor Eclipse plugins (SQLMEP and SQLMOP) usage or development (as it is based on Xtext 2.8), the next installation is also required:

  • Xtext SDK 2.8.4
  • MWE 2 language SDK 2.8.1
  • MWE 2 runtime SDK 2.8.1
  • EMF Eclipse Modeling Framework SDK 2.11.1
  • and finally Java 7

For the release management the Buckminster is the best choice. The P2 repository is at http://download.eclipse.org/tools/buckminster/updates-4.5

STS for the SQLMOP/SQLMEP 2.2.1+

The best IDE for the new version of the SQL Processor development should be STS, this time in version 3.6.4.RELEASE

For the SQL Processor Eclipse plugins (SQLMEP and SQLMOP) usage or development (as it is based on Xtext 2.8), the next installation is also required:

  • Xtext SDK 2.8.2
  • MWE 2 language SDK 2.7.1
  • MWE 2 runtime SDK 2.7.1
  • EMF Eclipse Modeling Framework SDK 2.10.2
  • and finally Java 7

STS for the SQLEP 2.0.0+ and SQLMOP/SQLMEP 2.1.0 up to 2.2.0

The best IDE for the new version of the SQL Processor development is STS, this time in version 3.6.3.RELEASE

For the SQL Processor Eclipse plugin (SQLEP) usage or development (as it is based on Xtext 2.7), the next installation is also required:

  • Xtext SDK 2.7.3
  • MWE 2 language SDK 2.7.0
  • MWE 2 runtime SDK 2.7.0
  • EMF Eclipse Modeling Framework SDK 2.10.2
  • and finally Java 7

STS for the SQLP 2.3.2+ and SQLEP 1.9.1+

The best IDE for the new version of the SQL Processor development is STS, this time in version 3.6.0.RELEASE

For the SQL Processor Eclipse plugin (SQLEP) usage or development (as it is based on Xtext 2.6), the next installation is also required:

  • Xtext SDK 2.6.0
  • MWE 2 language SDK 2.6.0
  • MWE 2 runtime SDK 2.6.0
  • EMF Eclipse Modeling Framework SDK 2.10.0
  • and finally Java 7

STS for the SQLP 2.2.9+ and SQLEP 1.8.0+

The best IDE for the new version of the SQL Processor development is STS, this time in version 3.5.1.RELEASE

For the SQL Processor Eclipse plugin (SQLEP) usage or development (as it is based on Xtext 2.4), the next installation is also required:

  • Xtext SDK 2.4.3
  • MWE 2 language SDK 2.4.1
  • MWE 2 runtime SDK 2.4.1
  • EMF Eclipse Modeling Framework SDK 2.9.2
  • and finally Java 7

STS for the SQLP 2.1.1+ and SQLEP 1.5.0+

The best IDE for the new version of the SQL Processor development is STS, this time in version 3.2.0.RELEASE. For the SQL Processor Eclipse plugin (SQLEP) usage or development (as it is based on Xtext 2.3), the next installation is also required:

  • Ecore Tools SDK 1.1.0

  • EMF - Eclipse Modeling Framework SDK 2.8.3

  • MWE 2 language SDK 2.3.0 (do not update to 2.4.0 *)

  • MWE 2 runtime SDK 2.3.0 (do not update to 2.4.0 *)

  • Xpand SDK 1.2.1 (updated to 1.3.0)

  • Xtext SDK 2.3.1 (do not update to 2.4.0 *)

  • Until it's distributed in Juno release.

STS for the SQLP 1.9.0+ and SQLEP 1.2.0+

The best IDE for the new version of the SQL Processor development is STS, this time in version 3.1.0.RELEASE. For the SQL Processor Eclipse plugin (SQLEP) usage or development (as it is based on Xtext 2.3), the next installation is also required:

  • Ecore Tools SDK 1.1.0
  • EMF - Eclipse Modeling Framework SDK 2.8.1
  • MWE 2 language SDK 2.3.0
  • MWE 2 runtime SDK 2.3.0
  • Xpand SDK 1.2.1
  • Xtext SDK 2.3.1

The SQLEP itself can be installed using the P2 repository http://sql-processor.eu/plugins/releases/.

STS for the SQLP 1.8.0 and newer

The best IDE for the new version of the SQL Processor development is STS, this time in version 3.0.0.RELEASE. For the SQL Processor Eclipse plugin usage or development (as it is based on Xtext 2.3), the next installation is also required:

  • Ecore Tools SDK 1.1.0
  • EMF - Eclipse Modeling Framework SDK 2.8.0
  • MWE 2 language SDK 2.3.0
  • MWE 2 runtime SDK 2.3.0
  • Xpand SDK 1.2.1
  • Xtext SDK 2.3.0

STS for the SQLP 1.7.1 and older

The best IDE for the older version of the SQL Processor development is STS, this time in version 2.8.1.RELEASE. For the SQL Processor Eclipse plugin usage or development (as it is based on Xtext 2.0), the next installation is also required:

  • Ecore Tools SDK 1.0.0
  • EMF - Eclipse Modeling Framework SDK 2.7.1
  • MWE 2 language SDK 2.0.1
  • MWE 2 runtime SDK 2.0.1
  • Xpand SDK 1.1.1
  • Xtext SDK 2.0.1

Eclipse for the SQLP 1.7.1 and older

Another possibility is to use the Eclipse 3.7.1 (Indigo). For the SQL Processor Eclipse plugin usage or development (as it is based on Xtext 2.0), the next installation is recommended:

  • eclipse-SDK-3.7.1-linux-gtk.tar.gz

and the plugins:

  • Eclipse SDK 3.7.1
  • Ecore Tools SDK 1.0.0
  • EMF - Eclipse Modeling Framework SDK 2.7.1
  • m2e - Maven Integration for Eclipse 1.0.100
  • m2e - slf4j over logback logging (Optional) 1.0.100
  • MWE 2 language SDK 2.0.1
  • MWE 2 runtime SDK 2.0.1
  • Xpand SDK 1.1.1
  • Xtext SDK 2.0.1

Details of Eclipse settings

  • General/Workspace
    • Text File Encoding = UTF-8
    • Text File Line Delimiter = Unix
  • Java/Editor/Save Actions
    • Perform the selected actions on save = true
    • Format Source Code = true (format all lines)
  • Java/Code Style/Formatter
    • New active profile sql
    • Indentation - Tab policy = Spaces only
    • Indent a Tab size = 4
    • Line Wrapping - max. line length = 120
    • Comments/Line width = 120
  • XML/XML Files/Editor
    • Line width = 120
    • Ident using spaces
    • Indentation size=4
  • Java/Code Style/Code Templates
    • Automatically add comments=true

    • Comments/File - is empty

    • Comments/Types

        /**
         * @author Complete Name
         *
         * ${tags}
         */
      

Build the SQL Processor (SQLP)

All the SQL Processor projects are based on the Maven

  • Maven 3 for the SQLP 1.8.0 and newer
  • Maven 2 for the SQLP 1.7.1 and older

The import of type "Maven/Existing Maven Projects" into the STS/Eclipse has to be used. Of course, also the standard command line build can be used

cd sql-processor
mvn clean install
cd sql-samples
mvn clean install

Build the Eclipse Plugin (SQLEP)

To edit/modify the Eclipse Plugin, the import of type "General/Existing Projects into Worskpace" into the STS/Eclipse has to be used. Of course, also the standard command line build can be used. In this case the Maven 3 is required. For example the commands can be used

cd sql-processor/sql-processor-eclipse
mvn clean install

To use the Eclipse plugin, the generated jars have to be activated in the STS/Eclipse. The simplest way is the next one

cp org.sqlproc.dsl/target/org.sqlproc.dsl.grammar-1.1.0.jar ~/springsource/sts-3.0.0.RELEASE/dropins/
cp org.sqlproc.dsl.ui/target/org.sqlproc.dsl.ui-1.1.0.jar ~/springsource/sts-3.0.0.RELEASE/dropins/

or

cp org.sqlproc.dsl/target/org.sqlproc.dsl.grammar-1.0.0.jar ~/springsource/sts-2.8.1.RELEASE/dropins/
cp org.sqlproc.dsl.ui/target/org.sqlproc.dsl.ui-1.0.0.jar ~/springsource/sts-2.8.1.RELEASE/dropins/

The previously used target STS/Eclipse directory should be modified to reflect your actual STS/Eclipse installation. After that, it's necessary to restart the IDE.

Clone this wiki locally