Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Indexer & context assist problems with templates

Hi,

thanks for the suggestions. I can now turn on this decoration and the settings appear to persist across sessions.

I have a slightly related question. I need to programmatically enable/disable the indexer. The following code works fine (at the moment)...


 		if(enableIndexer()) {
 			// switch indexer on
IndexerPreferences.set(project, IndexerPreferences.KEY_INDEXER_ID, IPDOMManager.ID_FAST_INDEXER);
 		} else {
 			// switch indexer off
IndexerPreferences.set(project, IndexerPreferences.KEY_INDEXER_ID, IPDOMManager.ID_NO_INDEXER);
 		}
 		CCoreInternals.savePreferences(project, true);


... but uses internal packages.

import org.eclipse.cdt.internal.core.CCoreInternals;
import org.eclipse.cdt.internal.core.pdom.indexer.IndexerPreferences;

Is there a more recommended way to do this?


cheers john


Elmenthaler, Jens wrote:
I always use export -> preferences to find out the preference keys and their values. It looks like that all decoractors are collected in one key:

org.eclipse.ui.workbench/ENABLED_DECORATORS=de.tobject.findbugs.decorators.ProjectBugCountDecorator\:false,de.tobject.findbugs.decorators.FolderBugCountDecorator\:false,de.
tobject.findbugs.decorators.FileBugCountDecorator\:false,com.mountainminds.eclemma.ui.coverageDecorator\:false,net.sourceforge.eclipseccase.ui.decorator\:true,org.eclipse.cdt.ui.inde
xedFiles\:true,org.eclipse.dltk.ruby.projectdecorator\:true,org.eclipse.jdt.ui.override.decorator\:true,org.eclipse.jdt.ui.interface.decorator\:false,org.eclipse.mylyn.context.ui.de
corator.interest\:true,org.eclipse.mylyn.tasks.ui.decorators.task\:true,org.eclipse.mylyn.team.ui.changeset.decorator\:true,org.eclipse.pde.ui.binaryProjectDecorator\:false,org.eclip
se.team.cvs.ui.decorator\:true,org.eclipse.ui.LinkedResourceDecorator\:true,org.eclipse.ui.ContentTypeDecorator\:true,

Jens.

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Schorn, Markus
Sent: Friday, March 13, 2009 08:31
To: CDT General developers list.
Subject: RE: [cdt-dev] Indexer & context assist problems with templates

Programmatically you can use:
PlatformUI.getWorkbench().getDecoratorManager().setEnabled("org.eclipse.
cdt.ui.indexedFiles", true);

I don't know how this is persisted by the Platform.

Markus.

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of John MOULE
Sent: Thursday, March 12, 2009 7:02 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] Indexer & context assist problems with templates
Importance: Low

... oh I wasn't aware of this decorator feature - its looks cool. Any idea what the preference ID is called so I can turn it on programmatically please?

cheers john

Schorn, Markus wrote:
Works perfectly for me (using 6.0 HEAD). Chances are that
your project
is not indexed. You can check by enabling the C/C++-Indexed files decorator (Window - Preferences - General - Appearance - Label Decorators). The decorator will show a little green dot on
the indexed
files in the project explorer.

Markus.

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx
[mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Rolando Martins
Sent: Thursday, March 12, 2009 10:46 AM
To: CDT General developers list.
Subject: [cdt-dev] Indexer & context assist problems with templates
Importance: Low

Hi,
I am using CDT:cdt-master-6.0.0-I200903060602 & using
eclipse 3.5M5,
and came across the following problems using templates.
Follows the test example:


#include <stdio.h>

template <typename T>
class A{
public:
	A(){}
	~A(){}
};

template <typename T>
class B:public A<T>{
public:	
	B(){}
	~B(){}

	void doit(){
		printf("B::doit()\n");
	}
};


int main()
{
	B<int> b;
	b.doit();
}



a) When typing "b."  the content assist only shows:
class A
A(void)
class B
B(void)

b) When I try to find usages on b::doit() I get 0 references.

Just want to make sure these are problems, prior to
submitting a bug.
Thanks.
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
--
--    --    --    --    --    --    --    --    --    --    --
john moule
software engineer
stmicroelectronics ltd
1000 aztec west
bristol bs32 4sq
t: 01454 462481
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev

--
--    --    --    --    --    --    --    --    --    --    --
john moule
software engineer
stmicroelectronics ltd
1000 aztec west
bristol bs32 4sq
t: 01454 462481


Back to the top