blob: 16be426152e95e8c4b04e481984a16c2483a620d [file] [log] [blame]
nitindb0f7b262004-11-23 19:12:23 +00001/*******************************************************************************
2 * Copyright (c) 2004 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11package org.eclipse.jst.jsp.core.internal.parser.internal;
12
13import org.eclipse.jst.jsp.core.internal.parser.JSPDirectiveStructuredDocumentRegion;
david_williams4ad020f2005-04-18 08:00:30 +000014import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
nitindb0f7b262004-11-23 19:12:23 +000015import org.eclipse.wst.xml.core.internal.parser.XMLStructuredRegionFactory;
16
17/**
18 * A simple class to generate instances of StructuredRegions.
19 */
20public class JSPStructuredRegionFactory extends XMLStructuredRegionFactory {
21
22 public static IStructuredDocumentRegion createRegion(int type) {
23 IStructuredDocumentRegion instance = null;
24 switch (type) {
25 case JSP_DIRECTIVE :
26 instance = new JSPDirectiveStructuredDocumentRegion();
27 break;
28 default :
29 instance = XMLStructuredRegionFactory.createRegion(type);
30 }
31 return instance;
32 }
33
34}