亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
亚洲综合偷拍欧美一区色| 青青草97国产精品免费观看无弹窗版 | 欧美亚洲日本一区| 激情综合五月婷婷| 亚洲综合激情网| 日本一区二区三区四区在线视频| 91福利在线看| 亚洲一区二区精品久久av| 国产欧美日韩三区| 精品国产人成亚洲区| 欧美在线免费视屏| 99精品欧美一区二区三区综合在线| 免费看日韩a级影片| 亚洲国产欧美日韩另类综合| 国产女人水真多18毛片18精品视频 | 成人精品免费网站| 精品一区二区三区久久| 五月天精品一区二区三区| 成人欧美一区二区三区1314| 久久综合中文字幕| 欧美一区二区啪啪| 欧美精品日日鲁夜夜添| 欧美四级电影网| 色悠悠久久综合| 成人午夜电影网站| 日本在线不卡视频一二三区| 一区二区日韩电影| 久久久噜噜噜久久人人看 | 99久久er热在这里只有精品66| 美女视频第一区二区三区免费观看网站| 亚洲天堂免费在线观看视频| 日韩区在线观看| 欧美一级淫片007| 欧美一区三区二区| 日韩午夜av一区| 日韩一级黄色大片| 日韩一区二区在线看| 欧美另类高清zo欧美| 在线观看日韩毛片| 精品视频在线看| 91丨九色丨尤物| 在线观看日韩高清av| 色综合亚洲欧洲| 91啪在线观看| 一本色道久久综合狠狠躁的推荐| 成a人片国产精品| 成人午夜私人影院| 成人午夜电影网站| 99国产精品久| 日韩一区二区在线免费观看| 日韩一区二区在线看片| 精品国产乱码久久久久久影片| 欧美一区二区三区免费观看视频 | 综合在线观看色| 国产亚洲欧美中文| 久久青草国产手机看片福利盒子| 久久久久久夜精品精品免费| 欧美一级搡bbbb搡bbbb| 欧美一区二区三区的| 精品美女被调教视频大全网站| 2017欧美狠狠色| 国产精品国产精品国产专区不片| 亚洲男人的天堂在线aⅴ视频| 一区二区三区在线视频播放| 日本欧美一区二区三区| 韩国成人福利片在线播放| 成人免费高清视频| 欧美亚洲综合色| 欧美大胆人体bbbb| 国产精品美女久久久久久2018| 国产精品不卡视频| 天天影视网天天综合色在线播放| 国产综合久久久久久鬼色| www.成人网.com| 欧美另类久久久品| 欧美国产成人精品| 亚洲一区二区三区四区的| 日韩av一级片| 99久久综合国产精品| 欧美日韩国产高清一区二区三区| 精品美女一区二区| 一区二区国产视频| 国产在线播放一区| 欧美三级视频在线| 亚洲国产高清在线| 青青草视频一区| 91麻豆123| 久久精品欧美日韩精品 | 国产剧情一区在线| 日本高清不卡aⅴ免费网站| 精品国产1区二区| 亚洲成人动漫一区| 99久久国产免费看| 精品电影一区二区| 亚洲第四色夜色| 99久久精品免费| 精品国产一区二区精华| 亚洲五码中文字幕| 成人av高清在线| 久久天堂av综合合色蜜桃网| 亚洲一区av在线| 91在线观看视频| 精品精品国产高清a毛片牛牛 | 日韩av在线发布| 色哦色哦哦色天天综合| 久久精品亚洲精品国产欧美kt∨ | 日韩精品亚洲一区二区三区免费| 国产精品一区二区免费不卡| 欧美日韩国产美| 中文字幕在线观看一区二区| 日韩成人免费看| 欧美三电影在线| 亚洲欧美自拍偷拍| 国产精品综合久久| 精品久久人人做人人爰| 亚洲成人av电影| 欧美日韩一区小说| 亚洲午夜久久久久久久久久久 | 激情综合五月天| 91精品久久久久久久91蜜桃| 亚洲精品国产精华液| 成人av免费在线播放| 久久精品夜色噜噜亚洲a∨| 狠狠网亚洲精品| 欧美一卡2卡三卡4卡5免费| 亚洲国产欧美另类丝袜| 欧美中文字幕一区二区三区| 一区二区三区在线视频免费| 色综合久久综合| 亚洲欧美另类在线| 91女人视频在线观看| 亚洲免费av高清| 色综合激情久久| 亚洲激情图片小说视频| 色综合色狠狠天天综合色| 综合欧美一区二区三区| 色婷婷亚洲综合| 亚洲一区二区精品3399| 欧美人与性动xxxx| 秋霞午夜鲁丝一区二区老狼| 91精品国产综合久久福利软件 | 久久一日本道色综合| 国产一区二区三区香蕉| 国产欧美日产一区| 成人爱爱电影网址| 亚洲免费观看高清完整| 欧美日韩中文字幕精品| 毛片av一区二区| 久久久夜色精品亚洲| 成人av在线影院| 亚洲一区视频在线观看视频| 欧美视频一区在线| 久久国产麻豆精品| 亚洲国产激情av| 91黄视频在线| 久久电影网站中文字幕| 国产肉丝袜一区二区| 91视频在线观看免费| 亚洲一二三四在线| 日韩欧美国产成人一区二区| 国产白丝网站精品污在线入口| 日韩美女啊v在线免费观看| 欧美日韩二区三区| 韩国欧美国产1区| 日韩美女啊v在线免费观看| 欧美老女人第四色| 国内精品第一页| 中文字幕一区二区三区在线不卡| 欧美综合亚洲图片综合区| 久久国产精品一区二区| 亚洲三级在线看| 91精品欧美福利在线观看| 国产盗摄精品一区二区三区在线| 一区二区在线观看视频| 日韩亚洲欧美一区二区三区| 高清在线成人网| 丝袜诱惑制服诱惑色一区在线观看| 精品国产乱子伦一区| 色丁香久综合在线久综合在线观看| 免费视频一区二区| 亚洲色图.com| 26uuu国产在线精品一区二区| 91麻豆国产福利在线观看| 美女国产一区二区| 亚洲精品久久久蜜桃| 精品国产麻豆免费人成网站| 欧洲视频一区二区| 国产99久久久国产精品免费看| 亚洲一区二区免费视频| 国产精品美女视频| 日韩欧美黄色影院| 欧美三级电影网| 99国产精品国产精品久久| 精品制服美女丁香| 亚洲国产综合视频在线观看| 国产精品剧情在线亚洲| 精品国产1区二区| 91精品国产高清一区二区三区蜜臀| 成人久久视频在线观看| 九九在线精品视频|