change, reparsing should be triggered by changing a corresponding xtext
file
Change-Id: I716eefbbe1166569179564c50335d4e2d61808e3
Signed-off-by: akosyakov <anton.kosyakov@itemis.de>
Made PortableURIs more robust against EObjects without eResource.
Also fixed the cause, which was BatchLinkingService returning proxies instead of null, when something couldn't be resolved.
Signed-off-by: Sven Efftinge <sven.efftinge@itemis.de>
Make sure this method returns the same grammar element, no matter
whether the text region access has been constructid via
serializer or node model.
Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
ITextRegionAccess should not inherit form AbstractTextSegment.
It's better to use delegation: ITextRegionAccess#regionForDocument()
Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
... because otherwise implementations of ISemanticRegion can't
expose methods that IEOBjectRegion sould not have
Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
The API useed to have the methods increaseIndentation() and
decreaseIndentation(). While this is quite flexible, it is also quite
likely that the two methods are not called symmetrically.
This can happen, if
- the developer forgets to call one of the methods
- due to a bug in the code's logic that calls one of the methods
- due to an exception that's being thrown after inc() has been called
and before dec() would be called. Exceptions are likely to be thrown
because formatter may be executed on syntactically broken documents.
If inc() and dec() aren't called symmetrically, the indenteation for the
remaining part of the document will be wrong which makes any formatter
look broken. Therefore, we can consider it to be the better solution to
apply one level of intention properly or not at all.
The new API makes use of methods from the IFormattableDocument that are
resposnsible for two HiddenRegions at the same time. Namely, the methods
are:
- surround(ISemanticRegion)
- surround(EObject)
- interior(ISemanticRegion, ISemanticRegion)
- set(IHiddenRegion, IHiddenRegion)
When calling one of these methods, IHiddenRegionFormatting#indent() can
be used to increase the level of indentation form the first HiddenRegion
to the second one.
Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
Don't handle the IOException thrown by Appenadable#append(Object) when
we don't supply the implementation of Appendable.
Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
- assume the document is formattet after applying a semantic quickfix
- in the formatter, make sure only 'unknown' hidden regions are
formatted. 'unknown' regions are the regions that didn't exist before
the model was programmatically modified.
Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>