Commit graph

3791 commits

Author SHA1 Message Date
Karsten Thoms
b8b82e13a3 [380232] getColumn() should return 0 for "for no information available"
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
2015-04-16 15:34:38 +02:00
Moritz Eysholdt
cddd77f476 Merge pull request #153 from eclipse/me/formatter_improve_indent_api
[formatter] improve indent api
2015-04-14 21:45:14 +02:00
Moritz Eysholdt
19491ed0e1 Merge pull request #149 from eclipse/me/text_region_access
Me/text region access
2015-04-14 21:01:49 +02:00
Moritz Eysholdt
6392a08e3e [formatter] changed API to ensure indentation implies dedentation
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>
2015-04-14 16:11:16 +02:00
Stefan Oehme
53613e9705 [maven] enable workspace resolution for maven dependencies 2015-04-14 10:35:56 +02:00
Moritz Eysholdt
531757ffc8 Merge pull request #148 from eclipse/mey/fix_quickfix_tests
[formatter][xtend][quickfix] assume formatted doc after sem qucikfix :)
2015-04-14 10:21:01 +02:00
Dennis Huebner
51254ff49a Merge pull request #151 from eclipse/dh/replace-uberjar
Dh/replace uberjar
2015-04-13 14:53:07 +02:00
Moritz Eysholdt
3c6f47f974 [formatter] don't handle IOException from Appendable if not self-caused
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>
2015-04-13 11:05:25 +02:00
Moritz Eysholdt
f8657135a3 [formatter] JavaDoc to explain why grammar elements are of EObject
Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
2015-04-13 11:05:23 +02:00
Moritz Eysholdt
eca5996e4e [formatter][xtend][quickfix] assume formatted doc after sem qucikfix :)
- 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>
2015-04-13 10:36:27 +02:00
Stefan Oehme
99b3a3120e [idea] turn on gradle dependency management 2015-04-13 10:31:21 +02:00
Dennis Huebner
f706946f5c [mvn] add some more modules
Signed-off-by: Dennis Huebner <dennis.huebner@itemis.de>
2015-04-10 17:50:50 +02:00
Moritz Eysholdt
63c142641e Merge pull request #146 from eclipse/mey/text_region_access_improvements
text region access improvements
2015-04-10 17:25:09 +02:00
Dennis Huebner
3a1b714dd8 Merge branch 'maintenance' 2015-04-10 16:13:52 +02:00
Dennis Huebner
6ee253a101 [releng] increased version 2.8.2 -> 2.8.3
Signed-off-by: Dennis Huebner <dennis.huebner@itemis.de>
2015-04-10 16:08:46 +02:00
Moritz Eysholdt
d3747b982f [formatter] allow access to regions representing EObjects
Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
2015-04-10 16:06:56 +02:00
Moritz Eysholdt
c5b88abc30 [formatter] avoid names such as 'gap' and 'token'
Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
2015-04-10 16:06:53 +02:00
Moritz Eysholdt
3a220ef882 [formatter] treat grammar elements as EObjects
Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
2015-04-10 16:06:51 +02:00
Moritz Eysholdt
9c351f2c74 [formatter] moved IText[Segment|Replacement] to package regionaccess
Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
2015-04-10 16:06:48 +02:00
Moritz Eysholdt
bf0b1e1927 [formatter] moved static methods into interface
Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
2015-04-10 16:06:45 +02:00
Moritz Eysholdt
e2d7b87c25 [formatter] introduce API to construct ITextRegionAccess instances
Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
2015-04-10 16:06:43 +02:00
Dennis Huebner
a9c98c1acc [mvn] Added first tycho configurations
Signed-off-by: Dennis Huebner <dennis.huebner@itemis.de>
2015-04-10 11:08:29 +02:00
Moritz Eysholdt
4b53996015 [453440][formatter2] hook up serializer
https://bugs.eclipse.org/bugs/show_bug.cgi?id=453440


Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
2015-04-09 15:31:02 +02:00
Moritz Eysholdt
258912951a [serializer] exclude leading whitespace/comments from datatype tokens
Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
2015-04-09 15:28:01 +02:00
Sebastian Zarnekow
7b26ff4c25 Merge pull request #131 from eclipse/maintenance
Merge fixes from maintenance into master
2015-04-08 13:22:00 +02:00
Moritz Eysholdt
c9358c68c0 [formatter] more preconditions to track down AFE in TextEdit.<init>
https://bugs.eclipse.org/bugs/show_bug.cgi?id=461966


Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
2015-04-08 10:14:08 +02:00
Sebastian Zarnekow
3df741e5d5 Merge pull request #129 from eclipse/sz/bug462917
[462917]: Removed broken template var resolver for Xtend
2015-04-08 08:33:40 +02:00
Sebastian Zarnekow
37e5776ebf Merge remote-tracking branch 'origin/maintenance'
Conflicts:
	features/org.eclipse.xtext.ui.feature/feature.xml
	plugins/org.eclipse.xtext.common.types.ui/.settings/.api_filters
	plugins/org.eclipse.xtext.ui/.settings/.api_filters
2015-04-07 18:11:11 +02:00
Sebastian Zarnekow
bffb8a494f [462917]: Removed broken template var resolver for Xtend
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=462917

Signed-off-by: szarnekow <Sebastian.Zarnekow@itemis.de>
2015-04-07 17:58:51 +02:00
Sebastian Zarnekow
1d433e0997 [464029]: Fixed NPE in grammar editor
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=464029

