blob: 2c56152de36e0d12148c693ab9250222df86ea56 (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
/*******************************************************************************
* Copyright (c) 2007 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 API and implementation
*******************************************************************************/
package org.eclipse.equinox.prov.ui.model;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.equinox.prov.core.ProvisionException;
import org.eclipse.equinox.prov.ui.ProvisioningUtil;
/**
* Element class that represents the root of a profile
* viewer. Its children are all installed profiles.
*
* @since 3.4
*
*/
public class AllProfiles extends ProvElement {
/*
* (non-Javadoc)
*
* @see org.eclipse.equinox.prov.ui.model.ProvElement#fetchChildren(java.lang.Object,
* org.eclipse.core.runtime.IProgressMonitor,
* org.eclipse.core.runtime.IAdaptable)
*/
protected Object[] fetchChildren(Object o, IProgressMonitor monitor, IAdaptable uiInfo) {
try {
return ProvisioningUtil.getProfiles(monitor, uiInfo);
} catch (ProvisionException e) {
handleException(e, null);
}
return new Object[0];
}
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
*/
public String getLabel(Object o) {
return ""; //$NON-NLS-1$
}
/*
* (non-Javadoc)
*
* @see org.eclipse.equinox.prov.ui.model.RepositoryElement#getParent(java.lang.Object)
*/
public Object getParent(Object o) {
return null;
}
}
|