Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » RCP Plugin to Access C++ project description
RCP Plugin to Access C++ project description [message #1279238] Fri, 28 March 2014 12:45 Go to next message
Manuel Guesdon is currently offline Manuel GuesdonFriend
Messages: 2
Registered: March 2014
Junior Member
Hello,

I have to develop an RCP Plugin to access or to modify a C++ project description.
I can already do that for a java project (access or modify, differents parameters of the .project file) and i know that they are some similar functions to do this with C++ project.

Here an extract of my plugin:


public Object start(IApplicationContext context) throws Exception {
// TODO Auto-generated method stub
System.out.println("Lancement de mon appli RCP!!\n");

IWorkspace workspace = ResourcesPlugin.getWorkspace();
IWorkspaceRoot root = workspace.getRoot();
IProject[] projects= root.getProjects();
for (IProject project : projects) {
System.out.println(project.getName());
}

IPath projectPath = ResourcesPlugin.getWorkspace().getRoot().findMember("/projetC++").getLocation();
System.out.println("\n"+projectPath+"\n");
ICProjectDescription cPrjDesc =null;
IProject project =projects[1];
System.out.println(project.getName());

cPrjDesc=CoreModel.getDefault().getProjectDescription(project,false);



return null;
}



Here, result after running:



Lancement de mon appli RCP!!

main
projetC++

C:/Users/Manuel/runtime-Plugin.id1/projetC++

projetC++
!SESSION 2014-03-28 11:42:46.869 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_31
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_FR
Framework arguments: -application Plugin.id1
Command-line arguments: -application Plugin.id1 -data C:\Users\Manuel\workspace/../runtime-Plugin.id1 -dev file:C:/Users/Manuel/workspace/.metadata/.plugins/org.eclipse.pde.core/Plugin.id1/dev.properties -os win32 -ws win32 -arch x86 -consoleLog

!ENTRY org.eclipse.cdt.managedbuilder.core 4 0 2014-03-28 11:42:48.338
!MESSAGE Orphaned CDT build configuration [cdt.managedbuild.config.gnu.mingw.exe.debug.170707270]: parent extension cfg [cdt.managedbuild.config.gnu.mingw.exe.debug] not found
!STACK 0
java.lang.Exception
at org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin.error(ManagedBuilderCorePlugin.java:226)
at org.eclipse.cdt.managedbuilder.internal.core.Configuration.loadFromProject(Configuration.java:852)
at org.eclipse.cdt.managedbuilder.internal.core.Configuration.<init>(Configuration.java:400)
at org.eclipse.cdt.managedbuilder.internal.dataprovider.ConfigurationDataProvider.load(ConfigurationDataProvider.java:366)
at org.eclipse.cdt.managedbuilder.internal.dataprovider.ConfigurationDataProvider.loadConfiguration(ConfigurationDataProvider.java:541)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.loadData(CProjectDescriptionManager.java:1115)
at org.eclipse.cdt.internal.core.settings.model.CConfigurationDescriptionCache.loadData(CConfigurationDescriptionCache.java:95)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescription.loadDatas(CProjectDescription.java:196)
at org.eclipse.cdt.internal.core.settings.model.xml.XmlProjectDescriptionStorage.loadProjectDescription(XmlProjectDescriptionStorage.java:486)
at org.eclipse.cdt.internal.core.settings.model.xml.XmlProjectDescriptionStorage.getProjectDescription(XmlProjectDescriptionStorage.java:231)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescriptionInternal(CProjectDescriptionManager.java:416)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:398)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:393)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:386)
at org.eclipse.cdt.core.model.CoreModel.getProjectDescription(CoreModel.java:1423)
at plugin.ApplicationPlugin.start(ApplicationPlugin.java:41)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

