blob: f9679d350ea1a8a6b67d61d10212f879b6b65a40 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2012 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.jaxb.eclipselink.core.internal.context.java;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.context.java.JavaContextNode;
import org.eclipse.jpt.jaxb.core.internal.context.java.AbstractJavaContextNode;
import org.eclipse.jpt.jaxb.eclipselink.core.context.java.ELXmlCDATA;
import org.eclipse.jpt.jaxb.eclipselink.core.resource.java.XmlCDATAAnnotation;
public class ELJavaXmlCDATA
extends AbstractJavaContextNode
implements ELXmlCDATA {
protected final Context context;
public ELJavaXmlCDATA(JavaContextNode parent, Context context) {
super(parent);
this.context = context;
}
@Override
public TextRange getValidationTextRange(CompilationUnit astRoot) {
return this.context.getAnnotation().getTextRange(astRoot);
}
public interface Context {
XmlCDATAAnnotation getAnnotation();
}
}