blob: 84e0b45146d98bb515cb5ecceac15fa7799279f4 (
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
|
/*******************************************************************************
* Copyright (c) 2010, 2019 IBM Corporation and others.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jst.jsf.facelet.core.internal.cm;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IProject;
import org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.FaceletExternalMetadataStrategy;
import org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.IExternalMetadataStrategy;
import org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.MDExternalMetadataStrategy;
import org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.TagInfoStrategyComposite;
/*package*/class FaceletTagInfo extends CompositeTagInfo
{
public FaceletTagInfo(final IProject project, final String uri)
{
super(uri, createStrategy(project));
}
private static TagInfoStrategyComposite createStrategy(
final IProject project)
{
final IExternalMetadataStrategy mdStrategy = MDExternalMetadataStrategy
.create(project);
final IExternalMetadataStrategy faceletStrategy = new FaceletExternalMetadataStrategy(
project);
final List<String> ids = new ArrayList<String>();
ids.add(FaceletExternalMetadataStrategy.STRATEGY_ID);
ids.add(MDExternalMetadataStrategy.STRATEGY_ID);
final TagInfoStrategyComposite strategyComposite = new TagInfoStrategyComposite(
ids);
strategyComposite.addStrategy(faceletStrategy);
strategyComposite.addStrategy(mdStrategy);
return strategyComposite;
}
}
|