[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[xtext-dev] How are tabs counted in the length of a line?
|
- From: "Mary Komor" <mary.mailinglist@xxxxxxxxx>
- Date: Fri, 27 May 2011 01:52:21 -0400
- Delivered-to: xtext-dev@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:from:to:references:in-reply-to :subject:date:mime-version:content-type:content-transfer-encoding :x-priority:x-msmail-priority:importance:x-mailer:x-mimeole; bh=0h+EIdSHoQl3pJXdtzdEoHIAFDDdesy0yl6g/SqbMg4=; b=wemS0dklAxwRx9TGP2+a7wmXRNx1nm5hUCNLrp8aWE7LLipiQz6VS2wz43ZwNm5FAJ veLnNv1LZMBgOYEKRHrbKDZ6FQMNllru5GuY4xYESrHgC7bhb6RNadlWx+im9lt4cCso e9G/Ihg/Y9lNL4tuEpfuE/Z8YG9zgcGZLwD1A=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:references:in-reply-to:subject:date:mime-version :content-type:content-transfer-encoding:x-priority:x-msmail-priority :importance:x-mailer:x-mimeole; b=kj+IpwVlNdNxQN6pJGmLzTdSMzdIxor1SxZrqIX8PF/SKRUr/JD786v2iLw1eOTn1F dviN26AP9DTzFVD0IMOB+MkwO0JYPORj5HH8iw7pqW5bO8g5yTc9Wa9UO6bSKH7S2EKO ZxzhtqiE/Joqc3tDOdEZZmMqWUYrA/RcfzuLE=
- Importance: Normal
How are tabs counted when calculating the length of a line (to decide
whether it should autoLineWrap or not)? Do they count as 1 or 4 (1 tab = 4
spaces)?
According to FormatterTest.testIndentationAndLineWrap() in the test suite,
for the input
-----
"test indentation { void func(x:int,y:int,s:javalangString, foo:javasqlDate,
blupp:mylongtype, msads:adshdjkhsakdasdkslajdlsask, x:x, a:b, c:d ); }"
-----
if I use the following config:
-----
c.setAutoLinewrap(30);
// increment the indentation twice after a "{"
c.setIndentationIncrement().after(f.getTestIndentationAccess().getLeftCurlyBracketKeyword_1());
c.setIndentationIncrement().after(f.getTestIndentationAccess().getLeftCurlyBracketKeyword_1());
-----
then the actual result is as follows:
-----
test indentation {
void func(x:int, y:int,
s:javalangString,
foo:javasqlDate,
blupp:mylongtype,
msads:adshdjkhsakdasdkslajdlsask,
x:x, a:b, c:d);
}
-----
But doesn't the line " void func(x:int, y:int," exceed 30 characters?
By my count, that line has 31 characters and should have been wrapped. Am I
miscounting?
Regards,
Mary