1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 01:15:29 +02:00

Partial fix for bug 63479 -- The binaries for Managed make projects are only listed sometimes.

This commit is contained in:
Sean Evoy 2004-06-24 15:57:06 +00:00
parent 550b35c0c6
commit 0f40577e78
4 changed files with 71 additions and 13 deletions

View file

@ -73,5 +73,13 @@
class="org.eclipse.cdt.managedbuilder.internal.scannerconfig.ManagedBuildPathEntryContainerInitializer"
id="org.eclipse.cdt.managedbuilder.MANAGED_CONTAINER"/>
</extension>
<extension
id="managedMake"
name="%ManagedMakeProject.name"
point="org.eclipse.cdt.core.CProject">
<cproject
natureID="org.eclipse.cdt.managedbuilder.core.managedBuildNature"
class="org.eclipse.cdt.managedbuilder.internal.core.ManagedMakeProject"/>
</extension>
</plugin>

View file

@ -1,13 +1,13 @@
/**********************************************************************
* Copyright (c) 2003 IBM Corporation and others.
/*******************************************************************************
* Copyright (c) 2003, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM - Initial API and implementation
**********************************************************************/
* Contributors:
* IBM - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.core;
import java.io.ByteArrayInputStream;

View file

@ -0,0 +1,52 @@
/**********************************************************************
* Copyright (c) 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM - Initial API and implementation
**********************************************************************/
package org.eclipse.cdt.managedbuilder.internal.core;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.ICDescriptor;
import org.eclipse.cdt.core.ICOwner;
import org.eclipse.core.runtime.CoreException;
/**
* @since 2.0
*/
public class ManagedMakeProject implements ICOwner {
/**
* Zero-argument constructor to fulfill the contract for
* implementation calsses supplied via an extension point
*/
public ManagedMakeProject() {
super();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.ICOwner#configure(org.eclipse.cdt.core.ICDescriptor)
*/
public void configure(ICDescriptor cproject) throws CoreException {
cproject.remove(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID);
cproject.remove(CCorePlugin.BUILDER_MODEL_ID);
cproject.remove(CCorePlugin.BINARY_PARSER_UNIQ_ID);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.core.ICOwner#update(org.eclipse.cdt.core.ICDescriptor, java.lang.String)
*/
public void update(ICDescriptor cproject, String extensionID)
throws CoreException {
// TODO Auto-generated method stub
}
private void updateBinaryParsers(ICDescriptor cproject) throws CoreException {
}
}

View file

@ -19,6 +19,7 @@ import org.eclipse.cdt.managedbuilder.core.BuildException;
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
import org.eclipse.cdt.managedbuilder.core.ITarget;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderHelpContextIds;
import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIMessages;
@ -110,16 +111,11 @@ public class NewManagedProjectWizard extends NewCProjectWizard {
super.doRun(new SubProgressMonitor(monitor, 5));
// Add the managed build nature and builder
ICDescriptor desc = null;
try {
monitor.subTask(ManagedBuilderUIMessages.getResourceString(MSG_ADD_NATURE));
ManagedCProjectNature.addManagedNature(newProject, new SubProgressMonitor(monitor, 1));
monitor.subTask(ManagedBuilderUIMessages.getResourceString(MSG_ADD_BUILDER));
ManagedCProjectNature.addManagedBuilder(newProject, new SubProgressMonitor(monitor, 1));
desc = CCorePlugin.getDefault().getCProjectDescription(newProject, true);
desc.remove(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID);
desc.create(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID, ManagedBuildManager.INTERFACE_IDENTITY);
desc.remove(CCorePlugin.BINARY_PARSER_UNIQ_ID);
} catch (CoreException e) {
ManagedBuilderUIPlugin.log(e);
}
@ -131,8 +127,10 @@ public class NewManagedProjectWizard extends NewCProjectWizard {
ITarget parent = targetConfigurationPage.getSelectedTarget();
newTarget = ManagedBuildManager.createTarget(newProject, parent);
if (newTarget != null) {
ICDescriptor desc = null;
try {
// org.eclipse.cdt.core.ELF or org.eclipse.cdt.core.PE
desc = CCorePlugin.getDefault().getCProjectDescription(newProject, true);
desc.create(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID, ManagedBuildManager.INTERFACE_IDENTITY);
desc.create(CCorePlugin.BINARY_PARSER_UNIQ_ID, newTarget.getBinaryParserId());
} catch (CoreException e) {
ManagedBuilderUIPlugin.log(e);
@ -209,8 +207,8 @@ public class NewManagedProjectWizard extends NewCProjectWizard {
* @see org.eclipse.cdt.ui.wizards.NewCProjectWizard#getProjectID()
*/
public String getProjectID() {
return "org.eclipse.cdt.make.core.make"; //$NON-NLS-1$
// return ManagedBuilderCorePlugin.getUniqueIdentifier() + ".make"; //$NON-NLS-1$
// return "org.eclipse.cdt.make.core.make"; //$NON-NLS-1$
return ManagedBuilderCorePlugin.MANAGED_MAKE_PROJECT_ID;
}
public ITarget getSelectedTarget() {