• R/O
  • SSH
  • HTTPS

smart-gs: Commit


Commit MetaInfo

Revision1194 (tree)
Time2016-10-01 20:57:55
Authorohura

Log Message

[editor-simplyhtml-merge] ビルドできない場合がある問題を修正
現状では使う必要のなくなったクラスの除去。
Javaの内部のメソッドを使っている関係か、JavaのバージョンかEclipseの設定によっては、ビルドできない場合があるようだ。

Change Summary

Incremental Difference

--- branches/editor-simplyhtml-merge/src/smart_gs/simplyhtml/SGSParserDelegator.java (revision 1193)
+++ branches/editor-simplyhtml-merge/src/smart_gs/simplyhtml/SGSParserDelegator.java (revision 1194)
@@ -9,7 +9,7 @@
99 import javax.swing.text.html.parser.Element;
1010 import javax.swing.text.html.parser.ParserDelegator;
1111
12-import sun.awt.AppContext;
12+//import sun.awt.AppContext;
1313
1414 public class SGSParserDelegator extends ParserDelegator {
1515 /**
@@ -48,30 +48,30 @@
4848 }
4949
5050 public void parse(Reader r, HTMLEditorKit.ParserCallback cb, boolean ignoreCharSet) throws IOException {
51- new SGSDocumentParser(getDefaultDTD()).parse(r, cb, ignoreCharSet);
51+ new SGSDocumentParser(createDTD(DTD.getDTD("html32"), "html32")).parse(r, cb, ignoreCharSet);
5252 }
5353
54- private static synchronized DTD getDefaultDTD() {
55- AppContext appContext = AppContext.getAppContext();
54+// private static synchronized DTD getDefaultDTD() {
55+// AppContext appContext = AppContext.getAppContext();
56+//
57+// DTD dtd = (DTD) appContext.get(DTD_KEY);
58+//
59+// if (dtd == null) {
60+// DTD _dtd = null;
61+// // (PENDING) Hate having to hard code!
62+// String nm = "html32";
63+// try {
64+// _dtd = DTD.getDTD(nm);
65+// } catch (IOException e) {
66+// // (PENDING) UGLY!
67+// System.out.println("Throw an exception: could not get default dtd: " + nm);
68+// }
69+// dtd = createDTD(_dtd, nm);
70+//
71+// appContext.put(DTD_KEY, dtd);
72+// }
73+//
74+// return dtd;
75+// }
5676
57- DTD dtd = (DTD) appContext.get(DTD_KEY);
58-
59- if (dtd == null) {
60- DTD _dtd = null;
61- // (PENDING) Hate having to hard code!
62- String nm = "html32";
63- try {
64- _dtd = DTD.getDTD(nm);
65- } catch (IOException e) {
66- // (PENDING) UGLY!
67- System.out.println("Throw an exception: could not get default dtd: " + nm);
68- }
69- dtd = createDTD(_dtd, nm);
70-
71- appContext.put(DTD_KEY, dtd);
72- }
73-
74- return dtd;
75- }
76-
7777 }
Show on old repository browser