autocomplete not acting as I expect [message #712145] |
Sun, 07 August 2011 03:41  |
Eclipse User |
|
|
|
I am using Eclipse Indigo, and programming a method that starts this way:
public void display()
{
JLabel label1 = new JLabel("one");
JScrollPane scrollPane1 = new JScrollPane(label1);
JLabel txtMessages = new JLabel("These are the times that fry men's soles.");
JPanel bigCourtInfoPanel = new JPanel();
bigCourtInfoPanel.setLayout(new BoxLayout(bigCourtInfoPanel, BoxLayout.Y_AXIS));
Right under the "JLabel txtMessages" line, I can type "txtMessages.", and I would expect an content assist with the methods available for the txtMessages variable. None appear. I would also expect content assist if I enter control-space, but none appear then either.
What I do get, intermittently, is a yellow background and red foreground highlight on the rest of the method. I don't know what that means.
1. What is the yellow/red highlighting?
2. How do I get my list of content-assist methods?
|
|
|
Re: autocomplete not acting as I expect [message #712647 is a reply to message #712145] |
Sun, 07 August 2011 14:33   |
Eclipse User |
|
|
|
On 08/06/2011 10:41 PM, Ralph Cook wrote:
> I am using Eclipse Indigo, and programming a method that starts this way:
>
> public void display()
> {
> JLabel label1 = new JLabel("one");
>
> JScrollPane scrollPane1 = new JScrollPane(label1);
> JLabel txtMessages = new JLabel("These are the times that fry men's
> soles.");
> JPanel bigCourtInfoPanel = new JPanel();
> bigCourtInfoPanel.setLayout(new BoxLayout(bigCourtInfoPanel,
> BoxLayout.Y_AXIS));
>
> Right under the "JLabel txtMessages" line, I can type "txtMessages.",
> and I would expect an content assist with the methods available for the
> txtMessages variable. None appear. I would also expect content assist if
> I enter control-space, but none appear then either.
>
> What I do get, intermittently, is a yellow background and red foreground
> highlight on the rest of the method. I don't know what that means.
>
> 1. What is the yellow/red highlighting?
>
> 2. How do I get my list of content-assist methods?
Have you added an import for JLabel? If not, then JLabel won't be able
to be resolved so it won't be possible to provide content assist.
|
|
|
Re: autocomplete not acting as I expect [message #713158 is a reply to message #712145] |
Mon, 08 August 2011 06:53  |
Eclipse User |
|
|
|
On 07.08.2011 05:41, Ralph Cook wrote:
> I am using Eclipse Indigo, and programming a method that starts this way:
>
> public void display()
> {
> JLabel label1 = new JLabel("one");
>
> JScrollPane scrollPane1 = new JScrollPane(label1);
> JLabel txtMessages = new JLabel("These are the times that fry
> men's soles.");
> JPanel bigCourtInfoPanel = new JPanel();
> bigCourtInfoPanel.setLayout(new BoxLayout(bigCourtInfoPanel,
> BoxLayout.Y_AXIS));
>
> Right under the "JLabel txtMessages" line, I can type "txtMessages.",
> and I would expect an content assist with the methods available for
> the txtMessages variable. None appear. I would also expect content
> assist if I enter control-space, but none appear then either.
>
> What I do get, intermittently, is a yellow background and red
> foreground highlight on the rest of the method. I don't know what
> that means.
>
> 1. What is the yellow/red highlighting?
This normally appears to the right and means that that this text will be
replaced when inserting the proposal.
>
> 2. How do I get my list of content-assist methods?
You should get it if you place the caret after the "textMessages." and
invoke Ctrl+Space. If that is not the case then please file a bug
against JDT Text
(https://bugs.eclipse.org/bugs/enter_bug.cgi?product=JDT;component=Text).
Dani
|
|
|
Powered by
FUDForum. Page generated in 0.03266 seconds