Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e8e9f88
Increment version of dependencies in bundle project MANIFEST.MF files
rizsi Jun 16, 2015
5f0e9bd
Fix possible NPE in HTML code generator
rizsi Jun 16, 2015
10b3212
Xtext grammar documentation generator tool
rizsi Jun 16, 2015
d9a1626
Break too long methods
rizsi Jun 16, 2015
923909b
Fix HTML errors in template
rizsi Jun 16, 2015
1b42c25
Fix HTML errors in template
rizsi Jun 16, 2015
6b98bc2
include hu.qgears.commons dependencies to simplify build
rizsi Jul 27, 2015
1efe522
Fixing issues in HTML template + generating xhtml conform output
agostoni Sep 4, 2015
267a819
Adding bindable classes for xtext editor for keyword hover and content
admglaser Sep 23, 2015
86021b6
Package xtextdoc plugin into p2 repo
agostoni Sep 28, 2015
7a4a507
Update README.md
admglaser Sep 28, 2015
956680b
Added owner and super types for hover and content assist EMF doc; added
admglaser Sep 28, 2015
ee91c9a
Merge branch 'master' of https://github.com/qgears/ecoreDocGen.git
admglaser Sep 28, 2015
5c728b2
Changed format of types.
admglaser Sep 29, 2015
8812748
Set require execution env to java 7
agostoni Sep 30, 2015
4abdcfc
Change Java builder settings (add SE7 lib instead of SE8) and fix com…
agostoni Sep 30, 2015
cf067ea
Formatting.
admglaser Oct 5, 2015
40cebfd
Merge branch 'master' of https://github.com/qgears/ecoreDocGen.git
admglaser Oct 5, 2015
69a4eec
Adding EObjectWrapper; fixing keyword content assist line breaking.
admglaser Oct 6, 2015
dc90ba8
Adding qualified name provider class.
admglaser Oct 6, 2015
efb581a
Adding xcore editor warnings for missing doc as a feature patch.
admglaser Oct 12, 2015
41f1066
Autobuild of emf.ecore.featurepatch
admglaser Oct 13, 2015
537bca6
Register documentation validator without rebuild org.eclipse.emf.ecor…
agostoni Oct 14, 2015
b3a3b09
Remove emf.ecore and feature from autobuild
agostoni Oct 14, 2015
6a047f1
Deleting org.eclipse.emf.ecore featurepatch plugins.
admglaser Nov 8, 2015
76fbb67
Adding semantic documentation fields; extending xcore, xtext editors and
admglaser Nov 8, 2015
3a7dc10
Adding supertype details to html generator.
admglaser Nov 9, 2015
5758aa5
Adding enum tooltips to html generator.
admglaser Nov 10, 2015
57246c5
Text With tooltips module tooltip size is parameterable
rizsi Nov 10, 2015
68a14cf
Removing Documentation.xcore from documentation project. Bin path needs
admglaser Nov 10, 2015
eaa8f98
Adding clickable tooltip to xtext lang; adding links to enums and cross
admglaser Nov 11, 2015
cac001a
Reflection is removed, doc fields are collected from resourceset,
admglaser Nov 11, 2015
d4a39f0
Fix autobuild: add pom.xml to hu.qgears.documentation project. Add en…
Nov 12, 2015
877a3f1
add src-gen folder to gitignore
rizsi Nov 12, 2015
9df2852
Fix autobuild: add hu.qgears.documentation to feautre.xml
Nov 12, 2015
975be01
Merge branch 'master' of https://github.com/qgears/ecoreDocGen
Nov 12, 2015
57e4092
Adding example projects; adding version validator; changing docfields
admglaser Nov 15, 2015
d6b31fe
Content assist fix.
admglaser Nov 16, 2015
5b0057e
Fixing docfield type validator for xcore editor.
admglaser Nov 22, 2015
1e6fdb7
Remove version constraint to fix autobuild.
Nov 23, 2015
c6ea53a
Fixing quatation mark problem in href attribute of EClass super type …
agostoni Nov 25, 2015
b5c069c
Some small fixes and changes on example.
admglaser Dec 10, 2015
2fdf038
Improve HTML output
rizsi Dec 15, 2015
7ec5318
Compatibility with IQ 1.1.0
agostoni Dec 21, 2015
edfee60
Change compliance to JavaSE-1.7
Jan 5, 2016
fe0d045
Fix occasional NPE.
Jan 8, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ The generator uses the structure of the metamodel and the values of the GenModel

The generated text will include a section for the main package in the metamodel and subsections for the classifiers, datatypes and enumerations.

Xtext extensions
==============
This tool can be used on Xtext langues too (.xtext files). A documentation of the xtext language with links and tooltips is generated before the metamodel documentation.

In the runtime editor documentations from the metamodel appear in keyword hovers and content assists. Javadoc-like comments are parsed as documentation and are shown for reference hovers and content assists.


