mail[Wesnoth-commits] r52626 - /trunk/utils/umc_dev/org.wesnoth.ui/src/org/wesnoth/ui/contentassist/WMLProposalProvider.java


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by timotei_cluj on January 16, 2012 - 20:05:
Author: timotei
Date: Mon Jan 16 20:05:18 2012
New Revision: 52626

URL: http://svn.gna.org/viewcvs/wesnoth?rev=52626&view=rev
Log:
eclipse plugin: Fix the proposal provider to provide the correct indentation

Modified:
    
trunk/utils/umc_dev/org.wesnoth.ui/src/org/wesnoth/ui/contentassist/WMLProposalProvider.java

Modified: 
trunk/utils/umc_dev/org.wesnoth.ui/src/org/wesnoth/ui/contentassist/WMLProposalProvider.java
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth.ui/src/org/wesnoth/ui/contentassist/WMLProposalProvider.java?rev=52626&r1=52625&r2=52626&view=diff
==============================================================================
--- 
trunk/utils/umc_dev/org.wesnoth.ui/src/org/wesnoth/ui/contentassist/WMLProposalProvider.java
 (original)
+++ 
trunk/utils/umc_dev/org.wesnoth.ui/src/org/wesnoth/ui/contentassist/WMLProposalProvider.java
 Mon Jan 16 20:05:18 2012
@@ -351,9 +351,8 @@
             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




Related Messages


Powered by MHonArc, Updated Tue Jan 17 02:40:07 2012