eclipse plugin: Fix the proposal provider to provide the correct indentation

This commit is contained in:
Timotei Dolean 2012-01-16 19:05:18 +00:00
parent d66b0f40bb
commit 37633c1c43

View file

@ -351,9 +351,8 @@ public class WMLProposalProvider extends AbstractWMLProposalProvider
String parentIndent = ""; //$NON-NLS-1$
if( context.getCurrentNode( ).getOffset( ) > 0 ) {
parentIndent = NodeModelUtils.findLeafNodeAtOffset( node,
context.getCurrentNode( ).getOffset( ) -
// if we have a non-rule proposal, subtract 1
( ruleProposal ? 0: 1 ) ).getText( );
context.getCurrentNode( ).getTotalOffset( ) -
( appendEndBracket ? 1: 2 ) ).getText( );
}
// remove ugly new lines that break indentation