1 19 20 package org.netbeans.modules.java.bridge; 21 22 import java.beans.PropertyChangeEvent ; 23 import java.util.ResourceBundle ; 24 25 import org.openide.src.SourceException; 26 import org.openide.util.NbBundle; 27 28 import org.openide.ErrorManager; 29 30 35 class Util extends Object { 36 37 static ResourceBundle bundle; 38 39 43 static String getString(String key) { 44 if (bundle == null) 45 bundle = NbBundle.getBundle(Util.class); 46 return bundle.getString(key); 47 } 48 49 static void throwException(String desc, String bundleKey) throws SourceException { 50 throw (SourceException)ErrorManager.getDefault().annotate( 51 new SourceException(desc), 52 getString(bundleKey) 53 ); 54 } 55 56 static PropertyChangeEvent computePropretyDiffs(Object [] oldValues, Object [] newValues) { 57 if (newValues.length == oldValues.length) 58 return null; 60 return null; 62 } 63 64 69 70 static ErrorManager em; 71 72 static void log(String msg) { 73 if (em == null) { 74 synchronized (Util.class) { 75 if (em == null) 76 em = ErrorManager.getDefault().getInstance("org.netbeans.modules.java.model"); } 78 } 79 em.log(msg); 80 } 81 } 82 | Popular Tags |