Signed-off-by: szarnekow <Sebastian.Zarnekow@itemis.de>
2015-04-07 15:45:38 +02:00
Jan Koehnlein
6ba8886988 [idea][builder] First shot at builder daemon
Change-Id: Ife8b7764ef64165d06172e779108bc6f68c661ba
Signed-off-by: Jan Koehnlein <jan.koehnlein@itemis.de>
2015-04-02 17:30:09 +02:00
Dennis Huebner
e10c7267dd Merge pull request #118 from eclipse/dh/Bug463794
[xtext] Moved copy fully initialized flag logic to EcoreUtil2
2015-04-02 16:58:47 +02:00
Dennis Huebner
2bcadf1893 [xtext] Moved copy fully initialized flag logic to EcoreUtil2
https://bugs.eclipse.org/bugs/show_bug.cgi?id=463794

Signed-off-by: Dennis Huebner <dennis.huebner@itemis.de>
2015-04-02 15:54:20 +02:00
Sven Efftinge
8c7a132629 Derived state error handling
don’t recomputed on error, but store exception in diagnostic (see also https://bugs.eclipse.org/bugs/show_bug.cgi?id=458620#c2)

Signed-off-by: Sven Efftinge <sven.efftinge@itemis.de>
2015-04-02 14:55:20 +02:00
Sebastian Zarnekow
4d4242890f [460696]: Fixed genmodel references in workflow files
Change-Id: Ie1e66ce29feebfe9bfbfecf1f479f2b7701f6e2f
2015-03-31 14:55:06 +02:00
Sebastian Zarnekow
f0845522a1 [460696]: Fixed erroneous genmodel declaration
Moved Xtext.ecore and Xtext.genmodel to a folder
org/eclipse/xtext which is not a source folder but
a model folder.

Change-Id: I6e5fea5f34bf3e52a36c59099162e20e1783fb38
Signed-off-by: szarnekow <Sebastian.Zarnekow@itemis.de>
2015-03-29 14:48:02 +02:00
Stefan Oehme
4c165cf94a [gradle] don't skip optional dependencies for maven central 2015-03-27 21:07:28 +01:00
Moritz Eysholdt
51aa2d4c5d [formatter] improved fix for bug 461033: CFE in HiddenRegionFormatting
The original fix
https://github.com/eclipse/xtext/commit/9f4514d13120df237e0accf42924c
resolved the symptomps of the problem, but the actual cause was a
wrongly constructed TextRegionAccess.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=461033

Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
2015-03-26 18:17:44 +01:00
Moritz Eysholdt
caef8f0574 Merge pull request #93 from eclipse/maintenance
Merge all fixes from 'maintenance' into 'master'
2015-03-26 18:11:54 +01:00
Moritz Eysholdt
61b5fb8b24 Merge pull request #88 from eclipse/mey/maintenance_serializer_node_model
[serializer] use node model even for rules without assignment
2015-03-26 16:37:59 +01:00
Sebastian Zarnekow
97d3db2c43 Merge pull request #83 from eclipse/sz/bug463095
[463095]: Fixed accidentally ignored OperationCancelErrors
2015-03-26 13:45:03 +01:00
Moritz Eysholdt
d1fa1237b6 [serializer/bug463196] use node model even for rules without assignment
This fixes a bug that caused the SyntacticSequencer to not consult the
node model if a serialized rule doesn't have any assignments but only an
action.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=463196

Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
2015-03-26 13:43:54 +01:00
Sebastian Zarnekow
c999e65666 [462486]: Fixed bogus grammar validation
Terminal fragments cannot shadow keywords

see https://bugs.eclipse.org/bugs/show_bug.cgi?id=462486

Signed-off-by: szarnekow <Sebastian.Zarnekow@itemis.de>
2015-03-26 09:27:38 +01:00
Stefan Oehme
f44134a9e8 [gradle] infer some external dependencies from manifest
can now replace most dependencies in the intellij projects with plugin
project dependencies
2015-03-25 17:29:41 +01:00
Sebastian Zarnekow
69cfb5b65a [463095]: Fixed accidentally ignored OperationCancelErrors
Active annotation processors used to swallow all cancellation
information.

see https://bugs.eclipse.org/bugs/show_bug.cgi?id=463095

Signed-off-by: szarnekow <Sebastian.Zarnekow@itemis.de>
2015-03-25 16:24:48 +01:00
Dennis Huebner
ebfb139a23 [misc] Removed deprecated junit3 bundles
Signed-off-by: Dennis Huebner <dennis.huebner@itemis.de>
2015-03-25 08:37:28 +01:00
Dennis Huebner
5d4ad53ade Merge branch 'maintenance' 2015-03-24 15:10:02 +01:00
Dennis Huebner
56b19a80f0 [releng] Version update: 2.8.1 -> 2.8.2
Signed-off-by: Dennis Huebner <dennis.huebner@itemis.de>
2015-03-24 14:58:44 +01:00
szarnekow
72f9e1c9e9 [461764]: Fixed wrongly propagated exception
The IResourceValidator is not supposed to throw a platform
specific cancellation exception but should wrap it in an
OperationCanceledError instead.

see https://bugs.eclipse.org/bugs/show_bug.cgi?id=461764

Signed-off-by: szarnekow <Sebastian.Zarnekow@itemis.de>
2015-03-23 10:44:28 +01:00
szarnekow
3203c40ef2 [461764]: Fixed wrongly propagated exception
The IResourceValidator is not supposed to throw a platform
specific cancellation exception but should wrap it in an
OperationCanceledError instead.

see https://bugs.eclipse.org/bugs/show_bug.cgi?id=461764

Signed-off-by: szarnekow <Sebastian.Zarnekow@itemis.de>
2015-03-23 09:13:36 +01:00