Examples of SourceEntry


Examples of org.openstreetmap.josm.gui.preferences.SourceEntry

            /* Migration code can be removed ~ Nov. 2014 */
            if (addedMapcssStyle) {
                // change title of the XML entry
                // only do this once. If the user changes it afterward, do not touch
                if (!Main.pref.getBoolean("mappaint.style.migration.changedXmlName", false)) {
                    SourceEntry josmXml = Utils.find(list, new Predicate<SourceEntry>() {
                        @Override
                        public boolean evaluate(SourceEntry se) {
                            return "resource://styles/standard/elemstyles.xml".equals(se.url);
                        }
                    });
                    if (josmXml != null) {
                        josmXml.title = tr("JOSM default (XML; old version)");
                        changed = true;
                    }
                    Main.pref.put("mappaint.style.migration.changedXmlName", true);
                }
            }

            /* Migration code can be removed ~ Nov. 2014 */
            if (!Main.pref.getBoolean("mappaint.style.migration.switchedToMapCSS", false)) {
                SourceEntry josmXml = Utils.find(list, new Predicate<SourceEntry>() {
                    @Override
                    public boolean evaluate(SourceEntry se) {
                        return "resource://styles/standard/elemstyles.xml".equals(se.url);
                    }
                });
                SourceEntry josmMapCSS = Utils.find(list, new Predicate<SourceEntry>() {
                    @Override
                    public boolean evaluate(SourceEntry se) {
                        return "resource://styles/standard/elemstyles.mapcss".equals(se.url);
                    }
                });
View Full Code Here

Examples of org.opoo.press.source.SourceEntry

 
  private File prepareTempFile(String content, Date date, String title) throws Exception{
    File file = File.createTempFile("opoopress.mail.", ".post");
    FileUtils.write(file, content, "UTF-8");
   
    SourceEntry sourceEntry = new SourceEntry(file);
    List<String> metaLines = new ArrayList<String>();
    boolean hasFrontMatter = true;
    try {
      Source source = sourceParser.parse(sourceEntry);
      Map<String, Object> meta = source.getMeta();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.