function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
HosHos 

Eclipse - code auto-complete

I currently have Eclipse 3.2 and downloaded the Force.com IDE plugin for 3.2.  While the plugin is working-- I am not getting any code-complete on my objects/ apex code.  One of our consultants (not from salesforce) - has Eclipse 3.3 wth the 3.3 plugin - and only gets code-complete on S-controls....   Are we supposed to get code-complete functionality with this plugin? From the description it sounds like yes.   Anyone know why this function may not be working in Eclipse with the Force.com plugin??
ad75ad75
Like Hos, I have experienced similar problems on Eclipse.  My installation is Eclipse 3.3 (Flex3, to be precise) and have tried to search for clues but can only find the post below from 6 months ago.  Can anyone confirm that they have Apex code auto-complete working on Flex3 or Eclipse 3.3?

My installation is as follows:
  • Clean install of Flex3 (which is based on Eclipse 3.3)
  • Vista64 OS
  • Installed Force.com IDE for Eclipse 3.3 exactly as described here.
I guess the problem could be related to Flex3 rather than the underlying Eclipse 3.3, but I would like to get the Force.com IDE working on Flex3 because my current project combines Apex server-side code with a Salesforce client based on the Flex toolkit.  If they won't play nicely together, I'll have to have two Eclipse 3.3 installations on the same machine, which is not so great.

If anyone has any thoughts or suggestions I would be most grateful.  Thanks.

PS I also have a secondary Eclipse problem related to help pages - see my separate post "Problem with Eclipse help when writing Apex code" under "Apex Code Development".
ad75ad75
Here's a little more information in case this helps identify what is wrong.

While editing a .cls file in the Force.com perspective, if I type out 'Opportunity' in full, this gets highlighted in blue, which presumably means that the validator recognises it as a keyword.  I can then type the dot after it and hit ctrl-space to get a pop-up list of methods/fields for autocompletion, which work fine.  So far so good.

Howevever, if instead I just type part of the word, for example just 'Opp', and hit ctrl-space, I hoped that this would propose 'Opportunity' as an autocompletion.  Instead a dialog appears entitled 'Problem Occurred' which says ' "Content Assist" did not complete normally.  Please see the log for more information.' and 'String index out of range: -1'.  The log shows this:

!ENTRY org.eclipse.ui 4 4 2008-08-27 14:13:56.006
!MESSAGE "Content Assist" did not complete normally.  Please see the log for more information.

!ENTRY org.eclipse.ui 4 0 2008-08-27 14:13:56.006
!MESSAGE String index out of range: -1
!STACK 0
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(Unknown Source)
    at com.salesforce.toolkit.ui.editors.apex.assistance.ApexCompletionProcessor.matchTypeKeyword(ApexCompletionProcessor.java:278)
    at com.salesforce.toolkit.ui.editors.apex.assistance.ApexCompletionProcessor.computeCompletionProposals(ApexCompletionProcessor.java:140)
    at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1759)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:478)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:475)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:410)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:404)
    at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1588)
    at org.eclipse.jface.text.source.SourceViewer.doOperation(SourceViewer.java:773)


and so on (63 lines in all)

Rajendra ORajendra O
Hi,
I am new to Salesforce.com and just downloaded Force IDE but I am facing same problem as Hos and ad75  faced even I am not using flex.
I am also getting same type of error when i am clicking Ctr+Space.
I wonder this message has been viewed more then 26370 times :smileysurprised: but till now no guidance!. Is there any SalesForce associate who can help us ? 
One more thing i would like to ask is does Force.com IDE has auto complete for the Visualforce pages because IDE is showing message like "Unknown tag",
if IDE dosn't have such feature then can we achieve this missing functionlity anyhow.
Thanks
 

JonPJonP
Rajendra,

What version of Eclipse are you using?  Have you installed any plug-ins other than the Force.com IDE and its dependecies?

The editor associated with Visualforce pages currently does not provide content assist for Visualforce tags, but that is definitely on our roadmap.

Jon
Rajendra ORajendra O
Jon,
   I am using eclipse Europa 3.3 (Java) and I am not using any other plug-in.
   It's nice that soon we will be having content assist  editor for the VisualForce Pages.
  GoodLuck
Thanks
JonPJonP
The IDE does not yet support Ctrl+Space code assist in the Apex Code Editor.  In the Winter '09 release, you should no longer see the exception message; instead it will do nothing.  This is high on our roadmap to deliver in a future release.
Boutcher in OmahaBoutcher in Omaha
It's now 2014.. Any update?
Rajakumar GanesanRajakumar Ganesan
Its 2015, any update?
Mustafa GuldoganMustafa Guldogan
and July 2016...
Jayanth ThathapudiJayanth Thathapudi
Its now Jan 2017...Any update?
jpatel@alternajpatel@alterna
how about May 2017....now any update?