Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 243880 - [typing] Smart paste: pasting spaces sometimes not working
Summary: [typing] Smart paste: pasting spaces sometimes not working
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-12 09:49 EDT by Andrew Gvozdev CLA
Modified: 2019-11-25 15:29 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Gvozdev CLA 2008-08-12 09:49:17 EDT
Creating a new task by the request of Daniel Megert. The issue was discovered while testing a fix for bug 243533. The issue was present before the fix, except that item 3 below was introduced by the patch which I believe is correct behavior for pasting spaces.

-- Created from Comment --
URL: https://bugs.eclipse.org/bugs/show_bug.cgi?id=243533
Comment: 5

... there is still something wrong. Set preferences as described in the description (also assuming that tab/ident width is 4) and consider following case (spaces are represented by dot "."):

public class Indent {
....void f() {
........;
....}
}

1. Save the file. Editor window tab is not marked with "*".
2. Select and copy to clipboard 5 spaces. Place the cursor just before the semicolon and paste. The spaces are not added. The contents of the editor are not changed, however the editor window tab is marked with "*" indicating that the file changed.
3. Select 2 spaces and copy at the same position. The spaces added.

If you use tab settings, pressing a tab in that position would add indentation. I think that if a user explicitly pastes a sequence of spaces he expects that it would be inserted as well.
Comment 1 Dani Megert CLA 2008-08-12 10:10:33 EDT
Works if smart paste is disabled.
Comment 2 Andrew Gvozdev CLA 2008-08-12 10:34:42 EDT
The description refers to the description of the other task for setting preferences. Here are the editor preferences used:

1. In Window>Preferences>Java>Editor>Typing uncheck "Tab key adjusts the indentation of the current line".
2. Go to the "formatter preference page" (the easiest to follow the link). Create custom style setting "Tab policy" to  "Spaces only"  ("Mixed" also got the problem). Apply the style.
3. Edit Java file. Enabling "Show whitespace characters" to see all spaces/tabs might be beneficial.
Comment 3 Eclipse Genie CLA 2019-11-25 15:29:30 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.