use of org.eclipse.cdt.core.model.ICProject in project linuxtools by eclipse.
the class RemoteProxyCMainTab method performApply.
@Override
public void performApply(ILaunchConfigurationWorkingCopy config) {
super.performApply(config);
ICProject cProject = this.getCProject();
if (cProject != null && cProject.exists()) {
config.setMappedResources(new IResource[] { cProject.getProject() });
} else {
// the user typed in a non-existent project name. Ensure that
// won't be suppressed from the dialog. This matches JDT behaviour
config.setMappedResources(null);
}
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, fProjText.getText());
if (enableCopyFromExeButton != null) {
config.setAttribute(ATTR_ENABLE_COPY_FROM_EXE, enableCopyFromExeButton.getSelection());
}
if (copyFromExeText != null) {
config.setAttribute(ATTR_COPY_FROM_EXE_NAME, copyFromExeText.getText());
}
if (fProgText != null) {
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, fProgText.getText());
}
if (workingDirText != null) {
config.setAttribute(ATTR_REMOTE_WORKING_DIRECTORY_NAME, workingDirText.getText());
}
if (fCoreText != null) {
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, fCoreText.getText());
}
if (fTerminalButton != null) {
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_USE_TERMINAL, fTerminalButton.getSelection());
}
}
use of org.eclipse.cdt.core.model.ICProject in project linuxtools by eclipse.
the class CProjectHelper method createCCProject.
private static ICProject createCCProject(final String projectName, final String binFolderName) throws CoreException {
final IWorkspace ws = ResourcesPlugin.getWorkspace();
final ICProject[] newProject = new ICProject[1];
ws.run((IWorkspaceRunnable) monitor -> {
ICProject cproject = createCProject2(projectName, binFolderName);
if (!cproject.getProject().hasNature(CCProjectNature.CC_NATURE_ID)) {
addNatureToProject(cproject.getProject(), CCProjectNature.CC_NATURE_ID, null);
}
newProject[0] = cproject;
}, null);
return newProject[0];
}
use of org.eclipse.cdt.core.model.ICProject in project linuxtools by eclipse.
the class AbstractTest method createProjectAndBuild.
protected ICProject createProjectAndBuild(Bundle bundle, String projname) throws CoreException, URISyntaxException, InvocationTargetException, InterruptedException, IOException {
ICProject proj = createProject(bundle, projname);
buildProject(proj);
IBinary[] binaries = null;
do {
Thread.sleep(500);
binaries = proj.getBinaryContainer().getBinaries();
} while (binaries == null || binaries.length < 1);
return proj;
}
Aggregations