blob: b13da797a9731b63a3c96d12e6bedf87ec6a4475 (
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
|
/*******************************************************************************
* Copyright (c) 2007 IBM Corporation and others.
* 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:
* IBM Corporation - initial API and implementation
*
*******************************************************************************/
package org.eclipse.jst.jsp.core.internal.modelhandler;
import java.util.Iterator;
import java.util.List;
import org.eclipse.jst.jsp.core.internal.modelquery.ModelQueryAdapterFactoryForTag;
import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
import org.eclipse.wst.xml.core.internal.ssemodelquery.ModelQueryAdapter;
public class TagModelLoader extends JSPModelLoader {
public TagModelLoader() {
}
public List getAdapterFactories() {
List factories = super.getAdapterFactories();
/*
* Replace the default JSP model query by using our own factory
*/
Iterator i = factories.iterator();
while (i.hasNext()) {
if (((INodeAdapterFactory) i.next()).isFactoryForType(ModelQueryAdapter.class)) {
i.remove();
}
}
factories.add(new ModelQueryAdapterFactoryForTag());
return factories;
}
}
|