Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 312025 | Differences between
and this patch

Collapse All | Expand All

(-)src-common-internal/org/eclipse/hyades/ui/internal/extension/AssociationDescriptor.java (-2 / +10 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
2
 * Copyright (c) 2005, 2010 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 32-38 Link Here
32
 * interface.
32
 * interface.
33
 * 
33
 * 
34
 * @author marcelop
34
 * @author marcelop
35
 * @author Jerome Bozier
35
 * @since 0.0.1
36
 * @since 0.0.1
37
 * @version May 7, 2010
36
 */
38
 */
37
public class AssociationDescriptor 
39
public class AssociationDescriptor 
38
implements IAssociationDescriptor, Serializable
40
implements IAssociationDescriptor, Serializable
Lines 56-61 Link Here
56
	protected boolean isPluginDefault = false;
58
	protected boolean isPluginDefault = false;
57
59
58
	protected IConfigurationElement configurationElement;
60
	protected IConfigurationElement configurationElement;
61
	private Object currentInstance = null;
59
	
62
	
60
	/**
63
	/**
61
	 * Constructor for AssociationDescriptor
64
	 * Constructor for AssociationDescriptor
Lines 209-221 Link Here
209
	 */
212
	 */
210
	public Class getImplementationClass()
213
	public Class getImplementationClass()
211
	{
214
	{
215
		currentInstance = null;
212
		if((extensionClass == null) && (configurationElement != null))
216
		if((extensionClass == null) && (configurationElement != null))
213
		{
217
		{
214
			if(getValue(configurationElement, "class") != null)
218
			if(getValue(configurationElement, "class") != null)
215
			{
219
			{
216
				try
220
				try
217
				{
221
				{
218
					extensionClass = configurationElement.createExecutableExtension("class").getClass();
222
					currentInstance = configurationElement.createExecutableExtension("class");
223
					extensionClass = currentInstance.getClass();
219
				}
224
				}
220
				catch (Exception e)
225
				catch (Exception e)
221
				{
226
				{
Lines 233-238 Link Here
233
	public Object createImplementationClassInstance()
238
	public Object createImplementationClassInstance()
234
	{
239
	{
235
		Class cls = getImplementationClass();
240
		Class cls = getImplementationClass();
241
		if (currentInstance != null) {
242
			return currentInstance;
243
		}
236
		if(cls != null)
244
		if(cls != null)
237
		{
245
		{
238
			try
246
			try

Return to bug 312025