1 19 20 package org.netbeans.modules.java.bridge; 21 22 import java.beans.PropertyChangeEvent ; 23 24 import org.openide.nodes.Node; 25 26 import org.openide.src.Element; 27 import org.openide.src.ClassElement; 28 import org.openide.src.SourceElement; 29 import org.openide.src.ElementProperties; 30 import org.openide.src.Identifier; 31 import org.openide.src.SourceException; 32 import org.openide.src.Type; 33 34 import org.netbeans.modules.java.ElementFactory; 35 36 41 public interface LangModel extends ElementCreator { 42 47 public void readLock(); 48 49 51 public void releaseReadLock(); 52 53 58 public boolean isWriteLocked(); 59 60 65 public void addPreCommitListener(CommitListener l); 66 67 70 public void removePreCommitListener(CommitListener l); 71 72 77 public void addPostCommitListener(CommitListener l); 78 79 82 public void removePostCommitListener(CommitListener l); 83 84 87 public void runAtomic(Runnable r) throws SourceException; 88 89 92 public void commitChanges(); 93 94 100 public Object writeLock(); 101 102 109 public Object tryWriteLock(); 110 111 118 public void releaseWriteLock(Object handle) throws SourceException; 119 120 124 public static interface Env { 125 132 public BindingFactory getBindingFactory(); 133 134 137 public WrapperFactory getWrapperFactory(); 138 139 146 public void complete(Element scope, int informationKind); 147 148 151 public Type resolveType(Element context, Type original); 152 153 156 public Identifier resolveTypeIdent(Element context, Identifier original); 157 158 162 public Node.Cookie findCookie(Element el, Class requestedClass); 163 164 169 } 170 171 public interface Updater extends LangModel, ElementProperties { 172 public void updateMembers(Element target, String propertyName, 173 Element[] els, int[] orderIndices, int[] optionalMap); 174 175 179 public void updateMemberOrder(Element target, String containerType, 180 Element[] orderedMembers); 181 182 public Binding getElementBinding(Element target); 183 184 189 public void activate(Element target); 190 191 194 public void invalidateModel(SourceElement el); 195 196 200 public boolean runUpdate(Runnable r, boolean disableVetos) throws SourceException; 201 202 208 public void firePropertyChange(Element el, PropertyChangeEvent evt); 209 210 215 public void updateBody(Element el, String bodyContent) throws UnsupportedOperationException ; 216 } 217 } 218 | Popular Tags |