[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: Applied: [cdt-patch] Patch for Approval: Standard make info in cdtproject
|
>
> I have applied this patch. I have raised a bug on myself to address the
> multi-threading issue.
>
For some reason, I did not see this email/patch 8(.
+1
A step in the right direction IMO.
> Doug Schaefer, Senior Software Developer
> IBM Rational Software, Ottawa, Ontario, Canada
>
>
>
> Douglas Schaefer/Ottawa/IBM@IBMCA
> Sent by: cdt-patch-admin@xxxxxxxxxxx
> 07/07/2003 10:14 PM
> Please respond to
> cdt-patch@xxxxxxxxxxx
>
>
> To
> cdt-patch@xxxxxxxxxxx
> cc
>
> Subject
> [cdt-patch] Patch for Approval: Standard make info in cdtproject file
>
>
>
>
>
>
> Hey gang,
>
> Here's one I'd like to get approval on. This patch adds the ability to
> add arbitrary XML data to the cdtproject file. I then use this to store
> the stuff Sean had put in the cdtbuild file for Standard Make projects.
> The intention is to do the same for the Managed Make projects and anything
>
> else we need to store in source control.
>
> I also cleaned up some of the exception handling in the
> StandardBuildManager.
>
> Thanks,
> Doug Schaefer, Senior Software Developer
> IBM Rational Software, Ottawa, Ontario, Canada
>
>
>
> --=_mixed 0067489B85256D5F_=
> Content-Type: text/plain; name="org.eclipse.cdt.core.patch.txt"
> Content-Disposition: attachment; filename="org.eclipse.cdt.core.patch.txt"
> Content-Transfer-Encoding: quoted-printable
>
> Index: build/org/eclipse/cdt/core/build/standard/StandardBuildManager.java
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /home/tools/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build=
> /standard/StandardBuildManager.java,v
> retrieving revision 1.1
> diff -u -r1.1 StandardBuildManager.java
> --- build/org/eclipse/cdt/core/build/standard/StandardBuildManager.java 4 J=
> ul 2003 18:36:45 -0000 1.1
> +++ build/org/eclipse/cdt/core/build/standard/StandardBuildManager.java 8 J=
> ul 2003 02:06:31 -0000
> @@ -1,9 +1,5 @@
> package org.eclipse.cdt.core.build.standard;
> =20
> -import java.io.ByteArrayInputStream;
> -import java.io.ByteArrayOutputStream;
> -import java.io.InputStream;
> -import java.io.OutputStreamWriter;
> import java.util.ArrayList;
> import java.util.Arrays;
> import java.util.HashMap;
> @@ -11,16 +7,9 @@
> import java.util.ListIterator;
> import java.util.Map;
> =20
> -import javax.xml.parsers.DocumentBuilder;
> -import javax.xml.parsers.DocumentBuilderFactory;
> -
> -import org.apache.xerces.dom.DocumentImpl;
> -import org.apache.xml.serialize.Method;
> -import org.apache.xml.serialize.OutputFormat;
> -import org.apache.xml.serialize.Serializer;
> -import org.apache.xml.serialize.SerializerFactory;
> import org.eclipse.cdt.core.BuildInfoFactory;
> import org.eclipse.cdt.core.CCorePlugin;
> +import org.eclipse.cdt.core.ICDescriptor;
> import org.eclipse.cdt.core.parser.IScannerInfo;
> import org.eclipse.cdt.core.parser.IScannerInfoChangeListener;
> import org.eclipse.cdt.core.parser.IScannerInfoProvider;
> @@ -30,9 +19,9 @@
> import org.eclipse.core.resources.IResource;
> import org.eclipse.core.runtime.CoreException;
> import org.eclipse.core.runtime.QualifiedName;
> -import org.w3c.dom.Document;
> import org.w3c.dom.Element;
> import org.w3c.dom.Node;
> +import org.w3c.dom.NodeList;
> =20
> /**********************************************************************
> * Copyright (c) 2002,2003 Rational Software Corporation and others.
> @@ -49,18 +38,16 @@
> // Name we will use to store build property with the project
> private static final QualifiedName buildInfoProperty
> =3D new QualifiedName(CCorePlugin.PLUGIN=5FID, "standardBuildInfo");
> + private static final String ID =3D CCorePlugin.PLUGIN=5FID + ".standardBu=
> ildInfo";
> =20
> // Listeners interested in build model changes
> private static Map buildModelListeners;=20
> =20
> - private static final String FILE=5FNAME =3D ".cdtbuild";
> - private static final String ROOT=5FELEM=5FNAME =3D "StandardProjectBuildI=
> nfo";
> -
> /**
> * @param project
> * @return
> */
> - private static IStandardBuildInfo findBuildInfo(IResource resource, boole=
> an create) {
> + private static IStandardBuildInfo findBuildInfo(IResource resource, boole=
> an create) throws CoreException {
> IStandardBuildInfo buildInfo =3D null;
> // See if there's already one associated with the resource for this sess=
> ion
> try {
> @@ -87,11 +74,11 @@
> return buildInfo;
> }
> =20
> - public static IStandardBuildInfo getBuildInfo(IProject project) {
> + public static IStandardBuildInfo getBuildInfo(IProject project) throws Co=
> reException {
> return findBuildInfo(project, false);
> }
> =09
> - public static IStandardBuildInfo getBuildInfo(IProject project, boolean c=
> reate) {
> + public static IStandardBuildInfo getBuildInfo(IProject project, boolean c=
> reate) throws CoreException {
> return findBuildInfo(project, create);
> }
> =20
> @@ -108,7 +95,7 @@
> /* (non-Javadoc)
> * @see org.eclipse.cdt.core.parser.IScannerInfoProvider#managesResource(=
> org.eclipse.core.resources.IResource)
> */
> - public boolean managesResource(IResource resource) {
> + public boolean managesResource(IResource resource) throws CoreException {
> /*=20
> * Answers true if this project has a build info associated with it
> */
> @@ -129,7 +116,9 @@
> return info =3D=3D null ? false : true;
> }
> =20
> - public static void setPreprocessorSymbols(IProject project, String[] symb=
> ols) {
> + public static void setPreprocessorSymbols(IProject project, String[] symb=
> ols)
> + throws CoreException=20
> + {
> // Get the information for the project
> IStandardBuildInfo info =3D getBuildInfo(project);
> // Set the new information
> @@ -143,7 +132,9 @@
> }
> }
> =09
> - public static void setIncludePaths(IProject project, String[] paths) {
> + public static void setIncludePaths(IProject project, String[] paths)
> + throws CoreException
> + {
> // Get the build info for the project
> IStandardBuildInfo info =3D getBuildInfo(project);
> if (info !=3D null) {
> @@ -177,25 +168,10 @@
> * information is then associated with the resource for the duration of=20
> * the session.
> */
> - private static IStandardBuildInfo loadBuildInfo(IProject project) {
> - IStandardBuildInfo buildInfo =3D null;
> - IFile file =3D project.getFile(FILE=5FNAME);
> - if (!file.exists())
> - return null;
> -=09
> - try {
> - InputStream stream =3D file.getContents();
> - DocumentBuilder parser =3D DocumentBuilderFactory.newInstance().newDocu=
> mentBuilder();
> - Document document =3D parser.parse(stream);
> - Node rootElement =3D document.getFirstChild();
> - if (rootElement.getNodeName().equals(ROOT=5FELEM=5FNAME)) {
> - buildInfo =3D BuildInfoFactory.create(project, (Element)rootElement);
> - project.setSessionProperty(buildInfoProperty, buildInfo);
> - }
> - } catch (Exception e) {
> - buildInfo =3D null;
> - }
> -
> + private static IStandardBuildInfo loadBuildInfo(IProject project) throws =
> CoreException {
> + ICDescriptor descriptor =3D CCorePlugin.getDefault().getCProjectDescript=
> ion(project);
> + IStandardBuildInfo buildInfo =3D BuildInfoFactory.create(project, descri=
> ptor.getProjectData(ID));
> + project.setSessionProperty(buildInfoProperty, buildInfo);
> return buildInfo;
> }
> =20
> @@ -224,38 +200,25 @@
> *=20
> * @param project
> */
> - public static void saveBuildInfo(IProject project) {
> - // Create document
> - Document doc =3D new DocumentImpl();
> - Element rootElement =3D doc.createElement(ROOT=5FELEM=5FNAME);
> - doc.appendChild(rootElement);
> -
> + public static void saveBuildInfo(IProject project) throws CoreException {
> + ICDescriptor descriptor =3D CCorePlugin.getDefault().getCProjectDescript=
> ion(project);
> + =09
> + Element rootElement =3D descriptor.getProjectData(ID);=20
> + =09
> + // Clear out all current children
> + // Note: Probably would be a better idea to merge in the data
> + NodeList nodes =3D rootElement.getChildNodes();
> + for (int i =3D 0; i < nodes.getLength(); ++i) {
> + Node node =3D nodes.item(i);
> + if (node instanceof Element)
> + rootElement.removeChild(nodes.item(i));
> + }
> + =09
> // Save the build info
> IStandardBuildInfo buildInfo =3D getBuildInfo(project);
> if (buildInfo !=3D null)
> - buildInfo.serialize(doc, rootElement);
> - =09
> - // Save the document
> - ByteArrayOutputStream s =3D new ByteArrayOutputStream();
> - OutputFormat format =3D new OutputFormat();
> - format.setIndenting(true);
> - format.setLineSeparator(System.getProperty("line.separator")); //$NON-NL=
> S-1$
> - String xml =3D null;
> - try {
> - Serializer serializer =3D SerializerFactory.getSerializerFactory(Method=
> .XML).makeSerializer(new OutputStreamWriter(s, "UTF8"), format);
> - serializer.asDOMSerializer().serialize(doc);
> - xml =3D s.toString("UTF8"); //$NON-NLS-1$ =09
> - IFile rscFile =3D project.getFile(FILE=5FNAME);
> - InputStream inputStream =3D new ByteArrayInputStream(xml.getBytes());
> - // update the resource content
> - if (rscFile.exists()) {
> - rscFile.setContents(inputStream, IResource.FORCE, null);
> - } else {
> - rscFile.create(inputStream, IResource.FORCE, null);
> - }
> - } catch (Exception e) {
> - return;
> - }
> + buildInfo.serialize(rootElement.getOwnerDocument(), rootElement);
> + descriptor.saveProjectData();
> }
> =20
> /* (non-Javadoc)
> Index: parser/org/eclipse/cdt/core/parser/IScannerInfoProvider.java
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/pars=
> er/IScannerInfoProvider.java,v
> retrieving revision 1.1
> diff -u -r1.1 IScannerInfoProvider.java
> --- parser/org/eclipse/cdt/core/parser/IScannerInfoProvider.java 4 Jul 2003=
> 18:36:45 -0000 1.1
> +++ parser/org/eclipse/cdt/core/parser/IScannerInfoProvider.java 8 Jul 2003=
> 02:06:40 -0000
> @@ -1,6 +1,7 @@
> package org.eclipse.cdt.core.parser;
> =20
> import org.eclipse.core.resources.IResource;
> +import org.eclipse.core.runtime.CoreException;
> =20
> /**********************************************************************
> * Copyright (c) 2002,2003 Rational Software Corporation and others.
> @@ -31,7 +32,7 @@
> * @param resource
> * @return
> */
> - public boolean managesResource(IResource resource);
> + public boolean managesResource(IResource resource) throws CoreException;
> =09
> /**
> * The receiver will no longer notify the listener specified in=20
> Index: src/org/eclipse/cdt/core/CProjectNature.java
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /home/tools/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CProjec=
> tNature.java,v
> retrieving revision 1.5
> diff -u -r1.5 CProjectNature.java
> --- src/org/eclipse/cdt/core/CProjectNature.java 4 Jul 2003 18:36:45 -0000 =
> 1.5
> +++ src/org/eclipse/cdt/core/CProjectNature.java 8 Jul 2003 02:06:44 -0000
> @@ -296,8 +296,11 @@
> * @see IProjectNature#setProject
> */
> public void setProject(IProject project) {
> - fProject=3D project;
> - fBuildInfo =3D StandardBuildManager.getBuildInfo(fProject, true);
> + try {
> + fProject=3D project;
> + fBuildInfo =3D StandardBuildManager.getBuildInfo(fProject, true);
> + } catch (CoreException e) {
> + }
> }
> =20
> }
> Index: src/org/eclipse/cdt/core/ICDescriptor.java
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /home/tools/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ICDescr=
> iptor.java,v
> retrieving revision 1.4
> diff -u -r1.4 ICDescriptor.java
> --- src/org/eclipse/cdt/core/ICDescriptor.java 28 Mar 2003 21:00:39 -0000 1=
> .4
> +++ src/org/eclipse/cdt/core/ICDescriptor.java 8 Jul 2003 02:06:44 -0000
> @@ -12,6 +12,7 @@
> =20
> import org.eclipse.core.resources.IProject;
> import org.eclipse.core.runtime.CoreException;
> +import org.w3c.dom.Element;
> =20
> public interface ICDescriptor {
> public ICOwnerInfo getProjectOwner();
> @@ -27,4 +28,7 @@
> =09
> public void setPathEntries(ICPathEntry[] entries) throws CoreException;
> public ICPathEntry[] getPathEntries();
> +=09
> + public Element getProjectData(String id) throws CoreException;
> + public void saveProjectData() throws CoreException;
> }
> Index: src/org/eclipse/cdt/internal/core/CDescriptor.java
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /home/tools/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/cor=
> e/CDescriptor.java,v
> retrieving revision 1.9
> diff -u -r1.9 CDescriptor.java
> --- src/org/eclipse/cdt/internal/core/CDescriptor.java 3 Apr 2003 04:28:54 =
> -0000 1.9
> +++ src/org/eclipse/cdt/internal/core/CDescriptor.java 8 Jul 2003 02:06:45 =
> -0000
> @@ -23,6 +23,7 @@
> =20
> import javax.xml.parsers.DocumentBuilder;
> import javax.xml.parsers.DocumentBuilderFactory;
> +import javax.xml.parsers.ParserConfigurationException;
> =20
> import org.apache.xerces.dom.DocumentImpl;
> import org.apache.xml.serialize.Method;
> @@ -60,6 +61,7 @@
> private IProject fProject;
> private HashMap extMap =3D new HashMap(4);
> private HashMap extInfoMap =3D new HashMap(4);
> + private Document dataDoc;
> =20
> static final String DESCRIPTION=5FFILE=5FNAME =3D ".cdtproject";
> private static final char[][] NO=5FCHAR=5FCHAR =3D new char[0][];
> @@ -67,6 +69,9 @@
> private static final String PROJECT=5FEXTENSION =3D "extension";
> private static final String PROJECT=5FEXTENSION=5FATTRIBUTE =3D "attribut=
> e";
> private static final String PATH=5FENTRY =3D "cpathentry";
> + private static final String PROJECT=5FDATA =3D "data";
> + private static final String PROJECT=5FDATA=5FITEM =3D "item";
> + private static final String PROJECT=5FDATA=5FID =3D "id";
> =20
> private boolean fDirty;
> private boolean autoSave;
> @@ -328,6 +333,8 @@
> if (entry !=3D null) {
> pathEntries.add(entry);
> }
> + } else if (childNode.getNodeName().equals(PROJECT=5FDATA)) {
> + decodeProjectData((Element)childNode);
> }
> }
> }
> @@ -450,6 +457,7 @@
> configRootElement.setAttribute("id", fOwner.getID()); //$NON-NLS-1$
> encodeProjectExtensions(doc, configRootElement);
> encodePathEntries(doc, configRootElement);
> + encodeProjectData(doc, configRootElement);
> return serializeDocument(doc);
> }
> =20
> @@ -544,5 +552,56 @@
> }
> }
> return (ICExtension) cExtension;
> + }
> +=09
> + // The project data allows for the storage of any structured information
> + // into the cdtproject file.
> + private Document getProjectDataDoc() throws CoreException {
> + if (dataDoc =3D=3D null) {
> + try {
> + dataDoc =3D DocumentBuilderFactory.newInstance().newDocumentBuilder().=
> newDocument();
> + } catch (ParserConfigurationException e) {
> + throw new CoreException(
> + new Status(
> + IStatus.ERROR,
> + CCorePlugin.PLUGIN=5FID,
> + IStatus.ERROR,
> + "getProjectDataDoc",
> + e));
> + }
> + Element rootElem =3D dataDoc.createElement(PROJECT=5FDATA);
> + dataDoc.appendChild(rootElem);
> + }
> + return dataDoc;
> + }
> +=09
> + private void decodeProjectData(Element data) throws CoreException {
> + Document doc =3D getProjectDataDoc();
> + doc.getDocumentElement().appendChild(doc.importNode(data, true));
> + }
> +
> + public Element getProjectData(String id) throws CoreException {
> + NodeList nodes =3D getProjectDataDoc().getDocumentElement().getElementsB=
> yTagName(PROJECT=5FDATA=5FITEM);
> + for (int i =3D 0; i < nodes.getLength(); ++i) {
> + Element element =3D (Element)nodes.item(i);
> + if (element.getAttribute(PROJECT=5FDATA=5FID).equals(id))
> + return element;=20
> + }
> +
> + // Not found, make a new one
> + Element element =3D dataDoc.createElement(PROJECT=5FDATA=5FITEM);
> + element.setAttribute(PROJECT=5FDATA=5FID, id);
> + dataDoc.getDocumentElement().appendChild(element);
> + return element;
> + }
> +=09
> + public void saveProjectData() throws CoreException {
> + setDirty();
> + }
> +=09
> + private void encodeProjectData(Document doc, Element root) {
> + // Don't create or encode the doc if it isn't there already
> + if (dataDoc !=3D null)
> + root.appendChild(doc.importNode(dataDoc.getDocumentElement(), true));
> }
> }=
> --=_mixed 0067489B85256D5F_=
> Content-Type: text/plain; name="org.eclipse.cdt.core.tests.patch.txt"
> Content-Disposition: attachment; filename="org.eclipse.cdt.core.tests.patch.txt"
> Content-Transfer-Encoding: quoted-printable
>
> Index: build/org/eclipse/cdt/core/build/managed/tests/StandardBuildTests.ja=
> va
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /home/tools/org.eclipse.cdt.core.tests/build/org/eclipse/cdt/core=
> /build/managed/tests/StandardBuildTests.java,v
> retrieving revision 1.1
> diff -u -r1.1 StandardBuildTests.java
> --- build/org/eclipse/cdt/core/build/managed/tests/StandardBuildTests.java =
> 4 Jul 2003 18:36:47 -0000 1.1
> +++ build/org/eclipse/cdt/core/build/managed/tests/StandardBuildTests.java =
> 8 Jul 2003 02:07:57 -0000
> @@ -107,7 +107,7 @@
> return suite;
> }
> =09
> - private void checkDefaultProjectSettings(IProject project) {
> + private void checkDefaultProjectSettings(IProject project) throws Excepti=
> on {
> assertNotNull(project);
> =20
> // There should not be any include path or defined symbols for the proje=
> ct
> @@ -128,7 +128,7 @@
> assertEquals(EMPTY=5FSTRING, info.getIncrementalBuildArguments());=20
> }
> =09
> - private void checkOverriddenProjectSettings(IProject project) {
> + private void checkOverriddenProjectSettings(IProject project) throws Exce=
> ption {
> assertNotNull(project);
> =20
> // Check that the new stuff is there
> @@ -232,7 +232,7 @@
> removeProject(PROJECT=5FNAME);
> }
> =20
> - public void testProjectConversion() {
> + public void testProjectConversion() throws Exception {
> // Open the project
> IProject project =3D null;
> try {
> @@ -280,7 +280,7 @@
> /**
> *=20
> */
> - public void testProjectCreation () {
> + public void testProjectCreation() throws Exception {
> // Create a new project
> IProject project =3D null;
> try {
> @@ -303,7 +303,7 @@
> checkDefaultProjectSettings(project);
> }
> =09
> - public void testProjectSettings() {
> + public void testProjectSettings() throws Exception {
> // Get the project
> IProject project =3D null;
> try {
> @@ -342,7 +342,7 @@
> checkOverriddenProjectSettings(project);
> }
> =20
> - public void testScannerListenerInterface() {
> + public void testScannerListenerInterface() throws Exception {
> // Get the project
> IProject project =3D null;
> try {=
> --=_mixed 0067489B85256D5F_=
> Content-Type: text/plain; name="org.eclipse.cdt.ui.patch.txt"
> Content-Disposition: attachment; filename="org.eclipse.cdt.ui.patch.txt"
> Content-Transfer-Encoding: quoted-printable
>
> Index: src/org/eclipse/cdt/ui/wizards/BuildPathInfoBlock.java
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /home/tools/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/Bui=
> ldPathInfoBlock.java,v
> retrieving revision 1.2
> diff -u -r1.2 BuildPathInfoBlock.java
> --- src/org/eclipse/cdt/ui/wizards/BuildPathInfoBlock.java 4 Jul 2003 18:36=
> :42 -0000 1.2
> +++ src/org/eclipse/cdt/ui/wizards/BuildPathInfoBlock.java 8 Jul 2003 02:09=
> :06 -0000
> @@ -265,14 +265,18 @@
> monitor =3D new NullProgressMonitor();
> }
> if (project !=3D null) {
> - // Store the paths and symbols=20
> - monitor.beginTask("Setting Include Paths", 1);
> - StandardBuildManager.setIncludePaths(project, getPathListContents());
> -
> - monitor.beginTask("Setting Defined Symbols", 1);
> - StandardBuildManager.setPreprocessorSymbols(project, getSymbolListConte=
> nts());
> - =09
> - StandardBuildManager.saveBuildInfo(project);
> + try {
> + // Store the paths and symbols=20
> + monitor.beginTask("Setting Include Paths", 1);
> + StandardBuildManager.setIncludePaths(project, getPathListContents());
> +=09
> + monitor.beginTask("Setting Defined Symbols", 1);
> + StandardBuildManager.setPreprocessorSymbols(project, getSymbolListCont=
> ents());
> + =09
> + StandardBuildManager.saveBuildInfo(project);
> + } catch (CoreException e) {
> + // Should probably tell someone
> + }
> }
> }
> =20
> @@ -589,15 +593,21 @@
> =20
> private void setPathListContents() {
> if (project !=3D null) {
> - IStandardBuildInfo info =3D StandardBuildManager.getBuildInfo(project);
> - pathList.setItems(info.getIncludePaths());
> + try {
> + IStandardBuildInfo info =3D StandardBuildManager.getBuildInfo(project);
> + pathList.setItems(info.getIncludePaths());
> + } catch (CoreException e) {
> + }
> }
> }
> =09
> private void setSymbolListContents() {
> if (project !=3D null) {
> - IStandardBuildInfo info =3D StandardBuildManager.getBuildInfo(project);
> - symbolList.setItems(info.getPreprocessorSymbols());
> + try {
> + IStandardBuildInfo info =3D StandardBuildManager.getBuildInfo(project);
> + symbolList.setItems(info.getPreprocessorSymbols());
> + } catch (CoreException e) {
> + }
> }
> }
> =
> --=_mixed 0067489B85256D5F_=--
> _______________________________________________
> cdt-patch mailing list
> cdt-patch@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/cdt-patch
>