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>
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>
[#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>
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>
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>
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>
- 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>
* 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>