| Summary: | Insert Spaces for Tabs / Tab Policy constantly inserts the configured number of spaces | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Jens G <jgo> | ||||
| Component: | PDT | Assignee: | PHP UI <php.ui-inbox> | ||||
| Status: | REOPENED --- | QA Contact: | Ilina Stefanova <ilina.s> | ||||
| Severity: | normal | ||||||
| Priority: | P2 | CC: | 66Ton99, dohpaz+pdt, eclipse, ilina.s, vladmu | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Jens G
Voted for this bug. It seems that PDT formatter calculates the number of spaces to the next tab only for intendation (from begining of line), but not inside the line (e.g. in array('a'=>[TAB]'b') the [TAB] will always constantly). It would be more useful to calculate the number of spaces to the next tab always in any place of line.
It seems the plugin from https://bugs.eclipse.org/bugs/show_bug.cgi?id=326250#c9 fixes this problem completely, it would by nice to embed that plugin as oficial fix to the next PDT update. Thanks duplicate of 326250 *** This bug has been marked as a duplicate of bug 326250 *** Verified. I don't see how this may be a duplicate of #326250, but maybe an internal technical relationship. Nevertheless, THIS bug still occurs in the current (I guess it's a release) version (3.0.2.v2011102768). Perhaps this was misconception. I meant the number of spaces, that is inserted when pressing the tab key, is constant. There is no tab character inserted, as described in the other bug. Hi Jens, I do not understand you,can you show some examples? With pleasure :)
Code before trying to align with tab key:
<?php
class NewTestClass
{
public function __construct()
{
// real tab position before //
$letsSee = 'some string';
$dfgd = 'another string';
}
}
?>
Code after:
<?php
class NewTestClass
{
public function __construct()
{
// real tab position before //
$letsSee = 'some string';
$dfgd = 'another string';
}
}
?>
You see, the tab position is completely ignored, the editor just inserts 4 spaces.
I have used last PDT 3.0.2 and can confirm that this problem still exists and I continue using 3th party plugin as I wrote before. Created attachment 213720 [details]
Adds logic for calculating the indent size, for spaces, so that the "tab" visually lines up with the literal tab character.
|