Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reintegrate Format and Check DSLs developments and builder improvements #7

Merged
merged 2 commits into from
Jun 22, 2017

Conversation

rmitin
Copy link
Collaborator

@rmitin rmitin commented Jun 21, 2017

Reintegrate recent development on Format and Check DSLs as well as the builder basics.

With #3 introduce new features and fixes for Check DSL, Format DSL and the builder.

New features

Extension properties for checks implemented with Check DSL

One can now externall contribute properts for checks which are orthogonal to check definitions themselves. Check configurations then allow setting these properties per check. As an example, if you want to be able to makr your checks as integration blocking, then you can add a property "integration blocking" which is then possible to configure for all checks within a check configuration file.

To register extended properties an extension point "property" in CheckCfg is introduced. Consumers are expected to supply an implementation of the provided ICheckCfgPropertySpecification interface.

Improved no_format handling and support for DSLs with pre-processor

  • no_format rules now can be also defined 'between' elements
  • nested no_format rules are correctly handled
  • 'around' no_format rules now are enforced before the element to be left unformatted, inside it and after it
  • Support for languages with pre-processor statements added to the runtime of Format DSL. That is you can now define handling of pre-processor instructions in your DSL when implementing formatter for your DSL using the Format DSL

Builder allow additional modules for standalone injector

Adds an "additionalModules" parameter to IDynamicSetupService#doSetup() so that a client can give additional modules which will be used when creating the injector for the DSL in question.

This feature is intended for use in headless builders with generators to allow the generator plug-in to supply its own Guice module.

Support strict source type ordering in any build

The IBuildSorter API allows for sorters to sort URIs into multiple groups to allow for finer tuned build ordering/precedence.

Cleanups and bug fixes

Check DSL cleanups:

  • Check DSL and check configuration DSL were migrated from an inferred Ecore model to an imported ECore model.
  • Unified workflows of Check and CheckCfg into a common workflow.
  • Use plugin URIs for references between Ecore models

Check fixes:

  • Fix check formatting of comments and contexts
  • Quickfix to import a missing class was fixed
  • Proper issue codes for multi-header checks. Issue codes now depend on message header only.

Format DSL fixes:

  • prevent unwanted method name conversion
  • Fixed generates the inner class handling of contextual formatting
    (e.g.ActivatorForColumnLocatorBefore, ParameterCalculatorForColumnLocatorBefore) to compilable names.-
  • Contextual formatting rules for Xtext elements that do not have an associated ECore class but explicitly define their object creation now trigger the creation of format methods for the correct Eclasses

Format DSL runtime fixes:

  • Elements that are explicitly left unformatted via format rules do not trigger any linebreak
  • no_format rules do not clash with explicit No-Format annotations
  • non breakable line entries are never broken (they'd rather make a line longer than the maximum)
  • Nested no_format rules are correctly handled also when they are a mix of 'around' and 'between' rules
  • White spaces are never added in front of non formatted elements
  • All comments that disable/re-enabled formatting are now left unformatted.

Builder fixes:

  • Fix inconsistency of isPrelinkingPhase flag. The change adjusts the implementation of LazyLinkingResource2 to actually set the real value for isPrelinkingPhase instead of hard-coded 'false' literal in Xtext. In order to achieve this, method's implementation had to be copied, which is not very clean, however this change should make model inference more robust.

  • Include Stack Trace in the Logger when StackOverflowError is thrown. The Stack Trace is limit to the first and last 10 elements.

To simplify reintegration and releasing the missing components we also for now downgrade Xtext version used to 2.8.3.

Issues #3, #6

rmitin and others added 2 commits June 21, 2017 16:09
 - Stay on Neon Eclipse 
 - Downgrade to Xtext 2.8.3 
 - Update Guava usage to be compatible with Guava 18 

This closes dsldevkit#6
Change-Id: Ib3029f4a71032861b0362ae8baeee1eff6032b73
Check DSL features:

* Proposals and validations for CheckCfg extension properties.

One can now externall contribute properts for checks which are
orthogonal to check definitions themselves. Check configurations
then allow setting these properties per check. As an example, 
if you want to be able to makr your checks as integration blocking,
then you can add a property "integration blocking" which is then
possible to configure for all checks within a check configuration
file.

To register extended properties an extension point "property" 
in CheckCfg is introduced. Consumers are expected to supply an 
implementation of the provided ICheckCfgPropertySpecification 
interface. 


Check DSL cleanups:

- Check DSL and check configuration DSL were migrated from an 
  inferred Ecore model to an imported ECore model.
- Unified workflows of Check and CheckCfg into a common workflow. 
- Use plugin URIs for references between Ecore models


Check fixes: 

- Fix check formatting of comments and contexts
- Quickfix to import a missing class was fixed
- Proper issue codes for multi-header checks. Issue codes now 
  depend on message header only. 


Format DSL features:

no_format handling

- no_format rules now can be also defined 'between' elements
- nested no_format rules are correctly handled
- 'around' no_format rules now are enforced before the element 
   to be left unformatted, inside it and after it


Format DSL fixes:

- prevent unwanted method name conversion
- Fixed generates the inner class handling of contextual formatting 
  (e.g.ActivatorFor**ColumnLocatorBefore, 
  ParameterCalculatorFor**ColumnLocatorBefore) to compilable names.-
- Contextual formatting rules for Xtext elements that do not have 
  an associated ECore class but explicitly define their object creation 
  now trigger the creation of format methods for the correct Eclasses 

Format DSL runtime extensions:

- Support for languages with pre-processor statements added


Fromat DSL runtime fixes:

- Elements that are explicitly left unformatted via format rules 
  do not trigger any linebreak
- no_format rules do not clash with explicit No-Format annotations
- non breakable line entries are never broken (they'd rather make a line
  longer than the maximum)
- Nested no_format rules are correctly handled also when they are a mix
  of 'around' and 'between' rules
- White spaces are never added in front of non formatted elements 
- All comments that disable/re-enabled formatting are now left
  unformatted.


Builder new features:

* Allow additional modules for standalone injector

Adds an "additionalModules" parameter to IDynamicSetupService#doSetup()
so that a client can give additional modules which will be used when
creating the injector for the DSL in question.

This feature is intended for use in headless builders with generators 
to allow the generator plug-in to supply its own Guice module.

* Support strict source type ordering in any build

The IBuildSorter API allows for sorters to sort URIs into multiple
groups to allow for finer tuned build ordering/precedence.


Builder fixes:

- Fix inconsistency of isPrelinkingPhase flag. The change adjusts the 
implementation of LazyLinkingResource2 to actually set the real value 
for isPrelinkingPhase instead of hard-coded 'false' literal in Xtext. 
In order to achieve this, method's implementation had to be copied, 
which is not very clean, however this change should make inference more 
robust.

- Include Stack Trace in the Logger when StackOverflowError is thrown.
The Stack Trace is limit to the first and last 10 elements.

Issue #3
Change-Id: I81e5f3738eaddee5ddb43b872ad62d665e7c1ae1
@rmitin rmitin requested a review from kai-ho June 22, 2017 06:58
@rmitin rmitin added this to the v1.0.0 milestone Jun 22, 2017
@kai-ho kai-ho merged commit e68a241 into dsldevkit:master Jun 22, 2017
abrahamm87 added a commit that referenced this pull request Jan 10, 2019
rubenporras added a commit that referenced this pull request Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants