XmlPrint.java package linwancheng.IDEAkeymap;import java.util.List;import org.dom4j.Document;import org.dom4j.DocumentException;import org.dom4j.Element;import org.dom4j.io.SAXReader;public class XmlPrint {public static void main(String[] a
package linwancheng.IDEAkeymap;
import java.util.List;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
public class XmlPrint {
public static void main(String[] args) throws DocumentException {
SAXReader saxReader = new SAXReader();
//C:\Program Files\JetBrains\IntelliJ IDEA 2017.2\lib\resources.jar\keymaps\$default.xml
Document read = saxReader.read("$default.xml");
Element rootElement = read.getRootElement();
@SuppressWarnings("unchecked")
List
actions = rootElement.elements();
for (Element action : actions) {
@SuppressWarnings("unchecked")
List
keyboards = action.elements(); for (Element keyboard : keyboards) { System.out.println(action.attributeValue("id")+","+keyboard.attributeValue("first-keystroke")); } } } }
PorpPrint.java
package linwancheng.IDEAkeymap;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;
public class PorpPrint {
public static void main(String[] args) throws FileNotFoundException, IOException {
//C:\Program Files\JetBrains\IntelliJ IDEA 2017.2\lib\resources_cn.jar\messages\ActionsBundle.properties
FileInputStream fileInputStream = new FileInputStream("ActionsBundle.properties");
Properties properties = new Properties();
properties.load(fileInputStream);
Set
> entrySet = properties.entrySet();
for (Entry