!ENTRY org.eclipse.cdt.managedbuilder.core 4 0 2014-03-28 11:42:48.494
!MESSAGE Orphaned CDT build configuration [cdt.managedbuild.config.gnu.mingw.exe.release.506888989]: parent extension cfg [cdt.managedbuild.config.gnu.mingw.exe.release] not found
!STACK 0
java.lang.Exception
at org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin.error(ManagedBuilderCorePlugin.java:226)
at org.eclipse.cdt.managedbuilder.internal.core.Configuration.loadFromProject(Configuration.java:852)
at org.eclipse.cdt.managedbuilder.internal.core.Configuration.<init>(Configuration.java:400)
at org.eclipse.cdt.managedbuilder.internal.dataprovider.ConfigurationDataProvider.load(ConfigurationDataProvider.java:366)
at org.eclipse.cdt.managedbuilder.internal.dataprovider.ConfigurationDataProvider.loadConfiguration(ConfigurationDataProvider.java:541)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.loadData(CProjectDescriptionManager.java:1115)
at org.eclipse.cdt.internal.core.settings.model.CConfigurationDescriptionCache.loadData(CConfigurationDescriptionCache.java:95)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescription.loadDatas(CProjectDescription.java:196)
at org.eclipse.cdt.internal.core.settings.model.xml.XmlProjectDescriptionStorage.loadProjectDescription(XmlProjectDescriptionStorage.java:486)
at org.eclipse.cdt.internal.core.settings.model.xml.XmlProjectDescriptionStorage.getProjectDescription(XmlProjectDescriptionStorage.java:231)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescriptionInternal(CProjectDescriptionManager.java:416)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:398)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:393)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:386)
at org.eclipse.cdt.core.model.CoreModel.getProjectDescription(CoreModel.java:1423)
at plugin.ApplicationPlugin.start(ApplicationPlugin.java:41)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

!ENTRY org.eclipse.core.jobs 4 2 2014-03-28 11:42:48.541
!MESSAGE An internal error occurred during: "Setting up indexer".
!STACK 0
java.lang.NullPointerException
at org.eclipse.cdt.core.model.LanguageManager.cacheAllLanguages(LanguageManager.java:360)
at org.eclipse.cdt.core.model.LanguageManager.getLanguageForContentTypeID(LanguageManager.java:195)
at org.eclipse.cdt.internal.core.pdom.indexer.ProjectIndexerInputAdapter.<init>(ProjectIndexerInputAdapter.java:74)
at org.eclipse.cdt.internal.core.pdom.PDOMManager.getOrCreatePDOM(PDOMManager.java:386)
at org.eclipse.cdt.internal.core.pdom.PDOMManager.createIndexer(PDOMManager.java:554)
at org.eclipse.cdt.internal.core.pdom.PDOMSetupJob.run(PDOMSetupJob.java:58)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)



it works until the last line before the return statement ( cPrjDesc=CoreModel.getDefault().getProjectDescription(project,false); )
and i don't understand what this error does it mean?

i have checked many tutorials and post but i didn't find the reason why this error appears..

Have you got an idea?

thank you in advance Smile

best regards,

Manuel
Re: RCP Plugin to Access C++ project description [message #1279324 is a reply to message #1279238] Fri, 28 March 2014 15:23 Go to previous messageGo to next message
Manuel Guesdon is currently offline Manuel GuesdonFriend
Messages: 2
Registered: March 2014
Junior Member
I have found a like that i will follow and i guess that he will be very usefull.
But a problem persist, i don't understand why this error appears:
=> Orphaned CDT build configuration [cdt.managedbuild.config.gnu.mingw.exe.debug.170707270]: parent extension cfg [cdt.managedbuild.config.gnu.mingw.exe.debug] not found

what does it mean?^^'

Regards,

Manuel
Re: RCP Plugin to Access C++ project description [message #1412511 is a reply to message #1279238] Tue, 26 August 2014 10:31 Go to previous message
aya salama is currently offline aya salamaFriend
Messages: 1
Registered: August 2014
Junior Member
Hi Manuel ,
can you please share what you found out about the issue, i have this same problem and am tiring to get it fixed or find a workaround of some sort .
Thanks
Previous Topic:Does CDT contain cryptographic code?
Next Topic:Eclipse for C on Mac
Goto Forum:
  


Current Time: Thu Oct 03 18:05:48 GMT 2024

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

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

Back to the top