Skip to main content
summaryrefslogtreecommitdiffstats
blob: 842728ddc9b972cd8c1c3d75b93de519b776146a (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
/*******************************************************************************
 * Copyright (c) 2007, 2008 Oracle. 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:
 *     Oracle - initial API and implementation
 ******************************************************************************/
package org.eclipse.jpt.ui.internal.structure;

import org.eclipse.jpt.core.context.orm.EntityMappings;
import org.eclipse.jpt.ui.internal.platform.generic.EntityMappingsItemLabelProvider;
import org.eclipse.jpt.ui.jface.DelegatingContentAndLabelProvider;
import org.eclipse.jpt.ui.jface.ItemLabelProvider;

public class OrmItemLabelProviderFactory extends GeneralJpaMappingItemLabelProviderFactory
{
	@Override
	public ItemLabelProvider buildItemLabelProvider(
			Object item, DelegatingContentAndLabelProvider labelProvider) {
		if (item instanceof EntityMappings) {
			return new EntityMappingsItemLabelProvider((EntityMappings) item, labelProvider);
		}
		return super.buildItemLabelProvider(item, labelProvider);
	}
}

Back to the top