1 11 12 package org.eclipse.ui.internal.intro.impl.model; 13 14 import org.eclipse.core.runtime.IConfigurationElement; 15 import org.eclipse.ui.internal.intro.impl.model.util.BundleUtil; 16 import org.osgi.framework.Bundle; 17 import org.w3c.dom.Element ; 18 19 23 public class IntroHead extends AbstractIntroElement { 24 25 protected static final String TAG_HEAD = "head"; 27 private static final String ATT_SRC = "src"; private static final String ATT_ENCODING = "encoding"; 31 private String src; 32 private String encoding; 33 34 IntroHead(IConfigurationElement element) { 35 super(element); 36 src = element.getAttribute(ATT_SRC); 37 encoding = element.getAttribute(ATT_ENCODING); 38 if (encoding == null) 39 encoding = "UTF-8"; 41 src = BundleUtil.getResourceLocation(src, element); 43 } 44 45 46 IntroHead(Element element, Bundle bundle, String base) { 47 super(element, bundle); 48 src = getAttribute(element, ATT_SRC); 49 encoding = getAttribute(element, ATT_ENCODING); 50 if (encoding == null) 51 encoding = "UTF-8"; 53 src = BundleUtil.getResolvedResourceLocation(base, src, bundle); 55 } 56 57 58 61 public String getSrc() { 62 return src; 63 } 64 65 68 public String getInlineEncoding() { 69 return encoding; 70 } 71 72 73 78 public int getType() { 79 return AbstractIntroElement.HEAD; 80 } 81 82 } 83 | Popular Tags |