blob: fdf2ca6b16c8ec00a8466f1ab06f40f734e29470 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/*******************************************************************************
* Copyright (c) 2008, 2017 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial implementation and ideas
******************************************************************************/
package org.eclipse.equinox.internal.p2.reconciler.dropins;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
public class Application implements IApplication {
@Override
public Object start(IApplicationContext context) throws Exception {
Object obj = System.getProperties().get(Activator.PROP_APPLICATION_STATUS);
// if we have a non-OK status return "unlucky" 13, otherwise return the OK return code
if (obj != null && (obj instanceof IStatus) && !((IStatus) obj).isOK())
return Integer.valueOf(13);
return IApplication.EXIT_OK;
}
@Override
public void stop() {
//Nothing to do
}
}
|