View | Details | Raw Unified | Return to bug 425789 | Differences between
and this patch

Collapse All | Expand All

(-)META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 2-8 Link Here
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: %pluginName
3
Bundle-Name: %pluginName
4
Bundle-SymbolicName: org.eclipse.wst.server.core; singleton:=true
4
Bundle-SymbolicName: org.eclipse.wst.server.core; singleton:=true
5
Bundle-Version: 1.5.100.qualifier
5
Bundle-Version: 1.6.0.qualifier
6
Bundle-Activator: org.eclipse.wst.server.core.internal.ServerPlugin
6
Bundle-Activator: org.eclipse.wst.server.core.internal.ServerPlugin
7
Bundle-Vendor: %providerName
7
Bundle-Vendor: %providerName
8
Bundle-Localization: plugin
8
Bundle-Localization: plugin
(-)schema/runtimeTypes.exsd (-1 / +8 lines)
Lines 127-132 Link Here
127
               </documentation>
127
               </documentation>
128
            </annotation>
128
            </annotation>
129
         </attribute>
129
         </attribute>
130
         <attribute name="supportsManualCreation" type="boolean">
131
            <annotation>
132
               <documentation>
133
                  boolean value &quot;true&quot; or &quot;false&quot; to specify whether this runtime type supports manual creation via the runtime creation wizard.  This setting can be used for system runtimes or deprecated runtimes.  If &quot;true&quot;, the runtime will show on the list of selectable runtime types on the runtime creation wizard; otherwise, the runtime will be hidden from the runtime creation wizard. If not specified, the default value is true.
134
               </documentation>
135
            </annotation>
136
         </attribute>
130
      </complexType>
137
      </complexType>
131
   </element>
138
   </element>
132
139
Lines 190-196 Link Here
190
         <meta.section type="copyright"/>
197
         <meta.section type="copyright"/>
191
      </appInfo>
198
      </appInfo>
192
      <documentation>
199
      <documentation>
193
         Copyright (c) 2000, 2005 IBM Corporation and others.&lt;br&gt;
200
         Copyright (c) 2000, 2014 IBM Corporation and others.&lt;br&gt;
194
All rights reserved. This program and the accompanying materials are made 
201
All rights reserved. This program and the accompanying materials are made 
195
available under the terms of the Eclipse Public License v1.0 which accompanies 
202
available under the terms of the Eclipse Public License v1.0 which accompanies 
196
this distribution, and is available at 
203
this distribution, and is available at 
(-)schema/serverTypes.exsd (-1 / +8 lines)
Lines 116-121 Link Here
116
               </documentation>
116
               </documentation>
117
            </annotation>
117
            </annotation>
118
         </attribute>
118
         </attribute>
119
         <attribute name="supportsManualCreation" type="boolean">
120
            <annotation>
121
               <documentation>
122
                  boolean value &quot;true&quot; or &quot;false&quot; to specify whether this server type supports manual creation via the server creation wizard.  This setting can be used for system servers or deprecated servers. If &quot;true&quot;, the server will show on the list of selectable server types on the server creation wizard; otherwise, the server will be hidden from the server creation wizard. If not specified, the default value is true.
123
               </documentation>
124
            </annotation>
125
         </attribute>
119
         <attribute name="supportsRemoteHosts" type="boolean">
126
         <attribute name="supportsRemoteHosts" type="boolean">
120
            <annotation>
127
            <annotation>
121
               <documentation>
128
               <documentation>
Lines 236-242 Link Here
236
         <meta.section type="copyright"/>
243
         <meta.section type="copyright"/>
237
      </appInfo>
244
      </appInfo>
238
      <documentation>
245
      <documentation>
239
         Copyright (c) 2000, 2005 IBM Corporation and others.&lt;br&gt;
246
         Copyright (c) 2000, 2014 IBM Corporation and others.&lt;br&gt;
