コード例 #1
0
ファイル: Utils.java プロジェクト: JSansalone/NetBeansIDE
 public static boolean containsMetadata(File folder) {
   CvsVersioningSystem.LOG.log(Level.FINER, " containsMetadata {0}", new Object[] {folder});
   long t = System.currentTimeMillis();
   File repository = new File(folder, CvsVersioningSystem.FILENAME_CVS_REPOSITORY);
   File entries = new File(folder, CvsVersioningSystem.FILENAME_CVS_ENTRIES);
   boolean ret = repository.exists() && entries.exists();
   if (CvsVersioningSystem.LOG.isLoggable(Level.FINER)) {
     CvsVersioningSystem.LOG.log(
         Level.FINER,
         " containsMetadata returns {0} after {1} millis",
         new Object[] {ret, System.currentTimeMillis() - t});
   }
   return ret;
 }
コード例 #2
0
ファイル: Utils.java プロジェクト: JSansalone/NetBeansIDE
 /**
  * Validates annotation format text
  *
  * @param format format to be validatet
  * @return <code>true</code> if the format is correct, <code>false</code> otherwise.
  */
 public static boolean isAnnotationFormatValid(final String format) {
   boolean retval = true;
   if (format != null) {
     try {
       new MessageFormat(format);
     } catch (IllegalArgumentException ex) {
       CvsVersioningSystem.LOG.log(Level.FINER, "Bad user input - annotation format", ex);
       retval = false;
     }
   }
   return retval;
 }