亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? modepropertyconfiguration.java

?? AStar算法
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/******************************************************************************* * Copyright ? 2008 Sandro Badame. All Rights Reserved. *  * This software and the accompanying materials is available under the  * Eclipse Public License 1.0 (EPL), which accompanies this distribution, and is * available at http://visualjpf.sourceforge.net/epl-v10.html ******************************************************************************/package com.javapathfinder.vjp.config.editors;import gov.nasa.jpf.Config;import gov.nasa.jpf.JPF;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.io.PipedInputStream;import java.io.PipedOutputStream;import java.io.PrintStream;import java.util.ArrayList;import java.util.Enumeration;import java.util.HashMap;import org.eclipse.core.resources.IFile;import org.eclipse.core.runtime.CoreException;import org.eclipse.core.runtime.IPath;import org.eclipse.core.runtime.IProgressMonitor;import org.eclipse.core.runtime.NullProgressMonitor;import org.eclipse.core.runtime.SubProgressMonitor;import org.eclipse.jdt.core.IJavaProject;import com.javapathfinder.vjp.DefaultProperties;import com.javapathfinder.vjp.VJP;/** * This class serves to manage the userdefined and default properties for JPF. * There are three levels of properties: * <ul> * <li>JPF default - a static set of properties loaded from jpf.properties and default.properties * <li>VJP default - properties determined by VJP (Overrides some properties from JPF default) * <li>User defined - properties determined by the user (Overrides the properties defined in VJP or JPF default) * </ul> *  * Each of these levels is represented by a map that contains the name/value pair * of their respective properties. When a property is to be retrieved this class * first looks to the user defined layer, then to the VJP layer and then finally * to the JPF layer. Values defined by the user should only be defined on the  * user defined layer.  * Only the user defined layer is saved to the Mode Property Configuration File. *  * @author Sandro Badame */public class ModePropertyConfiguration{    /**   * the default properties according to jpf.defaults   */   private static HashMap<String, String> jpfDefined;    /**   * contains default properties as determined by VJP by this project.   */  private HashMap<String, String> vjpDefined;    /**   * contains the custom user defined values   */  private HashMap<String, String> userDefined = new HashMap<String, String>();      /**   * This is set true when there are changes to be made to the property file.   */  private boolean isDirty = false;    /**   * The file that this ModePropertyConfiguration refers to.   */  private IFile file;    /**   * Hangs onto any listeners that this may have   */  private ArrayList<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>(3);     /**   * Creates a default instance of the PropertyManager. Loads values from    * file "jpf.properties", then loads values from the config file specified.   *    * @param configFile the file that properties and loaded from and stored to.   * @param project the project used to determine the VJP properties   */  public ModePropertyConfiguration(IFile configFile, IJavaProject project) {    this.file = configFile;    checkJPFDefaults();    setVJPDefaults(project);    parseConfigFile();     }    /**   * checks to see if the JPF defaults have been loaded.   * If not, they are.   */  @SuppressWarnings("unchecked")  private static void checkJPFDefaults() {    if (jpfDefined != null)      return;    jpfDefined = new HashMap<String, String>();    Config config = new Config(null, "jpf.properties", "", JPF.class);    Enumeration<String> numer = (Enumeration<String>) config.propertyNames();    while (numer.hasMoreElements()) {      String key = numer.nextElement();      jpfDefined.put(key, config.getProperty(key));    }  }    /**   * Sets the VJP default properties for this configuration based on the the   * project given.   *    * @param project The project to be used to define the VJP default settings   */  public void setVJPDefaults(IJavaProject project){    vjpDefined = DefaultProperties.getDefaultProperties(project);  }    /**   * Clears all of the config properties contained and then reloads all    * properties from the configuration file.   * NOTE: this does not reload from jpf.properties or default.properties   *    * @throws IOException if the file can not be read   * @throws CoreException if the file can not be found   */  public void reloadFromFile() throws IOException, CoreException{    vjpDefined.clear();    userDefined.clear();    parseConfigFile();  }    /**   * Parses the configuration file and handles it appropriatly   *   */  public void parseConfigFile(){    HashMap<String, String> h = getConfigFileProperties(file);    for(String key : h.keySet()){      handleProperty(key, h.get(key));    }  }  /**   * Loads this configuration with the properties contained in configuration   * file associated.   * @throws IOException   * @throws CoreException   * @return the HashMap that contains all of the properties loaded from    *         jpf.properties and default.properties   */  public static HashMap<String, String> getConfigFileProperties(IFile file){   HashMap<String, String> h = new HashMap<String, String>();   BufferedReader reader;   String line;      try{     reader = new BufferedReader(new InputStreamReader(file.getContents()));   }catch(CoreException ce){     VJP.logError("Input Stream from config file could not be opened.", ce);     return h;   }      try{       while ((line = reader.readLine()) != null) {       line = line.trim();       if (line.equals("") || line.charAt(0) == '#')         continue;       int index = line.indexOf('=');       if (index != -1){         String name = line.substring(0, index).trim();         String value = line.substring(index+1, line.length()).trim();         h.put(name, value);       }     }   }catch(IOException ioe){     VJP.logError("Could not read line from config file", ioe);   }   try{     if (reader !=  null)reader.close();   }catch(IOException ioe){     VJP.logError("Could not close InputStream.", ioe);   }   return h;  }    /*   * Decides where a property that has been loaded from a file belongs.   */  private void handleProperty(String name, String value){    if (!(vjpDefined.containsKey(name) && vjpDefined.get(name).equals(value)))     userDefined.put(name, value);  }    /**   * Saves the properties stored in this configuration to the corresponding   * file.   */  public void save() throws IOException, CoreException{    save(new NullProgressMonitor());  }    /**   * Saves the properties stored in this configuration to the corresponding   * file. Progress can be logged on the monitor passed.   *    * @param monitor used to track the progress of saving the file   */  public void save(IProgressMonitor monitor) throws IOException, CoreException{    monitor.beginTask("Saving Configuration File", 3);        monitor.subTask("Reading Configuration File...");    ArrayList<ConfigLine> contents = getFileContents(file);    ArrayList<String> properties = new ArrayList<String>(userDefined.keySet());    monitor.worked(1);        monitor.subTask("Opening data streams...");    PipedInputStream fileData = new PipedInputStream();    PipedOutputStream propertyData = new PipedOutputStream(fileData);    PrintStream writer = new PrintStream(propertyData);    monitor.worked(1);        monitor.subTask("Writing to file...");    for(ConfigLine c : contents){      writer.println(c.getLine());      if (c instanceof PropertyLine)        properties.remove(((PropertyLine)c).getPropertyName());    }    for(String p : properties){      writer.println(p+"="+getPropertyValue(p));    }    writer.flush();    writer.close();    file.setContents(fileData, true, true, new SubProgressMonitor(monitor,1));    fileData.close();    setDirty(false);    monitor.done();  }    private ArrayList<ConfigLine> getFileContents(IFile file) throws CoreException, IOException{    ArrayList<ConfigLine> c = new ArrayList<ConfigLine>();    BufferedReader reader = new BufferedReader(new InputStreamReader(file.getContents()));    String s;    while((s = reader.readLine()) != null){      if (isPropertyLine(s)){        s = s.trim();        PropertyLine p = new PropertyLine(s.substring(0, s.indexOf('=')));        c.add(p);      }else{        c.add(new ConfigLine(s));      }    }    reader.close();    return c;  }    private static boolean isPropertyLine(String line){    String s = line.trim();    return !(s.equals("") || s.charAt(0) == '#');  }    /**   * Move the property file.   * @param newPath the path representing the new location of the configuration file   * @param monitor tracks the progress of moving the file to the new location   */  public void movePropertiesFile(IPath newPath, IProgressMonitor monitor) throws CoreException{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
proumb性欧美在线观看| 日韩视频在线观看一区二区| 国产一区二区三区av电影| 日欧美一区二区| 日本一道高清亚洲日美韩| 五月激情六月综合| 亚洲bt欧美bt精品| 日韩电影免费一区| 麻豆国产精品一区二区三区| 久草这里只有精品视频| 精彩视频一区二区| 国产盗摄一区二区| 成人a区在线观看| 色成年激情久久综合| 欧美在线观看一二区| 欧美日韩国产小视频在线观看| 欧美妇女性影城| 欧美va亚洲va| 国产精品免费网站在线观看| 国产精品狼人久久影院观看方式| 国产精品午夜在线观看| 综合分类小说区另类春色亚洲小说欧美 | 精品一区二区三区不卡| 精品一区二区三区在线播放视频 | 风间由美一区二区av101| 岛国av在线一区| 99国产精品久久久久久久久久久| 色综合久久久久综合99| 欧美精品久久一区二区三区 | 奇米色777欧美一区二区| 美女脱光内衣内裤视频久久网站| 国产一区二区三区观看| 99re热这里只有精品视频| 欧美天堂亚洲电影院在线播放| 91精品一区二区三区久久久久久| 久久嫩草精品久久久久| 中文字幕佐山爱一区二区免费| 亚洲成在线观看| 经典一区二区三区| 色婷婷久久久亚洲一区二区三区 | 成人免费一区二区三区视频 | 成人app网站| 欧美乱熟臀69xxxxxx| 欧美mv日韩mv国产网站| 亚洲人成在线观看一区二区| 日韩成人精品在线| 盗摄精品av一区二区三区| 欧美影院一区二区| 欧美videofree性高清杂交| 中文字幕一区二区三区精华液| 丝袜诱惑亚洲看片| 成人精品国产免费网站| 欧美肥妇bbw| 亚洲国产精品精华液ab| 污片在线观看一区二区| 成人美女视频在线观看18| 欧美日韩一区二区三区四区五区| 久久久一区二区| 五月综合激情网| 成人福利视频网站| 欧美一级淫片007| 亚洲女人的天堂| 国产精品乡下勾搭老头1| 欧美日韩国产不卡| 国产精品久久久久久一区二区三区| 日韩成人免费看| 色综合天天狠狠| 中文字幕国产精品一区二区| 男人的j进女人的j一区| 日本道在线观看一区二区| 久久久久久久久岛国免费| 丝袜亚洲另类欧美| 91久久精品国产91性色tv| 久久先锋资源网| 蜜臀av性久久久久蜜臀aⅴ| 色呦呦日韩精品| 国产精品久久久久久久久久久免费看 | 日韩精品一级二级 | 精品日韩欧美在线| 亚洲一区二区在线视频| av欧美精品.com| 中文字幕不卡三区| 国产制服丝袜一区| 日韩一区二区电影在线| 天堂成人免费av电影一区| 91在线高清观看| 国产精品天天看| 国产精品白丝jk黑袜喷水| 欧美一级专区免费大片| 婷婷综合另类小说色区| 欧美性受xxxx| 亚洲精品成人精品456| 99久久亚洲一区二区三区青草| 国产拍欧美日韩视频二区| 精品亚洲国内自在自线福利| 日韩一区二区电影在线| 日本不卡免费在线视频| 91精品国产综合久久福利软件| 午夜免费久久看| 欧美肥妇bbw| 日本少妇一区二区| 这里只有精品电影| 三级在线观看一区二区| 国产欧美日本一区视频| 成人在线一区二区三区| 国产欧美一区二区三区在线看蜜臀| 国产一区二区电影| 久久精品一区蜜桃臀影院| 国产成人鲁色资源国产91色综| 久久久精品免费网站| 成人涩涩免费视频| 亚洲欧美一区二区三区久本道91| av激情综合网| 一区二区三区四区激情| 欧美日韩一区久久| 日韩成人精品在线观看| 亚洲精品一区二区三区四区高清| 国内精品视频666| 久久久久久久久久久久久夜| 国产成人综合网站| 亚洲日本丝袜连裤袜办公室| 在线亚洲欧美专区二区| 五月天欧美精品| 日韩精品最新网址| 丰满白嫩尤物一区二区| 亚洲欧美激情在线| 欧美美女一区二区在线观看| 免费成人小视频| 亚洲国产精品二十页| 色猫猫国产区一区二在线视频| 亚洲国产精品视频| 日韩欧美黄色影院| 高清成人免费视频| 亚洲精品久久嫩草网站秘色| 91精品久久久久久久91蜜桃| 国产在线看一区| 亚洲精品免费播放| 91精品久久久久久久91蜜桃| 国产呦萝稀缺另类资源| 亚洲视频精选在线| 日韩欧美精品在线视频| 国产成人av电影免费在线观看| 亚洲精品大片www| 精品久久一区二区三区| 99re热视频精品| 免费高清在线视频一区·| 国产精品视频线看| 欧美日韩国产欧美日美国产精品| 国产乱码精品一区二区三区五月婷| 国产精品美女久久久久久久久久久 | 国产精品午夜在线| 777久久久精品| hitomi一区二区三区精品| 丰满少妇久久久久久久| 五月婷婷激情综合网| 欧美高清在线精品一区| 欧美私人免费视频| 国产一区二区影院| 午夜视频在线观看一区二区三区| 国产日产欧美精品一区二区三区| 欧美日韩精品电影| 风间由美一区二区三区在线观看| 日韩精品久久久久久| 中文字幕巨乱亚洲| 日韩一级免费观看| 日本道色综合久久| 国产a精品视频| 日av在线不卡| 亚洲午夜av在线| 国产精品国产三级国产a| 日韩欧美卡一卡二| 欧美天堂一区二区三区| 99久久精品国产一区| 精品一区二区精品| 日韩av中文在线观看| 自拍偷拍国产亚洲| 久久蜜臀中文字幕| 日韩欧美亚洲一区二区| 欧美怡红院视频| 99国产精品国产精品久久| 韩国精品一区二区| 毛片基地黄久久久久久天堂| 亚洲精品伦理在线| 国产精品乱码一区二区三区软件| 26uuu色噜噜精品一区二区| 欧美一区二区二区| 欧美日韩高清在线播放| 色婷婷久久久综合中文字幕| av成人免费在线观看| 高潮精品一区videoshd| 国模大尺度一区二区三区| 天堂在线一区二区| 亚洲6080在线| 亚洲一区二区三区在线看| 中文字幕在线视频一区| 国产女人18毛片水真多成人如厕 | 国产专区综合网| 久久精品国产精品亚洲精品| 丝袜a∨在线一区二区三区不卡| 夜夜嗨av一区二区三区网页|