240
All rights reserved. This program and the accompanying materials are made 
247
All rights reserved. This program and the accompanying materials are made 
241
available under the terms of the Eclipse Public License v1.0 which accompanies 
248
available under the terms of the Eclipse Public License v1.0 which accompanies 
242
this distribution, and is available at 
249
this distribution, and is available at 
(-)servercore/org/eclipse/wst/server/core/internal/RuntimeType.java (-1 / +20 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2003, 2010 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 176-181 Link Here
176
			return null;
176
			return null;
177
		return element.getDeclaringExtension().getContributor().getName();
177
		return element.getDeclaringExtension().getContributor().getName();
178
	}
178
	}
179
	
180
	/**
181
	 * Returns <code>true</code> if this type of runtime can be created manually
182
	 * from the runtime creation wizard.
183
	 * Returns <code>false</code> if the runtime type can only be programmatically
184
	 * and hide from the runtime creation wizard.
185
	 * 
186
	 * @return <code>true</code> if this type of runtime can be created manually
187
	 * from the runtime creation wizard, and <code>false</code> if it cannot.
188
	 * @since 1.6
189
	 */
190
	public boolean supportsManualCreation() {
191
		try {
192
			String supportsManualCreation = element.getAttribute("supportsManualCreation");
193
			return (supportsManualCreation == null || supportsManualCreation.toLowerCase().equals("true"));
194
		} catch (Exception e) {
195
			return true;
196
		}
197
	}
179
198
180
	public String toString() {
199
	public String toString() {
181
		return "RuntimeType[" + getId() + ", " + getName() + "]";
200
		return "RuntimeType[" + getId() + ", " + getName() + "]";
(-)servercore/org/eclipse/wst/server/core/internal/ServerType.java (-1 / +20 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2003, 2011 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 157-162 Link Here
157
		}
157
		}
158
	}
158
	}
159
159
160
	/**
161
	 * Returns <code>true</code> if this type of server can be created manually
162
	 * from the server creation wizard.
163
	 * Returns <code>false</code> if the server type can only be programmatically
164
	 * and hide from the server creation wizard.
165
	 * 
166
	 * @return <code>true</code> if this type of server can be created manually
167
	 * from the server creation wizard, and <code>false</code> if it cannot.
168
	 * @since 1.6
169
	 */
170
	public boolean supportsManualCreation() {
171
		try {
172
			String supportsManualCreation = element.getAttribute("supportsManualCreation");
173
			return (supportsManualCreation == null || supportsManualCreation.toLowerCase().equals("true"));
174
		} catch (Exception e) {
175
			return true;
176
		}
177
	}
178
160
	public boolean supportsRemoteHosts() {
179
	public boolean supportsRemoteHosts() {
161
		try {
180
		try {
162
			String hosts = element.getAttribute("supportsRemoteHosts");
181
			String hosts = element.getAttribute("supportsRemoteHosts");
(-)serverui/org/eclipse/wst/server/ui/internal/viewers/RuntimeTypeTreeContentProvider.java (-2 / +13 lines)
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);
(-)serverui/org/eclipse/wst/server/ui/internal/viewers/ServerTypeTreeContentProvider.java (-1 / +10 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2003, 2011 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 14-19 Link Here
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.*;
17
import org.eclipse.wst.server.core.internal.ServerType;
17
import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
18
import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
18
import org.eclipse.wst.server.ui.internal.Trace;
19
import org.eclipse.wst.server.ui.internal.Trace;
19
/**
20
/**
Lines 72-77 Link Here
72
		if (serverTypeId != null && !serverType.getId().startsWith(serverTypeId))
73
		if (serverTypeId != null && !serverType.getId().startsWith(serverTypeId))
73
			return false;
74
			return false;
74
		
75
		
76
		try {
77
			if (!((ServerType)serverType).supportsManualCreation()) {
78
				return false;
79
			}
80
		} catch (Exception e) {
81
			// Do nothing since all IServerType should be instance of ServerType.
82
		}
83
		
75
		IRuntimeType runtimeType = serverType.getRuntimeType();
84
		IRuntimeType runtimeType = serverType.getRuntimeType();
76
		if (runtimeType == null)
85
		if (runtimeType == null)
77
			return false;
86
			return false;

Return to bug 425789