Usage
-----
Expand All @@ -25,6 +31,11 @@ We also provide validators based on EMF-IncQuery (http://eclipse.org/incquery) t

![EcoreDocGen screenshot](ecoredocgen_school.png?raw=true)

For the xtext runtime editor additions bind the following classes in your UIModule:
* MyEObjectDocumentationProvider.class -> documentation from EMF model/xtext comments
* MyEObjectHover.class -> hovers for keywords
* MyProposalProvider.class -> content assist for keywords

## Additional syntax

### For the HTML Case
Expand Down
17 changes: 17 additions & 0 deletions examples/Library/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Library</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
11 changes: 11 additions & 0 deletions examples/Library/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
65 changes: 65 additions & 0 deletions examples/Library/Library.mydsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* The first example library.
*/
library LIB_01 {
book "The Da Vinci Code"
book "Angels & Demons"
book "Harry Potter and the Philosopher's Stone"
author "J.K.Rowling"
author "Dan Brown"
}

/*
* Joanne "Jo" Rowling, (born 31 July 1965), pen names J. K. Rowling and Robert Galbraith, is a British novelist best known as the author of the Harry Potter fantasy series.
*/
author "J.K.Rowling" {
book "Harry Potter and the Philosopher's Stone"
}

/*
* Daniel "Dan" Brown (born June 22, 1964) is an American author of thriller fiction who is best known for the 2003 bestselling novel The Da Vinci Code.
*/
author "Dan Brown" {
book "The Da Vinci Code"
}

/*
* Harry Potter and the Philosopher's Stone is the first novel in the Harry Potter series and J. K. Rowling's debut novel.
*/
book "Harry Potter and the Philosopher's Stone" {
page 223
author "J.K.Rowling"
}

/*
* The Da Vinci Code is a 2003 mystery-detective novel by Dan Brown.
*/
book "The Da Vinci Code" {
page 490
category Mystery
author "Dan Brown"
}

/*
* Angels & Demons is a 2000 bestselling mystery-thriller novel written by American author Dan Brown and published by Pocket Books and then by Corgi Books.
*/
book "Angels & Demons" {
page 616
author "Dan Brown"
}

/*
* Rating of the the book Harry Potter 1.
*/
rating rating1 {
book "Harry Potter and the Philosopher's Stone"
rating 9
}

/*
* Rating of the book The Da Vinci Code.
*/
rating rating2 {
book "The Da Vinci Code"
rating 7
}
17 changes: 17 additions & 0 deletions examples/org.xtext.example.mydsl.sdk/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.xtext.example.mydsl.sdk</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 examples/org.xtext.example.mydsl.sdk/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin.includes =feature.xml
17 changes: 17 additions & 0 deletions examples/org.xtext.example.mydsl.sdk/feature.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature id="org.xtext.example.mydsl.sdk"
label="MyDsl SDK Feature "
version="1.0.0.qualifier">
<plugin
id="org.xtext.example.mydsl"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.xtext.example.mydsl.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>
9 changes: 9 additions & 0 deletions examples/org.xtext.example.mydsl.tests/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
34 changes: 34 additions & 0 deletions examples/org.xtext.example.mydsl.tests/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.xtext.example.mydsl.tests</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
24 changes: 24 additions & 0 deletions examples/org.xtext.example.mydsl.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.xtext.example.mydsl.tests
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: org.xtext.example.mydsl.tests; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.xtext.example.mydsl,
org.xtext.example.mydsl.ui,
org.eclipse.core.runtime,
org.eclipse.xtext.junit4,
org.eclipse.xtext.xbase.lib,
org.eclipse.ui.workbench;resolution:=optional,
org.objectweb.asm;bundle-version="[5.0.1,6.0.0)";resolution:=optional
Import-Package: org.apache.log4j,
org.junit;version="4.5.0",
org.junit.runner;version="4.5.0",
org.junit.runner.manipulation;version="4.5.0",
org.junit.runner.notification;version="4.5.0",
org.junit.runners;version="4.5.0",
org.junit.runners.model;version="4.5.0",
org.hamcrest.core
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: org.xtext.example.mydsl
5 changes: 5 additions & 0 deletions examples/org.xtext.example.mydsl.tests/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = META-INF/,\
.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/org.xtext.example.mydsl.tests"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.xtext.example.mydsl.tests"/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.xtext.example.mydsl.tests"/>
</launchConfiguration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* generated by Xtext
*/
package org.xtext.example.mydsl;

import org.eclipse.xtext.junit4.GlobalRegistries;
import org.eclipse.xtext.junit4.GlobalRegistries.GlobalStateMemento;
import org.eclipse.xtext.junit4.IInjectorProvider;
import org.eclipse.xtext.junit4.IRegistryConfigurator;

import com.google.inject.Injector;

public class MyDslInjectorProvider implements IInjectorProvider, IRegistryConfigurator {

protected GlobalStateMemento stateBeforeInjectorCreation;
protected GlobalStateMemento stateAfterInjectorCreation;
protected Injector injector;

static {
GlobalRegistries.initializeDefaults();
}

@Override
public Injector getInjector()
{
if (injector == null) {
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
this.injector = internalCreateInjector();
stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
}
return injector;
}

protected Injector internalCreateInjector() {
return new MyDslStandaloneSetup().createInjectorAndDoEMFRegistration();
}

@Override
public void restoreRegistry() {
stateBeforeInjectorCreation.restoreGlobalState();
}

@Override
public void setupRegistry() {
getInjector();
stateAfterInjectorCreation.restoreGlobalState();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* generated by Xtext
*/
package org.xtext.example.mydsl;

import org.eclipse.xtext.junit4.IInjectorProvider;

import com.google.inject.Injector;

public class MyDslUiInjectorProvider implements IInjectorProvider {

@Override
public Injector getInjector() {
return org.xtext.example.mydsl.ui.internal.MyDslActivator.getInstance().getInjector("org.xtext.example.mydsl.MyDsl");
}

}
9 changes: 9 additions & 0 deletions examples/org.xtext.example.mydsl.ui/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
34 changes: 34 additions & 0 deletions examples/org.xtext.example.mydsl.ui/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.xtext.example.mydsl.ui</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
Loading