| 1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2008, 2017 IBM Corporation and others. |
| 3 |
* |
| 4 |
* This program and the accompanying materials |
| 5 |
* are made available under the terms of the Eclipse Public License 2.0 |
| 6 |
* which accompanies this distribution, and is available at |
| 7 |
* https://www.eclipse.org/legal/epl-2.0/ |
| 8 |
* |
| 9 |
* SPDX-License-Identifier: EPL-2.0 |
| 10 |
* |
| 11 |
* Contributors: |
| 12 |
* IBM Corporation - initial API and implementation |
| 13 |
*******************************************************************************/ |
| 14 |
package org.eclipse.pde.internal.build.publisher; |
| 15 |
|
| 16 |
import java.util.ArrayList; |
| 17 |
import java.util.List; |
| 18 |
import org.eclipse.equinox.p2.publisher.AbstractPublisherApplication; |
| 19 |
import org.eclipse.equinox.p2.publisher.IPublisherAction; |
| 20 |
|
| 21 |
public class BuildPublisherApplication extends AbstractPublisherApplication { |
| 22 |
private List<IPublisherAction> actions; |
| 23 |
|
| 24 |
public void addAction(IPublisherAction action) { |
| 25 |
if (actions == null) |
| 26 |
actions = new ArrayList<>(1); |
| 27 |
actions.add(action); |
| 28 |
} |
| 29 |
|
| 30 |
@Override |
| 31 |
protected IPublisherAction[] createActions() { |
| 32 |
if (actions == null) |
| 33 |
return new IPublisherAction[0]; |
| 34 |
return actions.toArray(new IPublisherAction[actions.size()]); |
| 35 |
} |
| 36 |
|
| 37 |
public void setAppend(boolean value) { |
| 38 |
super.append = value; |
| 39 |
} |
| 40 |
|
| 41 |
} |