Commit graph

522 commits

Author SHA1 Message Date
Arne Deutsch
ad62f83604 [eclipse/xtext#1697] Abstract super class for java based formatters.
[#1489] Java based Xtext formatter (formatter2 API).

Remove API restrictions.
Testing java based formatter.
Formatter2 Java Fragment.
2020-11-16 09:32:34 +01:00
Christian Dietrich
ee21c89474 [eclipse/xtext#1837] converted xtend 2 java
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-11-08 09:54:48 +01:00
Christian Dietrich
e283b69ab6 cleanup x2j
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-10-26 15:09:34 +01:00
Christian Dietrich
70607b6081 fixed some bugs
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-10-16 13:39:45 +02:00
Christian Dietrich
e9bba8f355 [eclipse/xtext#1852] Update to ASM 9
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-10-06 09:07:47 +02:00
Christian Dietrich
56de6162c0 [eclipse/xtext-eclipse#1547] enhance ecore2xtext generator & xtext2ecore transformer for reserved keywords in enums
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-09-28 11:35:33 +02:00
Sebastian Zarnekow
5d251e5af2 [eclipse/xtext#1850] Fix resource leaks 2020-09-18 21:07:17 +02:00
Arne Deutsch
5c43b18fb4
Merge pull request #1567 from eclipse/ade-eobject-comment-offset0
[#1521] Return root on parse success and no other element found.
2020-09-18 09:06:08 +02:00
Sebastian Zarnekow
dc49298b09
Improve performance of Xtext editor with large grammars (#1562)
* Use EPackage.getEClassifier during grammar linking
* Avoid redundant validations of predicates that cover unordered groups
* Reuse previously collected information in the rule inspector for overridden values

closes #1561
2020-09-15 11:17:46 +02:00
Sebastian Zarnekow
8e1663e5e2 [#1568] Add restricted API to allow access to internals of the node
model
2020-09-08 12:15:26 +02:00
Arne Deutsch
1c0ec04ab0 [#1521] Return root on parse success and no other element found.
Signed-off-by: Arne Deutsch <Arne.Deutsch@itemis.de>
2020-09-04 08:59:13 +02:00
kthoms
599b17be0a [releng] Update Xtext version to 2.24.0
Signed-off-by: kthoms <karsten.thoms@karakun.com>
2020-08-31 21:37:37 +00:00
Titouan Vervack
c15d749416
Fixed spaces after ML comments in format(#1543)
When customizing the formatter to consider indentation + spaces, ML comments are prepended with a space. This patch fixes that.
2020-08-26 11:07:23 +02:00
Sebastian Zarnekow
108ea555d7
Improved validation against imported ecore meta model (#1552)
closes #1551 

Signed-off-by: Sebastian Zarnekow <sebastian.zarnekow@gmail.com>
2020-08-07 14:56:30 +02:00
Sebastian Zarnekow
6d7097ef24 Improved grammar validation in the context of unassigned rule calls
Subsequent unassigned actions are not allowed if there was already a
current instance present.

Signed-off-by: Sebastian Zarnekow <sebastian.zarnekow@gmail.com>
2020-08-07 14:32:57 +02:00
Christian Dietrich
b14f746cee
Merge pull request #1547 from eclipse/cd_rm_xtend_shared_ui_prefs
removed obsolete org.eclipse.xtend.shared.ui.prefs
2020-08-06 17:23:00 +02:00
Sebastian Zarnekow
71e7345890 API cleanup after Xtend2Java 2020-08-06 16:23:13 +02:00
Christian Dietrich
d1e19719fe predictable sorting in TracedAccessors
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-08-06 10:34:55 +02:00
Christian Dietrich
22107ae55a removed obsolete org.eclipse.xtend.shared.ui.prefs
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-08-03 13:18:44 +02:00
Titouan Vervack
a797694299
Add message to IndexOutOfBoundsException in InternalNodeModelUtils (#1542)
Signed-off-by: Titouan Vervack <titouan.vervack@sigasi.com>
2020-07-15 00:37:33 +02:00
nbhusare
80885cf08b Added Issue code INVALID_TERMINAL_FRAGMENT_RULE_REFERENCE in XtextConfigurableIssueCodes
Specifying the issue code in the method XtextValidator#checkTerminalFragmentCalledFromTerminalRule()
Updated the XtextLinkingDiagnosticMessageProvider

Signed-off-by: nbhusare <neerajbhusare@gmail.com>
2020-07-13 14:57:52 +05:30
Christian Dietrich
ab13977486 updated .classpath as generated by gradle
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-07-10 13:25:39 +02:00
Arne Deutsch
097ad57191
Merge pull request #1532 from eclipse/ade-refactor-xtend-to-java
[eclipse/xtext#1777] Translate more code to java.
2020-07-03 15:28:36 +02:00
Arne Deutsch
95afbc0813 [eclipse/xtext#1777] Translate more Xtend to java.
org.eclipse.xtext, org.eclipse.xtext.ide and org.eclipse.xtext.util are
Xtend free. Remove xtend-gen folders from build.

Signed-off-by: Arne Deutsch <Arne.Deutsch@itemis.de>
2020-07-03 10:23:21 +02:00
Sebastian Zarnekow
dec030a563 [#1536] Make LazyLinkingResource#proxyInformation available to sub-types 2020-06-30 10:10:15 +02:00
Christian Dietrich
26ff6099b6 [eclipse/xtext#1777] ported more xtend code to java & cleanup
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-06-05 10:17:20 +02:00
Christian Dietrich
60688817f5 [eclipse/xtext#1777] ported more xtend code to java
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-06-04 09:32:30 +02:00
Nico Prediger
5aae2d0e6b [releng] Update Xtext version to 2.23.0
Signed-off-by: Nico Prediger <mail@nicoprediger.de>
2020-06-02 17:18:46 +00:00
Tamas Miklossy
e1c20601fc [#269] Regenerate Xtext Language via the GenerateXtext.mwe2 workflow.
Signed-off-by: Tamas Miklossy <miklossy@itemis.de>
2020-05-21 18:13:33 +02:00
Sebastian Zarnekow
b751b9e2e0
[#1499] Enable JavaDoc validation on org.eclipse.xtext (#1500)
closes #1499
2020-05-20 17:11:07 +02:00
Sebastian Zarnekow
7b5900fc5a
[#1466] Global unique name validator (#1483)
This change introduces an explicit validation context that is used by the INamesAreUniqueValidationHelper. This allows to fine tune the scope of the validation in various ways. Default contexts are available to validation uniqueness in the current container, along the chain of visible containers or local to the current resource (the default).

Local unique name validation can be implemented now based on the LocalUniqueNameContext.

closes #1466
2020-05-15 21:16:47 +02:00
Tamas Miklossy
7b0469e1cc [#1443] Fix XtextFormatter behaviour on different line endings.
- Modify the FormattingConfigBasedStream to handle the different line
endings properly.
- Implement corresponding XtextFormatterTest and
GrammarAccessExtensions2Test test cases.

Signed-off-by: Tamas Miklossy <miklossy@itemis.de>
2020-05-12 22:16:31 +02:00
Tamas Miklossy
dfdceddc5c [https://github.com/eclipse/xtext-eclipse/issues/1221] Serializer.
- Improve the serializeReplacement implementation by modifying the
ReplaceRegion length calculation so that it takes not only the
ICompositeNode.getTotalLength() into account, but considers if the new
text contains additional whitespaces and the old text is also followed
by white spaces, than the whitespaces contained by the original document
is also consumed by the quickfix.
- Implement corresponding SerializerReplacementCalculationTest test case
based on the NoJdtTestLanguage.

Signed-off-by: Tamas Miklossy <miklossy@itemis.de>
2020-05-12 17:54:34 +02:00
Christian Dietrich
317c2d7a0d marked xpand/xtend(1) depending XtendXtext2EcorePostProcessor as deprecated
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-05-07 17:25:16 +02:00
Sebastian Zarnekow
b15fd84cfe
[#1467] Made lookAhead independent from encountered hidden tokens (#1469)
Made lookAhead independent from encountered hidden tokens

closes #1467
2020-05-04 17:18:34 +02:00
Sebastian Zarnekow
1647521e63
[#1462] Syntax errors will lead to unexpected calls to value converters (#1463)
Don't call a value converter if nothing was matched. Also don't assign naively true for boolean values without checking if there was a token consumed.

closes #1462
2020-05-04 13:47:16 +02:00
Christian Dietrich
a15344e18a
Merge pull request #1459 from eclipse/cd_issue1458
[#1458] made XtextResource.getParser more easily customizeable
2020-04-29 18:17:34 +02:00
Christian Dietrich
71f17744eb [eclipse/xtext#1679]ported more code to java
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-04-29 11:42:44 +02:00
Christian Dietrich
d83619ad80 [#1458] made XtextResource.getParser more easily customizeable
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-04-28 12:47:11 +02:00
Christian Dietrich
e7db3d48a8
Merge pull request #1457 from eclipse/cd_asm8
[eclipse/xtext#1649] update to ASM 8.0
2020-04-28 08:42:54 +02:00
Christian Dietrich
4ac89676f9 [eclipse/xtext#1649] update to ASM 8.0
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-04-28 08:27:41 +02:00
Arne Deutsch
fe6bd76975 [eclipse/xtext#1679] Refactor more Xtend to java.
Signed-off-by: Arne Deutsch <Arne.Deutsch@itemis.de>
2020-04-24 08:30:38 +02:00
Christian Dietrich
d685cf29ea [eclipse/xtext-eclipse#1389] fixed exception handing (revert to old behaviour)
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-04-06 10:34:38 +02:00
Arne Deutsch
2f5ad0017f
Merge pull request #1423 from eclipse/ade-refactor-xtend-to-java
[eclipse/xtext#1679] Refactor more Xtend to java.
2020-03-30 09:50:37 +02:00
Arne Deutsch
98ba18e78f [eclipse/xtext#1679] Refactor more Xtend to java.
Signed-off-by: Arne Deutsch <Arne.Deutsch@itemis.de>
2020-03-30 09:49:49 +02:00
Sebastian Zarnekow
12a21c9114
[eclipse/xtext#1679] Refactor more Xtend to Java (#1428)
* [eclipse/xtext#1679] Refactor more Xtend to Java
2020-03-26 16:54:05 +01:00
Arne Deutsch
9f4bf0fb16 [eclipse/xtext#1679] Refactor more Xtend to java.
Signed-off-by: Arne Deutsch <Arne.Deutsch@itemis.de>
2020-03-13 08:46:15 +01:00
Christian Dietrich
b9c9d679c4 fixed more unused imports
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-03-06 08:02:15 +01:00
Christian Dietrich
f7650e0bbc
Merge pull request #1411 from eclipse/cd_xtend_issue1018
fixed getEntryParserRule with actions [eclipse/xtext-xtend#1018]
2020-03-06 06:14:08 +01:00
Christian Dietrich
0d3bbbc5fc regenerated xtend code & cleanup imports
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-03-05 20:06:40 +01:00
Christian Dietrich
1969166a60 fixed getEntryParserRule with actions [eclipse/xtext-xtend#1018]
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-03-05 19:44:12 +01:00
Nico Prediger
7c82447f16 [releng] Update Xtext version to 2.22.0
Signed-off-by: Nico Prediger <mail@nicoprediger.de>
2020-03-03 12:00:56 +00:00
Sven Efftinge
f9b6d1bebe
[eclipse/xtext#1176] Migrate to EPL 2.0
Signed-off-by: Sven Efftinge <sven.efftinge@typefox.io>
Co-authored-by: Sebastian Zarnekow <Sebastian.Zarnekow@gmail.com>
2020-02-11 12:02:02 +01:00
Sebastian Zarnekow
04aedc416e
Merge pull request #1358 from rablewis/1262
[#1262] Prevent infinite loop with NodeIterator.
2020-02-03 09:35:28 +01:00
Arne Deutsch
5dec13b7b4 [#1303] Throw exception instead of returning null.
Extend JavaDoc.
Adapt unit test.

Signed-off-by: Arne Deutsch <Arne.Deutsch@itemis.de>
2020-01-31 08:21:07 +01:00
Robert Lewis
dc4699fb40 [#1262] Prevent infinite loop with NodeIterator.
Throw NullPointerException if null is passed to NodeIterator constructor
to prevent iterator state where hasNext() and hasPrevious() always
return true, but getNext() and getPrevious() always return null.
Similarly, throw NPE for null passed to constructors of NodeIterable,
BasicNodeIterator and BasicNodeIterable. Added unit tests for all four
classes.

Signed-off-by: Robert Lewis <rablewis@algo-pop.com>
2020-01-24 23:18:58 +00:00
Christian Dietrich
6b552f0659 [eclipse/xtext#1651] made error handling in StorageAwareResource null-safe
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-01-20 12:52:13 +01:00
Robert Lewis
da46e06388 [#1262] Prevent infinite loop with NodeIterator.
Throw NullPointerException if null is passed to NodeIterator constructor
to prevent iterator state where hasNext() and hasPrevious() always
return true, but getNext() and getPrevious() always return null.

Signed-off-by: Robert Lewis <rablewis@algo-pop.com>
2020-01-19 15:10:26 +00:00
Christian Dietrich
79e1ebcfed [eclipse/xtext#1642] regenerated xtend code with latest xtend
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-01-09 13:57:00 +01:00
Tamas Miklossy
3641ec9a97 [#1343] Fix invalid link in javadoc.
Signed-off-by: Tamas Miklossy <miklossy@itemis.de>
2020-01-07 20:53:00 +01:00
Christian Dietrich
83249956d4 [eclipse/xtext#1282] Update to EMF 2.20: change version constraints in MANIFESTs
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2020-01-03 16:38:15 +01:00
mmews-n4
4b37a9e4f5 [#1316| Add end line and end column positions to Issue
[#1316] Add end line and end column positions to Issue. Also initialise lines and columns with 0. 

Previously, end line and end column information was not part of Issue, IssueImpl, IssueLocation, AbstractDiagnostic, and ExceptionDiagnostic. It is helpful to have this information in these classes, because otherwise (i.e. now in LanguageServerImpl#toDiagnostic(Issue)) this information has to be computed by loading the Document again.

closes #1316 

Signed-off-by: mmews <marcus.mews@numberfour.eu>
2019-12-13 09:54:04 +01:00
Sebastian Zarnekow
f8c791989c
Merge pull request #1322 from mmews-n4/requestManger_logging
Log Exceptions thrown in futures created by the RequestManger
2019-12-12 17:28:25 +01:00
mmews
85e1620ab4 incorporate review feedback
Signed-off-by: mmews <marcus.mews@numberfour.eu>
2019-12-11 11:18:47 +01:00
mmews
3102556c4e add CancellationException to OCM#getPlatformOperationCanceledException
Signed-off-by: mmews <marcus.mews@numberfour.eu>
2019-12-10 22:51:31 +01:00
mmews
f360e6b1a0 add annotation @since
Signed-off-by: mmews <marcus.mews@numberfour.eu>
2019-12-10 22:46:27 +01:00
mmews
c59ce4d0db add isIndexOnly as default method and read it to create build request
Signed-off-by: mmews <marcus.mews@numberfour.eu>
2019-12-10 12:29:40 +01:00
Karsten Thoms
325fa1e8d6 [releng] Update Xtext version to 2.21.0
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
2019-12-02 14:06:33 +00:00
Christian Dietrich
b7589ed9c5 fixed unused import
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2019-11-22 12:22:04 +01:00
Christian Dietrich
8f89743894
Merge pull request #1253 from tisis2/fix#1252
[eclipse/xtext-core#1252] filter for contained resource descriptions
2019-11-19 10:15:12 +01:00
gabrield
acdd7c8482 add the since tags
Signed-off-by: gabrield <d.gabriel@bachmann.info>
2019-11-19 09:41:40 +01:00
gabrield
49447a65aa remove behavior changes of getExportedObjectsByType
Signed-off-by: gabrield <d.gabriel@bachmann.info>
2019-11-19 08:35:04 +01:00
Sebastian Zarnekow
0db28cc4c2 Add output folders to build.properties 2019-11-18 08:42:38 +01:00
Sebastian Zarnekow
e814a7d8dd Fixed build.properties, fixed a few warnings on the go 2019-11-18 08:42:38 +01:00
Sebastian Zarnekow
bbbdf68391 Added missing build.properties, fixed a couple of warnings 2019-11-18 08:42:38 +01:00
Christian Dietrich
98bd79e264 [eclipse/xtext#1504] added Eclipse-SourceReferences to manifests
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2019-11-15 12:28:44 +01:00
Christian Dietrich
dbb27240a2 log deprecation warning if xtend based postprocessor is used
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2019-11-11 15:14:12 +01:00
Sebastian Zarnekow
d58d1ea7e4
Merge pull request #1273 from eclipse/sz_issue1573
[eclipse/xtext#1573] Ensure that all plugins do have a ManifestBuilder
2019-11-04 16:55:55 +01:00
Sebastian Zarnekow
9f8aee979a [eclipse/xtext#1573] Ensure that all plugins do have a ManifestBuilder 2019-11-04 14:34:21 +01:00
Karsten Thoms
3a4ec33e7c
Merge pull request #1268 from eclipse/kt_issue1569_1
[eclipse/xtext#1569] Refactor Xtend to Java
2019-11-04 14:32:35 +01:00
Karsten Thoms
5703d41f3a [eclipse/xtext#1569] Refactor Xtend to Java
The usage of Xtend in the Xtext code base should be reduced where the
usage of Xtend is not super beneficial. Replaced Xtend classes by the
compiled code and refactored the code to more readable Java. Performed
source cleanup action.

Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
2019-11-04 12:53:45 +01:00
Karsten Thoms
5e70dd0360
Merge pull request #1269 from eclipse/kt/issue1569/3
[eclipse/xtext#1569] Refactor Xtend to Java
2019-11-04 12:34:24 +01:00
Karsten Thoms
4eba252aa9 [eclipse/xtext#1569] Refactor Xtend to Java
The usage of Xtend in the Xtext code base should be reduced where the
usage of Xtend is not super beneficial. Replaced Xtend classes by the
compiled code and refactored the code to more readable Java.

Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
2019-11-04 12:33:52 +01:00
Sebastian Zarnekow
eea345fba1
[eclipse/xtext#1569] Migrate Xtend code to Java (#1270)
* Migrate Xtend code to Java
* Apply auto-formatting and cleanup actions
* Add `@since` tags

see eclipse/xtext#1569
2019-10-31 16:06:12 +01:00
Karsten Thoms
85db097d56 [eclipse/xtext#1569] Refactor Xtend to Java
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
2019-10-30 14:42:09 +01:00
Sebastian Zarnekow
b1b444f504 [eclipse/xtext#1567] Upgrade to asm 7.2 2019-10-27 16:24:43 +01:00
gabrield
ca071ea58d added a factory method to create the StateBasedContainer and expose its
state as getter

Signed-off-by: gabrield <d.gabriel@bachmann.info>
2019-10-17 08:34:32 +02:00
gabrield
51d4cb204b get the resource descriptions by uri seems to be faster than filtering
Signed-off-by: gabrield <d.gabriel@bachmann.info>
2019-10-17 08:34:13 +02:00
Christian Dietrich
10fa244c1b [eclipse/xtext#1486] made png transparent
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2019-10-12 18:50:42 +02:00
gabrield
73f1f3e4e0 [eclipse/xtext-core#1252] filter for contained resource descriptions
before any other filter operation

there is a performance benefit, when first exclude all irrelevant
resources before considering their IEObjectDescriptions

Signed-off-by: gabrield <d.gabriel@bachmann.info>
2019-10-11 10:47:31 +02:00
Tamas Miklossy
78254b5b83 [https://github.com/eclipse/xtext/issues/1486]
- Remove unnecessary modeling32.png file and all the references to it.
The modeling32.png file has been replaced by the xtext32.png file.

Signed-off-by: Tamas Miklossy <miklossy@itemis.de>
2019-09-28 15:07:48 +02:00
Tamas Miklossy
ee1e91935a [https://github.com/eclipse/xtext/issues/1486]
- Add xtext32.png to the build.gradle file.

Signed-off-by: Tamas Miklossy <miklossy@itemis.de>
2019-09-26 08:20:14 +02:00
Tamas Miklossy
10a911a94c [https://github.com/eclipse/xtext/issues/1486]
- Use xtext32.png instead of modeling32.png for the feature image.

Signed-off-by: Tamas Miklossy <miklossy@itemis.de>
2019-09-25 16:47:55 +02:00
Christian Dietrich
00897b1b35 [eclipse/xtext#1550] set default compliance level to 8.0
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2019-09-23 11:27:08 +02:00
Christian Dietrich
065dd11210 regenerated xtext
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2019-09-23 10:54:50 +02:00
Karsten
365ba15867 [releng] Set version to 2.20.0
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
2019-09-03 15:24:30 +00:00
Mark Christiaens
07de69b2bc Intern grammar elements when nodes are created from the cache (#1233)
* Intern grammar elements when nodes are created from the cache

The node model contains nodes derived from AbstractNode.  An
AbstractNode has an array describing its grammar elements.  This array
is often identical for many AbstractNodes.  There can be millions of
nodes in a node model so it makes sense to remove the duplicate arrays.
This GrammarElementsInterner tries to reuse an interned version of
such an array wherever possible.  In particular, now we also intern
grammar elements when they are created during the load of a node model
from the node model cache.

Testing this modification on a largisch project showed that the
execution time of a clean build that accesses the node model cache
reduces by around 10%.

Signed-off-by: Mark Christiaens <mark.christiaens@sigasi.com>
2019-09-03 15:54:44 +02:00
Sebastian Zarnekow
ac801dc64b [eclipse/xtext-lib#224] Stable method order when using Delegate annotation 2019-08-13 21:56:42 +02:00
Christian Dietrich
95a94bdd49 fixed broken javadoc
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
2019-07-29 14:27:47 +02:00
mmews
a1566e10b3 extend ISourceFolder for precise file filtering
Signed-off-by: mmews <marcus.mews@numberfour.eu>
2019-07-22 09:42:44 +02:00