rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
LinkedHashMap attlist = (LinkedHashMap) doctype.attlists.get(elementName); if (attlist == null) return false; return attlist.containsKey(qn); | return doctype.isAttributeDeclared(elementName, qn); | boolean isAttributeDeclared(int index) { if (doctype == null) return false; Attribute a = (Attribute) attrs.get(index); String qn = ("".equals(a.prefix)) ? a.localName : a.prefix + ":" + a.localName; String elementName = buf.toString(); LinkedHashMap attlist = (LinkedHashMap) doctype.attlist... |
{ | public int next() throws XMLStreamException { if (lookahead) { lookahead = false; return event; } if (event == XMLStreamConstants.END_ELEMENT) { // Pop namespace context if (namespaceAware) namespaces.removeFirst(); // Pop base context if (ba... | |
if (inputStack.size() > 1) { if (tryRead(TEST_XML_DECL)) readTextDecl(); } } | public int next() throws XMLStreamException { if (lookahead) { lookahead = false; return event; } if (event == XMLStreamConstants.END_ELEMENT) { // Pop namespace context if (namespaceAware) namespaces.removeFirst(); // Pop base context if (ba... | |
expandEntity(ref); | expandEntity(ref, false); | public int next() throws XMLStreamException { if (lookahead) { lookahead = false; return event; } if (event == XMLStreamConstants.END_ELEMENT) { // Pop namespace context if (namespaceAware) namespaces.removeFirst(); // Pop base context if (ba... |
char c = readCh(); if (c != '\uffff') error("Only comments and PIs may appear after " + "the root element"); | public int next() throws XMLStreamException { if (lookahead) { lookahead = false; return event; } if (event == XMLStreamConstants.END_ELEMENT) { // Pop namespace context if (namespaceAware) namespaces.removeFirst(); // Pop base context if (ba... | |
private void normalize() | private StringBuffer normalize(StringBuffer buf) | private void normalize() { StringBuffer acc = new StringBuffer(); int len = buf.length(); int avState = 0; for (int i = 0; i < len; i++) { char c = buf.charAt(i); if (c == ' ') avState = (avState == 0) ? 0 : 1; else { if (avState == 1) a... |
buf = acc; | return acc; | private void normalize() { StringBuffer acc = new StringBuffer(); int len = buf.length(); int avState = 0; for (int i = 0; i < len; i++) { char c = buf.charAt(i); if (c == ' ') avState = (avState == 0) ? 0 : 1; else { if (avState == 1) a... |
private void normalizeCRLF() | private void normalizeCRLF(StringBuffer buf) | private void normalizeCRLF() { int len = buf.length() - 1; for (int i = 0; i < len; i++) { char c = buf.charAt(i); if (c == '\r' && buf.charAt(i + 1) == '\n') { buf.deleteCharAt(i--); len--; } } } |
Object entity = doctype.entities.get("%" + name); | String entityName = "%" + name; Object entity = doctype.getEntity(entityName); | private void parsePEReference() throws IOException, XMLStreamException { String name = readNmtoken(true); require(';'); if (doctype != null) { Object entity = doctype.entities.get("%" + name); if (entity != null) { if (entity instanceof String) pushInpu... |
} | else | private void parsePEReference() throws IOException, XMLStreamException { String name = readNmtoken(true); require(';'); if (doctype != null) { Object entity = doctype.entities.get("%" + name); if (entity != null) { if (entity instanceof String) pushInpu... |
else error("reference to parameter entity without doctype", name); } | private void parsePEReference() throws IOException, XMLStreamException { String name = readNmtoken(true); require(';'); if (doctype != null) { Object entity = doctype.entities.get("%" + name); if (entity != null) { if (entity instanceof String) pushInpu... | |
if (startEntityStack.contains(old.name)) | if (!"".equals(old.name)) | private void popInput() { Input old = (Input) inputStack.removeLast(); if (startEntityStack.contains(old.name)) endEntityStack.addFirst(old.name); input = (Input) inputStack.getLast(); //System.out.print("\n(-input:"+input.systemId+")"); //System.out.println("popInput "+old.name); } |
for (Iterator i = inputStack.iterator(); i.hasNext(); ) { Input ctx = (Input) i.next(); if (name.equals(ctx.name)) error("entities may not be self-recursive", name); } | private void pushInput(String name, String text) throws IOException, XMLStreamException { pushInput(new Input(null, new StringReader(text), input.publicId, input.systemId, name, input.inputEncoding)); //System.out.println("pushInput "+name+" "+text); } | |
if (namespaceAware && attributeName.equals("xmlns")) | if (namespaceAware) { if (attributeName.equals(":")) error("XML Namespaces forbids names consisting of a single colon"); else if (attributeName.equals("xmlns")) | private void readAttribute(String elementName) throws IOException, XMLStreamException { //System.err.println("readAttribute"); // Read attribute name String attributeName = readNmtoken(true); String type = getAttributeType(elementName, attributeName); readEq(); // Read literal final int flags... |
else if (namespaceAware && attributeName.startsWith("xmlns:")) | else if (attributeName.startsWith("xmlns:")) | private void readAttribute(String elementName) throws IOException, XMLStreamException { //System.err.println("readAttribute"); // Read attribute name String attributeName = readNmtoken(true); String type = getAttributeType(elementName, attributeName); readEq(); // Read literal final int flags... |
else { if (attrs.contains(attr)) | else if (attrs.contains(attr)) | private void readAttribute(String elementName) throws IOException, XMLStreamException { //System.err.println("readAttribute"); // Read attribute name String attributeName = readNmtoken(true); String type = getAttributeType(elementName, attributeName); readEq(); // Read literal final int flags... |
else if (attrs.contains(attr)) error("duplicate attribute", attributeName); | private void readAttribute(String elementName) throws IOException, XMLStreamException { //System.err.println("readAttribute"); // Read attribute name String attributeName = readNmtoken(true); String type = getAttributeType(elementName, attributeName); readEq(); // Read literal final int flags... | |
int c = read(); char ret = (char) c; | char c = (char) read(); | private char readCh() throws IOException, XMLStreamException { int c = read(); /*if (c == -1) { if (inputStack.size() > 1) { popInput(); return readCh(); } return (char) -1; }*/ char ret = (char) c; if (expandPE && c == '%') { ... |
return ret; | return c; | private char readCh() throws IOException, XMLStreamException { int c = read(); /*if (c == -1) { if (inputStack.size() > 1) { popInput(); return readCh(); } return (char) -1; }*/ char ret = (char) c; if (expandPE && c == '%') { ... |
if (replaceERefs) expandEntity(entityName); else reset(); | pushInput("", "&" + entityName + ";"); | private int readCharData(String prefix) throws IOException, XMLStreamException { boolean white = true; buf.setLength(0); if (prefix != null) buf.append(prefix); boolean done = false; boolean entities = false; //System.out.println("readCharData input="+input.name+" line="+input.line+" col="+... |
normalizeCRLF(); | normalizeCRLF(buf); | private int readCharData(String prefix) throws IOException, XMLStreamException { boolean white = true; buf.setLength(0); if (prefix != null) buf.append(prefix); boolean done = false; boolean entities = false; //System.out.println("readCharData input="+input.name+" line="+input.line+" col="+... |
for (char c = readCh(); c != ';'; c = readCh()) | for (char c = readCh(); c != ';' && c != '\uffff'; c = readCh()) | private char[] readCharacterRef(int base) throws IOException, XMLStreamException { StringBuffer b = new StringBuffer(); for (char c = readCh(); c != ';'; c = readCh()) b.append(c); try { int ord = Integer.parseInt(b.toString(), base); if ((ord < 0x20 && !(ord == 0x0a || ord == 0x0... |
doctype.elements.put(elementName, "EMPTY"); | doctype.addElementDecl(elementName, "EMPTY"); | private void readContentspec(String elementName) throws IOException, XMLStreamException { if (tryRead("EMPTY")) doctype.elements.put(elementName, "EMPTY"); else if (tryRead("ANY")) doctype.elements.put(elementName, "ANY"); else { StringBuffer acc = new StringBuffer(); require... |
doctype.elements.put(elementName, "ANY"); | doctype.addElementDecl(elementName, "ANY"); | private void readContentspec(String elementName) throws IOException, XMLStreamException { if (tryRead("EMPTY")) doctype.elements.put(elementName, "EMPTY"); else if (tryRead("ANY")) doctype.elements.put(elementName, "ANY"); else { StringBuffer acc = new StringBuffer(); require... |
doctype.elements.put(elementName, acc.toString()); | doctype.addElementDecl(elementName, acc.toString()); | private void readContentspec(String elementName) throws IOException, XMLStreamException { if (tryRead("EMPTY")) doctype.elements.put(elementName, "EMPTY"); else if (tryRead("ANY")) doctype.elements.put(elementName, "ANY"); else { StringBuffer acc = new StringBuffer(); require... |
LinkedHashMap attlist = (LinkedHashMap) doctype.attlists.get(elementName); if (attlist == null) { attlist = new LinkedHashMap(); doctype.attlists.put(elementName, attlist); } if (attlist.containsKey(name)) { return; } | private void readDefault(String elementName, String name, String type, String enumeration) throws IOException, XMLStreamException { int valueType = ATTRIBUTE_DEFAULT_SPECIFIED; int flags = LIT_ATTRIBUTE; String value = null, defaultType = null; boolean saved = expandPE; ... | |
attlist.put(name, attribute); | doctype.addAttributeDecl(elementName, name, attribute); | private void readDefault(String elementName, String name, String type, String enumeration) throws IOException, XMLStreamException { int valueType = ATTRIBUTE_DEFAULT_SPECIFIED; int flags = LIT_ATTRIBUTE; String value = null, defaultType = null; boolean saved = expandPE; ... |
readMarkupdecl(); | readMarkupdecl(false); | private void readDoctypeDecl() throws IOException, XMLStreamException { if (!supportDTD) error("parser was configured not to support DTDs"); requireWhitespace(); String rootName = readNmtoken(true); skipWhitespace(); ExternalIds ids = readExternalIds(false, true); doctype = this.new Do... |
pushInput(null, ">"); | pushInput("", ">"); | private void readDoctypeDecl() throws IOException, XMLStreamException { if (!supportDTD) error("parser was configured not to support DTDs"); requireWhitespace(); String rootName = readNmtoken(true); skipWhitespace(); ExternalIds ids = readExternalIds(false, true); doctype = this.new Do... |
peIsError = expandPE = true; readMarkupdecl(); peIsError = expandPE = false; | expandPE = true; readMarkupdecl(true); expandPE = true; | private void readDoctypeDecl() throws IOException, XMLStreamException { if (!supportDTD) error("parser was configured not to support DTDs"); requireWhitespace(); String rootName = readNmtoken(true); skipWhitespace(); ExternalIds ids = readExternalIds(false, true); doctype = this.new Do... |
private void readEntityDecl() | private void readEntityDecl(boolean inExternalSubset) | private void readEntityDecl() throws IOException, XMLStreamException { int flags = 0; // Check if parameter entity boolean peFlag = false; expandPE = false; requireWhitespace(); if (tryRead('%')) { peFlag = true; requireWhitespace(); } expandPE = true; // Read entit... |
error("Illegal character ':' in entity name", name); | error("illegal character ':' in entity name", name); | private void readEntityDecl() throws IOException, XMLStreamException { int flags = 0; // Check if parameter entity boolean peFlag = false; expandPE = false; requireWhitespace(); if (tryRead('%')) { peFlag = true; requireWhitespace(); } expandPE = true; // Read entit... |
String value = readLiteral(flags); doctype.entities.put(name, value); | String value = readLiteral(flags | LIT_DISABLE_EREF); doctype.addEntityDecl(name, value, inExternalSubset); | private void readEntityDecl() throws IOException, XMLStreamException { int flags = 0; // Check if parameter entity boolean peFlag = false; expandPE = false; requireWhitespace(); if (tryRead('%')) { peFlag = true; requireWhitespace(); } expandPE = true; // Read entit... |
doctype.entities.put(name, ids); | doctype.addEntityDecl(name, ids, inExternalSubset); | private void readEntityDecl() throws IOException, XMLStreamException { int flags = 0; // Check if parameter entity boolean peFlag = false; expandPE = false; requireWhitespace(); if (tryRead('%')) { peFlag = true; requireWhitespace(); } expandPE = true; // Read entit... |
ids.systemId = readLiteral(flags); | ids.systemId = absolutize(input.systemId, readLiteral(flags)); | private ExternalIds readExternalIds(boolean inNotation, boolean isSubset) throws IOException, XMLStreamException { char c; int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; ExternalIds ids = new ExternalIds(); if (tryRead("PUBLIC")) { requireWhitespace(); ids.pub... |
buf.setLength(0); | literalBuf.setLength(0); | private String readLiteral(int flags) throws IOException, XMLStreamException { boolean saved = expandPE; char delim = readCh(); if (delim != '\'' && delim != '"') error("expected '\"' or \"'\"", new Character(delim)); buf.setLength(0); if ((flags & LIT_DISABLE_PE) != 0) expandPE = false; ... |
for (char c = literalReadCh(); c != delim; c = literalReadCh()) | int inputStackSize = inputStack.size(); do | private String readLiteral(int flags) throws IOException, XMLStreamException { boolean saved = expandPE; char delim = readCh(); if (delim != '\'' && delim != '"') error("expected '\"' or \"'\"", new Character(delim)); buf.setLength(0); if ((flags & LIT_DISABLE_PE) != 0) expandPE = false; ... |
error("literal may not contain character reference"); | { reset(); c = '&'; } else { | private String readLiteral(int flags) throws IOException, XMLStreamException { boolean saved = expandPE; char delim = readCh(); if (delim != '\'' && delim != '"') error("expected '\"' or \"'\"", new Character(delim)); buf.setLength(0); if ((flags & LIT_DISABLE_PE) != 0) expandPE = false; ... |
buf.append(c); | literalBuf.append(c); | private String readLiteral(int flags) throws IOException, XMLStreamException { boolean saved = expandPE; char delim = readCh(); if (delim != '\'' && delim != '"') error("expected '\"' or \"'\"", new Character(delim)); buf.setLength(0); if ((flags & LIT_DISABLE_PE) != 0) expandPE = false; ... |
error("literal may not contain entity reference"); | { reset(); c = '&'; } else { | private String readLiteral(int flags) throws IOException, XMLStreamException { boolean saved = expandPE; char delim = readCh(); if (delim != '\'' && delim != '"') error("expected '\"' or \"'\"", new Character(delim)); buf.setLength(0); if ((flags & LIT_DISABLE_PE) != 0) expandPE = false; ... |
buf.append(text); | literalBuf.append(text); | private String readLiteral(int flags) throws IOException, XMLStreamException { boolean saved = expandPE; char delim = readCh(); if (delim != '\'' && delim != '"') error("expected '\"' or \"'\"", new Character(delim)); buf.setLength(0); if ((flags & LIT_DISABLE_PE) != 0) expandPE = false; ... |
expandEntity(entityName); | expandEntity(entityName, (flags & LIT_ATTRIBUTE) != 0); | private String readLiteral(int flags) throws IOException, XMLStreamException { boolean saved = expandPE; char delim = readCh(); if (delim != '\'' && delim != '"') error("expected '\"' or \"'\"", new Character(delim)); buf.setLength(0); if ((flags & LIT_DISABLE_PE) != 0) expandPE = false; ... |
buf.append(c); | throw new EOFException(); | private String readLiteral(int flags) throws IOException, XMLStreamException { boolean saved = expandPE; char delim = readCh(); if (delim != '\'' && delim != '"') error("expected '\"' or \"'\"", new Character(delim)); buf.setLength(0); if ((flags & LIT_DISABLE_PE) != 0) expandPE = false; ... |
normalizeCRLF(); | normalizeCRLF(literalBuf); | private String readLiteral(int flags) throws IOException, XMLStreamException { boolean saved = expandPE; char delim = readCh(); if (delim != '\'' && delim != '"') error("expected '\"' or \"'\"", new Character(delim)); buf.setLength(0); if ((flags & LIT_DISABLE_PE) != 0) expandPE = false; ... |
normalize(); return buf.toString(); | literalBuf = normalize(literalBuf); return literalBuf.toString(); | private String readLiteral(int flags) throws IOException, XMLStreamException { boolean saved = expandPE; char delim = readCh(); if (delim != '\'' && delim != '"') error("expected '\"' or \"'\"", new Character(delim)); buf.setLength(0); if ((flags & LIT_DISABLE_PE) != 0) expandPE = false; ... |
private void readMarkupdecl() | private void readMarkupdecl(boolean inExternalSubset) | private void readMarkupdecl() throws IOException, XMLStreamException { boolean saved = expandPE; mark(1); require('<'); reset(); expandPE = false; if (tryRead(TEST_ELEMENT_DECL)) { expandPE = saved; readElementDecl(); } else if (tryRead(TEST_ATTLIST_DECL)) { ... |
readEntityDecl(); | readEntityDecl(inExternalSubset); | private void readMarkupdecl() throws IOException, XMLStreamException { boolean saved = expandPE; mark(1); require('<'); reset(); expandPE = false; if (tryRead(TEST_ELEMENT_DECL)) { expandPE = saved; readElementDecl(); } else if (tryRead(TEST_ATTLIST_DECL)) { ... |
readNotationDecl(); | readNotationDecl(inExternalSubset); | private void readMarkupdecl() throws IOException, XMLStreamException { boolean saved = expandPE; mark(1); require('<'); reset(); expandPE = false; if (tryRead(TEST_ELEMENT_DECL)) { expandPE = saved; readElementDecl(); } else if (tryRead(TEST_ATTLIST_DECL)) { ... |
readMarkupdecl(); | readMarkupdecl(inExternalSubset); | private void readMarkupdecl() throws IOException, XMLStreamException { boolean saved = expandPE; mark(1); require('<'); reset(); expandPE = false; if (tryRead(TEST_ELEMENT_DECL)) { expandPE = saved; readElementDecl(); } else if (tryRead(TEST_ATTLIST_DECL)) { ... |
break; case '\uffff': throw new EOFException(); | private void readMarkupdecl() throws IOException, XMLStreamException { boolean saved = expandPE; mark(1); require('<'); reset(); expandPE = false; if (tryRead(TEST_ELEMENT_DECL)) { expandPE = saved; readElementDecl(); } else if (tryRead(TEST_ATTLIST_DECL)) { ... | |
private void readNotationDecl() | private void readNotationDecl(boolean inExternalSubset) | private void readNotationDecl() throws IOException, XMLStreamException { requireWhitespace(); String notationName = readNmtoken(true); if (notationName.indexOf(':') != -1) error("Illegal character ':' in notation name", notationName); requireWhitespace(); ExternalIds ids = readExternalIds(true... |
error("Illegal character ':' in notation name", notationName); | error("illegal character ':' in notation name", notationName); | private void readNotationDecl() throws IOException, XMLStreamException { requireWhitespace(); String notationName = readNmtoken(true); if (notationName.indexOf(':') != -1) error("Illegal character ':' in notation name", notationName); requireWhitespace(); ExternalIds ids = readExternalIds(true... |
doctype.notations.put(notationName, ids); | doctype.addNotationDecl(notationName, ids, inExternalSubset); | private void readNotationDecl() throws IOException, XMLStreamException { requireWhitespace(); String notationName = readNmtoken(true); if (notationName.indexOf(':') != -1) error("Illegal character ':' in notation name", notationName); requireWhitespace(); ExternalIds ids = readExternalIds(true... |
error("Illegal character in PI target", new Character(':')); | error("illegal character in PI target", new Character(':')); | private void readPI() throws IOException, XMLStreamException { boolean saved = expandPE; expandPE = false; piTarget = readNmtoken(true); if (piTarget.indexOf(':') != -1) error("Illegal character in PI target", new Character(':')); if ("xml".equalsIgnoreCase(piTarget)) error("Illegal PI ta... |
error("Illegal PI target", piTarget); | error("illegal PI target", piTarget); | private void readPI() throws IOException, XMLStreamException { boolean saved = expandPE; expandPE = false; piTarget = readNmtoken(true); if (piTarget.indexOf(':') != -1) error("Illegal character in PI target", new Character(':')); if ("xml".equalsIgnoreCase(piTarget)) error("Illegal PI ta... |
LinkedHashMap attlist = (LinkedHashMap) doctype.attlists.get(elementName); if (attlist != null) { for (Iterator i = attlist.entrySet().iterator(); i.hasNext(); ) | for (Iterator i = doctype.attlistIterator(elementName); i.hasNext(); ) | private int readStartElement() throws IOException, XMLStreamException { //System.err.println("readStartElement"); // Read element name String elementName = readNmtoken(true); attrs.clear(); // Push namespace context if (namespaceAware) namespaces.addFirst(new LinkedHashMap()); // Read el... |
else { for (Iterator j = attrs.iterator(); j.hasNext(); ) { Attribute a = (Attribute) j.next(); if (attName.equals(a.name)) continue; } } | else if (attributeSpecified(attName)) continue; | private int readStartElement() throws IOException, XMLStreamException { //System.err.println("readStartElement"); // Read element name String elementName = readNmtoken(true); attrs.clear(); // Push namespace context if (namespaceAware) namespaces.addFirst(new LinkedHashMap()); // Read el... |
} | private int readStartElement() throws IOException, XMLStreamException { //System.err.println("readStartElement"); // Read element name String elementName = readNmtoken(true); attrs.clear(); // Push namespace context if (namespaceAware) namespaces.addFirst(new LinkedHashMap()); // Read el... | |
stack.addLast(elementName); | private int readStartElement() throws IOException, XMLStreamException { //System.err.println("readStartElement"); // Read element name String elementName = readNmtoken(true); attrs.clear(); // Push namespace context if (namespaceAware) namespaces.addFirst(new LinkedHashMap()); // Read el... | |
requireWhitespace(); | private void readTextDecl() throws IOException, XMLStreamException { final int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; if (tryRead("version")) { readEq(); String v = readLiteral(flags); if ("1.0".equals(v)) input.xml11 = false; else if ("1.1".e... | |
if (c == '\uffff') throw new EOFException(); else if (c < 32 && c != 10 && c != 9 && c != 13) error("illegal XML character", Character.toString(c)); | private void readUntil(String delim) throws IOException, XMLStreamException { int startLine = input.line; try { while (!tryRead(delim)) { char c = readCh(); buf.append(c); } } catch (EOFException e) { error("end of input while looking f... | |
requireWhitespace(); | private void readXMLDecl() throws IOException, XMLStreamException { final int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; require("version"); readEq(); xmlVersion = readLiteral(flags); if ("1.0".equals(xmlVersion)) input.xml11 = false; else if ("1.1".equals(xmlVersion)... | |
while (c == '\uffff' && inputStack.size() > 1) { popInput(); c = readCh(); } | private void skipWhitespace() throws IOException, XMLStreamException { boolean white; do { mark(1); char c = readCh(); white = (c == ' ' || c == '\t' || c == '\n' || c == '\r'); } while (white); reset(); } | |
} | private boolean tryWhitespace() throws IOException, XMLStreamException { boolean white; boolean ret = false; do { mark(1); char c = readCh(); white = (c == ' ' || c == '\t' || c == '\n' || c == '\r'); if (white) ret = true; else if (c == '\uffff') ... | |
int mark = Utilities.getTabbedTextOffset(s, metrics, x0, x, e, startOffset); | int mark = Utilities.getTabbedTextOffset(s, metrics, x0, x, e, startOffset, false); | public static final int getBreakLocation(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset) { int mark = Utilities.getTabbedTextOffset(s, metrics, x0, x, e, startOffset); BreakIterator breaker = Brea... |
if (mark >= s.count) | int shift = startOffset - s.offset; if (mark >= shift + s.count) | public static final int getBreakLocation(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset) { int mark = Utilities.getTabbedTextOffset(s, metrics, x0, x, e, startOffset); BreakIterator breaker = Brea... |
int preceding = breaker.preceding(mark + 1); | int preceding = breaker.preceding(mark + 1 - shift); | public static final int getBreakLocation(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset) { int mark = Utilities.getTabbedTextOffset(s, metrics, x0, x, e, startOffset); BreakIterator breaker = Brea... |
return preceding; else | return preceding + shift; | public static final int getBreakLocation(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset) { int mark = Utilities.getTabbedTextOffset(s, metrics, x0, x, e, startOffset); BreakIterator breaker = Brea... |
return BreakIterator.DONE; | throw new BadLocationException("no more word", offs); | public static final int getNextWord(JTextComponent c, int offs) throws BadLocationException { if (offs < 0 || offs > (c.getText().length() - 1)) throw new BadLocationException("invalid offset specified", offs); String text = c.getText(); BreakIterator wb = BreakIterator.getWordInstance(); wb.se... |
{ if (! round && pos > 0) pos--; | public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current... | |
} | public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current... | |
currentX += fm.charWidth(nextChar); | width = fm.charWidth(nextChar); | public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current... |
currentX += fm.charWidth(' '); | width = fm.charWidth(' '); | public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current... |
currentX = (int) te.nextTabStop(currentX, pos); | width = ((int) te.nextTabStop(currentX, pos)) - currentX; | public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current... |
if (currentX >= x) | if (round) | public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current... |
if (! round && pos > 0) pos--; | if (currentX + (width>>1) > x) break; } else { if (currentX + width > x) | public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current... |
XRLog.layout(Level.FINEST, "is a fixed child: " + body_box.isChildrenExceedBounds()); | XRLog.layout(Level.FINEST, "is a fixed child: " + root.isChildrenExceedBounds()); | public void doActualLayout(Graphics g) { //Uu.p("doActualLayout called"); this.removeAll(); if (g == null) { return; } if (doc == null) { return; }// set up CSS Context c = newContext(pageInfo, (Graphics2D) g); synchronized (this) { ... |
if (body_box.isChildrenExceedBounds()) { | if (root.isChildrenExceedBounds()) { | public void doActualLayout(Graphics g) { //Uu.p("doActualLayout called"); this.removeAll(); if (g == null) { return; } if (doc == null) { return; }// set up CSS Context c = newContext(pageInfo, (Graphics2D) g); synchronized (this) { ... |
getRenderingContext().setRootBox(body_box); | getRenderingContext().setRootBox(root); | public void doActualLayout(Graphics g) { //Uu.p("doActualLayout called"); this.removeAll(); if (g == null) { return; } if (doc == null) { return; }// set up CSS Context c = newContext(pageInfo, (Graphics2D) g); synchronized (this) { ... |
XRLog.layout(Level.FINEST, "after layout: " + body_box); | XRLog.layout(Level.FINEST, "after layout: " + root); | public void doActualLayout(Graphics g) { //Uu.p("doActualLayout called"); this.removeAll(); if (g == null) { return; } if (doc == null) { return; }// set up CSS Context c = newContext(pageInfo, (Graphics2D) g); synchronized (this) { ... |
intrinsic_size = new Dimension(getContext().getMaxWidth(), body_box.height); | intrinsic_size = new Dimension(getContext().getMaxWidth(), root.height); | public void doActualLayout(Graphics g) { //Uu.p("doActualLayout called"); this.removeAll(); if (g == null) { return; } if (doc == null) { return; }// set up CSS Context c = newContext(pageInfo, (Graphics2D) g); synchronized (this) { ... |
if (body_box != null) { body_box.height = enclosingScrollPane.getViewport().getHeight(); bodyExpandHack(body_box, body_box.height); intrinsic_size.height = body_box.height; | if (root != null) { root.height = enclosingScrollPane.getViewport().getHeight(); bodyExpandHack(root, root.height); intrinsic_size.height = root.height; | public void doActualLayout(Graphics g) { //Uu.p("doActualLayout called"); this.removeAll(); if (g == null) { return; } if (doc == null) { return; }// set up CSS Context c = newContext(pageInfo, (Graphics2D) g); synchronized (this) { ... |
if (body_box.isFixedDescendant()) { | if (root.isFixedDescendant()) { | public void doActualLayout(Graphics g) { //Uu.p("doActualLayout called"); this.removeAll(); if (g == null) { return; } if (doc == null) { return; }// set up CSS Context c = newContext(pageInfo, (Graphics2D) g); synchronized (this) { ... |
list.add(object); fireIntervalAdded(this, list.size() - 1, list.size() - 1); if (list.size() == 1) | list.addElement(object); int index = list.size() - 1; fireIntervalAdded(this, index, index); if (list.size() == 1 && selectedItem == null) | public void addElement(Object object) { list.add(object); fireIntervalAdded(this, list.size() - 1, list.size() - 1); if (list.size() == 1) setSelectedItem(object); } |
list.remove(index); | public void removeElementAt(int index) { int selected = getIndexOf(selectedItem); list.remove(index); if (selected == index) // choose a new selected item { if (selected > 0) selectedItem = getElementAt(selected - 1); else selectedItem = getElementAt(selected); } ... | |
selectedItem = getElementAt(selected); | selectedItem = getElementAt(selected + 1); | public void removeElementAt(int index) { int selected = getIndexOf(selectedItem); list.remove(index); if (selected == index) // choose a new selected item { if (selected > 0) selectedItem = getElementAt(selected - 1); else selectedItem = getElementAt(selected); } ... |
list.removeElementAt(index); | public void removeElementAt(int index) { int selected = getIndexOf(selectedItem); list.remove(index); if (selected == index) // choose a new selected item { if (selected > 0) selectedItem = getElementAt(selected - 1); else selectedItem = getElementAt(selected); } ... | |
u.p("new font scale = " + rc.getTextRenderer().getFontScale()); | public void actionPerformed(ActionEvent evt) { RenderingContext rc = root.panel.view.getRenderingContext(); rc.getTextRenderer().setFontScale(rc.getTextRenderer().getFontScale()*scale); u.p("new font scale = " + rc.getTextRenderer().getFontScale()); root.panel.view.relayout(); roo... | |
MessageReference reference(Routable r); | MessageReference reference(Message m); | MessageReference reference(Routable r); |
BufferedReader br = new BufferedReader(new InputStreamReader(in, "UTF-8")); read_main_section(getMainAttributes(), br); read_individual_sections(getEntries(), br); | JarUtils.readMFManifest(getMainAttributes(), getEntries(), in); | public void read(InputStream in) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(in, "UTF-8")); read_main_section(getMainAttributes(), br); read_individual_sections(getEntries(), br); } |
BufferedOutputStream bos = out instanceof BufferedOutputStream ? (BufferedOutputStream) out : new BufferedOutputStream(out, 4096); write_main_section(getMainAttributes(), bos); bos.write(CRLF); write_individual_sections(getEntries(), bos); bos.flush(); | JarUtils.writeMFManifest(getMainAttributes(), getEntries(), out); | public void write(OutputStream out) throws IOException { BufferedOutputStream bos = out instanceof BufferedOutputStream ? (BufferedOutputStream) out : new BufferedOutputStream(out, 4096); write_main_section(getMainAttributes(), bos); bos.write(CRLF... |
log.error("Failed to load queue state", e); | void addCoreDestination(Destination jmsDestination) throws JMSException { JBossDestination d = (JBossDestination)jmsDestination; String name = d.getName(); boolean isQueue = d.isQueue(); CoreDestination cd = getCoreDestination(isQueue, name); if (cd != null) { throw new JMSExc... | |
return uac.isVisited(nsh.getLinkUri((Element) e)); | return isLink(e) && uac.isVisited(nsh.getLinkUri((Element) e)); | public boolean isVisited(Object e) { return uac.isVisited(nsh.getLinkUri((Element) e)); } |
int first = fmt_index; | int fmt_count = 1; | public Date parse (String dateStr, ParsePosition pos) { int fmt_index = 0; int fmt_max = pattern.length(); calendar.clear(); boolean saw_timezone = false; int quote_start = -1; boolean is2DigitYear = false; for (; fmt_index < fmt_max; ++fmt_index) { char ch = pattern.charAt(fmt_index); if (... |
; int fmt_count = fmt_index - first; | { ++fmt_count; } | public Date parse (String dateStr, ParsePosition pos) { int fmt_index = 0; int fmt_max = pattern.length(); calendar.clear(); boolean saw_timezone = false; int quote_start = -1; boolean is2DigitYear = false; for (; fmt_index < fmt_max; ++fmt_index) { char ch = pattern.charAt(fmt_index); if (... |
match = (fmt_count <= 3 | match = (fmt_count == 3 | public Date parse (String dateStr, ParsePosition pos) { int fmt_index = 0; int fmt_max = pattern.length(); calendar.clear(); boolean saw_timezone = false; int quote_start = -1; boolean is2DigitYear = false; for (; fmt_index < fmt_max; ++fmt_index) { char ch = pattern.charAt(fmt_index); if (... |
if (dateStr.startsWith(match[i], index)) | if (match[i] != null) if (dateStr.toUpperCase().startsWith(match[i].toUpperCase(), index)) | public Date parse (String dateStr, ParsePosition pos) { int fmt_index = 0; int fmt_max = pattern.length(); calendar.clear(); boolean saw_timezone = false; int quote_start = -1; boolean is2DigitYear = false; for (; fmt_index < fmt_max; ++fmt_index) { char ch = pattern.charAt(fmt_index); if (... |
try { | public Date parse (String dateStr, ParsePosition pos) { int fmt_index = 0; int fmt_max = pattern.length(); calendar.clear(); boolean saw_timezone = false; int quote_start = -1; boolean is2DigitYear = false; for (; fmt_index < fmt_max; ++fmt_index) { char ch = pattern.charAt(fmt_index); if (... | |
CoreSubscription sub = new CoreSubscription(id, topic, selector, noLocal, ms, pm, topic.getFullSize(), topic.getPageSize(), topic.getDownCacheSize()); return sub; | return new CoreSubscription(id, topic, selector, noLocal, ms, pm, topic.getFullSize(), topic.getPageSize(), topic.getDownCacheSize()); | public CoreSubscription createSubscription(String topicName, String selector, boolean noLocal, MessageStore ms, PersistenceManager pm) throws JMSException { try { //First insert a row in the db long id = getNextId(); Topic topic = (Topic)getCoreDestinationInternal... |
CoreDestination cd = getCoreDestinationInternal(jbDest.isQueue(), jbDest.getName()); return cd; | return getCoreDestinationInternal(jbDest.isQueue(), jbDest.getName()); | public CoreDestination getCoreDestination(JBossDestination jbDest) { CoreDestination cd = getCoreDestinationInternal(jbDest.isQueue(), jbDest.getName()); return cd; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.