01: /*******************************************************************************
02: * Copyright (c) 2000, 2004 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.internal.ui.examples.jspeditor;
11:
12: import org.eclipse.jface.text.source.translation.ITagHandler;
13: import org.eclipse.jface.text.source.translation.ITagHandlerFactory;
14:
15: /**
16: * First cut of JSP to Java tag handler factory.
17: * Only one handler is used to do the job.
18: *
19: * @since 3.0
20: */
21: public class Jsp2JavaTagHandlerFactory implements ITagHandlerFactory {
22:
23: private ITagHandler fTagHandler = new Jsp2JavaTagHandler();
24:
25: /*
26: * @see org.eclipse.jface.text.source.IHandlerFactory#getHandler(java.lang.String)
27: */
28: public ITagHandler getHandler(String tag) {
29: fTagHandler.reset(tag);
30: return fTagHandler;
31: }
32:
33: /*
34: * @see org.eclipse.jface.text.source.IHandlerFactory#findHandler(java.lang.String)
35: */
36: public ITagHandler findHandler(String text) {
37: return fTagHandler;
38: }
39:
40: }
|