diff --git a/build/org.eclipse.cdt.managedbuilder.core/.classpath b/build/org.eclipse.cdt.managedbuilder.core/.classpath new file mode 100644 index 00000000000..31ac46f26ac --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.core/.classpath @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/build/org.eclipse.cdt.managedbuilder.core/.cvsignore b/build/org.eclipse.cdt.managedbuilder.core/.cvsignore new file mode 100644 index 00000000000..ba077a4031a --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.core/.cvsignore @@ -0,0 +1 @@ +bin diff --git a/build/org.eclipse.cdt.managedbuilder.core/.project b/build/org.eclipse.cdt.managedbuilder.core/.project new file mode 100644 index 00000000000..fe252f677b2 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.core/.project @@ -0,0 +1,37 @@ + + + org.eclipse.cdt.managedbuilder.core + + + org.apache.xerces + org.eclipse.cdt.core + org.eclipse.cdt.core.linux + org.eclipse.cdt.core.qnx + org.eclipse.cdt.core.solaris + org.eclipse.cdt.core.win32 + org.eclipse.core.boot + org.eclipse.core.resources + org.eclipse.core.runtime + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/build/org.eclipse.cdt.managedbuilder.core/ChangeLog b/build/org.eclipse.cdt.managedbuilder.core/ChangeLog new file mode 100644 index 00000000000..e03ee82d96b --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.core/ChangeLog @@ -0,0 +1,10 @@ +2003-09-15 Sean Evoy + First submission of code to new project. Moved the managed builder + source code out of the cdt.core project. This includes the code to + implement the build model, along with the shema and extension point + declaration. Moved the builder, scnanaer info provider and managed + nature definitions into the package as well. + + There are 2 new classes to handle the externalized strings: + * src/org/eclipse/cdt/managedbuilder/core/ManagedBuilderCorePlugin.java + * src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties \ No newline at end of file diff --git a/build/org.eclipse.cdt.managedbuilder.core/about.html b/build/org.eclipse.cdt.managedbuilder.core/about.html new file mode 100644 index 00000000000..8c828de2ada --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.core/about.html @@ -0,0 +1,30 @@ + + + +About + + + +

About This Content

+ +

10th July, 2002

+

License

+

Eclipse.org makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the +Common Public License Version 1.0 ("CPL"). A copy of the CPL is available at http://www.eclipse.org/legal/cpl-v10.html. +For purposes of the CPL, "Program" will mean the Content.

+ +

Contributions

+ +

If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise +made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such +Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.

+ +

If this Content is licensed to you under license terms and conditions other than the CPL ("Other License"), any modifications, enhancements and/or +other code and/or documentation ("Modifications") uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the +host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available +to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also +providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of +the CPL.

