Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Problem with auto-complete in eclipse
Problem with auto-complete in eclipse [message #720247] Tue, 30 August 2011 04:16 Go to next message
Mladen Mijatovic is currently offline Mladen Mijatovic
Messages: 7
Registered: August 2011
Junior Member
I have created two classes in my project.

package com.tptesting.helperpackage;

@interface Hide {}

public class TestAnnotationsHelper {

	public static int seenByAll = 1;

	@Hide
	public static int hiddenOne = 0;

	public static void canBeCalled(){
		System.out.println("Greetings from NON annotated method!");
	}

	@Hide
	public static void canNotBeCalled(){
		System.out.println("Greetings from annotated method!");
	}
}

package org.tptesting;

import com.tptesting.helperpackage.TestAnnotationsHelper;

public class TestAnnotations extends TestAnnotationsHelper{
	public static void main(String[] args) {
		TestAnnotations ta = new TestAnnotations();
		
	}
}


Then I created SWTBot test for eclipse and in second class tried to get auto-complete working but when I try somthing like: editor.getAutoCompleteProposals("ta.ca") in main method of second class I don't get List<String> with auto proposals. Instead of that I get timeout exception: Could not find auto complete proposal using matcher table with item (ta.ca). On the other hand,
editor.autoCompleteProposal("ta.ca", "canBeCalled() : void - TestAnnotationsHelper");
works like a charmed. But I need list of possible proposals Sad Any suggestions?
Re: Problem with auto-complete in eclipse [message #720413 is a reply to message #720247] Tue, 30 August 2011 10:31 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
On 8/30/11 1:16 AM, Mladen wrote:
> Then I created SWTBot test for eclipse and in second class tried to get
> auto-complete working but when I try somthing like:
> editor.getAutoCompleteProposals("ta.ca") in main method of second class
> I don't get List<String> with auto proposals. Instead of that I get
> timeout exception: Could not find auto complete proposal using matcher
> table with item (ta.ca). On the other hand,
> editor.autoCompleteProposal("ta.ca", "canBeCalled() : void -
> TestAnnotationsHelper");
> works like a charmed. But I need list of possible proposals :( Any
> suggestions?

I've noticed this a few times myself. It /seems/ like eclipse has some
form of a cache of autocomplete proposals, and when the autocomplete
kicks in for the first time, it takes quite a while. I'd suggest bumping
up the timeout for autocompletes to say 10s
(http://swtbot.com/cheat-sheet/#change_timeout_value)

-- Ketan
Re: Problem with auto-complete in eclipse [message #720439 is a reply to message #720413] Tue, 30 August 2011 11:30 Go to previous message
Mladen Mijatovic is currently offline Mladen Mijatovic
Messages: 7
Registered: August 2011
Junior Member
Thank you, Ketan, for your response but I already tried it with timeout and it doesn't solve the problem.
Previous Topic:SWTBot : How get a screenshot that includes a menu ?
Next Topic:Keystrokes on SWTBotShell
Goto Forum:
  


Current Time: Fri Jul 25 11:25:57 EDT 2014

Powered by FUDForum. Page generated in 0.01597 seconds