Bug 520087 - Constructor completion should not add modifier
Summary: Constructor completion should not add modifier
Status: REOPENED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-24 04:35 EDT by Marvin Fröhlich CLA
Modified: 2024-02-26 19:35 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 Marvin Fröhlich CLA 2017-07-24 04:35:42 EDT
When I type the beginning of a constructor and hit CTRL+Space and selectio the completion of my constructor, it adds the public modifier, even if I already have it.

Example:

public class FooBar
{
    public FooB|
}

I hit CTRL+Space where the pipe is (instead of the caret). After selection constructor completion if looks as follows.

public class FooBar
{
    public public FooBar()
    {
    }
}

The public modifier is added regardless.

In my opinion the modifier should never be added by completion, since I will most probably have typed it already, since I am typing the constructor's name, which comes after the modifier.
Comment 1 Eclipse Genie CLA 2020-02-05 08:21: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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.
Comment 2 Marvin Fröhlich CLA 2020-02-06 12:30:47 EST
This behavior hasn't changed. It is still wrong.
Comment 3 Eclipse Genie CLA 2022-01-27 04:28:05 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.
Comment 4 Dirk Steinkamp CLA 2022-03-04 18:10:33 EST
(In reply to Marvin  Fröhlich from comment #2)
> This behavior hasn't changed. It is still wrong.

For me with 4.23M3 it is wrong in a different way: no additional public is inserted, but only completion of the Identifier is offered - no option for inserting the constructor is provided.
Comment 5 Eclipse Genie CLA 2024-02-26 19:35:33 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.