1 19 20 package org.netbeans.spi.lexer; 21 22 import java.beans.PropertyChangeListener ; 23 import java.beans.PropertyChangeSupport ; 24 import org.netbeans.api.lexer.InputAttributes; 25 import org.netbeans.api.lexer.Language; 26 import org.netbeans.api.lexer.LanguagePath; 27 import org.netbeans.api.lexer.Token; 28 import org.netbeans.api.lexer.TokenId; 29 30 47 public abstract class LanguageProvider { 48 49 53 public static final String PROP_LANGUAGE = "LanguageProvider.PROP_LANGUAGE"; 55 59 public static final String PROP_EMBEDDED_LANGUAGE = "LanguageProvider.PROP_EMBEDDED_LANGUAGE"; 61 76 public abstract Language<? extends TokenId> findLanguage(String mimePath); 77 78 107 public abstract LanguageEmbedding<? extends TokenId> findLanguageEmbedding( 108 Token<? extends TokenId> token, LanguagePath languagePath, InputAttributes inputAttributes); 109 110 115 public final void addPropertyChangeListener(PropertyChangeListener l) { 116 pcs.addPropertyChangeListener(l); 117 } 118 119 124 public final void removePropertyChangeListener(PropertyChangeListener l) { 125 pcs.removePropertyChangeListener(l); 126 } 127 128 protected final void firePropertyChange(String propertyName) { 129 pcs.firePropertyChange(propertyName, null, null); 130 } 131 132 135 protected LanguageProvider() { 136 137 } 138 139 private final PropertyChangeSupport pcs = new PropertyChangeSupport (this); 140 } 141 | Popular Tags |