Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/InputOrder.java')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/InputOrder.java23
1 files changed, 20 insertions, 3 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/InputOrder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/InputOrder.java
index d03131f5781..7b4444988c5 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/InputOrder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/InputOrder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2016 Intel Corporation and others.
+ * Copyright (c) 2005, 2019 Intel Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -11,6 +11,7 @@
* Contributors:
* Intel Corporation - Initial API and implementation
* IBM Corporation
+ * EclipseSource
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.internal.core;
@@ -93,6 +94,17 @@ public class InputOrder implements IInputOrder {
* @param inputOrder The existing InputOrder to clone.
*/
public InputOrder(IInputType parent, InputOrder inputOrder) {
+ this(parent, inputOrder, false);
+ }
+
+ /**
+ * Create an <code>InputOrder</code> based upon an existing InputOrder.
+ *
+ * @param parent The <code>IInputType</code> the InputOrder will be added to.
+ * @param inputOrder The existing InputOrder to clone.
+ * @param retainRebuildState Whether or not to retain the <code>rebuildState</code> and <code>dirty</code> state of <code>inputOrder</code>.
+ */
+ public InputOrder(IInputType parent, InputOrder inputOrder, boolean retainRebuildState) {
this.fParent = parent;
fIsExtensionInputOrder = false;
@@ -109,8 +121,13 @@ public class InputOrder implements IInputOrder {
fExcluded = inputOrder.fExcluded;
}
- setDirty(true);
- setRebuildState(true);
+ if (retainRebuildState) {
+ setDirty(inputOrder.fIsDirty);
+ setRebuildState(inputOrder.fRebuildState);
+ } else {
+ setDirty(true);
+ setRebuildState(true);
+ }
}
/*

Back to the top