Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2003, 2007 IBM Corporation and others. |
2 |
* Copyright (c) 2003, 2014 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 13-19
Link Here
|
13 |
import java.util.ArrayList; |
13 |
import java.util.ArrayList; |
14 |
import java.util.List; |
14 |
import java.util.List; |
15 |
|
15 |
|
16 |
import org.eclipse.wst.server.core.*; |
16 |
import org.eclipse.wst.server.core.IRuntimeType; |
|
|
17 |
import org.eclipse.wst.server.core.ServerUtil; |
18 |
import org.eclipse.wst.server.core.internal.RuntimeType; |
17 |
/** |
19 |
/** |
18 |
* Runtime type content provider. |
20 |
* Runtime type content provider. |
19 |
*/ |
21 |
*/ |
Lines 52-57
Link Here
|
52 |
for (int i = 0; i < size; i++) { |
54 |
for (int i = 0; i < size; i++) { |
53 |
IRuntimeType runtimeType = runtimeTypes[i]; |
55 |
IRuntimeType runtimeType = runtimeTypes[i]; |
54 |
if (!creation || runtimeType.canCreate()) { |
56 |
if (!creation || runtimeType.canCreate()) { |
|
|
57 |
try { |
58 |
if (!((RuntimeType)runtimeType).supportsManualCreation()) { |
59 |
// Hide this runtime type from the list. |
60 |
continue; |
61 |
} |
62 |
} catch (Exception e) { |
63 |
// Do nothing since all IRuntimeType should be instance of RuntimeType. |
64 |
} |
65 |
|
55 |
TreeElement ele = getOrCreate(list, runtimeType.getVendor()); |
66 |
TreeElement ele = getOrCreate(list, runtimeType.getVendor()); |
56 |
ele.contents.add(runtimeType); |
67 |
ele.contents.add(runtimeType); |
57 |
elementToParentMap.put(runtimeType, ele); |
68 |
elementToParentMap.put(runtimeType, ele); |