I eventually created my own class to hold all needed information. Seemed like the only way out.
I have IConfiguration obtained from a CDT project, how do I keep a copy of it for use after deleting it from project?
-
05-10-2022 - |
質問
I have obtained the Configuration (org.eclipse.cdt.managedbuilder.core.IConfiguration ) from the CDT project using:
IConfiguration[] c = ManagedBuildManager.getBuildInfo(project).getManagedProject().getConfigurations();
Now I want to keep a copy of this in my class and then delete it. After I delete it, I want to use the copy to obtain certain properties from that old configuration.
Now I can't just do,
IConfiguration cBackup = c;
Reason is that, it will be a reference to the old configuration and when deleted it will be lost. I know that I can create a dummy configuration using this configuration, but it will be added to the project [later while exiting class, the created config can be created] but I dont want to do this. So what are my options here??
解決
所属していません StackOverflow