+ + + \ No newline at end of file diff --git a/build/org.eclipse.cdt.managedbuilder.core/build.properties b/build/org.eclipse.cdt.managedbuilder.core/build.properties new file mode 100644 index 00000000000..16f386ca452 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.core/build.properties @@ -0,0 +1 @@ +source.New\ Library = src/ diff --git a/build/org.eclipse.cdt.managedbuilder.core/plugin.properties b/build/org.eclipse.cdt.managedbuilder.core/plugin.properties new file mode 100644 index 00000000000..4790b7ca75d --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.core/plugin.properties @@ -0,0 +1,2 @@ +pluginName=C/C++ Managed Builder Core +providerName=Eclipse.org \ No newline at end of file diff --git a/build/org.eclipse.cdt.managedbuilder.core/plugin.xml b/build/org.eclipse.cdt.managedbuilder.core/plugin.xml new file mode 100644 index 00000000000..a6f8dd79219 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.core/plugin.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/org.eclipse.cdt.core/schema/ManagedBuildTools.exsd b/build/org.eclipse.cdt.managedbuilder.core/schema/ManagedBuildTools.exsd similarity index 100% rename from core/org.eclipse.cdt.core/schema/ManagedBuildTools.exsd rename to build/org.eclipse.cdt.managedbuilder.core/schema/ManagedBuildTools.exsd diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/BuildException.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/BuildException.java new file mode 100644 index 00000000000..98f8506d1cf --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/BuildException.java @@ -0,0 +1,19 @@ +/********************************************************************** + * Copyright (c) 2003 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.core; + +public class BuildException extends Exception { + + public BuildException(String msg) { + super(msg); + } + +} diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IBuildObject.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IBuildObject.java similarity index 93% rename from core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IBuildObject.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IBuildObject.java index 2529da7ec8b..96c0cd1bcf2 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IBuildObject.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IBuildObject.java @@ -8,7 +8,7 @@ * Contributors: * IBM - Initial API and implementation **********************************************************************/ -package org.eclipse.cdt.core.build.managed; +package org.eclipse.cdt.managedbuilder.core; public interface IBuildObject { // Schema element names diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IConfiguration.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IConfiguration.java similarity index 97% rename from core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IConfiguration.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IConfiguration.java index f61c9143137..24478ebd8e9 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IConfiguration.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IConfiguration.java @@ -8,7 +8,7 @@ * Contributors: * IBM - Initial API and implementation **********************************************************************/ -package org.eclipse.cdt.core.build.managed; +package org.eclipse.cdt.managedbuilder.core; import org.eclipse.core.resources.IResource; diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IManagedBuildInfo.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java similarity index 99% rename from core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IManagedBuildInfo.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java index c60e45474e1..cc0e747f272 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IManagedBuildInfo.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.core.build.managed; +package org.eclipse.cdt.managedbuilder.core; import java.util.List; diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IOption.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IOption.java similarity index 99% rename from core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IOption.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IOption.java index 496a2ace23f..3f47f4b83f7 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IOption.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IOption.java @@ -8,7 +8,7 @@ * Contributors: * IBM - Initial API and implementation **********************************************************************/ -package org.eclipse.cdt.core.build.managed; +package org.eclipse.cdt.managedbuilder.core; /** * diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IOptionCategory.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IOptionCategory.java similarity index 96% rename from core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IOptionCategory.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IOptionCategory.java index e0b5a7bfcf6..5067a92de36 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IOptionCategory.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IOptionCategory.java @@ -8,7 +8,7 @@ * Contributors: * IBM - Initial API and implementation **********************************************************************/ -package org.eclipse.cdt.core.build.managed; +package org.eclipse.cdt.managedbuilder.core; /** * diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/ITarget.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ITarget.java similarity index 98% rename from core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/ITarget.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ITarget.java index d22f5a56109..3440e2ad9ef 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/ITarget.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ITarget.java @@ -8,7 +8,7 @@ * Contributors: * IBM - Initial API and implementation **********************************************************************/ -package org.eclipse.cdt.core.build.managed; +package org.eclipse.cdt.managedbuilder.core; import org.eclipse.core.resources.IResource; diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/ITool.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ITool.java similarity index 98% rename from core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/ITool.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ITool.java index 85f0be6c3d6..f6bc93031cc 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/ITool.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ITool.java @@ -8,7 +8,7 @@ * Contributors: * IBM - Initial API and implementation **********************************************************************/ -package org.eclipse.cdt.core.build.managed; +package org.eclipse.cdt.managedbuilder.core; /** * diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/ManagedBuildManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java similarity index 95% rename from core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/ManagedBuildManager.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java index c99e26dde34..14c74c84ec1 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/ManagedBuildManager.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java @@ -8,7 +8,7 @@ * Contributors: * IBM - Initial API and implementation **********************************************************************/ -package org.eclipse.cdt.core.build.managed; +package org.eclipse.cdt.managedbuilder.core; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -29,11 +29,10 @@ import org.apache.xml.serialize.OutputFormat; import org.apache.xml.serialize.Serializer; import org.apache.xml.serialize.SerializerFactory; import org.eclipse.cdt.core.AbstractCExtension; -import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.parser.*; -import org.eclipse.cdt.internal.core.build.managed.Configuration; -import org.eclipse.cdt.internal.core.build.managed.ManagedBuildInfo; -import org.eclipse.cdt.internal.core.build.managed.Target; +import org.eclipse.cdt.managedbuilder.internal.core.Configuration; +import org.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInfo; +import org.eclipse.cdt.managedbuilder.internal.core.Target; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; @@ -52,11 +51,11 @@ import org.w3c.dom.Node; */ public class ManagedBuildManager extends AbstractCExtension implements IScannerInfoProvider { - private static final QualifiedName buildInfoProperty = new QualifiedName(CCorePlugin.PLUGIN_ID, "managedBuildInfo"); + private static final QualifiedName buildInfoProperty = new QualifiedName(ManagedBuilderCorePlugin.getUniqueIdentifier(), "managedBuildInfo"); private static final String ROOT_ELEM_NAME = "ManagedProjectBuildInfo"; //$NON-NLS-1$ private static final String FILE_NAME = ".cdtbuild"; //$NON-NLS-1$ private static final ITarget[] emptyTargets = new ITarget[0]; - public static final String INTERFACE_IDENTITY = CCorePlugin.PLUGIN_ID + "." + "ManagedBuildManager"; //$NON-NLS-1$ + public static final String INTERFACE_IDENTITY = ManagedBuilderCorePlugin.getUniqueIdentifier() + "." + "ManagedBuildManager"; //$NON-NLS-1$ public static final String EXTENSION_POINT_ID = "ManagedBuildInfo"; //$NON-NLS-1$ // Targets defined by extensions (i.e., not associated with a resource) @@ -83,8 +82,9 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI // To Do // Create the array and copy the elements over - int size = extensionTargets.size() - + (definedTargets != null ? definedTargets.size() : 0); + int size = extensionTargets != null ? + extensionTargets.size() + (definedTargets != null ? definedTargets.size() : 0) : + 0; ITarget[] targets = new ITarget[size]; @@ -340,7 +340,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI ITarget parentTarget = parentConfig.getTarget(); // Get the extension point information - IExtensionPoint extensionPoint = CCorePlugin.getDefault().getDescriptor().getExtensionPoint(EXTENSION_POINT_ID); + IExtensionPoint extensionPoint = ManagedBuilderCorePlugin.getDefault().getDescriptor().getExtensionPoint(EXTENSION_POINT_ID); IExtension[] extensions = extensionPoint.getExtensions(); for (int i = 0; i < extensions.length; ++i) { IExtension extension = extensions[i]; @@ -402,7 +402,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI return; extensionTargetsLoaded = true; - IExtensionPoint extensionPoint = CCorePlugin.getDefault().getDescriptor().getExtensionPoint(EXTENSION_POINT_ID); + IExtensionPoint extensionPoint = ManagedBuilderCorePlugin.getDefault().getDescriptor().getExtensionPoint(EXTENSION_POINT_ID); IExtension[] extensions = extensionPoint.getExtensions(); for (int i = 0; i < extensions.length; ++i) { IExtension extension = extensions[i]; diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuilderCorePlugin.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuilderCorePlugin.java new file mode 100644 index 00000000000..a671aea8511 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuilderCorePlugin.java @@ -0,0 +1,80 @@ +package org.eclipse.cdt.managedbuilder.core; + +/********************************************************************** + * Copyright (c) 2002,2003 Rational Software Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v0.5 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v05.html + * + * Contributors: + * IBM Rational Software - Initial API and implementation + * **********************************************************************/ + +import java.text.MessageFormat; +import java.util.MissingResourceException; +import java.util.ResourceBundle; + +import org.eclipse.core.runtime.IPluginDescriptor; +import org.eclipse.core.runtime.Plugin; + + +public class ManagedBuilderCorePlugin extends Plugin { + //The shared instance. + private static ManagedBuilderCorePlugin plugin; + //Resource bundle. + private static ResourceBundle resourceBundle; + + /** + * @param descriptor + */ + public ManagedBuilderCorePlugin(IPluginDescriptor descriptor) { + super(descriptor); + plugin = this; + try { + resourceBundle = ResourceBundle.getBundle("org.eclipse.cdt.managedbuilder.internal.core.PluginResources"); //$NON-NLS-1$ + } catch (MissingResourceException x) { + resourceBundle = null; + } + } + + /** + * Returns the shared instance. + */ + public static ManagedBuilderCorePlugin getDefault() { + return plugin; + } + + + public static String getResourceString(String key) { + try { + return resourceBundle.getString(key); + } catch (MissingResourceException e) { + return "!" + key + "!"; + } catch (NullPointerException e) { + return "#" + key + "#"; + } + } + + public static String getFormattedString(String key, String arg) { + return MessageFormat.format(getResourceString(key), new String[] { arg }); + } + + public static String getFormattedString(String key, String[] args) { + return MessageFormat.format(getResourceString(key), args); + } + + /** + * Convenience method which returns the unique identifier of this plugin. + */ + public static String getUniqueIdentifier() { + if (getDefault() == null) { + // If the default instance is not yet initialized, + // return a static identifier. This identifier must + // match the plugin id defined in plugin.xml + return "org.eclipse.cdt.managedbuilder.core"; //$NON-NLS-1$ + } + return getDefault().getDescriptor().getUniqueIdentifier(); + } + +} diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ManagedCProjectNature.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedCProjectNature.java similarity index 94% rename from core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ManagedCProjectNature.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedCProjectNature.java index cf77ba2800d..235167976e8 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ManagedCProjectNature.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedCProjectNature.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.core; +package org.eclipse.cdt.managedbuilder.core; /********************************************************************** * Copyright (c) 2002,2003 Rational Software Corporation and others. @@ -26,9 +26,9 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Plugin; public class ManagedCProjectNature implements IProjectNature { - public static final String BUILDER_NAME= "genmakebuilder"; - public static final String BUILDER_ID= CCorePlugin.PLUGIN_ID + "." + BUILDER_NAME; - private static final String MNG_NATURE_ID = CCorePlugin.PLUGIN_ID + ".managedBuildNature"; + public static final String BUILDER_NAME = "genmakebuilder"; + public static final String BUILDER_ID = ManagedBuilderCorePlugin.getUniqueIdentifier() + "." + BUILDER_NAME; + private static final String MNG_NATURE_ID = ManagedBuilderCorePlugin.getUniqueIdentifier() + ".managedBuildNature"; private IProject project; /** @@ -109,7 +109,7 @@ public class ManagedCProjectNature implements IProjectNature { * Get the correct builderID */ public static String getBuilderID() { - Plugin plugin = (Plugin)CCorePlugin.getDefault(); + Plugin plugin = (Plugin)ManagedBuilderCorePlugin.getDefault(); IPluginDescriptor descriptor = plugin.getDescriptor(); if (descriptor.getExtension(BUILDER_NAME) != null) { return descriptor.getUniqueIdentifier() + "." + BUILDER_NAME; diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/BuildObject.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BuildObject.java similarity index 52% rename from core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/BuildObject.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BuildObject.java index 97c8f9a0c9f..482e691ebd5 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/BuildObject.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/BuildObject.java @@ -1,19 +1,18 @@ -/* - * Created on Apr 9, 2003 - * - * To change the template for this generated file go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -package org.eclipse.cdt.internal.core.build.managed; +package org.eclipse.cdt.managedbuilder.internal.core; -import org.eclipse.cdt.core.build.managed.IBuildObject; +/********************************************************************** + * Copyright (c) 2003 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 + **********************************************************************/ + +import org.eclipse.cdt.managedbuilder.core.IBuildObject; -/** - * @author dschaefe - * - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ public class BuildObject implements IBuildObject { protected String id; diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Configuration.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java similarity index 96% rename from core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Configuration.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java index a4ce7cccb18..4de1b3afa7e 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Configuration.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java @@ -8,17 +8,17 @@ * Contributors: * IBM - Initial API and implementation **********************************************************************/ -package org.eclipse.cdt.internal.core.build.managed; +package org.eclipse.cdt.managedbuilder.internal.core; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.eclipse.cdt.core.build.managed.BuildException; -import org.eclipse.cdt.core.build.managed.IConfiguration; -import org.eclipse.cdt.core.build.managed.IOption; -import org.eclipse.cdt.core.build.managed.ITarget; -import org.eclipse.cdt.core.build.managed.ITool; +import org.eclipse.cdt.managedbuilder.core.BuildException; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IOption; +import org.eclipse.cdt.managedbuilder.core.ITarget; +import org.eclipse.cdt.managedbuilder.core.ITool; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IConfigurationElement; import org.w3c.dom.Document; diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/GeneratedMakefileBuilder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java similarity index 93% rename from core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/GeneratedMakefileBuilder.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java index efa4accea72..ddf014c0f86 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/GeneratedMakefileBuilder.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.internal.core; +package org.eclipse.cdt.managedbuilder.internal.core; /********************************************************************** * Copyright (c) 2002,2003 Rational Software Corporation and others. @@ -24,8 +24,9 @@ import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.CommandLauncher; import org.eclipse.cdt.core.ConsoleOutputStream; import org.eclipse.cdt.core.ErrorParserManager; -import org.eclipse.cdt.core.build.managed.IManagedBuildInfo; -import org.eclipse.cdt.core.build.managed.ManagedBuildManager; +import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo; +import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; +import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin; import org.eclipse.cdt.core.model.ICModelMarker; import org.eclipse.cdt.core.resources.ACBuilder; import org.eclipse.cdt.core.resources.IConsole; @@ -93,7 +94,7 @@ public class GeneratedMakefileBuilder extends ACBuilder { * @see org.eclipse.core.internal.events.InternalBuilder#build(int, java.util.Map, org.eclipse.core.runtime.IProgressMonitor) */ protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException { - String statusMsg = CCorePlugin.getFormattedString(START, getProject().getName()); + String statusMsg = ManagedBuilderCorePlugin.getFormattedString(START, getProject().getName()); if (statusMsg != null) { monitor.subTask(statusMsg); } @@ -170,7 +171,7 @@ public class GeneratedMakefileBuilder extends ACBuilder { } // Need to report status to the user - String statusMsg = CCorePlugin.getFormattedString(REBUILD, currentProject.getName()); + String statusMsg = ManagedBuilderCorePlugin.getFormattedString(REBUILD, currentProject.getName()); monitor.subTask(statusMsg); // Regenerate the makefiles for this project @@ -256,7 +257,7 @@ public class GeneratedMakefileBuilder extends ACBuilder { if (monitor == null) { monitor = new NullProgressMonitor(); } - statusMsg = CCorePlugin.getFormattedString(INCREMENTAL, currentProject.getName()); + statusMsg = ManagedBuilderCorePlugin.getFormattedString(INCREMENTAL, currentProject.getName()); monitor.subTask(statusMsg); // Ask the makefile generator to generate any makefiles needed to build delta @@ -296,7 +297,7 @@ public class GeneratedMakefileBuilder extends ACBuilder { String[] msgs = new String[2]; msgs[0] = info.getMakeCommand(); msgs[1] = currentProject.getName(); - String statusMsg = CCorePlugin.getFormattedString(MAKE, msgs); + String statusMsg = ManagedBuilderCorePlugin.getFormattedString(MAKE, msgs); if (statusMsg != null) { monitor.subTask(statusMsg); } @@ -384,14 +385,14 @@ public class GeneratedMakefileBuilder extends ACBuilder { // Report either the success or failure of our mission StringBuffer buf = new StringBuffer(); if (errMsg != null && errMsg.length() > 0) { - String errorDesc = CCorePlugin.getResourceString(BUILD_ERROR); + String errorDesc = ManagedBuilderCorePlugin.getResourceString(BUILD_ERROR); buf.append(errorDesc); buf.append(System.getProperty("line.separator", "\n")); buf.append("(").append(errMsg).append(")"); } else { // Report a successful build - String successMsg = CCorePlugin.getFormattedString(BUILD_FINISHED, currentProject.getName()); + String successMsg = ManagedBuilderCorePlugin.getFormattedString(BUILD_FINISHED, currentProject.getName()); buf.append(successMsg); buf.append(System.getProperty("line.separator", "\n")); } diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/MakefileGenerator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java similarity index 95% rename from core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/MakefileGenerator.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java index 74269e995d6..2d4c75d3fd7 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/MakefileGenerator.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.internal.core; +package org.eclipse.cdt.managedbuilder.internal.core; /********************************************************************** * Copyright (c) 2002,2003 Rational Software Corporation and others. @@ -17,9 +17,10 @@ import java.util.Iterator; import java.util.List; import java.util.ListIterator; +import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo; +import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; +import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin; import org.eclipse.cdt.core.CCorePlugin; -import org.eclipse.cdt.core.build.managed.IManagedBuildInfo; -import org.eclipse.cdt.core.build.managed.ManagedBuildManager; import org.eclipse.cdt.core.search.ICSearchConstants; import org.eclipse.cdt.internal.core.model.Util; import org.eclipse.cdt.internal.core.sourcedependency.DependencyManager; @@ -220,7 +221,7 @@ public class MakefileGenerator { // Create the buffer to hold the output for the module and a dep calculator StringBuffer buffer = new StringBuffer(); - buffer.append(CCorePlugin.getResourceString(AUTO_DEP) + NEWLINE); + buffer.append(ManagedBuilderCorePlugin.getResourceString(AUTO_DEP) + NEWLINE); DependencyManager dependencyManager = CCorePlugin.getDefault().getCoreModel().getDependencyManager(); /* @@ -278,7 +279,7 @@ public class MakefileGenerator { buffer.append("RM := "); buffer.append(info.getCleanCommand() + NEWLINE + NEWLINE); - buffer.append(CCorePlugin.getResourceString(SRC_LISTS) + NEWLINE); + buffer.append(ManagedBuilderCorePlugin.getResourceString(SRC_LISTS) + NEWLINE); buffer.append("C_SRCS := " + NEWLINE); buffer.append("CC_SRCS := " + NEWLINE + NEWLINE); @@ -294,7 +295,7 @@ public class MakefileGenerator { protected StringBuffer addModules() { StringBuffer buffer = new StringBuffer(); // Add the comment - buffer.append(CCorePlugin.getResourceString(MOD_LIST) + NEWLINE); + buffer.append(ManagedBuilderCorePlugin.getResourceString(MOD_LIST) + NEWLINE); buffer.append("MODULES := " + LINEBREAK + NEWLINE); // Get all the module names @@ -312,7 +313,7 @@ public class MakefileGenerator { // Now add the makefile instruction to include all the subdirectory makefile fragments buffer.append(NEWLINE); - buffer.append(CCorePlugin.getResourceString(MOD_INCL) + NEWLINE); + buffer.append(ManagedBuilderCorePlugin.getResourceString(MOD_INCL) + NEWLINE); buffer.append("include ${patsubst %, %/module.mk, $(MODULES)}" + NEWLINE); buffer.append(NEWLINE + NEWLINE); @@ -338,10 +339,10 @@ public class MakefileGenerator { cBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE); StringBuffer ccBuffer = new StringBuffer("CC_SRCS += \\" + NEWLINE); ccBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE); - StringBuffer ruleBuffer = new StringBuffer(CCorePlugin.getResourceString(MOD_RULES) + NEWLINE); + StringBuffer ruleBuffer = new StringBuffer(ManagedBuilderCorePlugin.getResourceString(MOD_RULES) + NEWLINE); // Put the comment in - buffer.append(CCorePlugin.getResourceString(SRC_LISTS) + NEWLINE); + buffer.append(ManagedBuilderCorePlugin.getResourceString(SRC_LISTS) + NEWLINE); // Visit the resources in this folder IResource[] resources = module.members(); @@ -429,7 +430,7 @@ public class MakefileGenerator { buffer.append(TAB + "$(RM)" + WHITESPACE + "${addprefix ., $(CC_SRCS:$(ROOT)%.cpp=%.o)} ${addprefix ., $(C_SRCS:$(ROOT)%.c=%.o)}" + WHITESPACE + outputPrefix + target + NEWLINE); buffer.append(NEWLINE); - buffer.append(NEWLINE + CCorePlugin.getResourceString(DEP_INCL) + NEWLINE); + buffer.append(NEWLINE + ManagedBuilderCorePlugin.getResourceString(DEP_INCL) + NEWLINE); buffer.append("include ${patsubst %, %/module.dep, $(MODULES)}" + NEWLINE); buffer.append(NEWLINE); @@ -550,7 +551,7 @@ public class MakefileGenerator { // There may be nothing to regenerate and no content changes that require a rebuild if (getModifiedList().isEmpty() && !shouldRunBuild()) { // There is nothing to build - IStatus status = new Status(IStatus.INFO, CCorePlugin.PLUGIN_ID, GeneratedMakefileBuilder.EMPTY_PROJECT_BUILD_ERROR, "", null); + IStatus status = new Status(IStatus.INFO, ManagedBuilderCorePlugin.getUniqueIdentifier(), GeneratedMakefileBuilder.EMPTY_PROJECT_BUILD_ERROR, "", null); throw new CoreException(status); } @@ -562,7 +563,7 @@ public class MakefileGenerator { project.accept(resourceVisitor, IResource.NONE); if (getSubdirList().isEmpty()) { // There is nothing to build (but we should never throw this exception) - IStatus status = new Status(IStatus.INFO, CCorePlugin.PLUGIN_ID, GeneratedMakefileBuilder.EMPTY_PROJECT_BUILD_ERROR, "", null); + IStatus status = new Status(IStatus.INFO, ManagedBuilderCorePlugin.getUniqueIdentifier(), GeneratedMakefileBuilder.EMPTY_PROJECT_BUILD_ERROR, "", null); throw new CoreException(status); } checkCancel(); @@ -788,7 +789,7 @@ public class MakefileGenerator { project.accept(visitor, IResource.NONE); if (getSubdirList().isEmpty()) { // There is nothing to build - IStatus status = new Status(IStatus.INFO, CCorePlugin.PLUGIN_ID, GeneratedMakefileBuilder.EMPTY_PROJECT_BUILD_ERROR, "", null); + IStatus status = new Status(IStatus.INFO, ManagedBuilderCorePlugin.getUniqueIdentifier(), GeneratedMakefileBuilder.EMPTY_PROJECT_BUILD_ERROR, "", null); throw new CoreException(status); } diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/ManagedBuildInfo.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java similarity index 97% rename from core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/ManagedBuildInfo.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java index 382a65e3c62..1409dc09cba 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/ManagedBuildInfo.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.internal.core.build.managed; +package org.eclipse.cdt.managedbuilder.internal.core; /********************************************************************** * Copyright (c) 2002,2003 Rational Software Corporation and others. @@ -19,12 +19,12 @@ import java.util.List; import java.util.ListIterator; import java.util.Map; -import org.eclipse.cdt.core.build.managed.BuildException; -import org.eclipse.cdt.core.build.managed.IConfiguration; -import org.eclipse.cdt.core.build.managed.IManagedBuildInfo; -import org.eclipse.cdt.core.build.managed.IOption; -import org.eclipse.cdt.core.build.managed.ITarget; -import org.eclipse.cdt.core.build.managed.ITool; +import org.eclipse.cdt.managedbuilder.core.BuildException; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo; +import org.eclipse.cdt.managedbuilder.core.IOption; +import org.eclipse.cdt.managedbuilder.core.ITarget; +import org.eclipse.cdt.managedbuilder.core.ITool; import org.eclipse.cdt.core.parser.IScannerInfo; import org.eclipse.core.resources.IResource; import org.w3c.dom.Document; diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Option.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java similarity index 96% rename from core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Option.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java index c0fa51a4c99..30e2f17e431 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Option.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java @@ -8,18 +8,18 @@ * Contributors: * IBM - Initial API and implementation **********************************************************************/ -package org.eclipse.cdt.internal.core.build.managed; +package org.eclipse.cdt.managedbuilder.internal.core; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.eclipse.cdt.core.build.managed.BuildException; -import org.eclipse.cdt.core.build.managed.IConfiguration; -import org.eclipse.cdt.core.build.managed.IOption; -import org.eclipse.cdt.core.build.managed.IOptionCategory; -import org.eclipse.cdt.core.build.managed.ITool; +import org.eclipse.cdt.managedbuilder.core.BuildException; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IOption; +import org.eclipse.cdt.managedbuilder.core.IOptionCategory; +import org.eclipse.cdt.managedbuilder.core.ITool; import org.eclipse.core.runtime.IConfigurationElement; /** diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/OptionCategory.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionCategory.java similarity index 92% rename from core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/OptionCategory.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionCategory.java index e8e6ec6e8a8..11ad290022b 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/OptionCategory.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionCategory.java @@ -8,15 +8,15 @@ * Contributors: * IBM - Initial API and implementation **********************************************************************/ -package org.eclipse.cdt.internal.core.build.managed; +package org.eclipse.cdt.managedbuilder.internal.core; import java.util.ArrayList; import java.util.List; -import org.eclipse.cdt.core.build.managed.IConfiguration; -import org.eclipse.cdt.core.build.managed.IOption; -import org.eclipse.cdt.core.build.managed.IOptionCategory; -import org.eclipse.cdt.core.build.managed.ITool; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IOption; +import org.eclipse.cdt.managedbuilder.core.IOptionCategory; +import org.eclipse.cdt.managedbuilder.core.ITool; import org.eclipse.core.runtime.IConfigurationElement; /** diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/OptionReference.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java similarity index 97% rename from core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/OptionReference.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java index e52d5e829d2..269812c5832 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/OptionReference.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java @@ -8,17 +8,17 @@ * Contributors: * IBM - Initial API and implementation **********************************************************************/ -package org.eclipse.cdt.internal.core.build.managed; +package org.eclipse.cdt.managedbuilder.internal.core; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.ListIterator; -import org.eclipse.cdt.core.build.managed.BuildException; -import org.eclipse.cdt.core.build.managed.IOption; -import org.eclipse.cdt.core.build.managed.IOptionCategory; -import org.eclipse.cdt.core.build.managed.ITool; +import org.eclipse.cdt.managedbuilder.core.BuildException; +import org.eclipse.cdt.managedbuilder.core.IOption; +import org.eclipse.cdt.managedbuilder.core.IOptionCategory; +import org.eclipse.cdt.managedbuilder.core.ITool; import org.eclipse.core.runtime.IConfigurationElement; import org.w3c.dom.Document; import org.w3c.dom.Element; diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties new file mode 100644 index 00000000000..2cdf0e150ab --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties @@ -0,0 +1,24 @@ +########################################################################## +# Copyright (c) 2002,2003 Rational Software Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Common Public License v0.5 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/cpl-v05.html +# +# Contributors: +# IBM Rational Software - Initial API and implementation +########################################################################## + +# Generated makefile builder messages +MakeBuilder.message.starting = Starting the build for project {0} +MakeBuilder.message.rebuild = Regenerating makefiles for project {0} +MakeBuilder.message.incremental = Updating makefiles for project {0} +MakeBuilder.message.make = Calling {0} for project {1} +MakeBuilder.message.error = Build error +MakeBuilder.message.finished = Build complete for project {0} +MakeBuilder.comment.module.list = # Every subdirectory with source files must be described here +MakeBuilder.comment.source.list = # Each subdirectory must contribute its source files here +MakeBuilder.comment.build.rule = # Each subdirectory must supply rules for building sources it contributes +MakeBuilder.comment.module.make.includes = # Include the makefiles for each source subdirectory +MakeBuilder.comment.module.dep.includes = # Include automatically-generated dependency list: +MakeBuilder.comment.autodeps = # Automatically-generated dependency list: diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Target.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Target.java similarity index 96% rename from core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Target.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Target.java index 520242ef36a..7f660fcffdc 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Target.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Target.java @@ -8,18 +8,18 @@ * Contributors: * IBM - Initial API and implementation **********************************************************************/ -package org.eclipse.cdt.internal.core.build.managed; +package org.eclipse.cdt.managedbuilder.internal.core; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.eclipse.cdt.core.build.managed.IConfiguration; -import org.eclipse.cdt.core.build.managed.IManagedBuildInfo; -import org.eclipse.cdt.core.build.managed.ITarget; -import org.eclipse.cdt.core.build.managed.ITool; -import org.eclipse.cdt.core.build.managed.ManagedBuildManager; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo; +import org.eclipse.cdt.managedbuilder.core.ITarget; +import org.eclipse.cdt.managedbuilder.core.ITool; +import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IConfigurationElement; import org.w3c.dom.Document; diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Tool.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java similarity index 96% rename from core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Tool.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java index 3ed5bf404c9..59e09f12b6d 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Tool.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java @@ -8,7 +8,7 @@ * Contributors: * IBM - Initial API and implementation **********************************************************************/ -package org.eclipse.cdt.internal.core.build.managed; +package org.eclipse.cdt.managedbuilder.internal.core; import java.util.ArrayList; import java.util.HashMap; @@ -17,12 +17,12 @@ import java.util.ListIterator; import java.util.Map; import java.util.StringTokenizer; -import org.eclipse.cdt.core.build.managed.BuildException; -import org.eclipse.cdt.core.build.managed.IConfiguration; -import org.eclipse.cdt.core.build.managed.IOption; -import org.eclipse.cdt.core.build.managed.IOptionCategory; -import org.eclipse.cdt.core.build.managed.ITarget; -import org.eclipse.cdt.core.build.managed.ITool; +import org.eclipse.cdt.managedbuilder.core.BuildException; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IOption; +import org.eclipse.cdt.managedbuilder.core.IOptionCategory; +import org.eclipse.cdt.managedbuilder.core.ITarget; +import org.eclipse.cdt.managedbuilder.core.ITool; import org.eclipse.core.runtime.IConfigurationElement; /** diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/ToolReference.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java similarity index 95% rename from core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/ToolReference.java rename to build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java index a670db24dc6..bd230450dbf 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/ToolReference.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java @@ -8,18 +8,18 @@ * Contributors: * IBM - Initial API and implementation **********************************************************************/ -package org.eclipse.cdt.internal.core.build.managed; +package org.eclipse.cdt.managedbuilder.internal.core; import java.util.ArrayList; import java.util.List; import java.util.Map; -import org.eclipse.cdt.core.build.managed.BuildException; -import org.eclipse.cdt.core.build.managed.IConfiguration; -import org.eclipse.cdt.core.build.managed.IOption; -import org.eclipse.cdt.core.build.managed.IOptionCategory; -import org.eclipse.cdt.core.build.managed.ITarget; -import org.eclipse.cdt.core.build.managed.ITool; +import org.eclipse.cdt.managedbuilder.core.BuildException; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IOption; +import org.eclipse.cdt.managedbuilder.core.IOptionCategory; +import org.eclipse.cdt.managedbuilder.core.ITarget; +import org.eclipse.cdt.managedbuilder.core.ITool; import org.eclipse.core.runtime.IConfigurationElement; import org.w3c.dom.Document; import org.w3c.dom.Element; diff --git a/build/org.eclipse.cdt.managedbuilder.ui/.classpath b/build/org.eclipse.cdt.managedbuilder.ui/.classpath new file mode 100644 index 00000000000..35da7f95d3a --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.ui/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/build/org.eclipse.cdt.managedbuilder.ui/.cvsignore b/build/org.eclipse.cdt.managedbuilder.ui/.cvsignore new file mode 100644 index 00000000000..ba077a4031a --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.ui/.cvsignore @@ -0,0 +1 @@ +bin diff --git a/build/org.eclipse.cdt.managedbuilder.ui/.project b/build/org.eclipse.cdt.managedbuilder.ui/.project new file mode 100644 index 00000000000..9091b32f7a0 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.ui/.project @@ -0,0 +1,39 @@ + + + org.eclipse.cdt.managedbuilder.ui + + + org.eclipse.cdt.core + org.eclipse.cdt.core.linux + org.eclipse.cdt.core.qnx + org.eclipse.cdt.core.solaris + org.eclipse.cdt.core.win32 + org.eclipse.cdt.managedbuilder.core + org.eclipse.cdt.ui + org.eclipse.core.boot + org.eclipse.core.resources + org.eclipse.core.runtime + org.eclipse.ui + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/build/org.eclipse.cdt.managedbuilder.ui/ChangeLog b/build/org.eclipse.cdt.managedbuilder.ui/ChangeLog new file mode 100644 index 00000000000..b670dfc5c0f --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.ui/ChangeLog @@ -0,0 +1,15 @@ +2003-09-15 Sean Evoy + First submission of code to new project. Moved all the managed + builder-specific UI elements out of the cdt.ui project. This + includes the icons, and externalized strings. + + There are 2 new classes to handle the externalized strings and image + files: + * src/org/eclipse/cdt/managedbuilder/internal/ui/PluginResources.properties + * src/org/eclipse/cdt/managedbuilder/internal/ui/ManagedBuilderUIPlugin.java + * src/org/eclipse/cdt/managedbuilder/internal/ui/ManagedBuilderUIImages.java + + The property pages have been modified to use a mix of externalized + strings from the CUIPlugin and ManagedBuilderUIPlugin. The new project + wizard has been reimplemented using the new C project classes added by + QNX September 12, 2003. The UI itself has not changed. \ No newline at end of file diff --git a/build/org.eclipse.cdt.managedbuilder.ui/about.html b/build/org.eclipse.cdt.managedbuilder.ui/about.html new file mode 100644 index 00000000000..8c828de2ada --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.ui/about.html @@ -0,0 +1,30 @@ + + + +About + + + +

About This Content

+ +

10th July, 2002

+

License

+

Eclipse.org makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the +Common Public License Version 1.0 ("CPL"). A copy of the CPL is available at http://www.eclipse.org/legal/cpl-v10.html. +For purposes of the CPL, "Program" will mean the Content.

+ +

Contributions

+ +

If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise +made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such +Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.

+ +

If this Content is licensed to you under license terms and conditions other than the CPL ("Other License"), any modifications, enhancements and/or +other code and/or documentation ("Modifications") uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the +host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available +to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also +providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of +the CPL.

+ + + \ No newline at end of file diff --git a/build/org.eclipse.cdt.managedbuilder.ui/build.properties b/build/org.eclipse.cdt.managedbuilder.ui/build.properties new file mode 100644 index 00000000000..90d0a0b9d3b --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.ui/build.properties @@ -0,0 +1 @@ +source.mgdbuildui.jar = src/ diff --git a/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/action-buildconfig.gif b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/action-buildconfig.gif new file mode 100644 index 00000000000..bb64374a7be Binary files /dev/null and b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/action-buildconfig.gif differ diff --git a/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/action-deleteconfig.gif b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/action-deleteconfig.gif new file mode 100644 index 00000000000..a06106af2d8 Binary files /dev/null and b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/action-deleteconfig.gif differ diff --git a/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/action-editconfig.gif b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/action-editconfig.gif new file mode 100644 index 00000000000..820079ad6ba Binary files /dev/null and b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/action-editconfig.gif differ diff --git a/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/action-newconfig.gif b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/action-newconfig.gif new file mode 100644 index 00000000000..5b04a5e4610 Binary files /dev/null and b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/action-newconfig.gif differ diff --git a/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/build_configs.gif b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/build_configs.gif new file mode 100644 index 00000000000..bb64374a7be Binary files /dev/null and b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/build_configs.gif differ diff --git a/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-category.gif b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-category.gif new file mode 100644 index 00000000000..690bba071fc Binary files /dev/null and b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-category.gif differ diff --git a/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-compiler.gif b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-compiler.gif new file mode 100644 index 00000000000..20e7baed143 Binary files /dev/null and b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-compiler.gif differ diff --git a/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-debug.gif b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-debug.gif new file mode 100644 index 00000000000..3052a80cd67 Binary files /dev/null and b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-debug.gif differ diff --git a/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-librarian.gif b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-librarian.gif new file mode 100644 index 00000000000..f966fc39d9b Binary files /dev/null and b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-librarian.gif differ diff --git a/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-linker.gif b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-linker.gif new file mode 100644 index 00000000000..91eec0f7dae Binary files /dev/null and b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-linker.gif differ diff --git a/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-preprocessor.gif b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-preprocessor.gif new file mode 100644 index 00000000000..082e49fbe66 Binary files /dev/null and b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-preprocessor.gif differ diff --git a/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-profile.gif b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-profile.gif new file mode 100644 index 00000000000..45d614829bf Binary files /dev/null and b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-profile.gif differ diff --git a/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-release.gif b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-release.gif new file mode 100644 index 00000000000..b7b23708e09 Binary files /dev/null and b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-release.gif differ diff --git a/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-tool.gif b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-tool.gif new file mode 100644 index 00000000000..33981a5dbf1 Binary files /dev/null and b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/build16/config-tool.gif differ diff --git a/build/org.eclipse.cdt.managedbuilder.ui/icons/full/wizban/newmngc_app.gif b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/wizban/newmngc_app.gif new file mode 100644 index 00000000000..beefb8ee95d Binary files /dev/null and b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/wizban/newmngc_app.gif differ diff --git a/build/org.eclipse.cdt.managedbuilder.ui/icons/full/wizban/newmngcc_app.gif b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/wizban/newmngcc_app.gif new file mode 100644 index 00000000000..85e3f72d33c Binary files /dev/null and b/build/org.eclipse.cdt.managedbuilder.ui/icons/full/wizban/newmngcc_app.gif differ diff --git a/build/org.eclipse.cdt.managedbuilder.ui/plugin.properties b/build/org.eclipse.cdt.managedbuilder.ui/plugin.properties new file mode 100644 index 00000000000..b8dfd060f59 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.ui/plugin.properties @@ -0,0 +1,24 @@ +pluginName=C/C++ Managed Builder UI +providerName=Eclipse.org + +# The Wizards +MngCWizard.name=Managed Make C Project +MngCWizard.description=Create a new C project and let Eclipse create and manage the makefile +MngCCWizard.name=Managed Make C++ Project +MngCCWizard.description=Create a new C++ project and let Eclipse create and manage the makefile + +# Build Model Names +ConfigName.Rel=Release +ConfigName.Dbg=Debug +ToolName.preprocessor = Preprocessor +ToolName.compiler = Compiler +ToolName.archiver = Archiver +ToolName.linker = Linker +OptionCategory.Preproc = Preprocessor +OptionCategory.Dirs = Directories +OptionCategory.General = General +OptionCategory.Optimize=Optimization +OptionCategory.Debug=Debugging +OptionCategory.Warn=Warnings +OptionCategory.Misc=Miscellaneous +OptionCategory.Libs=Libraries diff --git a/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml b/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml new file mode 100644 index 00000000000..f3bd68d6137 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml @@ -0,0 +1,1530 @@ + + + + + + + + + + + + + + + + + + + + + %MngCCWizard.description + + + + + %MngCWizard.description + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/ManagedBuilderUIImages.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/ManagedBuilderUIImages.java new file mode 100644 index 00000000000..338ade77584 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/ManagedBuilderUIImages.java @@ -0,0 +1,112 @@ +package org.eclipse.cdt.managedbuilder.internal.ui; + +/********************************************************************** + * Copyright (c) 2002,2003 Rational Software Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v0.5 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v05.html + * + * Contributors: + * IBM Rational Software - Initial API and implementation + * **********************************************************************/ + +import java.net.MalformedURLException; +import java.net.URL; + +import org.eclipse.cdt.ui.*; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.resource.ImageRegistry; +import org.eclipse.swt.graphics.Image; + +/** + * Bundle of all images used by the C plugin. + */ +public class ManagedBuilderUIImages { + + // The plugin registry + private static ImageRegistry imageRegistry = new ImageRegistry(); + + // Subdirectory (under the package containing this class) where 16 color images are + private static URL fgIconBaseURL; + static { + try { + fgIconBaseURL= new URL(ManagedBuilderUIPlugin.getDefault().getDescriptor().getInstallURL(), "icons/" ); + } catch (MalformedURLException e) { + CUIPlugin.getDefault().log(e); + } + } + private static final String NAME_PREFIX= ManagedBuilderUIPlugin.getUniqueIdentifier() + '.'; + private static final int NAME_PREFIX_LENGTH= NAME_PREFIX.length(); + private static final String T= "full/"; + + public static final String T_BUILD= T + "build16/"; + + + + // For the managed build images + public static final String IMG_BUILD_CONFIG = NAME_PREFIX + "build_configs.gif"; + public static final ImageDescriptor DESC_BUILD_CONFIG = createManaged(T_BUILD, IMG_BUILD_CONFIG); + public static final String IMG_BUILD_COMPILER = NAME_PREFIX + "config-compiler.gif"; + public static final ImageDescriptor DESC_BUILD_COMPILER = createManaged(T_BUILD, IMG_BUILD_COMPILER); + public static final String IMG_BUILD_LINKER = NAME_PREFIX + "config-linker.gif"; + public static final ImageDescriptor DESC_BUILD_LINKER = createManaged(T_BUILD, IMG_BUILD_LINKER); + public static final String IMG_BUILD_LIBRARIAN = NAME_PREFIX + "config-librarian.gif"; + public static final ImageDescriptor DESC_BUILD_LIBRARIAN = createManaged(T_BUILD, IMG_BUILD_LIBRARIAN); + public static final String IMG_BUILD_COMMAND = NAME_PREFIX + "config-command.gif"; + public static final ImageDescriptor DESC_BUILD_COMMAND = createManaged(T_BUILD, IMG_BUILD_COMMAND); + public static final String IMG_BUILD_PREPROCESSOR = NAME_PREFIX + "config-preprocessor.gif"; + public static final ImageDescriptor DESC_BUILD_PREPROCESSOR = createManaged(T_BUILD, IMG_BUILD_PREPROCESSOR); + public static final String IMG_BUILD_TOOL = NAME_PREFIX + "config-tool.gif"; + public static final ImageDescriptor DESC_BUILD_TOOL = createManaged(T_BUILD, IMG_BUILD_TOOL); + public static final String IMG_BUILD_CAT = NAME_PREFIX + "config-category.gif"; + public static final ImageDescriptor DESC_BUILD_CAT = createManaged(T_BUILD, IMG_BUILD_CAT); + + + private static ImageDescriptor createManaged(String prefix, String name) { + return createManaged(imageRegistry, prefix, name); + } + + private static ImageDescriptor createManaged(ImageRegistry registry, String prefix, String name) { + ImageDescriptor result= ImageDescriptor.createFromURL(makeIconFileURL(prefix, name.substring(NAME_PREFIX_LENGTH))); + registry.put(name, result); + return result; + } + + public static Image get(String key) { + return imageRegistry.get(key); + } + + private static ImageDescriptor create(String prefix, String name) { + return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name)); + } + + private static URL makeIconFileURL(String prefix, String name) { + StringBuffer buffer= new StringBuffer(prefix); + buffer.append(name); + try { + return new URL(fgIconBaseURL, buffer.toString()); + } catch (MalformedURLException e) { + CUIPlugin.getDefault().log(e); + return null; + } + } + + /** + * Sets all available image descriptors for the given action. + */ + public static void setImageDescriptors(IAction action, String type, String relPath) { + relPath= relPath.substring(NAME_PREFIX_LENGTH); + action.setDisabledImageDescriptor(create(T + "d" + type, relPath)); + action.setHoverImageDescriptor(create(T + "c" + type, relPath)); + action.setImageDescriptor(create(T + "e" + type, relPath)); + } + + /** + * Helper method to access the image registry from the JavaPlugin class. + */ + static ImageRegistry getImageRegistry() { + return imageRegistry; + } +} diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/ManagedBuilderUIPlugin.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/ManagedBuilderUIPlugin.java new file mode 100644 index 00000000000..69b6aa23029 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/ManagedBuilderUIPlugin.java @@ -0,0 +1,79 @@ +package org.eclipse.cdt.managedbuilder.internal.ui; + +/********************************************************************** + * Copyright (c) 2002,2003 Rational Software Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v0.5 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v05.html + * + * Contributors: + * IBM Rational Software - Initial API and implementation + * **********************************************************************/ + +import java.text.MessageFormat; +import java.util.MissingResourceException; +import java.util.ResourceBundle; + +import org.eclipse.core.runtime.IPluginDescriptor; +import org.eclipse.core.runtime.Plugin; + + +public class ManagedBuilderUIPlugin extends Plugin { + //The shared instance. + private static ManagedBuilderUIPlugin plugin; + //Resource bundle. + private static ResourceBundle resourceBundle; + + /** + * @param descriptor + */ + public ManagedBuilderUIPlugin(IPluginDescriptor descriptor) { + super(descriptor); + plugin = this; + try { + resourceBundle = ResourceBundle.getBundle("org.eclipse.cdt.managedbuilder.internal.ui.PluginResources"); //$NON-NLS-1$ + } catch (MissingResourceException x) { + resourceBundle = null; + } + } + + /** + * Returns the shared instance. + */ + public static ManagedBuilderUIPlugin getDefault() { + return plugin; + } + + public static String getResourceString(String key) { + try { + return resourceBundle.getString(key); + } catch (MissingResourceException e) { + return "!" + key + "!"; + } catch (NullPointerException e) { + return "#" + key + "#"; + } + } + + public static String getFormattedString(String key, String arg) { + return MessageFormat.format(getResourceString(key), new String[] { arg }); + } + + public static String getFormattedString(String key, String[] args) { + return MessageFormat.format(getResourceString(key), args); + } + + /** + * Convenience method which returns the unique identifier of this plugin. + */ + public static String getUniqueIdentifier() { + if (getDefault() == null) { + // If the default instance is not yet initialized, + // return a static identifier. This identifier must + // match the plugin id defined in plugin.xml + return "org.eclipse.cdt.managedbuilder.ui"; //$NON-NLS-1$ + } + return getDefault().getDescriptor().getUniqueIdentifier(); + } + +} diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/ManagedProjectOptionBlock.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/ManagedProjectOptionBlock.java new file mode 100644 index 00000000000..ed3feeacccf --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/ManagedProjectOptionBlock.java @@ -0,0 +1,35 @@ +package org.eclipse.cdt.managedbuilder.internal.ui; + +/********************************************************************** + * Copyright (c) 2002,2003 Rational Software Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v0.5 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v05.html + * + * Contributors: + * IBM Rational Software - Initial API and implementation + * **********************************************************************/ + +import org.eclipse.cdt.ui.dialogs.ICOptionContainer; +import org.eclipse.cdt.ui.dialogs.TabFolderOptionBlock; + +public class ManagedProjectOptionBlock extends TabFolderOptionBlock { + + /** + * @param parent + */ + public ManagedProjectOptionBlock(ICOptionContainer parent) { + super(parent); + // TODO Auto-generated constructor stub + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.ui.dialogs.TabFolderOptionBlock#addTabs() + */ + protected void addTabs() { + // TODO Auto-generated method stub + + } + +} diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/PluginResources.properties b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/PluginResources.properties new file mode 100644 index 00000000000..a3c5f17ab48 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/PluginResources.properties @@ -0,0 +1,57 @@ +######################################### +# (c) Copyright IBM Corp. 2000, 2001. +# All Rights Reserved. +######################################### + +# ------- NewProjectCreationPluginPage------- + +MngMakeProjectWizard.op_error=Managed Make Error +MngMakeProjectWizard.title=Managed Make Project +MngMakeProjectWizard.description=Create a new Managed Make project. +#MngMakeProjectWizardSettings.title=Managed Make Settings +#MngMakeProjectWizardSettings.description=Define the Managed Make build settings. +MngMakeProjectWizard.message.add_nature=Adding Managed Nature +MngMakeProjectWizard.message.add_builder=Adding Makefile Generator +MngMakeProjectWizard.message.save=Saving new build options + +MngCWizard.title=Managed Make C Project +MngCWizard.description=Create a new Managed Make C project. +MngCWizardSettings.title=Managed Make C Settings +MngCWizardSettings.description=Define the Managed Make C build settings. + +MngCCWizard.title=Managed Make C++ Project +MngCCWizard.description=Create a new Managed Make C++ Project. +MngCCWizard.message.creating=Creating a new C++ Project with a makefile generator +MngCCWizardSettings.title=Managed Make C++ Settings +MngCCWizardSettings.description=Define the Managed Make C++ build settings. + +# -- Strings for the platform selection page -- +MngMakeProjectWizard.config.title=Select a Target +MngMakeProjectWizard.config.desc=Select the platform and configurations you wish to deploy on +PlatformBlock.label.platform=Platform: +PlatformBlock.label.configs=Configurations: + +# -- Strings for the additional options tab +MngMakeProjectWizard.options.title=Additional Project Settings +MngMakeProjectWizard.options.desc=Defined the binary parser and inter-project dependencies, if any. + +# ----------- Configuration Selection Page ----------- +BuildPropertyPage.label.Platform=Platform: +BuildPropertyPage.label.Configuration=Configuration: +BuildPropertyPage.label.Active=Active configuration +BuildPropertyPage.label.Settings=Configuration settings +BuildPropertyPage.label.AddConfButton=Manage... +BuildPropertyPage.label.ToolTree=Tools +BuildPropertyPage.label.ToolOptions=Options +BuildPropertyPage.tip.platform=Select a platform for the project +BuildPropertyPage.tip.config=Select the configuration to edit +BuildPropertyPage.tip.addconf=Add configurations for the platform +BuildPropertyPage.tip.remconf=Remove configurations for the platform +BuildPropertyPage.manage.title=Manage Configurations + + +# ----------- New Configuration ----------- +NewConfiguration.label.name=Configuration name: +NewConfiguration.label.copy=Copy settings from: +NewConfiguration.error.title=Error +NewConfiguration.error.duplicateName=A configuration named "{0}" already exists. diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BrowseEntryDialog.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BrowseEntryDialog.java similarity index 94% rename from core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BrowseEntryDialog.java rename to build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BrowseEntryDialog.java index ffab7c71d6d..5d70b4606fe 100644 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BrowseEntryDialog.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BrowseEntryDialog.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.ui.build.properties; +package org.eclipse.cdt.managedbuilder.ui.properties; /********************************************************************** * Copyright (c) 2002,2003 Rational Software Corporation and others. @@ -21,7 +21,13 @@ import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.*; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.DirectoryDialog; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; public class BrowseEntryDialog extends Dialog { // String constants diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildOptionComboFieldEditor.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionComboFieldEditor.java similarity index 98% rename from core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildOptionComboFieldEditor.java rename to build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionComboFieldEditor.java index 8e470efdb56..8288407edd5 100644 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildOptionComboFieldEditor.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionComboFieldEditor.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.ui.build.properties; +package org.eclipse.cdt.managedbuilder.ui.properties; /********************************************************************** * Copyright (c) 2002,2003 Rational Software Corporation and others. diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildOptionListFieldEditor.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionListFieldEditor.java similarity index 99% rename from core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildOptionListFieldEditor.java rename to build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionListFieldEditor.java index ef2e289a1c3..cc9930521b9 100644 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildOptionListFieldEditor.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionListFieldEditor.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.ui.build.properties; +package org.eclipse.cdt.managedbuilder.ui.properties; /********************************************************************** * Copyright (c) 2002,2003 Rational Software Corporation and others. diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildPropertyPage.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildPropertyPage.java similarity index 93% rename from core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildPropertyPage.java rename to build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildPropertyPage.java index ff1472a2485..e8b0d53a0c5 100644 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildPropertyPage.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildPropertyPage.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.ui.build.properties; +package org.eclipse.cdt.managedbuilder.ui.properties; /********************************************************************** * Copyright (c) 2002,2003 Rational Software Corporation and others. @@ -17,12 +17,12 @@ import java.util.List; import java.util.ListIterator; import java.util.Map; -import org.eclipse.cdt.core.build.managed.IConfiguration; -import org.eclipse.cdt.core.build.managed.IManagedBuildInfo; -import org.eclipse.cdt.core.build.managed.IOptionCategory; -import org.eclipse.cdt.core.build.managed.ITarget; -import org.eclipse.cdt.core.build.managed.ManagedBuildManager; -import org.eclipse.cdt.ui.CUIPlugin; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo; +import org.eclipse.cdt.managedbuilder.core.IOptionCategory; +import org.eclipse.cdt.managedbuilder.core.ITarget; +import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; +import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIPlugin; import org.eclipse.cdt.utils.ui.controls.ControlFactory; import org.eclipse.core.resources.IProject; import org.eclipse.jface.preference.IPreferencePageContainer; @@ -162,7 +162,7 @@ public class BuildPropertyPage extends PropertyPage implements IWorkbenchPropert GridData gd; // Add a config selection area - Group configGroup = ControlFactory.createGroup(composite, CUIPlugin.getResourceString(ACTIVE_LABEL), 1); + Group configGroup = ControlFactory.createGroup(composite, ManagedBuilderUIPlugin.getResourceString(ACTIVE_LABEL), 1); gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd.grabExcessHorizontalSpace = true; configGroup.setLayoutData(gd); @@ -172,24 +172,24 @@ public class BuildPropertyPage extends PropertyPage implements IWorkbenchPropert form.marginWidth = 5; configGroup.setLayout(form); - Label platformLabel = ControlFactory.createLabel(configGroup, CUIPlugin.getResourceString(PLATFORM_LABEL)); + Label platformLabel = ControlFactory.createLabel(configGroup, ManagedBuilderUIPlugin.getResourceString(PLATFORM_LABEL)); targetSelector = ControlFactory.createSelectCombo(configGroup, getPlatformNames(), null); targetSelector.addListener(SWT.Selection, new Listener () { public void handleEvent(Event e) { handleTargetSelection(); } }); - targetSelector.setToolTipText(CUIPlugin.getResourceString(PLAT_TIP)); - Label configLabel = ControlFactory.createLabel(configGroup, CUIPlugin.getResourceString(CONFIG_LABEL)); + targetSelector.setToolTipText(ManagedBuilderUIPlugin.getResourceString(PLAT_TIP)); + Label configLabel = ControlFactory.createLabel(configGroup, ManagedBuilderUIPlugin.getResourceString(CONFIG_LABEL)); configSelector = new Combo(configGroup, SWT.READ_ONLY|SWT.DROP_DOWN); configSelector.addListener(SWT.Selection, new Listener () { public void handleEvent(Event e) { handleConfigSelection(); } }); - configSelector.setToolTipText(CUIPlugin.getResourceString(CONF_TIP)); - manageConfigs = ControlFactory.createPushButton(configGroup, CUIPlugin.getResourceString(ADD_CONF)); - manageConfigs.setToolTipText(CUIPlugin.getResourceString(ADD_TIP)); + configSelector.setToolTipText(ManagedBuilderUIPlugin.getResourceString(CONF_TIP)); + manageConfigs = ControlFactory.createPushButton(configGroup, ManagedBuilderUIPlugin.getResourceString(ADD_CONF)); + manageConfigs.setToolTipText(ManagedBuilderUIPlugin.getResourceString(ADD_TIP)); manageConfigs.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleManageConfig(); @@ -221,7 +221,7 @@ public class BuildPropertyPage extends PropertyPage implements IWorkbenchPropert configSelector.setLayoutData(fd); // Create the sash form - sashGroup = ControlFactory.createGroup(composite, CUIPlugin.getResourceString(SETTINGS_LABEL), 1); + sashGroup = ControlFactory.createGroup(composite, ManagedBuilderUIPlugin.getResourceString(SETTINGS_LABEL), 1); sashGroup.setLayoutData(new GridData(GridData.FILL_BOTH)); sashForm = new SashForm(sashGroup, SWT.NONE); sashForm.setOrientation(SWT.HORIZONTAL); @@ -413,7 +413,7 @@ public class BuildPropertyPage extends PropertyPage implements IWorkbenchPropert // Event handler for the manage configuration button event private void handleManageConfig () { - ManageConfigDialog manageDialog = new ManageConfigDialog(getShell(), CUIPlugin.getResourceString(MANAGE_TITLE), selectedTarget); + ManageConfigDialog manageDialog = new ManageConfigDialog(getShell(), ManagedBuilderUIPlugin.getResourceString(MANAGE_TITLE), selectedTarget); if (manageDialog.open() == ManageConfigDialog.OK) { // Check to see if any configurations have to be deleted ArrayList deleteMe = manageDialog.getDeletedConfigs(); diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildToolSettingsPage.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingsPage.java similarity index 93% rename from core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildToolSettingsPage.java rename to build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingsPage.java index 4e500b1edb1..c4d4e41b841 100644 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildToolSettingsPage.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingsPage.java @@ -1,10 +1,10 @@ -package org.eclipse.cdt.ui.build.properties; +package org.eclipse.cdt.managedbuilder.ui.properties; -import org.eclipse.cdt.core.build.managed.BuildException; -import org.eclipse.cdt.core.build.managed.IConfiguration; -import org.eclipse.cdt.core.build.managed.IOption; -import org.eclipse.cdt.core.build.managed.IOptionCategory; -import org.eclipse.cdt.core.build.managed.ManagedBuildManager; +import org.eclipse.cdt.managedbuilder.core.BuildException; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IOption; +import org.eclipse.cdt.managedbuilder.core.IOptionCategory; +import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; import org.eclipse.jface.preference.BooleanFieldEditor; import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.jface.preference.IPreferenceStore; diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildToolsSettingsStore.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolsSettingsStore.java similarity index 97% rename from core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildToolsSettingsStore.java rename to build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolsSettingsStore.java index 3e4551f0735..85ad989c53d 100644 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildToolsSettingsStore.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolsSettingsStore.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.ui.build.properties; +package org.eclipse.cdt.managedbuilder.ui.properties; /********************************************************************** * Copyright (c) 2002,2003 Rational Software Corporation and others. @@ -16,15 +16,15 @@ import java.util.HashMap; import java.util.Map; import java.util.StringTokenizer; -import org.eclipse.cdt.core.build.managed.BuildException; -import org.eclipse.cdt.core.build.managed.IConfiguration; -import org.eclipse.cdt.core.build.managed.IOption; -import org.eclipse.cdt.core.build.managed.IOptionCategory; -import org.eclipse.cdt.core.build.managed.ITool; -import org.eclipse.jface.util.ListenerList; -import org.eclipse.jface.util.PropertyChangeEvent; +import org.eclipse.cdt.managedbuilder.core.BuildException; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IOption; +import org.eclipse.cdt.managedbuilder.core.IOptionCategory; +import org.eclipse.cdt.managedbuilder.core.ITool; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.util.IPropertyChangeListener; +import org.eclipse.jface.util.ListenerList; +import org.eclipse.jface.util.PropertyChangeEvent; public class BuildToolsSettingsStore implements IPreferenceStore { public static final String DEFAULT_SEPERATOR = ";"; diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/ManageConfigDialog.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ManageConfigDialog.java similarity index 97% rename from core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/ManageConfigDialog.java rename to build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ManageConfigDialog.java index 412fb529c8b..6a9ba104c99 100644 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/ManageConfigDialog.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ManageConfigDialog.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.ui.build.properties; +package org.eclipse.cdt.managedbuilder.ui.properties; /********************************************************************** * Copyright (c) 2002,2003 Rational Software Corporation and others. @@ -15,9 +15,9 @@ import java.util.ArrayList; import java.util.SortedMap; import java.util.TreeMap; -import org.eclipse.cdt.core.build.managed.IConfiguration; -import org.eclipse.cdt.core.build.managed.ITarget; -import org.eclipse.cdt.core.build.managed.ManagedBuildManager; +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.ui.CUIPlugin; import org.eclipse.cdt.utils.ui.controls.ControlFactory; import org.eclipse.core.resources.IProject; diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/NewConfigurationDialog.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewConfigurationDialog.java similarity index 91% rename from core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/NewConfigurationDialog.java rename to build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewConfigurationDialog.java index 6fcb6b5e85a..8765e7ce573 100644 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/NewConfigurationDialog.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewConfigurationDialog.java @@ -1,8 +1,8 @@ -package org.eclipse.cdt.ui.build.properties; +package org.eclipse.cdt.managedbuilder.ui.properties; -import org.eclipse.cdt.core.build.managed.IConfiguration; -import org.eclipse.cdt.core.build.managed.ITarget; -import org.eclipse.cdt.ui.CUIPlugin; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.ITarget; +import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIPlugin; import org.eclipse.cdt.utils.ui.controls.ControlFactory; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.IDialogConstants; @@ -109,7 +109,7 @@ public class NewConfigurationDialog extends Dialog { GridData gd; // Add a label and a text widget - Label nameLabel = ControlFactory.createLabel(composite, CUIPlugin.getResourceString(NAME)); + Label nameLabel = ControlFactory.createLabel(composite, ManagedBuilderUIPlugin.getResourceString(NAME)); gd = new GridData(); gd.horizontalSpan = 1; nameLabel.setLayoutData(gd); @@ -124,7 +124,7 @@ public class NewConfigurationDialog extends Dialog { }); // Add a label and combo box to select the base config - Label configLabel = ControlFactory.createLabel(composite, CUIPlugin.getResourceString(COPY)); + Label configLabel = ControlFactory.createLabel(composite, ManagedBuilderUIPlugin.getResourceString(COPY)); gd = new GridData(); gd.horizontalSpan = 1; configLabel.setLayoutData(gd); @@ -198,8 +198,8 @@ public class NewConfigurationDialog extends Dialog { // Make sure the name is not a duplicate if (isDuplicateName(currentName)) { MessageDialog.openError(getShell(), - CUIPlugin.getResourceString(TITLE), - CUIPlugin.getFormattedString(DUPLICATE, currentName)); //$NON-NLS-1$ + ManagedBuilderUIPlugin.getResourceString(TITLE), + ManagedBuilderUIPlugin.getFormattedString(DUPLICATE, currentName)); //$NON-NLS-1$ return false; } // TODO make sure there are no invalid chars in name diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/SummaryFieldEditor.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/SummaryFieldEditor.java similarity index 97% rename from core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/SummaryFieldEditor.java rename to build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/SummaryFieldEditor.java index aa6e6bcdedb..ad2ed4c10c8 100644 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/SummaryFieldEditor.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/SummaryFieldEditor.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.ui.build.properties; +package org.eclipse.cdt.managedbuilder.ui.properties; /********************************************************************** * Copyright (c) 2002,2003 Rational Software Corporation and others. @@ -11,7 +11,7 @@ package org.eclipse.cdt.ui.build.properties; * IBM Rational Software - Initial API and implementation ***********************************************************************/ -import org.eclipse.cdt.core.build.managed.ITool; +import org.eclipse.cdt.managedbuilder.core.ITool; import org.eclipse.jface.preference.FieldEditor; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/ToolListContentProvider.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListContentProvider.java similarity index 93% rename from core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/ToolListContentProvider.java rename to build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListContentProvider.java index d2f04f63c72..2114a8f88c3 100644 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/ToolListContentProvider.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListContentProvider.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.ui.build.properties; +package org.eclipse.cdt.managedbuilder.ui.properties; /********************************************************************** * Copyright (c) 2002,2003 Rational Software Corporation and others. @@ -12,9 +12,9 @@ package org.eclipse.cdt.ui.build.properties; * IBM Rational Software * *********************************************************************/ -import org.eclipse.cdt.core.build.managed.IConfiguration; -import org.eclipse.cdt.core.build.managed.IOptionCategory; -import org.eclipse.cdt.core.build.managed.ITool; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IOptionCategory; +import org.eclipse.cdt.managedbuilder.core.ITool; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.Viewer; diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/ToolListLabelProvider.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListLabelProvider.java similarity index 81% rename from core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/ToolListLabelProvider.java rename to build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListLabelProvider.java index b1d6397f0c0..f1b1d7311c7 100644 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/ToolListLabelProvider.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListLabelProvider.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.ui.build.properties; +package org.eclipse.cdt.managedbuilder.ui.properties; /********************************************************************** * Copyright (c) 2002,2003 Rational Software Corporation and others. @@ -11,14 +11,14 @@ package org.eclipse.cdt.ui.build.properties; * IBM Rational Software - Initial API and implementation * **********************************************************************/ -import org.eclipse.cdt.core.build.managed.IOptionCategory; -import org.eclipse.cdt.internal.ui.CPluginImages; +import org.eclipse.cdt.managedbuilder.core.IOptionCategory; +import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIImages; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.swt.graphics.Image; class ToolListLabelProvider extends LabelProvider { - private final Image IMG_TOOL = CPluginImages.get(CPluginImages.IMG_BUILD_TOOL); - private final Image IMG_CAT = CPluginImages.get(CPluginImages.IMG_BUILD_CAT); + private final Image IMG_TOOL = ManagedBuilderUIImages.get(ManagedBuilderUIImages.IMG_BUILD_TOOL); + private final Image IMG_CAT = ManagedBuilderUIImages.get(ManagedBuilderUIImages.IMG_BUILD_CAT); private static final String TREE_LABEL = "BuildPropertyPage.label.ToolTree"; //$NON-NLS-1$ public Image getImage(Object element) { diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/CProjectPlatformPage.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CProjectPlatformPage.java similarity index 89% rename from core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/CProjectPlatformPage.java rename to build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CProjectPlatformPage.java index 9a1f3f8a0d1..edb4066ae70 100644 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/CProjectPlatformPage.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CProjectPlatformPage.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.ui.build.wizards; +package org.eclipse.cdt.managedbuilder.ui.wizards; /********************************************************************** * Copyright (c) 2002,2003 Rational Software Corporation and others. @@ -15,11 +15,10 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.ListIterator; -import org.eclipse.cdt.core.build.managed.IConfiguration; -import org.eclipse.cdt.core.build.managed.ITarget; -import org.eclipse.cdt.core.build.managed.ManagedBuildManager; -import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.cdt.ui.wizards.CProjectWizard; +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.internal.ui.ManagedBuilderUIPlugin; import org.eclipse.cdt.utils.ui.controls.ControlFactory; import org.eclipse.jface.viewers.CheckboxTableViewer; import org.eclipse.jface.viewers.ISelectionChangedListener; @@ -39,7 +38,7 @@ public class CProjectPlatformPage extends WizardPage { /* * Bookeeping variables */ - private CProjectWizard wizard; +// private CProjectWizard wizard; private ArrayList selectedConfigurations; protected ITarget selectedTarget; protected String[] targetNames; @@ -62,10 +61,10 @@ public class CProjectPlatformPage extends WizardPage { * @param wizard * @param pageName */ - public CProjectPlatformPage(CProjectWizard wizard, String pageName) { + public CProjectPlatformPage(/*CProjectWizard wizard,*/ String pageName) { super(pageName); setPageComplete(false); - this.wizard = wizard; +// this.wizard = wizard; populateTargets(); selectedTarget = null; selectedConfigurations = new ArrayList(0); @@ -86,11 +85,11 @@ public class CProjectPlatformPage extends WizardPage { Composite composite = ControlFactory.createComposite(parent, 6); // Create the platform selection label and combo widgets - Label platformLabel = ControlFactory.createLabel(composite, CUIPlugin.getResourceString(PLATFORM_LABEL)); + Label platformLabel = ControlFactory.createLabel(composite, ManagedBuilderUIPlugin.getResourceString(PLATFORM_LABEL)); platformLabel.setLayoutData(new GridData()); platformSelection = ControlFactory.createSelectCombo(composite, targetNames, null); - platformSelection.setToolTipText(CUIPlugin.getResourceString(PLATFORM_TIP)); + platformSelection.setToolTipText(ManagedBuilderUIPlugin.getResourceString(PLATFORM_TIP)); platformSelection.addListener(SWT.Selection, new Listener() { public void handleEvent(Event e) { handleTargetSelection(); @@ -101,7 +100,7 @@ public class CProjectPlatformPage extends WizardPage { platformSelection.setLayoutData(gd); // Create a check box table of valid configurations - Label configLabel = ControlFactory.createLabel(composite, CUIPlugin.getResourceString(CONFIG_LABEL)); + Label configLabel = ControlFactory.createLabel(composite, ManagedBuilderUIPlugin.getResourceString(CONFIG_LABEL)); configLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Table table = new Table(composite, SWT.CHECK | SWT.BORDER | SWT.MULTI | SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL); diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/ConfigurationContentProvider.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ConfigurationContentProvider.java similarity index 87% rename from core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/ConfigurationContentProvider.java rename to build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ConfigurationContentProvider.java index ab4a6f6e670..27db61034bd 100644 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/ConfigurationContentProvider.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ConfigurationContentProvider.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.ui.build.wizards; +package org.eclipse.cdt.managedbuilder.ui.wizards; /********************************************************************** * Copyright (c) 2002,2003 Rational Software Corporation and others. @@ -11,8 +11,8 @@ package org.eclipse.cdt.ui.build.wizards; * IBM Rational Software - Initial API and implementation ***********************************************************************/ -import org.eclipse.cdt.core.build.managed.IConfiguration; -import org.eclipse.cdt.core.build.managed.ITarget; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.ITarget; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.Viewer; diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/ConfigurationLabelProvider.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ConfigurationLabelProvider.java similarity index 80% rename from core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/ConfigurationLabelProvider.java rename to build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ConfigurationLabelProvider.java index 9d727ee6c88..229c1bfbc7c 100644 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/ConfigurationLabelProvider.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ConfigurationLabelProvider.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.ui.build.wizards; +package org.eclipse.cdt.managedbuilder.ui.wizards; /********************************************************************** * Copyright (c) 2002,2003 Rational Software Corporation and others. @@ -11,15 +11,15 @@ package org.eclipse.cdt.ui.build.wizards; * IBM Rational Software - Initial API and implementation ***********************************************************************/ -import org.eclipse.cdt.core.build.managed.IConfiguration; -import org.eclipse.cdt.internal.ui.CPluginImages; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIImages; import org.eclipse.jface.viewers.ITableLabelProvider; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.swt.graphics.Image; public class ConfigurationLabelProvider extends LabelProvider implements ITableLabelProvider { private final Image IMG_CFG = - CPluginImages.get(CPluginImages.IMG_BUILD_CONFIG); + ManagedBuilderUIImages.get(ManagedBuilderUIImages.IMG_BUILD_CONFIG); // public String getColumnText(Object obj, int index) { diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/NewManagedCCProjectWizard.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/NewManagedCCProjectWizard.java new file mode 100644 index 00000000000..f03be1dab46 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/NewManagedCCProjectWizard.java @@ -0,0 +1,54 @@ +package org.eclipse.cdt.managedbuilder.ui.wizards; + +/********************************************************************** + * Copyright (c) 2002,2003 Rational Software Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v0.5 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v05.html + * + * Contributors: + * IBM Rational Software - Initial API and implementation + * **********************************************************************/ + +import org.eclipse.cdt.core.CCorePlugin; +import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.SubProgressMonitor; + +public class NewManagedCCProjectWizard extends NewManagedProjectWizard { + private static final String WZ_TITLE = "MngCCWizard.title"; //$NON-NLS-1$ + private static final String WZ_DESC = "MngCCWizard.description"; //$NON-NLS-1$ + private static final String SETTINGS_TITLE = "MngCCWizardSettings.title"; //$NON-NLS-1$ + private static final String SETTINGS_DESC = "MngCCWizardSettings.description"; //$NON-NLS-1$ + private static final String MSG_CREATE = "MngCCWizard.message.creating"; //$NON-NLS-1$ + + public NewManagedCCProjectWizard() { + this(ManagedBuilderUIPlugin.getResourceString(WZ_TITLE), ManagedBuilderUIPlugin.getResourceString(WZ_DESC)); + } + + public NewManagedCCProjectWizard(String title, String desc) { + super(title, desc); + } + + public void addPages() { + // Add the default page for all new managed projects + super.addPages(); + } + + protected void doRun(IProgressMonitor monitor) throws CoreException { + if (monitor == null) { + monitor = new NullProgressMonitor(); + } + monitor.beginTask(ManagedBuilderUIPlugin.getResourceString(MSG_CREATE), 8); //$NON-NLS-1$ + super.doRun(new SubProgressMonitor(monitor, 7)); + // Add C++ Nature. + if (newProject != null) { + // Add C++ Nature to the newly created project. + CCorePlugin.getDefault().convertProjectFromCtoCC(newProject, new SubProgressMonitor(monitor, 1)); + } + monitor.done(); + } +} diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/NewManagedCProjectWizard.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/NewManagedCProjectWizard.java new file mode 100644 index 00000000000..d935a187ba3 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/NewManagedCProjectWizard.java @@ -0,0 +1,36 @@ +package org.eclipse.cdt.managedbuilder.ui.wizards; + +/********************************************************************** + * Copyright (c) 2002,2003 Rational Software Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v0.5 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v05.html + * + * Contributors: + * IBM Rational Software - Initial API and implementation + * **********************************************************************/ + +import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIPlugin; + +public class NewManagedCProjectWizard extends NewManagedProjectWizard { + // String constants + private static final String WZ_TITLE = "MngCWizard.title"; + private static final String WZ_DESC = "MngCWizard.description"; + private static final String SETTINGS_TITLE= "MngCWizardSettings.title"; //$NON-NLS-1$ + private static final String SETTINGS_DESC= "MngCWizardSettings.description"; //$NON-NLS-1$ + + public NewManagedCProjectWizard() { + this(ManagedBuilderUIPlugin.getResourceString(WZ_TITLE), ManagedBuilderUIPlugin.getResourceString(WZ_DESC)); + } + + public NewManagedCProjectWizard(String title, String description) { + super(title, description); + } + + public void addPages() { + // Add the default page for all new managed projects + super.addPages(); + } + +} diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/NewManagedProjectOptionPage.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/NewManagedProjectOptionPage.java new file mode 100644 index 00000000000..55de97afb5d --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/NewManagedProjectOptionPage.java @@ -0,0 +1,59 @@ +package org.eclipse.cdt.managedbuilder.ui.wizards; + +/********************************************************************** + * Copyright (c) 2002,2003 Rational Software Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v0.5 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v05.html + * + * Contributors: + * IBM Rational Software - Initial API and implementation + * **********************************************************************/ + +import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin; +import org.eclipse.cdt.managedbuilder.internal.ui.ManagedProjectOptionBlock; +import org.eclipse.cdt.ui.dialogs.BinaryParserBlock; +import org.eclipse.cdt.ui.dialogs.ICOptionContainer; +import org.eclipse.cdt.ui.dialogs.ReferenceBlock; +import org.eclipse.cdt.ui.dialogs.TabFolderOptionBlock; +import org.eclipse.cdt.ui.wizards.NewCProjectWizard; +import org.eclipse.cdt.ui.wizards.NewCProjectWizardOptionPage; +import org.eclipse.core.resources.IProject; + +public class NewManagedProjectOptionPage extends NewCProjectWizardOptionPage { + + public class ManagedWizardOptionBlock extends ManagedProjectOptionBlock { + + public ManagedWizardOptionBlock(ICOptionContainer parent) { + super(parent); + } + + protected void addTabs() { + addTab(new ReferenceBlock()); + addTab(new BinaryParserBlock(ManagedBuilderCorePlugin.getDefault().getPluginPreferences())); + } + } + + /** + * @param pageName + */ + public NewManagedProjectOptionPage(String pageName) { + super(pageName); + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.ui.wizards.NewCProjectWizardOptionPage#createOptionBlock() + */ + protected TabFolderOptionBlock createOptionBlock() { + return new ManagedWizardOptionBlock(this); + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.ui.dialogs.ICOptionContainer#getProject() + */ + public IProject getProject() { + return ((NewCProjectWizard)getWizard()).getNewProject(); + } + +} diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/NewManagedProjectWizard.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/NewManagedProjectWizard.java new file mode 100644 index 00000000000..9e185d22bdf --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/NewManagedProjectWizard.java @@ -0,0 +1,168 @@ +package org.eclipse.cdt.managedbuilder.ui.wizards; + +/********************************************************************** + * Copyright (c) 2002,2003 Rational Software Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v0.5 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v05.html + * + * Contributors: + * IBM Rational Software - Initial API and implementation + * **********************************************************************/ + +import org.eclipse.cdt.core.CCorePlugin; +import org.eclipse.cdt.core.ICDescriptor; +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.ManagedCProjectNature; +import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIPlugin; +import org.eclipse.cdt.ui.wizards.NewCProjectWizard; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.SubProgressMonitor; + + +public class NewManagedProjectWizard extends NewCProjectWizard { + + /* (non-Javadoc) + * String constants + */ + protected static final String PREFIX = "MngMakeProjectWizard"; //$NON-NLS-1$ + protected static final String OP_ERROR = PREFIX + ".op_error"; //$NON-NLS-1$ + protected static final String WZ_TITLE = PREFIX + ".title"; //$NON-NLS-1$ + protected static final String WZ_DESC = PREFIX + ".description"; //$NON-NLS-1$ + protected static final String CONF_TITLE = PREFIX + ".config.title"; //$NON-NLS-1$ + protected static final String CONF_DESC = PREFIX + ".config.desc"; //$NON-NLS-1$ + protected static final String OPTIONS_TITLE = PREFIX + ".options.title"; //$NON-NLS-1$ + protected static final String OPTIONS_DESC = PREFIX + ".options.desc"; //$NON-NLS-1$ + protected static final String MSG_ADD_NATURE = PREFIX + ".message.add_nature"; //$NON-NLS-1$ + protected static final String MSG_ADD_BUILDER = PREFIX + ".message.add_builder"; //$NON-NLS-1$ + protected static final String MSG_SAVE = PREFIX + ".message.save"; //$NON-NLS-1$ + protected static final String SETTINGS_TITLE = "MngMakeWizardSettings.title"; //$NON-NLS-1$ + protected static final String SETTINGS_DESC = "MngMakeWizardSettings.description"; //$NON-NLS-1$ + + // Wizard pages + protected CProjectPlatformPage targetConfigurationPage; + protected NewManagedProjectOptionPage optionPage; + + public NewManagedProjectWizard() { + this(ManagedBuilderUIPlugin.getResourceString(WZ_TITLE), ManagedBuilderUIPlugin.getResourceString(WZ_DESC)); + } + + public NewManagedProjectWizard(String title, String description) { + super(title, description); + } + + public void addPages() { + // Add the default page for all new projects + super.addPages(); + + // Add the configuration selection page + targetConfigurationPage = new CProjectPlatformPage(PREFIX); + targetConfigurationPage.setTitle(ManagedBuilderUIPlugin.getResourceString(CONF_TITLE)); + targetConfigurationPage.setDescription(ManagedBuilderUIPlugin.getResourceString(CONF_DESC)); + addPage(targetConfigurationPage); + + // Add the options (tabbed) page + optionPage = new NewManagedProjectOptionPage(PREFIX); + optionPage.setTitle(ManagedBuilderUIPlugin.getResourceString(OPTIONS_TITLE)); + optionPage.setDescription(ManagedBuilderUIPlugin.getResourceString(OPTIONS_DESC)); + addPage(optionPage); + } + + protected void doRun(IProgressMonitor monitor) throws CoreException { + if (monitor == null) { + monitor = new NullProgressMonitor(); + } + + // super.doRun() just creates the project and does not assign a builder to it. + super.doRun(new SubProgressMonitor(monitor, 5)); + + // Add the managed build nature + try { + monitor.subTask(ManagedBuilderUIPlugin.getResourceString(MSG_ADD_NATURE)); + ManagedCProjectNature.addManagedNature(newProject, new SubProgressMonitor(monitor, 1)); + } catch (CoreException e) { + // Bail out of the project creation + } + // Add the builder + try { + monitor.subTask(ManagedBuilderUIPlugin.getResourceString(MSG_ADD_BUILDER)); + ManagedCProjectNature.addManagedBuilder(newProject, new SubProgressMonitor(monitor, 1)); + } catch (CoreException e) { + // Bail out of the project creation + } + + // Modify the project settings + if (newProject != null) { + optionPage.performApply(new SubProgressMonitor(monitor, 2)); + } + + // Add the target to the project + try { + ITarget parent = targetConfigurationPage.getSelectedTarget(); + ITarget newTarget = ManagedBuildManager.createTarget(newProject, parent); + if (newTarget != null) { + // TODO add name entry field to project + String artifactName = newProject.getName(); + artifactName += parent.getDefaultExtension().length() == 0 ? "" : "." + parent.getDefaultExtension(); + newTarget.setBuildArtifact(artifactName); + IConfiguration [] selectedConfigs = targetConfigurationPage.getSelectedConfigurations(); + for (int i = 0; i < selectedConfigs.length; i++) { + IConfiguration config = selectedConfigs[i]; + newTarget.createConfiguration(config, config.getId() + "." + i); + } + // Now add the first config in the list as the default + IConfiguration[] newConfigs = newTarget.getConfigurations(); + if (newConfigs.length > 0) { + ManagedBuildManager.setDefaultConfiguration(newProject, newConfigs[0]); + } + } + } catch (BuildException e) { + // TODO Flag the error to the user + } + + // Associate the project with the managed builder so the clients can get proper information + try { + ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(newProject); + desc.remove(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID); + desc.create(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID, ManagedBuildManager.INTERFACE_IDENTITY); + } catch (CoreException e) { + // TODO Flag the error to the user + } + + // Save the build options + monitor.subTask(ManagedBuilderUIPlugin.getResourceString(MSG_SAVE)); + ManagedBuildManager.saveBuildInfo(newProject); + monitor.done(); + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.ui.wizards.NewCProjectWizard#doRunPrologue(org.eclipse.core.runtime.IProgressMonitor) + */ + protected void doRunPrologue(IProgressMonitor monitor) { + // Auto-generated method stub + + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.ui.wizards.NewCProjectWizard#doRunEpilogue(org.eclipse.core.runtime.IProgressMonitor) + */ + protected void doRunEpilogue(IProgressMonitor monitor) { + // Auto-generated method stub + + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.ui.wizards.NewCProjectWizard#getProjectID() + */ + public String getProjectID() { + return "org.eclipse.cdt.make.core.make"; +// return ManagedBuilderCorePlugin.getUniqueIdentifier() + ".make"; //$NON-NLS-1$ + } + +} diff --git a/core/org.eclipse.cdt.core.tests/.classpath b/core/org.eclipse.cdt.core.tests/.classpath index d495f08f7d8..71f8c51ecd1 100644 --- a/core/org.eclipse.cdt.core.tests/.classpath +++ b/core/org.eclipse.cdt.core.tests/.classpath @@ -12,11 +12,16 @@ + + + + + - + diff --git a/core/org.eclipse.cdt.core.tests/.project b/core/org.eclipse.cdt.core.tests/.project index a0121139f31..23c267fe889 100644 --- a/core/org.eclipse.cdt.core.tests/.project +++ b/core/org.eclipse.cdt.core.tests/.project @@ -5,6 +5,11 @@ org.apache.xerces org.eclipse.cdt.core + org.eclipse.cdt.core.linux + org.eclipse.cdt.core.qnx + org.eclipse.cdt.core.solaris + org.eclipse.cdt.core.win32 + org.eclipse.cdt.managedbuilder.core org.eclipse.cdt.ui org.eclipse.core.boot org.eclipse.core.resources diff --git a/core/org.eclipse.cdt.core.tests/build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java b/core/org.eclipse.cdt.core.tests/build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java index 320a4b72bf4..b9a63e004a4 100644 --- a/core/org.eclipse.cdt.core.tests/build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java +++ b/core/org.eclipse.cdt.core.tests/build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java @@ -20,19 +20,19 @@ import junit.framework.TestSuite; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.ICDescriptor; -import org.eclipse.cdt.core.ManagedCProjectNature; -import org.eclipse.cdt.core.build.managed.BuildException; -import org.eclipse.cdt.core.build.managed.IConfiguration; -import org.eclipse.cdt.core.build.managed.IManagedBuildInfo; -import org.eclipse.cdt.core.build.managed.IOption; -import org.eclipse.cdt.core.build.managed.IOptionCategory; -import org.eclipse.cdt.core.build.managed.ITarget; -import org.eclipse.cdt.core.build.managed.ITool; -import org.eclipse.cdt.core.build.managed.ManagedBuildManager; import org.eclipse.cdt.core.parser.IScannerInfo; import org.eclipse.cdt.core.parser.IScannerInfoChangeListener; import org.eclipse.cdt.core.parser.IScannerInfoProvider; -import org.eclipse.cdt.internal.core.build.managed.ToolReference; +import org.eclipse.cdt.managedbuilder.core.BuildException; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo; +import org.eclipse.cdt.managedbuilder.core.IOption; +import org.eclipse.cdt.managedbuilder.core.IOptionCategory; +import org.eclipse.cdt.managedbuilder.core.ITarget; +import org.eclipse.cdt.managedbuilder.core.ITool; +import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; +import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature; +import org.eclipse.cdt.managedbuilder.internal.core.ToolReference; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; import org.eclipse.core.resources.IResource; diff --git a/core/org.eclipse.cdt.core.tests/plugin.xml b/core/org.eclipse.cdt.core.tests/plugin.xml index 8fcef957f9e..e2c6ad2cc00 100644 --- a/core/org.eclipse.cdt.core.tests/plugin.xml +++ b/core/org.eclipse.cdt.core.tests/plugin.xml @@ -19,13 +19,14 @@ + + point="org.eclipse.cdt.managedbuilder.core.ManagedBuildInfo"> Preferences>Java>Code Generation>Code and Comments - */ -package org.eclipse.cdt.core.build.managed; - -/** - * @author dschaefe - * - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -public class BuildException extends Exception { - - public BuildException(String msg) { - super(msg); - } - -} diff --git a/core/org.eclipse.cdt.core/plugin.properties b/core/org.eclipse.cdt.core/plugin.properties index b94cb646bd5..8f28b993ab8 100644 --- a/core/org.eclipse.cdt.core/plugin.properties +++ b/core/org.eclipse.cdt.core/plugin.properties @@ -16,8 +16,4 @@ makeproject.name=Make Project genericmake.name=Generic Make makebuildmodel.name=Make Builder -ManagedBuildNature.name=Managed C/C++ Build Nature - -GeneratedMakefileCBuilder.name=Generated Makefile C/C++ Builder - CTaskName=C/C++ Task diff --git a/core/org.eclipse.cdt.core/plugin.xml b/core/org.eclipse.cdt.core/plugin.xml index f1231d9b2c7..6812cf1a2ad 100644 --- a/core/org.eclipse.cdt.core/plugin.xml +++ b/core/org.eclipse.cdt.core/plugin.xml @@ -69,7 +69,6 @@ - @@ -219,22 +218,6 @@ - - - - - - - - - - - @@ -281,26 +264,6 @@ - - - - - - - - - - - - - - @@ -431,20 +394,6 @@ - - - - - - - - - - - diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePluginResources.properties b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePluginResources.properties index f5654696747..b74630d25ce 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePluginResources.properties +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePluginResources.properties @@ -5,17 +5,3 @@ # ################################################ CBuilder.build_error= Build Error - -# Generated makefile builder messages -MakeBuilder.message.starting = Starting the build for project {0} -MakeBuilder.message.rebuild = Regenerating makefiles for project {0} -MakeBuilder.message.incremental = Updating makefiles for project {0} -MakeBuilder.message.make = Calling {0} for project {1} -MakeBuilder.message.error = Build error -MakeBuilder.message.finished = Build complete for project {0} -MakeBuilder.comment.module.list = # Every subdirectory with source files must be described here -MakeBuilder.comment.source.list = # Each subdirectory must contribute its source files here -MakeBuilder.comment.build.rule = # Each subdirectory must supply rules for building sources it contributes -MakeBuilder.comment.module.make.includes = # Include the makefiles for each source subdirectory -MakeBuilder.comment.module.dep.includes = # Include automatically-generated dependency list: -MakeBuilder.comment.autodeps = # Automatically-generated dependency list: diff --git a/core/org.eclipse.cdt.ui/.classpath b/core/org.eclipse.cdt.ui/.classpath index 9aecda4f3ac..0bcc542d2a9 100644 --- a/core/org.eclipse.cdt.ui/.classpath +++ b/core/org.eclipse.cdt.ui/.classpath @@ -2,7 +2,6 @@ - diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/ConfigurationBlock.java b/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/ConfigurationBlock.java deleted file mode 100644 index 48a3910cafb..00000000000 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/ConfigurationBlock.java +++ /dev/null @@ -1,181 +0,0 @@ -package org.eclipse.cdt.ui.build.wizards; - -/********************************************************************** - * Copyright (c) 2002,2003 Rational Software Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v0.5 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v05.html - * - * Contributors: - * Rational Software - Initial API and implementation -***********************************************************************/ - -import org.eclipse.cdt.core.CProjectNature; -import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.cdt.ui.wizards.IWizardTab; -import org.eclipse.cdt.utils.ui.controls.ControlFactory; -import org.eclipse.cdt.utils.ui.controls.RadioButtonsArea; -import org.eclipse.cdt.utils.ui.swt.IValidation; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; - -public class ConfigurationBlock implements IWizardTab { - /* (non-Javadoc) - * String constants - */ - private static final String PREFIX = "ConfigurationBlock"; //$NON-NLS-1$ - private static final String TYPE = PREFIX + ".type"; //$NON-NLS-1$ - private static final String LABEL = PREFIX + ".label"; //$NON-NLS-1$ - private static final String APP = TYPE + ".app"; //$NON-NLS-1$ - private static final String DLL = TYPE + ".shared"; //$NON-NLS-1$ - private static final String LIB = TYPE + ".static"; //$NON-NLS-1$ - private static final String BUILD = PREFIX + ".build"; //$NON-NLS-1$ - private static final String BUILD_LABEL = BUILD + ".label"; //$NON-NLS-1$ - private static final String CONT = BUILD + ".continue"; //$NON-NLS-1$ - private static final String STOP = BUILD + ".stop"; //$NON-NLS-1$ - - /* (non-Javadoc) - * Bookeeping variables - */ - private IValidation page; - private ManagedProjectWizard fWizard; - - /* (non-Javadoc) - * Widgets used on the tab - */ - protected Composite composite; - protected GridData gd; - protected RadioButtonsArea typeRadioButtons; - private String [][] types; - private static final String APP_ARG = "exe"; //$NON-NLS-1$ - private static final String DLL_ARG = "dll"; //$NON-NLS-1$ - private static final String LIB_ARG = "lib"; //$NON-NLS-1$ - protected RadioButtonsArea optRadioButtons; - private String [][] opts; - private static final String CONT_ARG = "cont"; //$NON-NLS-1$ - private static final String STOP_ARG = "stop"; //$NON-NLS-1$ - - public ConfigurationBlock(IValidation valid, ManagedProjectWizard wizard) { - page = valid; - fWizard = wizard; - } - - /** - * @see org.eclipse.cdt.ui.wizards.IWizardTab#getLabel() - */ - public String getLabel() { - return CUIPlugin.getResourceString(LABEL); - } - - /** - * @see org.eclipse.cdt.ui.wizards.IWizardTab#getImage() - */ - public Image getImage() { -// return CPluginImages.get(CPluginImages.IMG_BUILD_CONFIG); - return null; - } - - /** - * @see org.eclipse.cdt.ui.wizards.IWizardTab#getControl(org.eclipse.swt.widgets.Composite) - */ - public Composite getControl(Composite parent) { - // Create the composite control for the tab - composite = ControlFactory.createComposite(parent, 2); - - // Create the application type selection area and select the application option - types = new String [][] { - {CUIPlugin.getResourceString(APP), APP_ARG}, - {CUIPlugin.getResourceString(DLL), DLL_ARG}, - {CUIPlugin.getResourceString(LIB), LIB_ARG} - }; - typeRadioButtons = new RadioButtonsArea(composite, CUIPlugin.getResourceString(TYPE), 1, types); - typeRadioButtons.addListener(SWT.Selection, new Listener () { - public void handleEvent(Event e) { - page.setComplete(isValid()); - } - }); - - gd = new GridData(); - gd.horizontalSpan = 2; - gd.horizontalAlignment = GridData.FILL; - gd.grabExcessHorizontalSpace = true; - typeRadioButtons.setLayoutData(gd); - - // Create the build option buttons - opts = new String [][] { - {CUIPlugin.getResourceString(CONT), CONT_ARG}, - {CUIPlugin.getResourceString(STOP), STOP_ARG} - }; - optRadioButtons = new RadioButtonsArea(composite, CUIPlugin.getResourceString(BUILD_LABEL), 1, opts); - gd = new GridData(); - gd.horizontalSpan = 2; - gd.horizontalAlignment = GridData.FILL; - gd.grabExcessHorizontalSpace = true; - optRadioButtons.setLayoutData(gd); - - // Return the widget - return composite; - } - - /** - * @see org.eclipse.cdt.ui.wizards.IWizardTab#isValid() - */ - public boolean isValid() { - return true; - } - - /** - * @see org.eclipse.cdt.ui.wizards.IWizardTab#setVisible(boolean) - */ - public void setVisible(boolean visible) { - - // Set the executable radio button by default - typeRadioButtons.setSelectedButton(0); - - // Set the build option radio button based on the platform default - optRadioButtons.setSelectedButton(0); - } - - /** - * @see org.eclipse.cdt.ui.wizards.IWizardTab#doRun(org.eclipse.core.resources.IProject, org.eclipse.core.runtime.IProgressMonitor) - */ - public void doRun(IProject project, IProgressMonitor monitor) { - try { - if (monitor == null) { - monitor = new NullProgressMonitor(); - } - monitor.beginTask("Configuration", 1); - - // Get the project nature; - CProjectNature nature = (CProjectNature) project.getNature(CProjectNature.C_NATURE_ID); - - // Set the build options on the project nature - if (nature != null) { - nature.setStopOnError(isStopOnError()); - } - } - catch (CoreException e) { - } - } - - /** - * Method isStopOnError. - * @return boolean - */ - private boolean isStopOnError() { - if (optRadioButtons != null) { - return (optRadioButtons.getSelectedValue() == STOP_ARG); - } - return false; - } - -} diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/ManagedCCWizard.java b/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/ManagedCCWizard.java deleted file mode 100644 index 76b9e27c41f..00000000000 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/ManagedCCWizard.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.eclipse.cdt.ui.build.wizards; - -/********************************************************************** - * Copyright (c) 2002,2003 Rational Software Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v0.5 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v05.html - * - * Contributors: - * Rational Software - Initial API and implementation -***********************************************************************/ - -import org.eclipse.cdt.core.CCorePlugin; -import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.swt.widgets.TabFolder; - -/** - * Wizard that creates a new C++ project that uses the managed make system - */ -public class ManagedCCWizard extends ManagedProjectWizard { - - private static final String WZ_TITLE = "MngCCWizard.title"; - private static final String WZ_DESC = "MngCCWizard.description"; - private static final String SETTINGS_TITLE= "MngCCWizardSettings.title"; //$NON-NLS-1$ - private static final String SETTINGS_DESC= "MngCCWizardSettings.description"; //$NON-NLS-1$ - - public ManagedCCWizard() { - this(CUIPlugin.getResourceString(WZ_TITLE), CUIPlugin.getResourceString(WZ_DESC)); - } - - public ManagedCCWizard(String title, String desc) { - super(title, desc); - } - - public void addTabItems(TabFolder folder) { - super.addTabItems(folder); - fTabFolderPage.setTitle(CUIPlugin.getResourceString(SETTINGS_TITLE)); - fTabFolderPage.setDescription(CUIPlugin.getResourceString(SETTINGS_DESC)); - } - - protected void doRun(IProgressMonitor monitor) throws CoreException { - monitor.beginTask("Creating Generated C++ Make Project", 4); - super.doRun(monitor); - // Add C++ and managed build natures - if (newProject != null) { - if (monitor == null) { - monitor = new NullProgressMonitor(); - } - // Add C++ Nature to the newly created project. - monitor.subTask("Adding C++ Nature"); - CCorePlugin.getDefault().convertProjectFromCtoCC(newProject, monitor); - monitor.worked(1); - - // Add the managed build nature to the project - monitor.subTask("Adding makefile generator"); - addManagedBuildNature(newProject, monitor); - monitor.worked(1); - - monitor.done(); - } - } -} diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/ManagedCWizard.java b/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/ManagedCWizard.java deleted file mode 100644 index 550c9585a0e..00000000000 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/ManagedCWizard.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.eclipse.cdt.ui.build.wizards; - -/********************************************************************** - * Copyright (c) 2002,2003 Rational Software Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v0.5 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v05.html - * - * Contributors: - * Rational Software - Initial API and implementation -***********************************************************************/ - - -import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.swt.widgets.TabFolder; - -/** - * Wizard to create a new C project that uses the managed make system. - */ -public class ManagedCWizard extends ManagedProjectWizard { - - private static final String WZ_TITLE = "MngCWizard.title"; - private static final String WZ_DESC = "MngCWizard.description"; - private static final String SETTINGS_TITLE= "MngCWizardSettings.title"; //$NON-NLS-1$ - private static final String SETTINGS_DESC= "MngCWizardSettings.description"; //$NON-NLS-1$ - - public ManagedCWizard() { - this(CUIPlugin.getResourceString(WZ_TITLE), CUIPlugin.getResourceString(WZ_DESC)); - } - - public ManagedCWizard(String title, String desc) { - super(title, desc); - } - - public void addTabItems(TabFolder folder) { - super.addTabItems(folder); - fTabFolderPage.setTitle(CUIPlugin.getResourceString(SETTINGS_TITLE)); - fTabFolderPage.setDescription(CUIPlugin.getResourceString(SETTINGS_DESC)); - } - - protected void doRun(IProgressMonitor monitor) throws CoreException { - // Let the super class create and populate the standard project - super.doRun(monitor); - // Add the managed build nature - if (newProject != null) { - if (monitor == null) { - monitor = new NullProgressMonitor(); - } - monitor.beginTask("Creating Generated C Make Project", 3); - - // Add the managed build nature to the project - addManagedBuildNature(newProject, monitor); - - monitor.done(); - } - } -} diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/ManagedProjectWizard.java b/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/ManagedProjectWizard.java deleted file mode 100644 index f543524abcc..00000000000 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/ManagedProjectWizard.java +++ /dev/null @@ -1,214 +0,0 @@ -package org.eclipse.cdt.ui.build.wizards; - -/********************************************************************** - * Copyright (c) 2002,2003 Rational Software Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v0.5 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v05.html - * - * Contributors: - * Rational Software - Initial API and implementation -***********************************************************************/ - -import org.eclipse.cdt.core.CCorePlugin; -import org.eclipse.cdt.core.ICDescriptor; -import org.eclipse.cdt.core.ManagedCProjectNature; -import org.eclipse.cdt.core.build.managed.BuildException; -import org.eclipse.cdt.core.build.managed.IConfiguration; -import org.eclipse.cdt.core.build.managed.ITarget; -import org.eclipse.cdt.core.build.managed.ManagedBuildManager; -import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.cdt.ui.wizards.BinaryParserBlock; -import org.eclipse.cdt.ui.wizards.CProjectWizard; -import org.eclipse.cdt.ui.wizards.CProjectWizardPage; -import org.eclipse.cdt.ui.wizards.ReferenceBlock; -import org.eclipse.cdt.ui.wizards.TabFolderPage; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.core.runtime.SubProgressMonitor; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.TabFolder; -import org.eclipse.swt.widgets.TabItem; - -public abstract class ManagedProjectWizard extends CProjectWizard { - - /* (non-Javadoc) - * String constants - */ - protected static final String PREFIX = "MngMakeProjectWizard"; //$NON-NLS-1$ - protected static final String OP_ERROR= PREFIX + ".op_error"; //$NON-NLS-1$ - protected static final String WZ_TITLE= PREFIX + ".title"; //$NON-NLS-1$ - protected static final String WZ_DESC= PREFIX + ".description"; //$NON-NLS-1$ - protected static final String SETTINGS_TITLE= "MngMakeWizardSettings.title"; //$NON-NLS-1$ - protected static final String SETTINGS_DESC= "MngMakeWizardSettings.description"; //$NON-NLS-1$ - - /* (non-Javadoc) - * Wizard has a page inherited from super class for setting project - * location, one for choosing the platform and a tabbed page to set - * configuration options - */ - protected CProjectPlatformPage targetConfigurationPage; - protected ConfigurationBlock configBlock; - protected ReferenceBlock referenceBlock; - protected BinaryParserBlock binaryParserBlock; - - /** - * Default Constructor - */ - public ManagedProjectWizard() { - this(CUIPlugin.getResourceString(WZ_TITLE), CUIPlugin.getResourceString(WZ_DESC)); - } - - /** - * @see org.eclipse.cdt.ui.wizards.CProjectWizard#CProjectWizard(java.lang.String, java.lang.String) - */ - public ManagedProjectWizard(String title, String desc) { - super(title,desc); - } - - public void addManagedBuildNature (IProject project, IProgressMonitor monitor) { - // Add the managed build nature - try { - monitor.subTask("Adding Managed Nature"); - ManagedCProjectNature.addManagedNature(project, monitor); - monitor.worked(1); - } catch (CoreException e) { - e.printStackTrace(); - } - // Add the builder - try { - monitor.subTask("Adding Makefile Generator"); - ManagedCProjectNature.addManagedBuilder(project, monitor); - monitor.worked(1); - } catch (CoreException e) { - // TODO: handle exception - } - - // Add the target to the project - try { - ITarget parent = targetConfigurationPage.getSelectedTarget(); - ITarget newTarget = ManagedBuildManager.createTarget(project, parent); - if (newTarget != null) { - // TODO add name entry field to project - String artifactName = project.getName(); - artifactName += parent.getDefaultExtension().length() == 0 ? "" : "." + parent.getDefaultExtension(); - newTarget.setBuildArtifact(artifactName); - IConfiguration [] selectedConfigs = targetConfigurationPage.getSelectedConfigurations(); - for (int i = 0; i < selectedConfigs.length; i++) { - IConfiguration config = selectedConfigs[i]; - newTarget.createConfiguration(config, config.getId() + "." + i); - } - // Now add the first config in the list as the default - IConfiguration[] newConfigs = newTarget.getConfigurations(); - if (newConfigs.length > 0) { - ManagedBuildManager.setDefaultConfiguration(project, newConfigs[0]); - } - } - } catch (BuildException e) { - e.printStackTrace(); - } - - // Associate the project with the managed builder so the clients can get proper information - try { - ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(project); - desc.remove(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID); - desc.create(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID, ManagedBuildManager.INTERFACE_IDENTITY); - } catch (CoreException e) { - // TODO Flag the error to the user - } - - // Save the build options - monitor.subTask("Saving new build options."); - ManagedBuildManager.saveBuildInfo(project); - monitor.worked(1); - } - - /** - * @see Wizard#createPages - */ - public void addPages() { - // Add the page to name the project and set the location - fMainPage= new CProjectWizardPage(this, new String()); - fMainPage.setTitle(CUIPlugin.getResourceString(WZ_TITLE)); - fMainPage.setDescription(CUIPlugin.getResourceString(WZ_DESC)); - addPage(fMainPage); - - // Add a page to chose the build platform - targetConfigurationPage = new CProjectPlatformPage(this, new String()); - targetConfigurationPage.setTitle(CUIPlugin.getResourceString(WZ_TITLE)); - targetConfigurationPage.setDescription(CUIPlugin.getResourceString(WZ_DESC)); - addPage(targetConfigurationPage); - - // Add the tab container - fTabFolderPage = new TabFolderPage(this); - addPage(fTabFolderPage); - } - - /** - * @see org.eclipse.cdt.ui.wizards.CProjectWizard#addTabItems(org.eclipse.swt.widgets.TabFolder) - */ - public void addTabItems(TabFolder folder) { - fTabFolderPage.setTitle(CUIPlugin.getResourceString(SETTINGS_TITLE)); - fTabFolderPage.setDescription(CUIPlugin.getResourceString(SETTINGS_DESC)); - - // Add the tab to set the project dependencies - referenceBlock = new ReferenceBlock(getValidation()); - TabItem item2 = new TabItem(folder, SWT.NONE); - item2.setText(referenceBlock.getLabel()); - Image img2 = referenceBlock.getImage(); - if (img2 != null) - item2.setImage(img2); - item2.setData(referenceBlock); - item2.setControl(referenceBlock.getControl(folder)); - addTabItem(referenceBlock); - - // add the tab to select which parser to use for binaries - binaryParserBlock = new BinaryParserBlock(getValidation()); - TabItem item3 = new TabItem(folder, SWT.NONE); - item3.setText(binaryParserBlock.getLabel()); - Image img3 = binaryParserBlock.getImage(); - if (img3 != null) - item3.setImage(img3); - item3.setData(binaryParserBlock); - item3.setControl(binaryParserBlock.getControl(folder)); - addTabItem(binaryParserBlock); - } - - protected void doRunPrologue(IProgressMonitor monitor) { - } - - protected void doRunEpilogue(IProgressMonitor monitor) { - } - - protected void doRun(IProgressMonitor monitor) throws CoreException { - // super.doRun() just creates the project and does not assign a builder to it. - super.doRun(monitor); - - // Modify the project based on what the user has selected - if (newProject != null) { - if (monitor == null) { - monitor = new NullProgressMonitor(); - } - // Update the referenced project if provided. - monitor.subTask("Adding project references"); - if (referenceBlock != null) { - referenceBlock.doRun(newProject, new SubProgressMonitor(monitor, 1)); - } - monitor.worked(1); - // Update the binary parser - monitor.subTask("Setting binary parser"); - if (binaryParserBlock != null) { - binaryParserBlock.doRun(newProject, new SubProgressMonitor(monitor, 1)); - } - monitor.worked(1); - } - } - - public String getProjectID() { - return CCorePlugin.PLUGIN_ID + ".make"; - } -} diff --git a/core/org.eclipse.cdt.ui/plugin.properties b/core/org.eclipse.cdt.ui/plugin.properties index 49a295c7c78..dba8b386d74 100644 --- a/core/org.eclipse.cdt.ui/plugin.properties +++ b/core/org.eclipse.cdt.ui/plugin.properties @@ -18,15 +18,11 @@ MakeView.name=Make Targets newCWizardsCategory.name=C StdCWizard.name=Standard Make C Project StdCWizard.description=Create a new C project and let me create and manage the makefile -MngCWizard.name=Managed Make C Project -MngCWizard.description=Create a new C project and let Eclipse create and manage the makefile # C++ newCCWizardsCategory.name=C++ StdCCWizard.name=Standard Make C++ Project StdCCWizard.description=Create a new C++ project and let me create and manage the makefile -MngCCWizard.name=Managed Make C++ Project -MngCCWizard.description=Create a new C++ project and let Eclipse create and manage the makefile #Project Conversion ConversionWizard.name=Convert a project's nature @@ -87,22 +83,6 @@ CFolderActionSet.description=C Folder Action Set # Task Action DeleteTaskAction.label=Delete C/C++ Markers -# Build Model Names -ConfigName.Rel=Release -ConfigName.Dbg=Debug -ToolName.preprocessor = Preprocessor -ToolName.compiler = Compiler -ToolName.archiver = Archiver -ToolName.linker = Linker -OptionCategory.Preproc = Preprocessor -OptionCategory.Dirs = Directories -OptionCategory.General = General -OptionCategory.Optimize=Optimization -OptionCategory.Debug=Debugging -OptionCategory.Warn=Warnings -OptionCategory.Misc=Miscellaneous -OptionCategory.Libs=Libraries - # C/C++ Search CSearchPage.label= C/C++ Search openCSearchPageAction.label= &C/C++... diff --git a/core/org.eclipse.cdt.ui/plugin.xml b/core/org.eclipse.cdt.ui/plugin.xml index dba24591176..029258626fa 100644 --- a/core/org.eclipse.cdt.ui/plugin.xml +++ b/core/org.eclipse.cdt.ui/plugin.xml @@ -227,31 +227,6 @@ class="org.eclipse.core.resources.IResource"> - - - - %MngCCWizard.description - - - - - %MngCWizard.description - - - - - - --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +