Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Solution of ContentAssist Problem
Solution of ContentAssist Problem [message #331449] Mon, 08 September 2008 10:59 Go to next message
Bhasker  is currently offline Bhasker Friend
Messages: 10
Registered: July 2009
Junior Member
The Problem was:
Problem stmt:
Hi Experts,


Contents Assist does not work in eclipse 3.3 CDT.


1.created a c++ project in Eclipse Europa 3.3 for CDT

2.now added a Header file and without compiling , try to use any method
defined in the header file by typing few characters and then ctrl+space

3.we dont get any option unless you save it once which inturn also
compiles the file.


More information:
There is one option in preference page =>c/c++=>check the checkBox
captioned
"follow unindexed files when producing the outline view".
which is to support content assist without compilation but does not work
accurately with europa.

But, if you follow the same steps with "ECLIPSE Genymade" which uses cdt
5.0
version , this option work properly.


So can anybody tell me how to resolve this.

SOLUTION:
As i have done a work around to resolve the problem , and its working in
my case.
In plugin org.eclipse.cdt.core there is a file TranslationUnit.java.
So just cange some line to a function named

public IASTCompletionNode getCompletionNode(IIndex index, int style, int
offset) throws CoreException
{
ICodeReaderFactory codeReaderFactory;
if (index != null && (style & (ITranslationUnit.AST_SKIP_INDEXED_HEADERS |
ITranslationUnit.AST_SKIP_ALL_HEADERS)) != 0) {
ICodeReaderFactory fallbackFactory;
if ((style & ITranslationUnit.AST_SKIP_ALL_HEADERS) != 0) {
fallbackFactory= SavedCodeReaderFactory.getInstance();
==>the above needs to be added and the below need to be commented
//fallbackFactory= NullCodeReaderFactory.getInstance();
}

Hope it should work,let me know incase of any error you face!!!
Re: Solution of ContentAssist Problem [message #331452 is a reply to message #331449] Mon, 08 September 2008 12:42 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Bhasker wrote:
> The Problem was:
> Problem stmt:
> Hi Experts,
>
>
> Contents Assist does not work in eclipse 3.3 CDT.
I suggest to post this to the eclipse.tools.cdt newsgroup.

Dani
>
>
> 1.created a c++ project in Eclipse Europa 3.3 for CDT
>
> 2.now added a Header file and without compiling , try to use any
> method defined in the header file by typing few characters and then
> ctrl+space
>
> 3.we dont get any option unless you save it once which inturn also
> compiles the file.
>
>
> More information:
> There is one option in preference page =>c/c++=>check the checkBox
> captioned
> "follow unindexed files when producing the outline view".
> which is to support content assist without compilation but does not
> work accurately with europa.
>
> But, if you follow the same steps with "ECLIPSE Genymade" which uses
> cdt 5.0
> version , this option work properly.
>
>
> So can anybody tell me how to resolve this.
>
> SOLUTION:
> As i have done a work around to resolve the problem , and its working
> in my case.
> In plugin org.eclipse.cdt.core there is a file TranslationUnit.java.
> So just cange some line to a function named
>
> public IASTCompletionNode getCompletionNode(IIndex index, int style,
> int offset) throws CoreException {
> ICodeReaderFactory codeReaderFactory;
> if (index != null && (style &
> (ITranslationUnit.AST_SKIP_INDEXED_HEADERS |
> ITranslationUnit.AST_SKIP_ALL_HEADERS)) != 0) {
> ICodeReaderFactory fallbackFactory;
> if ((style & ITranslationUnit.AST_SKIP_ALL_HEADERS) != 0) {
> fallbackFactory= SavedCodeReaderFactory.getInstance();
> ==>the above needs to be added and the below need to be commented
> //fallbackFactory= NullCodeReaderFactory.getInstance();
> }
> Hope it should work,let me know incase of any error you face!!!
Previous Topic:Plug-in Beginner
Next Topic:CompletionProposal final?
Goto Forum:
  


Current Time: Thu Jul 25 23:29:37 GMT 2024

Powered by FUDForum. Page generated in 0.03572 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top