platform35/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ModelObjectWriter.java
author timkelly
Thu, 30 Jul 2009 11:56:23 -0500
changeset 40 eb3c938c7fef
permissions -rw-r--r--
set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
40
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
     1
/*******************************************************************************
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
     2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
     3
 * All rights reserved. This program and the accompanying materials
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
     4
 * are made available under the terms of the Eclipse Public License v1.0
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
     5
 * which accompanies this distribution, and is available at
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
     6
 * http://www.eclipse.org/legal/epl-v10.html
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
     7
 * 
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
     8
 * Contributors:
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
     9
 *     IBM Corporation - initial API and implementation
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    10
 *******************************************************************************/
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    11
package org.eclipse.core.internal.resources;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    12
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    13
import java.io.IOException;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    14
import java.io.OutputStream;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    15
import java.net.URI;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    16
import java.util.*;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    17
import org.eclipse.core.filesystem.EFS;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    18
import org.eclipse.core.internal.events.BuildCommand;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    19
import org.eclipse.core.internal.localstore.SafeFileOutputStream;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    20
import org.eclipse.core.internal.utils.FileUtil;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    21
import org.eclipse.core.resources.IProject;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    22
import org.eclipse.core.resources.IncrementalProjectBuilder;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    23
import org.eclipse.core.runtime.IPath;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    24
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    25
//
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    26
public class ModelObjectWriter implements IModelObjectConstants {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    27
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    28
	/**
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    29
	 * Returns the string representing the serialized set of build triggers for
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    30
	 * the given command
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    31
	 */
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    32
	private static String triggerString(BuildCommand command) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    33
		StringBuffer buf = new StringBuffer();
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    34
		if (command.isBuilding(IncrementalProjectBuilder.AUTO_BUILD))
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    35
			buf.append(TRIGGER_AUTO).append(',');
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    36
		if (command.isBuilding(IncrementalProjectBuilder.CLEAN_BUILD))
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    37
			buf.append(TRIGGER_CLEAN).append(',');
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    38
		if (command.isBuilding(IncrementalProjectBuilder.FULL_BUILD))
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    39
			buf.append(TRIGGER_FULL).append(',');
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    40
		if (command.isBuilding(IncrementalProjectBuilder.INCREMENTAL_BUILD))
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    41
			buf.append(TRIGGER_INCREMENTAL).append(',');
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    42
		return buf.toString();
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    43
	}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    44
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    45
	public ModelObjectWriter() {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    46
		super();
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    47
	}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    48
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    49
	protected String[] getReferencedProjects(ProjectDescription description) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    50
		IProject[] projects = description.getReferencedProjects();
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    51
		String[] result = new String[projects.length];
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    52
		for (int i = 0; i < projects.length; i++)
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    53
			result[i] = projects[i].getName();
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    54
		return result;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    55
	}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    56
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    57
	protected void write(BuildCommand command, XMLWriter writer) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    58
		writer.startTag(BUILD_COMMAND, null);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    59
		if (command != null) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    60
			writer.printSimpleTag(NAME, command.getName());
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    61
			if (shouldWriteTriggers(command))
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    62
				writer.printSimpleTag(BUILD_TRIGGERS, triggerString(command));
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    63
			write(ARGUMENTS, command.getArguments(false), writer);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    64
		}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    65
		writer.endTag(BUILD_COMMAND);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    66
	}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    67
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    68
	/**
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    69
	 * Returns whether the build triggers for this command should be written.
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    70
	 */
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    71
	private boolean shouldWriteTriggers(BuildCommand command) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    72
		//only write triggers if command is configurable and there exists a trigger
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    73
		//that the builder does NOT respond to.  I.e., don't write out on the default
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    74
		//cases to avoid dirtying .project files unnecessarily.	
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    75
		if (!command.isConfigurable())
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    76
			return false;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    77
		return !command.isBuilding(IncrementalProjectBuilder.AUTO_BUILD) || 
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    78
			!command.isBuilding(IncrementalProjectBuilder.CLEAN_BUILD) || 
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    79
			!command.isBuilding(IncrementalProjectBuilder.FULL_BUILD) || 
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    80
			!command.isBuilding(IncrementalProjectBuilder.INCREMENTAL_BUILD);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    81
	}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    82
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    83
	protected void write(LinkDescription description, XMLWriter writer) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    84
		writer.startTag(LINK, null);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    85
		if (description != null) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    86
			writer.printSimpleTag(NAME, description.getProjectRelativePath());
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    87
			writer.printSimpleTag(TYPE, Integer.toString(description.getType()));
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    88
			//use ASCII string of URI to ensure spaces are encoded
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    89
			writeLocation(description.getLocationURI(), writer);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    90
		}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    91
		writer.endTag(LINK);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    92
	}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    93
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    94
	/**
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    95
	 * Writes a location to the XML writer.  For backwards compatibility,
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    96
	 * local file system locations are written and read using a different tag
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    97
	 * from non-local file systems.
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    98
	 * @param location
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
    99
	 * @param writer
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   100
	 */
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   101
	private void writeLocation(URI location, XMLWriter writer) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   102
		if (EFS.SCHEME_FILE.equals(location.getScheme())) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   103
			writer.printSimpleTag(LOCATION, FileUtil.toPath(location).toPortableString());
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   104
		} else {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   105
			writer.printSimpleTag(LOCATION_URI, location.toASCIIString());
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   106
		}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   107
	}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   108
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   109
	/**
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   110
	 * The parameter tempLocation is a location to place our temp file (copy of the target one)
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   111
	 * to be used in case we could not successfully write the new file.
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   112
	 */
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   113
	public void write(Object object, IPath location, IPath tempLocation) throws IOException {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   114
		SafeFileOutputStream file = null;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   115
		String tempPath = tempLocation == null ? null : tempLocation.toOSString();
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   116
		try {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   117
			file = new SafeFileOutputStream(location.toOSString(), tempPath);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   118
			write(object, file);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   119
		} finally {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   120
			if (file != null)
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   121
				file.close();
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   122
		}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   123
	}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   124
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   125
	/**
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   126
	 * The OutputStream is closed in this method.
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   127
	 */
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   128
	public void write(Object object, OutputStream output) throws IOException {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   129
		try {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   130
			XMLWriter writer = new XMLWriter(output);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   131
			write(object, writer);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   132
			writer.flush();
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   133
			writer.close();
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   134
		} finally {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   135
			output.close();
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   136
		}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   137
	}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   138
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   139
	protected void write(Object obj, XMLWriter writer) throws IOException {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   140
		if (obj instanceof BuildCommand) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   141
			write((BuildCommand) obj, writer);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   142
			return;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   143
		}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   144
		if (obj instanceof ProjectDescription) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   145
			write((ProjectDescription) obj, writer);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   146
			return;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   147
		}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   148
		if (obj instanceof WorkspaceDescription) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   149
			write((WorkspaceDescription) obj, writer);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   150
			return;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   151
		}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   152
		if (obj instanceof LinkDescription) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   153
			write((LinkDescription) obj, writer);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   154
			return;
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   155
		}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   156
		writer.printTabulation();
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   157
		writer.println(obj.toString());
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   158
	}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   159
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   160
	protected void write(ProjectDescription description, XMLWriter writer) throws IOException {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   161
		writer.startTag(PROJECT_DESCRIPTION, null);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   162
		if (description != null) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   163
			writer.printSimpleTag(NAME, description.getName());
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   164
			String comment = description.getComment();
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   165
			writer.printSimpleTag(COMMENT, comment == null ? "" : comment); //$NON-NLS-1$
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   166
			write(PROJECTS, PROJECT, getReferencedProjects(description), writer);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   167
			write(BUILD_SPEC, Arrays.asList(description.getBuildSpec(false)), writer);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   168
			write(NATURES, NATURE, description.getNatureIds(false), writer);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   169
			HashMap links = description.getLinks();
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   170
			if (links != null) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   171
				// ensure consistent order of map elements
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   172
				List sorted = new ArrayList(links.values());
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   173
				Collections.sort(sorted);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   174
				write(LINKED_RESOURCES, sorted, writer);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   175
			}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   176
		}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   177
		writer.endTag(PROJECT_DESCRIPTION);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   178
	}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   179
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   180
	protected void write(String name, Collection collection, XMLWriter writer) throws IOException {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   181
		writer.startTag(name, null);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   182
		for (Iterator it = collection.iterator(); it.hasNext();)
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   183
			write(it.next(), writer);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   184
		writer.endTag(name);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   185
	}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   186
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   187
	/**
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   188
	 * Write maps of (String, String).
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   189
	 */
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   190
	protected void write(String name, Map table, XMLWriter writer) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   191
		writer.startTag(name, null);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   192
		if (table != null) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   193
			// ensure consistent order of map elements
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   194
			List sorted = new ArrayList(table.keySet());
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   195
			Collections.sort(sorted);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   196
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   197
			for (Iterator it = sorted.iterator(); it.hasNext();) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   198
				String key = (String) it.next();
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   199
				Object value = table.get(key);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   200
				writer.startTag(DICTIONARY, null);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   201
				{
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   202
					writer.printSimpleTag(KEY, key);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   203
					writer.printSimpleTag(VALUE, value);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   204
				}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   205
				writer.endTag(DICTIONARY);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   206
			}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   207
		}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   208
		writer.endTag(name);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   209
	}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   210
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   211
	protected void write(String name, String elementTagName, String[] array, XMLWriter writer) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   212
		writer.startTag(name, null);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   213
		for (int i = 0; i < array.length; i++)
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   214
			writer.printSimpleTag(elementTagName, array[i]);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   215
		writer.endTag(name);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   216
	}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   217
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   218
	protected void write(WorkspaceDescription description, XMLWriter writer) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   219
		writer.startTag(WORKSPACE_DESCRIPTION, null);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   220
		if (description != null) {
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   221
			writer.printSimpleTag(NAME, description.getName());
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   222
			writer.printSimpleTag(AUTOBUILD, description.isAutoBuilding() ? "1" : "0"); //$NON-NLS-1$ //$NON-NLS-2$
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   223
			writer.printSimpleTag(SNAPSHOT_INTERVAL, new Long(description.getSnapshotInterval()));
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   224
			writer.printSimpleTag(FILE_STATE_LONGEVITY, new Long(description.getFileStateLongevity()));
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   225
			writer.printSimpleTag(MAX_FILE_STATE_SIZE, new Long(description.getMaxFileStateSize()));
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   226
			writer.printSimpleTag(MAX_FILE_STATES, new Integer(description.getMaxFileStates()));
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   227
			String[] order = description.getBuildOrder(false);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   228
			if (order != null)
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   229
				write(BUILD_ORDER, PROJECT, order, writer);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   230
		}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   231
		writer.endTag(WORKSPACE_DESCRIPTION);
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   232
	}
eb3c938c7fef set up for custom build for logging. merged from carbide 2.1.x builds. this state is as it comes from platform. Next changelog will add the updates.
timkelly
parents:
diff changeset
   233
}