rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if (jj_scan_token(POUND)) return true;
if (jj_scan_token(LBRACE)) return true;
final private boolean jj_3R_62() { if (jj_scan_token(POUND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_scan_token(DOLLAR)) return true;
if (jj_scan_token(RBRACE)) return true;
final private boolean jj_3R_63() { if (jj_scan_token(DOLLAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
Token xsp; xsp = jj_scanpos; if (jj_3R_71()) { jj_scanpos = xsp; if (jj_3R_72()) return true;
if (jj_scan_token(POUND)) return true;
final private boolean jj_3R_64() { Token xsp; xsp = jj_scanpos; if (jj_3R_71()) { jj_scanpos = xsp; if (jj_3R_72()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
final private boolean jj_3R_64() { Token xsp; xsp = jj_scanpos; if (jj_3R_71()) { jj_scanpos = xsp; if (jj_3R_72()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_scan_token(LBRACKET)) return true;
if (jj_scan_token(DOLLAR)) return true;
final private boolean jj_3R_65() { if (jj_scan_token(LBRACKET)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_scan_token(STUFF)) return true;
Token xsp; xsp = jj_scanpos; if (jj_3R_73()) { jj_scanpos = xsp; if (jj_3R_74()) return true;
final private boolean jj_3R_66() { if (jj_scan_token(STUFF)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
final private boolean jj_3R_66() { if (jj_scan_token(STUFF)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_scan_token(QCHAR)) return true;
if (jj_scan_token(LBRACKET)) return true;
final private boolean jj_3R_67() { if (jj_scan_token(QCHAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_scan_token(SLASH)) return true;
if (jj_scan_token(STUFF)) return true;
final private boolean jj_3R_68() { if (jj_scan_token(SLASH)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_73()) return true;
if (jj_scan_token(QCHAR)) return true;
final private boolean jj_3R_69() { if (jj_3R_73()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_74()) return true;
if (jj_scan_token(SLASH)) return true;
final private boolean jj_3R_70() { if (jj_3R_74()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_scan_token(QUOTE)) return true;
if (jj_3R_75()) return true;
final private boolean jj_3R_71() { if (jj_scan_token(QUOTE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_scan_token(SQUOTE)) return true;
if (jj_3R_76()) return true;
final private boolean jj_3R_72() { if (jj_scan_token(SQUOTE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_scan_token(POUNDPOUND)) return true;
if (jj_scan_token(QUOTE)) return true;
final private boolean jj_3R_73() { if (jj_scan_token(POUNDPOUND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
Token xsp; xsp = jj_scanpos; if (jj_3R_75()) { jj_scanpos = xsp; if (jj_3R_76()) return true;
if (jj_scan_token(SQUOTE)) return true;
final private boolean jj_3R_74() { Token xsp; xsp = jj_scanpos; if (jj_3R_75()) { jj_scanpos = xsp; if (jj_3R_76()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
final private boolean jj_3R_74() { Token xsp; xsp = jj_scanpos; if (jj_3R_75()) { jj_scanpos = xsp; if (jj_3R_76()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_63()) return true;
if (jj_scan_token(POUNDPOUND)) return true;
final private boolean jj_3R_75() { if (jj_3R_63()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_scan_token(DOLLAR)) return true;
Token xsp; xsp = jj_scanpos; if (jj_3R_77()) { jj_scanpos = xsp; if (jj_3R_78()) return true;
final private boolean jj_3R_76() { if (jj_scan_token(DOLLAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
final private boolean jj_3R_76() { if (jj_scan_token(DOLLAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_17()) jj_scanpos = xsp;
if (jj_3R_19()) jj_scanpos = xsp;
final private boolean jj_3_11() { Token xsp; xsp = jj_scanpos; if (jj_3R_17()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_18()) { jj_scanpos = xsp; if (jj_3R_19()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_20()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_21()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_18()) {
if (jj_3R_20()) {
final private boolean jj_3_11() { Token xsp; xsp = jj_scanpos; if (jj_3R_17()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_18()) { jj_scanpos = xsp; if (jj_3R_19()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_20()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_21()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_19()) return true;
if (jj_3R_21()) return true;
final private boolean jj_3_11() { Token xsp; xsp = jj_scanpos; if (jj_3R_17()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_18()) { jj_scanpos = xsp; if (jj_3R_19()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_20()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_21()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_20()) jj_scanpos = xsp;
if (jj_3R_22()) jj_scanpos = xsp;
final private boolean jj_3_11() { Token xsp; xsp = jj_scanpos; if (jj_3R_17()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_18()) { jj_scanpos = xsp; if (jj_3R_19()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_20()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_21()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_21()) return true;
if (jj_3R_23()) return true;
final private boolean jj_3_11() { Token xsp; xsp = jj_scanpos; if (jj_3R_17()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_18()) { jj_scanpos = xsp; if (jj_3R_19()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_20()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_21()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_22()) jj_scanpos = xsp;
if (jj_3R_24()) jj_scanpos = xsp;
final private boolean jj_3_12() { Token xsp; xsp = jj_scanpos; if (jj_3R_22()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_23()) { jj_scanpos = xsp; if (jj_3R_24()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_25()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_26()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_23()) {
if (jj_3R_25()) {
final private boolean jj_3_12() { Token xsp; xsp = jj_scanpos; if (jj_3R_22()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_23()) { jj_scanpos = xsp; if (jj_3R_24()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_25()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_26()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_24()) return true;
if (jj_3R_26()) return true;
final private boolean jj_3_12() { Token xsp; xsp = jj_scanpos; if (jj_3R_22()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_23()) { jj_scanpos = xsp; if (jj_3R_24()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_25()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_26()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_25()) jj_scanpos = xsp;
if (jj_3R_27()) jj_scanpos = xsp;
final private boolean jj_3_12() { Token xsp; xsp = jj_scanpos; if (jj_3R_22()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_23()) { jj_scanpos = xsp; if (jj_3R_24()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_25()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_26()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_26()) return true;
if (jj_3R_28()) return true;
final private boolean jj_3_12() { Token xsp; xsp = jj_scanpos; if (jj_3R_22()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_23()) { jj_scanpos = xsp; if (jj_3R_24()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_25()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_26()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
xsp = jj_scanpos; if (jj_3R_27()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_28()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
final private boolean jj_3_13() { Token xsp; xsp = jj_scanpos; if (jj_3R_27()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_28()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_29()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_30()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
xsp = jj_scanpos; if (jj_3R_31()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_32()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
final private boolean jj_3_13() { Token xsp; xsp = jj_scanpos; if (jj_3R_27()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_28()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_29()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_30()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_31()) jj_scanpos = xsp;
if (jj_3R_33()) jj_scanpos = xsp;
final private boolean jj_3_14() { Token xsp; xsp = jj_scanpos; if (jj_3R_31()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_scan_token(OP_AND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_32()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_33()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_32()) jj_scanpos = xsp;
if (jj_3R_34()) jj_scanpos = xsp;
final private boolean jj_3_14() { Token xsp; xsp = jj_scanpos; if (jj_3R_31()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_scan_token(OP_AND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_32()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_33()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_33()) return true;
if (jj_3R_35()) return true;
final private boolean jj_3_14() { Token xsp; xsp = jj_scanpos; if (jj_3R_31()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_scan_token(OP_AND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_32()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_33()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_34()) jj_scanpos = xsp;
if (jj_3R_36()) jj_scanpos = xsp;
final private boolean jj_3_15() { Token xsp; xsp = jj_scanpos; if (jj_3R_34()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_scan_token(OP_OR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_35()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_36()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_35()) jj_scanpos = xsp;
if (jj_3R_37()) jj_scanpos = xsp;
final private boolean jj_3_15() { Token xsp; xsp = jj_scanpos; if (jj_3R_34()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_scan_token(OP_OR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_35()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_36()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_36()) return true;
if (jj_3R_38()) return true;
final private boolean jj_3_15() { Token xsp; xsp = jj_scanpos; if (jj_3R_34()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_scan_token(OP_OR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_35()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_36()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_37()) jj_scanpos = xsp;
if (jj_3R_39()) jj_scanpos = xsp;
final private boolean jj_3_17() { if (jj_scan_token(DOLLAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; Token xsp; xsp = jj_scanpos; if (jj_3R_37()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_38()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_scan_token(WORD)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_38()) jj_scanpos = xsp;
if (jj_3R_40()) jj_scanpos = xsp;
final private boolean jj_3_17() { if (jj_scan_token(DOLLAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; Token xsp; xsp = jj_scanpos; if (jj_3R_37()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_38()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_scan_token(WORD)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_39()) {
if (jj_3R_41()) {
final private boolean jj_3_21() { Token xsp; xsp = jj_scanpos; if (jj_3R_39()) { jj_scanpos = xsp; if (jj_3R_40()) { jj_scanpos = xsp; lookingAhead = true; jj_semLA = lookahead_not_breaking_subd(); lookingAhead = false; if (!jj_semLA || jj_3R_41()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_40()) {
if (jj_3R_42()) {
final private boolean jj_3_21() { Token xsp; xsp = jj_scanpos; if (jj_3R_39()) { jj_scanpos = xsp; if (jj_3R_40()) { jj_scanpos = xsp; lookingAhead = true; jj_semLA = lookahead_not_breaking_subd(); lookingAhead = false; if (!jj_semLA || jj_3R_41()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (!jj_semLA || jj_3R_41()) return true;
if (!jj_semLA || jj_3R_43()) return true;
final private boolean jj_3_21() { Token xsp; xsp = jj_scanpos; if (jj_3R_39()) { jj_scanpos = xsp; if (jj_3R_40()) { jj_scanpos = xsp; lookingAhead = true; jj_semLA = lookahead_not_breaking_subd(); lookingAhead = false; if (!jj_semLA || jj_3R_41()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_scan_token(POUND)) return true;
Token xsp; xsp = jj_scanpos; if (jj_3R_15()) { jj_scanpos = xsp; if (jj_3R_16()) return true;
final private boolean jj_3_5() { if (jj_scan_token(WS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_scan_token(POUND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
final private boolean jj_3_5() { if (jj_scan_token(WS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_scan_token(POUND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_15()) jj_scanpos = xsp;
if (jj_3R_17()) jj_scanpos = xsp;
final private boolean jj_3_6() { Token xsp; xsp = jj_scanpos; if (jj_3R_15()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_scan_token(NEWLINE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_16()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_16()) jj_scanpos = xsp;
if (jj_3R_18()) jj_scanpos = xsp;
final private boolean jj_3_6() { Token xsp; xsp = jj_scanpos; if (jj_3R_15()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_scan_token(NEWLINE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_16()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
EnhancedDebuggerWindow.PERSISTED_DEBUGGER = true; EnhancedDebuggerWindow.MAX_TABLE_ROWS = 10; XMPPConnection.DEBUG_ENABLED = true;
public static void main(final String[] args) { /* * EnhancedDebuggerWindow.PERSISTED_DEBUGGER = true; * EnhancedDebuggerWindow.MAX_TABLE_ROWS = 10; * XMPPConnection.DEBUG_ENABLED = true; */ String current = System.getProperty("java.library.path"); String classPath = System.getProperty("java.class.path"); // Set UIManager properties for JTree System.setProperty("apple.laf.useScreenMenuBar", "true"); /** Update Library Path **/ StringBuffer buf = new StringBuffer(); buf.append(current); buf.append(";"); final String workingDirectory = System.getProperty("appdir"); if (workingDirectory == null) { RESOURCE_DIRECTORY = new File(USER_HOME, "/Spark/resources").getAbsoluteFile(); BIN_DIRECTORY = new File(USER_HOME, "/Spark/bin").getAbsoluteFile(); LOG_DIRECTORY = new File(USER_HOME, "/Spark/logs").getAbsoluteFile(); RESOURCE_DIRECTORY.mkdirs(); LOG_DIRECTORY.mkdirs(); if (!RESOURCE_DIRECTORY.exists() || !LOG_DIRECTORY.exists()) { JOptionPane.showMessageDialog(new JFrame(), "Unable to create directories necessary for runtime.", "Spark Error", JOptionPane.ERROR_MESSAGE); System.exit(1); } } // This is the Spark.exe or Spark.dmg installed executable. else { // This is the installed executable. File workingDir = new File(workingDirectory); RESOURCE_DIRECTORY = new File(workingDir, "resources").getAbsoluteFile(); BIN_DIRECTORY = new File(workingDir, "bin").getAbsoluteFile(); if (!Spark.isWindows()) { LOG_DIRECTORY = new File(USER_HOME, "/Spark/logs").getAbsoluteFile(); } else { LOG_DIRECTORY = new File(workingDir, "logs").getAbsoluteFile(); } LOG_DIRECTORY.mkdirs(); try { buf.append(RESOURCE_DIRECTORY.getCanonicalPath()).append(";"); } catch (IOException e) { e.printStackTrace(); } } buf.append(classPath); // Update System Properties System.setProperty("java.library.path", buf.toString()); System.setProperty("sun.java2d.noddraw", "true"); SwingUtilities.invokeLater(new Runnable() { public void run() { // Start Application new Spark(); } }); // Handle arguments if (args.length > 0) { argument = args[0]; } }
Copyright.print(System.out);
Header.print(System.out);
public void execute() throws BuildException { Copyright.print(System.out); getJava().createArg().setValue("-i"); getJava().createArg().setValue(coverageDataFileName); getJava().createArg().setValue("-s"); getJava().createArg().setValue(src.toString()); getJava().createArg().setValue("-o"); getJava().createArg().setValue(destDir.toString()); getJava().createArg().setValue("-f"); getJava().createArg().setValue(format); if (getJava().executeJava() != 0) { throw new BuildException(); } }
public DiffHelper (Diff.change changes) { _changes = new ArrayList();
public DiffHelper (WikiSystem wiki, WikiPage old, WikiPage current) throws Exception { _currentLines = WikiUtil.delimitedToArray(wiki.getPageRenderer().render(current), "\n"); _oldLines = WikiUtil.delimitedToArray(wiki.getPageRenderer().render(old), "\n"); Diff diff = new Diff (_oldLines, _currentLines); Diff.change changes = diff.diff(Diff.forwardScript); _changeList = new ArrayList();
public DiffHelper (Diff.change changes) { _changes = new ArrayList(); while (changes != null) { _changes.add (changes); changes = changes.link; } }
_changes.add (changes);
_changeList.add (changes);
public DiffHelper (Diff.change changes) { _changes = new ArrayList(); while (changes != null) { _changes.add (changes); changes = changes.link; } }
if (isModified(line_no))
if (isModifiedRight(line_no))
public int getDeleteCount(int line_no) { if (isModified(line_no)) return 0; for (Iterator itr = _changes.iterator(); itr.hasNext();) { Diff.change ch = (Diff.change) itr.next(); if (line_no == ch.line1) return ch.deleted; } return 0; }
for (Iterator itr = _changes.iterator(); itr.hasNext();) {
for (Iterator itr = _changeList.iterator(); itr.hasNext();) {
public int getDeleteCount(int line_no) { if (isModified(line_no)) return 0; for (Iterator itr = _changes.iterator(); itr.hasNext();) { Diff.change ch = (Diff.change) itr.next(); if (line_no == ch.line1) return ch.deleted; } return 0; }
if (isModified(line_no))
if (isModifiedRight(line_no))
public int getInsertCount(int line_no) { if (isModified(line_no)) return 0; for (Iterator itr = _changes.iterator(); itr.hasNext();) { Diff.change ch = (Diff.change) itr.next(); if (line_no == ch.line0) return ch.inserted; } return 0; }
for (Iterator itr = _changes.iterator(); itr.hasNext();) {
for (Iterator itr = _changeList.iterator(); itr.hasNext();) {
public int getInsertCount(int line_no) { if (isModified(line_no)) return 0; for (Iterator itr = _changes.iterator(); itr.hasNext();) { Diff.change ch = (Diff.change) itr.next(); if (line_no == ch.line0) return ch.inserted; } return 0; }
if (isModified(line_no))
if (isModifiedLeft(line_no))
public boolean isDeleted(int line_no) { if (isModified(line_no)) return false; for (Iterator itr = _changes.iterator(); itr.hasNext();) { Diff.change ch = (Diff.change) itr.next(); if (ch.line0 + ch.deleted > line_no && ch.line0 <= line_no) return true; } return false; }
for (Iterator itr = _changes.iterator(); itr.hasNext();) {
for (Iterator itr = _changeList.iterator(); itr.hasNext();) {
public boolean isDeleted(int line_no) { if (isModified(line_no)) return false; for (Iterator itr = _changes.iterator(); itr.hasNext();) { Diff.change ch = (Diff.change) itr.next(); if (ch.line0 + ch.deleted > line_no && ch.line0 <= line_no) return true; } return false; }
if (isModified(line_no))
if (isModifiedLeft(line_no))
public boolean isInserted(int line_no) { if (isModified(line_no)) return false; for (Iterator itr = _changes.iterator(); itr.hasNext();) { Diff.change ch = (Diff.change) itr.next(); if (line_no >= ch.line1 && line_no < ch.line1 + ch.inserted) return true; } return false; }
for (Iterator itr = _changes.iterator(); itr.hasNext();) {
for (Iterator itr = _changeList.iterator(); itr.hasNext();) {
public boolean isInserted(int line_no) { if (isModified(line_no)) return false; for (Iterator itr = _changes.iterator(); itr.hasNext();) { Diff.change ch = (Diff.change) itr.next(); if (line_no >= ch.line1 && line_no < ch.line1 + ch.inserted) return true; } return false; }
String[] currentPageLines = WikiUtil.delimitedToArray(currentPage.getUnparsedData(), "\n"); String[] oldPageLines = WikiUtil.delimitedToArray(oldPage.getUnparsedData(), "\n"); Diff diff = new Diff(oldPageLines, currentPageLines); Diff.change changes = diff.diff(Diff.forwardScript);
DiffHelper helper = new DiffHelper (wiki, oldPage, currentPage);
public void perform(WikiSystem wiki, WebContext wc, WikiUser user, WikiPage page) throws PageAction.PageActionException { try { String current_version = wc.getForm("V1"); String old_version = wc.getForm("V2"); String page_name = wc.getForm("PAGE"); if (page_name == null) return; WikiPage tmp = wiki.getPage(page_name); WikiPage currentPage = wiki.getPage(current_version == null ? page_name : page_name + "." + current_version); if (currentPage == null) return; WikiPage oldPage = wiki.getPage(old_version == null ? page_name + "." + (currentPage.getVersion()-1) : page_name + "." + old_version); if (oldPage == null) oldPage = currentPage; boolean is_current = tmp.getVersion() == currentPage.getVersion(); String[] currentPageLines = WikiUtil.delimitedToArray(currentPage.getUnparsedData(), "\n"); String[] oldPageLines = WikiUtil.delimitedToArray(oldPage.getUnparsedData(), "\n"); Diff diff = new Diff(oldPageLines, currentPageLines); Diff.change changes = diff.diff(Diff.forwardScript); wc.put ("IsCurrent", is_current); wc.put ("CurrentPage", currentPage); wc.put ("OldPage", oldPage); wc.put ("CurrentPageLines", currentPageLines); wc.put ("OldPageLines", oldPageLines); wc.put ("DiffHelper", new DiffHelper (changes)); } catch (Exception e) { e.printStackTrace(); throw new PageAction.PageActionException(e.toString()); } }
wc.put ("CurrentPageLines", currentPageLines); wc.put ("OldPageLines", oldPageLines); wc.put ("DiffHelper", new DiffHelper (changes));
wc.put ("DiffHelper", helper);
public void perform(WikiSystem wiki, WebContext wc, WikiUser user, WikiPage page) throws PageAction.PageActionException { try { String current_version = wc.getForm("V1"); String old_version = wc.getForm("V2"); String page_name = wc.getForm("PAGE"); if (page_name == null) return; WikiPage tmp = wiki.getPage(page_name); WikiPage currentPage = wiki.getPage(current_version == null ? page_name : page_name + "." + current_version); if (currentPage == null) return; WikiPage oldPage = wiki.getPage(old_version == null ? page_name + "." + (currentPage.getVersion()-1) : page_name + "." + old_version); if (oldPage == null) oldPage = currentPage; boolean is_current = tmp.getVersion() == currentPage.getVersion(); String[] currentPageLines = WikiUtil.delimitedToArray(currentPage.getUnparsedData(), "\n"); String[] oldPageLines = WikiUtil.delimitedToArray(oldPage.getUnparsedData(), "\n"); Diff diff = new Diff(oldPageLines, currentPageLines); Diff.change changes = diff.diff(Diff.forwardScript); wc.put ("IsCurrent", is_current); wc.put ("CurrentPage", currentPage); wc.put ("OldPage", oldPage); wc.put ("CurrentPageLines", currentPageLines); wc.put ("OldPageLines", oldPageLines); wc.put ("DiffHelper", new DiffHelper (changes)); } catch (Exception e) { e.printStackTrace(); throw new PageAction.PageActionException(e.toString()); } }
else if (!selected && boldWhenActive) { textLabel.setFont(defaultFont); } else if(selected){
else if(boldWhenActive && !selected){
public void setSelected(boolean selected) { super.setSelected(selected); this.selected = selected; if (boldWhenActive && selected) { textLabel.setFont(textLabel.getFont().deriveFont(Font.BOLD)); } else if (!selected && boldWhenActive) { textLabel.setFont(defaultFont); } else if(selected){ textLabel.setFont(defaultFont); } invalidate(); repaint(); }
Image text = (Image)t.getTransferData(DataFlavor.imageFlavor); return text;
return (Image)t.getTransferData(DataFlavor.imageFlavor);
public static Image getClipboard() { Transferable t = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null); try { if (t != null && t.isDataFlavorSupported(DataFlavor.imageFlavor)) { Image text = (Image)t.getTransferData(DataFlavor.imageFlavor); return text; } } catch (UnsupportedFlavorException e) { } catch (IOException e) { } return null; }
File tmpDirectory = new File(Spark.getUserHome(), "Spark/tmp");
File tmpDirectory = new File(Spark.getUserHome(), "Spark/tempImages");
public void sendImage(final Image image, final ChatRoom room) { File tmpDirectory = new File(Spark.getUserHome(), "Spark/tmp"); tmpDirectory.mkdirs(); String imageName = "image_" + StringUtils.randomString(2) + ".png"; final File imageFile = new File(tmpDirectory, imageName); // Write image to system. SwingWorker worker = new SwingWorker() { public Object construct() { try { // Write out file in separate thread. BufferedImage bi = GraphicUtils.convert(image); ImageIO.write(bi, "png", imageFile); } catch (InterruptedException e) { Log.error(e); } catch (IOException e) { Log.error(e); } return "ok"; } public void finished() { ChatRoomImpl roomImpl = (ChatRoomImpl)room; sendFile(imageFile, roomImpl.getParticipantJID()); SparkManager.getChatManager().getChatContainer().activateChatRoom(room); } }; worker.start(); }
return "ok";
return true;
public void sendImage(final Image image, final ChatRoom room) { File tmpDirectory = new File(Spark.getUserHome(), "Spark/tmp"); tmpDirectory.mkdirs(); String imageName = "image_" + StringUtils.randomString(2) + ".png"; final File imageFile = new File(tmpDirectory, imageName); // Write image to system. SwingWorker worker = new SwingWorker() { public Object construct() { try { // Write out file in separate thread. BufferedImage bi = GraphicUtils.convert(image); ImageIO.write(bi, "png", imageFile); } catch (InterruptedException e) { Log.error(e); } catch (IOException e) { Log.error(e); } return "ok"; } public void finished() { ChatRoomImpl roomImpl = (ChatRoomImpl)room; sendFile(imageFile, roomImpl.getParticipantJID()); SparkManager.getChatManager().getChatContainer().activateChatRoom(room); } }; worker.start(); }
room.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
public void sendImage(final Image image, final ChatRoom room) { File tmpDirectory = new File(Spark.getUserHome(), "Spark/tmp"); tmpDirectory.mkdirs(); String imageName = "image_" + StringUtils.randomString(2) + ".png"; final File imageFile = new File(tmpDirectory, imageName); // Write image to system. SwingWorker worker = new SwingWorker() { public Object construct() { try { // Write out file in separate thread. BufferedImage bi = GraphicUtils.convert(image); ImageIO.write(bi, "png", imageFile); } catch (InterruptedException e) { Log.error(e); } catch (IOException e) { Log.error(e); } return "ok"; } public void finished() { ChatRoomImpl roomImpl = (ChatRoomImpl)room; sendFile(imageFile, roomImpl.getParticipantJID()); SparkManager.getChatManager().getChatContainer().activateChatRoom(room); } }; worker.start(); }
return "ok";
return true;
public Object construct() { try { // Write out file in separate thread. BufferedImage bi = GraphicUtils.convert(image); ImageIO.write(bi, "png", imageFile); } catch (InterruptedException e) { Log.error(e); } catch (IOException e) { Log.error(e); } return "ok"; }
room.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
public void finished() { ChatRoomImpl roomImpl = (ChatRoomImpl)room; sendFile(imageFile, roomImpl.getParticipantJID()); SparkManager.getChatManager().getChatContainer().activateChatRoom(room); }
declineLabel.setFont(new Font("Dialog", Font.BOLD, 10)); acceptLabel.setFont(new Font("Dialog", Font.BOLD, 10));
declineLabel.setFont(new Font("Dialog", Font.BOLD, 11)); acceptLabel.setFont(new Font("Dialog", Font.BOLD, 11));
public ReceiveMessage() { setLayout(new GridBagLayout()); setBackground(new Color(250, 249, 242)); add(imageLabel, new GridBagConstraints(0, 0, 1, 3, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(1, 0, 2, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); titleLabel.setFont(new Font("Dialog", Font.BOLD, 11)); titleLabel.setForeground(new Color(211, 174, 102)); add(fileLabel, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0)); add(acceptLabel, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); add(declineLabel, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); ResourceUtils.resButton(acceptLabel, Res.getString("accept")); ResourceUtils.resButton(declineLabel, Res.getString("reject")); // Decorate Cancel Button decorateCancelButton(); acceptLabel.setForeground(new Color(73, 113, 196)); declineLabel.setForeground(new Color(73, 113, 196)); declineLabel.setFont(new Font("Dialog", Font.BOLD, 10)); acceptLabel.setFont(new Font("Dialog", Font.BOLD, 10)); acceptLabel.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); declineLabel.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.white)); acceptLabel.addMouseListener(new MouseAdapter() { public void mouseEntered(MouseEvent e) { acceptLabel.setCursor(new Cursor(Cursor.HAND_CURSOR)); } public void mouseExited(MouseEvent e) { acceptLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } }); declineLabel.addMouseListener(new MouseAdapter() { public void mouseEntered(MouseEvent e) { declineLabel.setCursor(new Cursor(Cursor.HAND_CURSOR)); } public void mouseExited(MouseEvent e) { declineLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } }); }
e1.printStackTrace();
Log.error(e1);
public SendMessage() { setLayout(new GridBagLayout()); setBackground(new Color(250, 249, 242)); add(imageLabel, new GridBagConstraints(0, 0, 1, 3, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(1, 0, 2, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); titleLabel.setFont(new Font("Dialog", Font.BOLD, 11)); titleLabel.setForeground(new Color(211, 174, 102)); add(fileLabel, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0)); cancelButton.setText(Res.getString("cancel")); retryButton.setText(Res.getString("retry")); add(cancelButton, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); add(retryButton, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); retryButton.setVisible(false); retryButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { File file = new File(transfer.getFilePath()); transfer = transferManager.createOutgoingFileTransfer(fullJID); transfer.sendFile(file, "Sending"); } catch (XMPPException e1) { e1.printStackTrace(); } sendFile(transfer, transferManager, fullJID, nickname); } }); cancelButton.setForeground(new Color(73, 113, 196)); cancelButton.setFont(new Font("Dialog", Font.BOLD, 10)); cancelButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); retryButton.setForeground(new Color(73, 113, 196)); retryButton.setFont(new Font("Dialog", Font.BOLD, 10)); retryButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.white)); }
cancelButton.setFont(new Font("Dialog", Font.BOLD, 10));
cancelButton.setFont(new Font("Dialog", Font.BOLD, 11));
public SendMessage() { setLayout(new GridBagLayout()); setBackground(new Color(250, 249, 242)); add(imageLabel, new GridBagConstraints(0, 0, 1, 3, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(1, 0, 2, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); titleLabel.setFont(new Font("Dialog", Font.BOLD, 11)); titleLabel.setForeground(new Color(211, 174, 102)); add(fileLabel, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0)); cancelButton.setText(Res.getString("cancel")); retryButton.setText(Res.getString("retry")); add(cancelButton, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); add(retryButton, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); retryButton.setVisible(false); retryButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { File file = new File(transfer.getFilePath()); transfer = transferManager.createOutgoingFileTransfer(fullJID); transfer.sendFile(file, "Sending"); } catch (XMPPException e1) { e1.printStackTrace(); } sendFile(transfer, transferManager, fullJID, nickname); } }); cancelButton.setForeground(new Color(73, 113, 196)); cancelButton.setFont(new Font("Dialog", Font.BOLD, 10)); cancelButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); retryButton.setForeground(new Color(73, 113, 196)); retryButton.setFont(new Font("Dialog", Font.BOLD, 10)); retryButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.white)); }
retryButton.setFont(new Font("Dialog", Font.BOLD, 10));
retryButton.setFont(new Font("Dialog", Font.BOLD, 11));
public SendMessage() { setLayout(new GridBagLayout()); setBackground(new Color(250, 249, 242)); add(imageLabel, new GridBagConstraints(0, 0, 1, 3, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(1, 0, 2, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); titleLabel.setFont(new Font("Dialog", Font.BOLD, 11)); titleLabel.setForeground(new Color(211, 174, 102)); add(fileLabel, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0)); cancelButton.setText(Res.getString("cancel")); retryButton.setText(Res.getString("retry")); add(cancelButton, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); add(retryButton, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0)); retryButton.setVisible(false); retryButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { File file = new File(transfer.getFilePath()); transfer = transferManager.createOutgoingFileTransfer(fullJID); transfer.sendFile(file, "Sending"); } catch (XMPPException e1) { e1.printStackTrace(); } sendFile(transfer, transferManager, fullJID, nickname); } }); cancelButton.setForeground(new Color(73, 113, 196)); cancelButton.setFont(new Font("Dialog", Font.BOLD, 10)); cancelButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); retryButton.setForeground(new Color(73, 113, 196)); retryButton.setFont(new Font("Dialog", Font.BOLD, 10)); retryButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.white)); }
utf8stream = new ByteArrayInputStream(article.getBytes("UTF-8"));
public void store() throws IDOStoreException{ boolean storeOk = true; clearErrorKeys(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; }// if (getBody().trim().equals("")) {// addErrorKey(KEY_ERROR_BODY_EMPTY);// storeOk = false;// } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } // String filename = getHeadline();// if(null==filename || filename.length()==0) {// filename = "empty";// } if(storeOk){ try { IWUserContext iwuc = IWContext.getInstance(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); WebdavRootResource rootResource = session.getWebdavRootResource(); //Setting the path for creating new file/creating localized version/updating existing file String filePath=getResourcePath(); String articleFolderPath=getArticlePath(); if(articleFolderPath!=null) { filePath=articleFolderPath+"/"+getArticleName(); }else { filePath=getArticleResourcePath(); articleFolderPath = getArticlePath(); } boolean hadToCreate = session.createAllFoldersInPath(articleFolderPath); if(hadToCreate){ String fixedFolderURL = session.getURI(articleFolderPath); rootResource.proppatchMethod(fixedFolderURL,PROPERTY_CONTENT_TYPE,"LocalizedFile",true); } else{ rootResource.proppatchMethod(articleFolderPath,PROPERTY_CONTENT_TYPE,"LocalizedFile",true); } String article = getAsXML(); ByteArrayInputStream utf8stream = new ByteArrayInputStream(article.getBytes("UTF-8")); // System.out.println(article); //Conflict fix: uri for creating but path for updating //Note! This is a patch to what seems to be a bug in WebDav //Apparently in verion below works in some cases and the other in other cases. //Seems to be connected to creating files in folders created in same tomcat session or similar //not quite clear... if(rootResource.putMethod(filePath,utf8stream)){ rootResource.proppatchMethod(filePath,PROPERTY_CONTENT_TYPE,ARTICLE_FILENAME_SCOPE,true); } else{ String fixedURL = session.getURI(filePath); rootResource.putMethod(fixedURL,utf8stream); rootResource.proppatchMethod(fixedURL,PROPERTY_CONTENT_TYPE,ARTICLE_FILENAME_SCOPE,true); } rootResource.close(); try { load(filePath); } catch (Exception e) { e.printStackTrace(); } } catch (IOException e1) { storeOk = false; e1.printStackTrace(); } catch (XMLException e) { storeOk = false; e.printStackTrace(); } } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
if (descriptor.getWriteMethod() != null) { String name = descriptor.getName(); if (name.equals(localName)) { return descriptor; }
String name = descriptor.getName(); if (name.equals(localName)) { return descriptor;
protected PropertyDescriptor getPropertyDescriptor(String className, String localName) { BeanInfo beanInfo = getBeanInfo(className); if (beanInfo != null) { PropertyDescriptor[] descriptors = beanInfo.getPropertyDescriptors(); for (int i = 0; i < descriptors.length; i++) { PropertyDescriptor descriptor = descriptors[i]; if (descriptor.getWriteMethod() != null) { String name = descriptor.getName(); if (name.equals(localName)) { return descriptor; } } } } return null; }
return (new ArticleActionURIHandler()).getHandlerIdentifier();
return ArticleActionURIHandler.HANDLER_IDENTIFIER;
public String getIWActionURIHandlerIdentifier() { return (new ArticleActionURIHandler()).getHandlerIdentifier(); }
String id = articleItemBean[i].getFolderLocation()+"/"+articleItemBean[i].getHeadline()+".xml";
String id = articleItemBean[i].getFolderLocation()+"/"+articleItemBean[i].getHeadline()+ArticleItemBean.ARTICLE_SUFFIX;
public void updateDataModel(Integer start, Integer rows) { if (_dataModel == null) { _dataModel = new WFDataModel(); } try {// ArticleItemBean[] articleItemBean = (ArticleItemBean[]) ArticleListBean.loadAllArticlesInFolder("/files/content").toArray(new ArticleItemBean[0]); ArticleItemBean[] articleItemBean = (ArticleItemBean[]) ArticleListBean.loadAllArticlesInFolder(ContentUtil.ARTICLE_PATH).toArray(new ArticleItemBean[0]); int availableRows = articleItemBean.length; int nrOfRows = rows.intValue(); if (nrOfRows == 0) { nrOfRows = availableRows; } int maxRow = Math.min(start.intValue() + nrOfRows,availableRows); for (int i = start.intValue(); i < maxRow; i++) { //TODO we don't have published in the article item bean String id = articleItemBean[i].getFolderLocation()+"/"+articleItemBean[i].getHeadline()+".xml"; ListArticlesBean bean = new ListArticlesBean(id, articleItemBean[i].getHeadline(), ""); _dataModel.set(bean, i); } _dataModel.setRowCount(availableRows); } catch (XmlException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
catch (Exception e) { throw new PropertyException ("Unable to iterate list", e); }
public void write(FastWriter out, Context context) throws PropertyException, IOException { Object l, limit, from; int loopLimit=-1, loopStart=1, loopIndex=0; l = list; while (l instanceof Macro) l = ((Macro) l).evaluate(context); if (limitExpr != null) { limit = limitExpr; while (limit instanceof Macro) limit = ((Macro) limit).evaluate(context); if (Expression.isNumber(limit)) loopLimit = (int) Expression.numberValue(limit); else { String warning = "#foreach: Cannot evaluate limit"; context.getLog("engine").warning(warning); writeWarning(warning, context, out); } } if (index != null && indexFromExpr != null) { from = indexFromExpr; while (from instanceof Macro) from = ((Macro) from).evaluate(context); if (Expression.isNumber(from)) loopStart = (int) Expression.numberValue(from); else { String warning = "#foreach: Cannot evaluate loop start"; context.getLog("engine").warning(warning); writeWarning(warning, context, out); } } Iterator iter; try { iter = context.getBroker()._propertyOperators.getIterator(l); } catch (Exception e) { String warning = "#foreach: list argument is not a list: " + l; context.getLog("engine").warning(warning + "; " + e); writeWarning(warning, context, out); return; } while(iter.hasNext() && ((loopLimit == -1) || (loopLimit > loopIndex))) { try { target.setValue(context, iter.next()); if (index != null) index.setValue(context, new Integer(loopIndex + loopStart)); } catch (PropertyException e) { String errorText = "#foreach: Unable to set list index"; context.getBroker().getLog("engine").error(errorText); writeWarning(errorText, context, out); } body.write(out, context); ++loopIndex; } }
String pageName = wc.getForm ("save");
String pageName = getWikiPageName(wiki, wc);
protected WikiPage createNewPage (WikiSystem wiki, WebContext wc, WikiUser user) throws Exception { // get the page elements from the request String editor = user.getIdentifier(); String text = wc.getForm ("TEXT"); boolean moderated = wc.getForm ("MODERATED") != null && wc.getForm("MODERATED").equals ("true"); String keywords = wc.getForm ("RELATED_TITLES"); String pageName = wc.getForm ("save"); // create the page WikiPage newPage = wiki.createPage (pageName, editor, text); newPage.setRelatedTitles (keywordsToStringArray(keywords)); newPage.setIsModerated(moderated); // make sure to save the page wiki.savePage (newPage); return newPage; }
return wc.getForm ("save");
String pageName = wc.getForm ("save"); pageName = WikiUtil.formatAsWikiTitle(pageName); return pageName;
public String getWikiPageName(WikiSystem wiki, WebContext wc) { return wc.getForm ("save"); }
println("<method nameAndSignature=\"" + methodNameAndSignature + "\">");
println("<method nameAndSignature=\"" + xmlEscape(methodNameAndSignature) + "\">");
private void dumpMethods(CoverageData instrumentation) { Iterator iter = instrumentation.getMethodNamesAndDescriptors() .iterator(); while (iter.hasNext()) { String methodNameAndSignature = (String)iter.next(); println("<method nameAndSignature=\"" + methodNameAndSignature + "\">"); increaseIndentation(); try { println("<line rate=\"" + instrumentation .getLineCoverageRate(methodNameAndSignature) + "\"/>"); println("<branch rate=\"" + instrumentation .getBranchCoverageRate(methodNameAndSignature) + "\"/>"); } catch (IllegalArgumentException ex) { logger.warn(ex); } decreaseIndentation(); println("</method>"); } }
return t;
return null;
final public Template getTemplate(String fileName) { File tFile = findTemplate (fileName); Template t = null; try { t = new FileTemplate (_broker, tFile); t.parse (); _lastModifiedCache.put (fileName, new Long (tFile.lastModified())); } catch (NullPointerException npe) { _log.warning ("TemplateProvider: Template not found: " + fileName, npe); } catch (Exception e) { // this probably occured b/c of a parsing error. // should throw some kind of ParseErrorException here instead _log.warning ("TemplateProvider: Error occured while getting " + fileName, e); } return t; }
return chatPreferences.getNickname();
LocalPreferences pref = SettingsManager.getLocalPreferences(); return pref.getNickname();
public String getNickname() { return chatPreferences.getNickname(); }
chatPreferences = (ChatPreferences)SparkManager.getPreferenceManager().getPreferenceData(ChatPreference.NAMESPACE);
private void init() { setLayout(new GridBagLayout()); add(splitPane, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); add(notificationLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 2, 5, 0), 0, 0)); // Remove Default Beveled Borders splitPane.setBorder(null); verticalSplit.setBorder(null); splitPane.setLeftComponent(verticalSplit); // Load Preferences for this instance chatPreferences = (ChatPreferences)SparkManager.getPreferenceManager().getPreferenceData(ChatPreference.NAMESPACE); textScroller.setAutoscrolls(true); // Speed up scrolling. It was way too slow. textScroller.getVerticalScrollBar().setBlockIncrement(50); textScroller.getVerticalScrollBar().setUnitIncrement(20); chatWindowPanel = new JPanel(); chatWindowPanel.setLayout(new GridBagLayout()); chatWindowPanel.add(textScroller, new GridBagConstraints(0, 10, 1, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); chatWindowPanel.setOpaque(false); // Layout Components chatPanel.add(chatWindowPanel, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); // Add edit buttons to Chat Room editorBar.setOpaque(false); chatPanel.setOpaque(false); editorBar.add(new JSeparator(JSeparator.VERTICAL)); bottomPanel.setOpaque(false); splitPane.setOpaque(false); bottomPanel.setLayout(new GridBagLayout()); bottomPanel.add(chatAreaButton, new GridBagConstraints(0, 1, 5, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 30)); bottomPanel.add(editorBar, new GridBagConstraints(0, 0, 5, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); verticalSplit.setOpaque(false); verticalSplit.setTopComponent(chatPanel); verticalSplit.setBottomComponent(bottomPanel); verticalSplit.setResizeWeight(1.0); verticalSplit.setDividerSize(2); // Add listener to send button chatAreaButton.getButton().addActionListener(this); // Add Key Listener to Send Field getChatInputEditor().getDocument().addDocumentListener(this); // Add Key Listener to Send Field getChatInputEditor().addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent e) { checkForEnter(e); } }); getChatInputEditor().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ctrl F4"), "closeTheRoom"); getChatInputEditor().getActionMap().put("closeTheRoom", new AbstractAction("closeTheRoom") { public void actionPerformed(ActionEvent evt) { final int ok = JOptionPane.showConfirmDialog(SparkManager.getMainWindow(), "Would you like to close this chat?", "Confirmation", JOptionPane.YES_NO_OPTION); if (ok == JOptionPane.OK_OPTION) { // Leave this chat. closeChatRoom(); } } }); }
File file = new File("target/SpringLoaderTest.jar");
File file = new File(basedir, "target/SpringLoaderTest.jar");
private static File createJarFile() throws IOException { File file = new File("target/SpringLoaderTest.jar"); FileOutputStream out = new FileOutputStream(file); JarOutputStream jarOut = new JarOutputStream(out); jarOut.putNextEntry(new JarEntry(CLASS_NAME + ".class")); jarOut.write(createClass(CLASS_NAME)); jarOut.putNextEntry(new JarEntry(ENTRY_NAME)); jarOut.write(ENTRY_VALUE.getBytes()); jarOut.close(); out.close(); return file; }
File baseDir = new File("src/test/org/xbean/server/spring/loader/").getAbsoluteFile(); System.setProperty("xbean.base.dir", baseDir.getAbsolutePath());
File xbeanDir = new File(basedir, "src/test/org/xbean/server/spring/loader/").getAbsoluteFile(); System.setProperty("xbean.base.dir", xbeanDir.getAbsolutePath());
public void testLoad() throws Exception{ Kernel kernel = KernelFactory.newInstance().createKernel("test"); try { File baseDir = new File("src/test/org/xbean/server/spring/loader/").getAbsoluteFile(); System.setProperty("xbean.base.dir", baseDir.getAbsolutePath()); FileSystemRepository repository = new FileSystemRepository(new File(".").getAbsoluteFile()); ClassLoaderXmlPreprocessor classLoaderXmlPreprocessor = new ClassLoaderXmlPreprocessor(repository); List xmlPreprocessors = Collections.singletonList(classLoaderXmlPreprocessor); SpringLoader springLoader = new SpringLoader(); springLoader.setKernel(kernel); springLoader.setBaseDir(baseDir); springLoader.setXmlPreprocessors(xmlPreprocessors); ServiceName configurationName = springLoader.load("classpath-xbean"); kernel.startService(configurationName); Object testService = kernel.getService(new StringServiceName("test")); assertEquals("TestClass", testService.getClass().getName()); assertTrue(testService instanceof SortedSet); } finally { kernel.destroy(); } }
FileSystemRepository repository = new FileSystemRepository(new File(".").getAbsoluteFile());
FileSystemRepository repository = new FileSystemRepository(new File(basedir).getAbsoluteFile());
public void testLoad() throws Exception{ Kernel kernel = KernelFactory.newInstance().createKernel("test"); try { File baseDir = new File("src/test/org/xbean/server/spring/loader/").getAbsoluteFile(); System.setProperty("xbean.base.dir", baseDir.getAbsolutePath()); FileSystemRepository repository = new FileSystemRepository(new File(".").getAbsoluteFile()); ClassLoaderXmlPreprocessor classLoaderXmlPreprocessor = new ClassLoaderXmlPreprocessor(repository); List xmlPreprocessors = Collections.singletonList(classLoaderXmlPreprocessor); SpringLoader springLoader = new SpringLoader(); springLoader.setKernel(kernel); springLoader.setBaseDir(baseDir); springLoader.setXmlPreprocessors(xmlPreprocessors); ServiceName configurationName = springLoader.load("classpath-xbean"); kernel.startService(configurationName); Object testService = kernel.getService(new StringServiceName("test")); assertEquals("TestClass", testService.getClass().getName()); assertTrue(testService instanceof SortedSet); } finally { kernel.destroy(); } }
springLoader.setBaseDir(baseDir);
springLoader.setBaseDir(xbeanDir);
public void testLoad() throws Exception{ Kernel kernel = KernelFactory.newInstance().createKernel("test"); try { File baseDir = new File("src/test/org/xbean/server/spring/loader/").getAbsoluteFile(); System.setProperty("xbean.base.dir", baseDir.getAbsolutePath()); FileSystemRepository repository = new FileSystemRepository(new File(".").getAbsoluteFile()); ClassLoaderXmlPreprocessor classLoaderXmlPreprocessor = new ClassLoaderXmlPreprocessor(repository); List xmlPreprocessors = Collections.singletonList(classLoaderXmlPreprocessor); SpringLoader springLoader = new SpringLoader(); springLoader.setKernel(kernel); springLoader.setBaseDir(baseDir); springLoader.setXmlPreprocessors(xmlPreprocessors); ServiceName configurationName = springLoader.load("classpath-xbean"); kernel.startService(configurationName); Object testService = kernel.getService(new StringServiceName("test")); assertEquals("TestClass", testService.getClass().getName()); assertTrue(testService instanceof SortedSet); } finally { kernel.destroy(); } }
File baseDir = new File("src/test/org/xbean/server/spring/loader/").getAbsoluteFile(); System.setProperty("xbean.base.dir", baseDir.getAbsolutePath());
File xbeanDir = new File(basedir, "src/test/org/xbean/server/spring/loader/").getAbsoluteFile(); System.setProperty("xbean.base.dir", xbeanDir.getAbsolutePath());
public void testReload() throws Exception{ Kernel kernel = KernelFactory.newInstance().createKernel("test"); try { File baseDir = new File("src/test/org/xbean/server/spring/loader/").getAbsoluteFile(); System.setProperty("xbean.base.dir", baseDir.getAbsolutePath()); FileSystemRepository repository = new FileSystemRepository(new File(".").getAbsoluteFile()); ClassLoaderXmlPreprocessor classLoaderXmlPreprocessor = new ClassLoaderXmlPreprocessor(repository); List xmlPreprocessors = Collections.singletonList(classLoaderXmlPreprocessor); SpringLoader springLoader = new SpringLoader(); springLoader.setKernel(kernel); springLoader.setBaseDir(baseDir); springLoader.setXmlPreprocessors(xmlPreprocessors); ServiceName configurationName = springLoader.load("classpath-xbean"); SpringConfigurationServiceFactory serviceFactory = (SpringConfigurationServiceFactory) kernel.getServiceFactory(configurationName); SpringApplicationContext applicationContext = serviceFactory.getApplicationContext(); kernel.startService(configurationName); Object testService = kernel.getService(new StringServiceName("test")); assertEquals("TestClass", testService.getClass().getName()); assertEquals(applicationContext.getClassLoader(), testService.getClass().getClassLoader()); assertTrue(testService instanceof SortedSet); kernel.stopService(configurationName); kernel.startService(configurationName); Object newTestService = kernel.getService(new StringServiceName("test")); assertEquals("TestClass", newTestService.getClass().getName()); assertEquals(applicationContext.getClassLoader(), newTestService.getClass().getClassLoader()); assertTrue(newTestService instanceof SortedSet); assertNotSame("test service should be a new instance", testService, newTestService); assertNotSame("test service should have been loaded from a different classloader", testService.getClass().getClassLoader(), newTestService.getClass().getClassLoader()); } finally { kernel.destroy(); } }
FileSystemRepository repository = new FileSystemRepository(new File(".").getAbsoluteFile());
FileSystemRepository repository = new FileSystemRepository(new File(basedir).getAbsoluteFile());
public void testReload() throws Exception{ Kernel kernel = KernelFactory.newInstance().createKernel("test"); try { File baseDir = new File("src/test/org/xbean/server/spring/loader/").getAbsoluteFile(); System.setProperty("xbean.base.dir", baseDir.getAbsolutePath()); FileSystemRepository repository = new FileSystemRepository(new File(".").getAbsoluteFile()); ClassLoaderXmlPreprocessor classLoaderXmlPreprocessor = new ClassLoaderXmlPreprocessor(repository); List xmlPreprocessors = Collections.singletonList(classLoaderXmlPreprocessor); SpringLoader springLoader = new SpringLoader(); springLoader.setKernel(kernel); springLoader.setBaseDir(baseDir); springLoader.setXmlPreprocessors(xmlPreprocessors); ServiceName configurationName = springLoader.load("classpath-xbean"); SpringConfigurationServiceFactory serviceFactory = (SpringConfigurationServiceFactory) kernel.getServiceFactory(configurationName); SpringApplicationContext applicationContext = serviceFactory.getApplicationContext(); kernel.startService(configurationName); Object testService = kernel.getService(new StringServiceName("test")); assertEquals("TestClass", testService.getClass().getName()); assertEquals(applicationContext.getClassLoader(), testService.getClass().getClassLoader()); assertTrue(testService instanceof SortedSet); kernel.stopService(configurationName); kernel.startService(configurationName); Object newTestService = kernel.getService(new StringServiceName("test")); assertEquals("TestClass", newTestService.getClass().getName()); assertEquals(applicationContext.getClassLoader(), newTestService.getClass().getClassLoader()); assertTrue(newTestService instanceof SortedSet); assertNotSame("test service should be a new instance", testService, newTestService); assertNotSame("test service should have been loaded from a different classloader", testService.getClass().getClassLoader(), newTestService.getClass().getClassLoader()); } finally { kernel.destroy(); } }
springLoader.setBaseDir(baseDir);
springLoader.setBaseDir(xbeanDir);
public void testReload() throws Exception{ Kernel kernel = KernelFactory.newInstance().createKernel("test"); try { File baseDir = new File("src/test/org/xbean/server/spring/loader/").getAbsoluteFile(); System.setProperty("xbean.base.dir", baseDir.getAbsolutePath()); FileSystemRepository repository = new FileSystemRepository(new File(".").getAbsoluteFile()); ClassLoaderXmlPreprocessor classLoaderXmlPreprocessor = new ClassLoaderXmlPreprocessor(repository); List xmlPreprocessors = Collections.singletonList(classLoaderXmlPreprocessor); SpringLoader springLoader = new SpringLoader(); springLoader.setKernel(kernel); springLoader.setBaseDir(baseDir); springLoader.setXmlPreprocessors(xmlPreprocessors); ServiceName configurationName = springLoader.load("classpath-xbean"); SpringConfigurationServiceFactory serviceFactory = (SpringConfigurationServiceFactory) kernel.getServiceFactory(configurationName); SpringApplicationContext applicationContext = serviceFactory.getApplicationContext(); kernel.startService(configurationName); Object testService = kernel.getService(new StringServiceName("test")); assertEquals("TestClass", testService.getClass().getName()); assertEquals(applicationContext.getClassLoader(), testService.getClass().getClassLoader()); assertTrue(testService instanceof SortedSet); kernel.stopService(configurationName); kernel.startService(configurationName); Object newTestService = kernel.getService(new StringServiceName("test")); assertEquals("TestClass", newTestService.getClass().getName()); assertEquals(applicationContext.getClassLoader(), newTestService.getClass().getClassLoader()); assertTrue(newTestService instanceof SortedSet); assertNotSame("test service should be a new instance", testService, newTestService); assertNotSame("test service should have been loaded from a different classloader", testService.getClass().getClassLoader(), newTestService.getClass().getClassLoader()); } finally { kernel.destroy(); } }
public FileSystemRepository(File root) { this.root = root;
public FileSystemRepository() {
public FileSystemRepository(File root) { this.root = root; }
public ASCII_UCodeESC_CharStream(java.io.Reader dstream, int startline, int startcolumn,
private ASCII_UCodeESC_CharStream(java.io.Reader dstream, int startline, int startcolumn,
public ASCII_UCodeESC_CharStream(java.io.Reader dstream, int startline, int startcolumn, int buffersize) { inputStream = dstream; line = startline; column = startcolumn - 1; available = bufsize = buffersize; buffer = new char[buffersize]; bufline = new int[buffersize]; bufcolumn = new int[buffersize]; nextCharBuf = new char[4096]; }
static final int hexval(char c) throws java.io.IOException
private static final int hexval(char c) throws java.io.IOException
static final int hexval(char c) throws java.io.IOException { switch (c) { case '0': return 0; case '1': return 1; case '2': return 2; case '3': return 3; case '4': return 4; case '5': return 5; case '6': return 6; case '7': return 7; case '8': return 8; case '9': return 9; case 'a': case 'A': return 10; case 'b': case 'B': return 11; case 'c': case 'C': return 12; case 'd': case 'D': return 13; case 'e': case 'E': return 14; case 'f': case 'F': return 15; } throw new java.io.IOException(); // Should never come here }
AdjustBuffSize();
adjustBuffSize();
public final char readChar() throws java.io.IOException { if (inBuf > 0) { --inBuf; return buffer[(bufpos == bufsize - 1) ? (bufpos = 0) : ++bufpos]; } char c; if (++bufpos == available) AdjustBuffSize(); if (((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) == '\\')) { UpdateLineColumn(c); int backSlashCnt = 1; for (;;) // Read all the backslashes { if (++bufpos == available) AdjustBuffSize(); try { if ((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) != '\\') { UpdateLineColumn(c); // found a non-backslash char. if ((c == 'u') && ((backSlashCnt & 1) == 1)) { if (--bufpos < 0) bufpos = bufsize - 1; break; } backup(backSlashCnt); return '\\'; } } catch (java.io.IOException e) { if (backSlashCnt > 1) backup(backSlashCnt); return '\\'; } UpdateLineColumn(c); backSlashCnt++; } // Here, we have seen an odd number of backslash's followed by a 'u' try { while ((c = (char)((char)0xff & ReadByte())) == 'u') ++column; buffer[bufpos] = c = (char)(hexval(c) << 12 | hexval((char)((char)0xff & ReadByte())) << 8 | hexval((char)((char)0xff & ReadByte())) << 4 | hexval((char)((char)0xff & ReadByte()))); column += 4; } catch (java.io.IOException e) { throw new Error("Invalid escape character at line " + line + " column " + column + "."); } if (backSlashCnt == 1) return c; backup(backSlashCnt - 1); return '\\'; } UpdateLineColumn(c); return (c); }
if (((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) == '\\'))
if (((buffer[bufpos] = c = (char)((char)0xff & readByte())) == '\\'))
public final char readChar() throws java.io.IOException { if (inBuf > 0) { --inBuf; return buffer[(bufpos == bufsize - 1) ? (bufpos = 0) : ++bufpos]; } char c; if (++bufpos == available) AdjustBuffSize(); if (((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) == '\\')) { UpdateLineColumn(c); int backSlashCnt = 1; for (;;) // Read all the backslashes { if (++bufpos == available) AdjustBuffSize(); try { if ((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) != '\\') { UpdateLineColumn(c); // found a non-backslash char. if ((c == 'u') && ((backSlashCnt & 1) == 1)) { if (--bufpos < 0) bufpos = bufsize - 1; break; } backup(backSlashCnt); return '\\'; } } catch (java.io.IOException e) { if (backSlashCnt > 1) backup(backSlashCnt); return '\\'; } UpdateLineColumn(c); backSlashCnt++; } // Here, we have seen an odd number of backslash's followed by a 'u' try { while ((c = (char)((char)0xff & ReadByte())) == 'u') ++column; buffer[bufpos] = c = (char)(hexval(c) << 12 | hexval((char)((char)0xff & ReadByte())) << 8 | hexval((char)((char)0xff & ReadByte())) << 4 | hexval((char)((char)0xff & ReadByte()))); column += 4; } catch (java.io.IOException e) { throw new Error("Invalid escape character at line " + line + " column " + column + "."); } if (backSlashCnt == 1) return c; backup(backSlashCnt - 1); return '\\'; } UpdateLineColumn(c); return (c); }
UpdateLineColumn(c);
updateLineColumn(c);
public final char readChar() throws java.io.IOException { if (inBuf > 0) { --inBuf; return buffer[(bufpos == bufsize - 1) ? (bufpos = 0) : ++bufpos]; } char c; if (++bufpos == available) AdjustBuffSize(); if (((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) == '\\')) { UpdateLineColumn(c); int backSlashCnt = 1; for (;;) // Read all the backslashes { if (++bufpos == available) AdjustBuffSize(); try { if ((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) != '\\') { UpdateLineColumn(c); // found a non-backslash char. if ((c == 'u') && ((backSlashCnt & 1) == 1)) { if (--bufpos < 0) bufpos = bufsize - 1; break; } backup(backSlashCnt); return '\\'; } } catch (java.io.IOException e) { if (backSlashCnt > 1) backup(backSlashCnt); return '\\'; } UpdateLineColumn(c); backSlashCnt++; } // Here, we have seen an odd number of backslash's followed by a 'u' try { while ((c = (char)((char)0xff & ReadByte())) == 'u') ++column; buffer[bufpos] = c = (char)(hexval(c) << 12 | hexval((char)((char)0xff & ReadByte())) << 8 | hexval((char)((char)0xff & ReadByte())) << 4 | hexval((char)((char)0xff & ReadByte()))); column += 4; } catch (java.io.IOException e) { throw new Error("Invalid escape character at line " + line + " column " + column + "."); } if (backSlashCnt == 1) return c; backup(backSlashCnt - 1); return '\\'; } UpdateLineColumn(c); return (c); }
if ((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) != '\\')
if ((buffer[bufpos] = c = (char)((char)0xff & readByte())) != '\\')
public final char readChar() throws java.io.IOException { if (inBuf > 0) { --inBuf; return buffer[(bufpos == bufsize - 1) ? (bufpos = 0) : ++bufpos]; } char c; if (++bufpos == available) AdjustBuffSize(); if (((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) == '\\')) { UpdateLineColumn(c); int backSlashCnt = 1; for (;;) // Read all the backslashes { if (++bufpos == available) AdjustBuffSize(); try { if ((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) != '\\') { UpdateLineColumn(c); // found a non-backslash char. if ((c == 'u') && ((backSlashCnt & 1) == 1)) { if (--bufpos < 0) bufpos = bufsize - 1; break; } backup(backSlashCnt); return '\\'; } } catch (java.io.IOException e) { if (backSlashCnt > 1) backup(backSlashCnt); return '\\'; } UpdateLineColumn(c); backSlashCnt++; } // Here, we have seen an odd number of backslash's followed by a 'u' try { while ((c = (char)((char)0xff & ReadByte())) == 'u') ++column; buffer[bufpos] = c = (char)(hexval(c) << 12 | hexval((char)((char)0xff & ReadByte())) << 8 | hexval((char)((char)0xff & ReadByte())) << 4 | hexval((char)((char)0xff & ReadByte()))); column += 4; } catch (java.io.IOException e) { throw new Error("Invalid escape character at line " + line + " column " + column + "."); } if (backSlashCnt == 1) return c; backup(backSlashCnt - 1); return '\\'; } UpdateLineColumn(c); return (c); }
while ((c = (char)((char)0xff & ReadByte())) == 'u')
while ((c = (char)((char)0xff & readByte())) == 'u')
public final char readChar() throws java.io.IOException { if (inBuf > 0) { --inBuf; return buffer[(bufpos == bufsize - 1) ? (bufpos = 0) : ++bufpos]; } char c; if (++bufpos == available) AdjustBuffSize(); if (((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) == '\\')) { UpdateLineColumn(c); int backSlashCnt = 1; for (;;) // Read all the backslashes { if (++bufpos == available) AdjustBuffSize(); try { if ((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) != '\\') { UpdateLineColumn(c); // found a non-backslash char. if ((c == 'u') && ((backSlashCnt & 1) == 1)) { if (--bufpos < 0) bufpos = bufsize - 1; break; } backup(backSlashCnt); return '\\'; } } catch (java.io.IOException e) { if (backSlashCnt > 1) backup(backSlashCnt); return '\\'; } UpdateLineColumn(c); backSlashCnt++; } // Here, we have seen an odd number of backslash's followed by a 'u' try { while ((c = (char)((char)0xff & ReadByte())) == 'u') ++column; buffer[bufpos] = c = (char)(hexval(c) << 12 | hexval((char)((char)0xff & ReadByte())) << 8 | hexval((char)((char)0xff & ReadByte())) << 4 | hexval((char)((char)0xff & ReadByte()))); column += 4; } catch (java.io.IOException e) { throw new Error("Invalid escape character at line " + line + " column " + column + "."); } if (backSlashCnt == 1) return c; backup(backSlashCnt - 1); return '\\'; } UpdateLineColumn(c); return (c); }
| hexval((char)((char)0xff & ReadByte())) << 8 | hexval((char)((char)0xff & ReadByte())) << 4 | hexval((char)((char)0xff & ReadByte())));
| hexval((char)((char)0xff & readByte())) << 8 | hexval((char)((char)0xff & readByte())) << 4 | hexval((char)((char)0xff & readByte())));
public final char readChar() throws java.io.IOException { if (inBuf > 0) { --inBuf; return buffer[(bufpos == bufsize - 1) ? (bufpos = 0) : ++bufpos]; } char c; if (++bufpos == available) AdjustBuffSize(); if (((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) == '\\')) { UpdateLineColumn(c); int backSlashCnt = 1; for (;;) // Read all the backslashes { if (++bufpos == available) AdjustBuffSize(); try { if ((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) != '\\') { UpdateLineColumn(c); // found a non-backslash char. if ((c == 'u') && ((backSlashCnt & 1) == 1)) { if (--bufpos < 0) bufpos = bufsize - 1; break; } backup(backSlashCnt); return '\\'; } } catch (java.io.IOException e) { if (backSlashCnt > 1) backup(backSlashCnt); return '\\'; } UpdateLineColumn(c); backSlashCnt++; } // Here, we have seen an odd number of backslash's followed by a 'u' try { while ((c = (char)((char)0xff & ReadByte())) == 'u') ++column; buffer[bufpos] = c = (char)(hexval(c) << 12 | hexval((char)((char)0xff & ReadByte())) << 8 | hexval((char)((char)0xff & ReadByte())) << 4 | hexval((char)((char)0xff & ReadByte()))); column += 4; } catch (java.io.IOException e) { throw new Error("Invalid escape character at line " + line + " column " + column + "."); } if (backSlashCnt == 1) return c; backup(backSlashCnt - 1); return '\\'; } UpdateLineColumn(c); return (c); }
if (System.getProperty("xbean.dir") != null) { File f = new File(System.getProperty("xbean.dir") + uri); try { return new FileInputStream(f); } catch (FileNotFoundException e) { } }
protected InputStream loadResource(String uri) { // lets try the thread context class loader first InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(uri); if (in == null) { in = getClass().getClassLoader().getResourceAsStream(uri); if (in == null) { log.debug("Could not find resource: " + uri); } } return in; }
public NoteTree(Shell shell, Composite parent, Listener l) {
public NoteTree(Composite parent, Listener l) {
public NoteTree(Shell shell, Composite parent, Listener l) { // Tree and context menu. tree = new Tree(parent, SWT.MULTI); contextMenu = new TreeContextMenu(shell, tree, l); // Text editor for renaming tree nodes. treeEditor = new TreeEditor(tree); treeEditor.grabHorizontal = true; treeEditor.minimumWidth = 50; // Events. this.l = l; l.mapEvent(tree, SWT.MouseDoubleClick, MainController.DISPLAY_TAB); }