bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
public void action (SaxDocumentHandler handler, char buf [], int offset, int len) { // IF we get here, we have the delmited case for populating // a value list. // our string that we will parse String valueListString = new String (buf, offset, len); String delimiter = (String) CurrentValueListParameter.get("delimiter"); String repeatable = (String) CurrentValueListParameter.get("repeatable"); // reconsitute information stored in CurrentValueListParameter table String parentNodeName = (String) CurrentValueListParameter.get("parentNodeName");// NOT currently complete. Adds values ONLY to axes. Need one for parameter too. // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); // split up string into values based on declared delimiter // and snag the string representation of the values ArrayList strValueList = splitStringIntoStringObjects(valueListString, delimiter, repeatable, null ); // now create value objects, add them to groups Iterator iter = strValueList.iterator(); while (iter.hasNext()) { String valueString = (String) iter.next(); // add the value to the axis Value newvalue = new Value(valueString); lastAxisObject.addAxisValue(newvalue); // add this object to all open value groups Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } } CurrentValueListParameter.put("isDelimitedCase", "true"); // notify that we did the list }
public void action (SaxDocumentHandler handler, char buf [], int offset, int len) { // IF we get here, we have the delmited case for populating // a value list. // our string that we will parse String valueListString = new String (buf, offset, len); String delimiter = (String) CurrentValueListParameter.get("delimiter"); String repeatable = (String) CurrentValueListParameter.get("repeatable"); // reconsitute information stored in CurrentValueListParameter table String parentNodeName = (String) CurrentValueListParameter.get("parentNodeName");// NOT currently complete. Adds values ONLY to axes. Need one for parameter too. // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); // split up string into values based on declared delimiter // and snag the string representation of the values ArrayList strValueList = splitStringIntoStringObjects(valueListString, delimiter, repeatable, null ); // now create value objects, add them to groups Iterator iter = strValueList.iterator(); while (iter.hasNext()) { String valueString = (String) iter.next(); // add the value to the axis Value newvalue = new Value(valueString); lastAxisObject.addAxisValue(newvalue); // add this object to all open value groups Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } } CurrentValueListParameter.put("isDelimitedCase", "true"); // notify that we did the list }
4,525
public void action (SaxDocumentHandler handler, char buf [], int offset, int len) { // IF we get here, we have the delmited case for populating // a value list. // our string that we will parse String valueListString = new String (buf, offset, len); String delimiter = (String) CurrentValueListParameter.get("delimiter"); String repeatable = (String) CurrentValueListParameter.get("repeatable"); // reconsitute information stored in CurrentValueListParameter table String parentNodeName = (String) CurrentValueListParameter.get("parentNodeName");// NOT currently complete. Adds values ONLY to axes. Need one for parameter too. // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); // split up string into values based on declared delimiter // and snag the string representation of the values ArrayList strValueList = splitStringIntoStringObjects(valueListString, delimiter, repeatable, null ); // now create value objects, add them to groups Iterator iter = strValueList.iterator(); while (iter.hasNext()) { String valueString = (String) iter.next(); // add the value to the axis Value newvalue = new Value(valueString); lastAxisObject.addAxisValue(newvalue); // add this object to all open value groups Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } } CurrentValueListParameter.put("isDelimitedCase", "true"); // notify that we did the list }
public void action (SaxDocumentHandler handler, char buf [], int offset, int len) { // IF we get here, we have the delmited case for populating // a value list. // our string that we will parse String valueListString = new String (buf, offset, len); String delimiter = (String) CurrentValueListParameter.get("delimiter"); String repeatable = (String) CurrentValueListParameter.get("repeatable"); // reconsitute information stored in CurrentValueListParameter table String parentNodeName = (String) CurrentValueListParameter.get("parentNodeName");// NOT currently complete. Adds values ONLY to axes. Need one for parameter too. // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); // split up string into values based on declared delimiter // and snag the string representation of the values ArrayList strValueList = splitStringIntoStringObjects(valueListString, delimiter, repeatable, null ); // now create value objects, add them to groups Iterator iter = strValueList.iterator(); while (iter.hasNext()) { // add the value to the axis Value newvalue = new Value(valueString); lastAxisObject.addAxisValue(newvalue); // add this object to all open value groups Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } } CurrentValueListParameter.put("isDelimitedCase", "true"); // notify that we did the list }
4,526
public void action (SaxDocumentHandler handler, char buf [], int offset, int len) { // IF we get here, we have the delmited case for populating // a value list. // our string that we will parse String valueListString = new String (buf, offset, len); String delimiter = (String) CurrentValueListParameter.get("delimiter"); String repeatable = (String) CurrentValueListParameter.get("repeatable"); // reconsitute information stored in CurrentValueListParameter table String parentNodeName = (String) CurrentValueListParameter.get("parentNodeName");// NOT currently complete. Adds values ONLY to axes. Need one for parameter too. // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); // split up string into values based on declared delimiter // and snag the string representation of the values ArrayList strValueList = splitStringIntoStringObjects(valueListString, delimiter, repeatable, null ); // now create value objects, add them to groups Iterator iter = strValueList.iterator(); while (iter.hasNext()) { String valueString = (String) iter.next(); // add the value to the axis Value newvalue = new Value(valueString); lastAxisObject.addAxisValue(newvalue); // add this object to all open value groups Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } } CurrentValueListParameter.put("isDelimitedCase", "true"); // notify that we did the list }
public void action (SaxDocumentHandler handler, char buf [], int offset, int len) { // IF we get here, we have the delmited case for populating // a value list. // our string that we will parse String valueListString = new String (buf, offset, len); String delimiter = (String) CurrentValueListParameter.get("delimiter"); String repeatable = (String) CurrentValueListParameter.get("repeatable"); // reconsitute information stored in CurrentValueListParameter table String parentNodeName = (String) CurrentValueListParameter.get("parentNodeName");// NOT currently complete. Adds values ONLY to axes. Need one for parameter too. // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); // split up string into values based on declared delimiter // and snag the string representation of the values ArrayList strValueList = splitStringIntoStringObjects(valueListString, delimiter, repeatable, null ); // now create value objects, add them to groups Iterator iter = strValueList.iterator(); while (iter.hasNext()) { String valueString = (String) iter.next(); // add the value to the axis Value newvalue = new Value(valueString); lastAxisObject.addAxisValue(newvalue); // add this object to all open value groups Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } } CurrentValueListParameter.put("isDelimitedCase", "true"); // notify that we did the list }
4,527
public void action (SaxDocumentHandler handler, char buf [], int offset, int len) { // IF we get here, we have the delmited case for populating // a value list. // our string that we will parse String valueListString = new String (buf, offset, len); String delimiter = (String) CurrentValueListParameter.get("delimiter"); String repeatable = (String) CurrentValueListParameter.get("repeatable"); // reconsitute information stored in CurrentValueListParameter table String parentNodeName = (String) CurrentValueListParameter.get("parentNodeName");// NOT currently complete. Adds values ONLY to axes. Need one for parameter too. // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); // split up string into values based on declared delimiter // and snag the string representation of the values ArrayList strValueList = splitStringIntoStringObjects(valueListString, delimiter, repeatable, null ); // now create value objects, add them to groups Iterator iter = strValueList.iterator(); while (iter.hasNext()) { String valueString = (String) iter.next(); // add the value to the axis Value newvalue = new Value(valueString); lastAxisObject.addAxisValue(newvalue); // add this object to all open value groups Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } } CurrentValueListParameter.put("isDelimitedCase", "true"); // notify that we did the list }
public void action (SaxDocumentHandler handler, char buf [], int offset, int len) { // IF we get here, we have the delmited case for populating // a value list. // our string that we will parse String valueListString = new String (buf, offset, len); String delimiter = (String) CurrentValueListParameter.get("delimiter"); String repeatable = (String) CurrentValueListParameter.get("repeatable"); // reconsitute information stored in CurrentValueListParameter table String parentNodeName = (String) CurrentValueListParameter.get("parentNodeName");// NOT currently complete. Adds values ONLY to axes. Need one for parameter too. // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); // split up string into values based on declared delimiter // and snag the string representation of the values ArrayList strValueList = splitStringIntoStringObjects(valueListString, delimiter, repeatable, null ); // now create value objects, add them to groups Iterator iter = strValueList.iterator(); while (iter.hasNext()) { String valueString = (String) iter.next(); // add the value to the axis Value newvalue = new Value(valueString); lastAxisObject.addAxisValue(newvalue); // add this object to all open value groups Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } } CurrentValueListParameter.put("isDelimitedCase", "true"); // notify that we did the list }
4,528
public void action (SaxDocumentHandler handler, char buf [], int offset, int len) { // IF we get here, we have the delmited case for populating // a value list. // our string that we will parse String valueListString = new String (buf, offset, len); String delimiter = (String) CurrentValueListParameter.get("delimiter"); String repeatable = (String) CurrentValueListParameter.get("repeatable"); // reconsitute information stored in CurrentValueListParameter table String parentNodeName = (String) CurrentValueListParameter.get("parentNodeName");// NOT currently complete. Adds values ONLY to axes. Need one for parameter too. // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); // split up string into values based on declared delimiter // and snag the string representation of the values ArrayList strValueList = splitStringIntoStringObjects(valueListString, delimiter, repeatable, null ); // now create value objects, add them to groups Iterator iter = strValueList.iterator(); while (iter.hasNext()) { String valueString = (String) iter.next(); // add the value to the axis Value newvalue = new Value(valueString); lastAxisObject.addAxisValue(newvalue); // add this object to all open value groups Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } } CurrentValueListParameter.put("isDelimitedCase", "true"); // notify that we did the list }
public void action (SaxDocumentHandler handler, char buf [], int offset, int len) { // IF we get here, we have the delmited case for populating // a value list. // our string that we will parse String valueListString = new String (buf, offset, len); String delimiter = (String) CurrentValueListParameter.get("delimiter"); String repeatable = (String) CurrentValueListParameter.get("repeatable"); // reconsitute information stored in CurrentValueListParameter table String parentNodeName = (String) CurrentValueListParameter.get("parentNodeName");// NOT currently complete. Adds values ONLY to axes. Need one for parameter too. // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); // split up string into values based on declared delimiter // and snag the string representation of the values ArrayList strValueList = splitStringIntoStringObjects(valueListString, delimiter, repeatable, null ); // now create value objects, add them to groups Iterator iter = strValueList.iterator(); while (iter.hasNext()) { String valueString = (String) iter.next(); // add the value to the axis Value newvalue = new Value(valueString); lastAxisObject.addAxisValue(newvalue); // add this object to all open value groups Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } } CurrentValueListParameter.put("isDelimitedCase", "true"); // notify that we did the list }
4,529
public void action (SaxDocumentHandler handler, char buf [], int offset, int len) { // IF we get here, we have the delmited case for populating // a value list. // our string that we will parse String valueListString = new String (buf, offset, len); String delimiter = (String) CurrentValueListParameter.get("delimiter"); String repeatable = (String) CurrentValueListParameter.get("repeatable"); // reconsitute information stored in CurrentValueListParameter table String parentNodeName = (String) CurrentValueListParameter.get("parentNodeName");// NOT currently complete. Adds values ONLY to axes. Need one for parameter too. // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); // split up string into values based on declared delimiter // and snag the string representation of the values ArrayList strValueList = splitStringIntoStringObjects(valueListString, delimiter, repeatable, null ); // now create value objects, add them to groups Iterator iter = strValueList.iterator(); while (iter.hasNext()) { String valueString = (String) iter.next(); // add the value to the axis Value newvalue = new Value(valueString); lastAxisObject.addAxisValue(newvalue); // add this object to all open value groups Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } } CurrentValueListParameter.put("isDelimitedCase", "true"); // notify that we did the list }
public void action (SaxDocumentHandler handler, char buf [], int offset, int len) { // IF we get here, we have the delmited case for populating // a value list. // our string that we will parse String valueListString = new String (buf, offset, len); String delimiter = (String) CurrentValueListParameter.get("delimiter"); String repeatable = (String) CurrentValueListParameter.get("repeatable"); // reconsitute information stored in CurrentValueListParameter table String parentNodeName = (String) CurrentValueListParameter.get("parentNodeName");// NOT currently complete. Adds values ONLY to axes. Need one for parameter too. // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); // split up string into values based on declared delimiter // and snag the string representation of the values ArrayList strValueList = splitStringIntoStringObjects(valueListString, delimiter, repeatable, null ); // now create value objects, add them to groups Iterator iter = strValueList.iterator(); while (iter.hasNext()) { String valueString = (String) iter.next(); // add the value to the axis Value newvalue = new Value(valueString); lastAxisObject.addAxisValue(newvalue); // add this object to all open value groups Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } else if( parentNodeName.equals(XDFNodeName.PARAMETER) ) { Iterator iter = strValueList.iterator(); while (iter.hasNext()) { String valueString = (String) iter.next(); Value newvalue = new Value(valueString); LastParameterObject.addValue(newvalue); Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } } } else { Log.errorln("Error: weird parent node "+parentNodeName+" for "+XDFNodeName.VALUELIST+", aborting read."); System.exit(-1); } } else if( parentNodeName.equals(XDFNodeName.PARAMETER) ) { Iterator iter = strValueList.iterator(); while (iter.hasNext()) { String valueString = (String) iter.next(); Value newvalue = new Value(valueString); LastParameterObject.addValue(newvalue); Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } } } else { Log.errorln("Error: weird parent node "+parentNodeName+" for "+XDFNodeName.VALUELIST+", aborting read."); System.exit(-1); } CurrentValueListParameter.put("isDelimitedCase", "true"); // notify that we did the list } else if( parentNodeName.equals(XDFNodeName.PARAMETER) ) { Iterator iter = strValueList.iterator(); while (iter.hasNext()) { String valueString = (String) iter.next(); Value newvalue = new Value(valueString); LastParameterObject.addValue(newvalue); Iterator groupIter = CurrentValueGroupList.iterator(); while (groupIter.hasNext()) { ValueGroup nextValueGroupObj = (ValueGroup) groupIter.next(); newvalue.addToGroup(nextValueGroupObj); } } } else { Log.errorln("Error: weird parent node "+parentNodeName+" for "+XDFNodeName.VALUELIST+", aborting read."); System.exit(-1); }
4,530
public void action (SaxDocumentHandler handler) { // generate valuelist values from algoritm IF we need to // (e.g. values where'nt in a delimited cdata list) // check to see if we didnt alrealy parse from a delmited string. if ( ((String) CurrentValueListParameter.get("isDelimitedCase")).equals("true") ) return; // we already did the list, leave here // 1. grab parent node name String parentNodeName = (String) CurrentValueListParameter.get("parentNodeName"); // 2. try to determine values from attributes (e.g. algorithm method) ArrayList values = getValueListNodeValues(); // 3. Populate correct parent node w/ values if(values.size() > 0 ) { // needed safety? ArrayList valueObjList = new ArrayList(); if( parentNodeName.equals(XDFNodeName.AXIS) ) { // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(lastAxisObject.addAxisValue(value)); } } else if ( parentNodeName.equals(XDFNodeName.VALUEGROUP) ) {/* ValueGroup lastValueGroup = (ValueGroup) CurrentValueGroupList.get(CurrentValueGroupList.size()-1); newvalueGroup = lastValueGroup.addValueGroup(newvalueGroup);*/ if ( LastValueGroupParentObject instanceof Parameter ) { Parameter myParamObject = (Parameter) LastValueGroupParentObject; Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(myParamObject.addValue(value)); } } else if ( LastValueGroupParentObject instanceof Axis ) { // get the last axis Axis myAxisObject = (Axis) LastValueGroupParentObject; Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(myAxisObject.addAxisValue(value)); } } else { Log.warnln("Error: unknown valueGroupParent "+LastValueGroupParentObject+ " cant treat for "+XDFNodeName.VALUELIST); return; // bail } } else if ( parentNodeName.equals(XDFNodeName.PARAMETER) ) { Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(LastParameterObject.addValue(value)); } } else { Log.errorln("Error: weird parent node "+parentNodeName+" for "+XDFNodeName.VALUELIST); System.exit(-1); // fatal error, shut down } }// Need to do something wi/ ValueObjList HERE?? }
public void action (SaxDocumentHandler handler) { // generate valuelist values from algoritm IF we need to // (e.g. values where'nt in a delimited cdata list) // check to see if we didnt alrealy parse from a delmited string. if ( ((String) CurrentValueListParameter.get("isDelimitedCase")).equals("true") ) return; // we already did the list, leave here // 1. grab parent node name String parentNodeName = (String) CurrentValueListParameter.get("parentNodeName"); // 2. try to determine values from attributes (e.g. algorithm method) ArrayList values = null; String valueListIdRef = (String) CurrentValueListParameter.get("valueListIdRef"); if (valueListIdRef != null) { if (ValueListObj.containsKey(valueListIdRef)) { // 3. Populate correct parent node w/ values if(values.size() > 0 ) { // needed safety? ArrayList valueObjList = new ArrayList(); if( parentNodeName.equals(XDFNodeName.AXIS) ) { // get the last axis List axisList = (List) CurrentArray.getAxisList(); Axis lastAxisObject = (Axis) axisList.get(axisList.size()-1); Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(lastAxisObject.addAxisValue(value)); } } else if ( parentNodeName.equals(XDFNodeName.VALUEGROUP) ) {/* ValueGroup lastValueGroup = (ValueGroup) CurrentValueGroupList.get(CurrentValueGroupList.size()-1); newvalueGroup = lastValueGroup.addValueGroup(newvalueGroup);*/ if ( LastValueGroupParentObject instanceof Parameter ) { Parameter myParamObject = (Parameter) LastValueGroupParentObject; Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(myParamObject.addValue(value)); } } else if ( LastValueGroupParentObject instanceof Axis ) { // get the last axis Axis myAxisObject = (Axis) LastValueGroupParentObject; Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(myAxisObject.addAxisValue(value)); } } else { Log.warnln("Error: unknown valueGroupParent "+LastValueGroupParentObject+ " cant treat for "+XDFNodeName.VALUELIST); return; // bail } } else if ( parentNodeName.equals(XDFNodeName.PARAMETER) ) { Iterator iter = values.iterator(); while (iter.hasNext()) { String valuePCDATA = (String) iter.next(); Value value = new Value (valuePCDATA); valueObjList.add(LastParameterObject.addValue(value)); } } else { Log.errorln("Error: weird parent node "+parentNodeName+" for "+XDFNodeName.VALUELIST); System.exit(-1); // fatal error, shut down } }// Need to do something wi/ ValueObjList HERE?? }
4,531
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // 1. re-init CurrentValueListParameter.clear(); // 2. populate ValueListparameters from attribute list CurrentValueListParameter = attribListToHashtable(attrs); // 3. populate ValueListparameters w/ parent name String parentNodeName = getParentNodeName(); CurrentValueListParameter.put("parentNodeName", parentNodeName); // 4. set this parameter to false to indicate the future is not // yet determined for this :) CurrentValueListParameter.put("isDelimitedCase", "false"); return (Object) null; }
public Object action (SaxDocumentHandler handler, AttributeList attrs) { // 1. re-init CurrentValueListParameter.clear(); // 2. populate ValueListparameters from attribute list CurrentValueListParameter = attribListToHashtable(attrs); // 3. populate ValueListparameters w/ parent name String parentNodeName = getParentNodeName(XDFNodeName.VALUEGROUP); CurrentValueListParameter.put("parentNodeName", parentNodeName); // 4. set this parameter to false to indicate the future is not // yet determined for this :) CurrentValueListParameter.put("isDelimitedCase", "false"); return (Object) null; }
4,533
public EncryptedPrivateKeyInfo(AlgorithmParameters params, byte[] encryptedData) throws IllegalArgumentException, NoSuchAlgorithmException { if (encryptedData.length == 0) { throw new IllegalArgumentException("0-length encryptedData"); } this.params = params; algOid = new OID(params.getAlgorithm()); this.encryptedData = (byte[]) encryptedData.clone(); }
public EncryptedPrivateKeyInfo(AlgorithmParameters params, byte[] encryptedData) throws IllegalArgumentException, NoSuchAlgorithmException { if (encryptedData.length == 0) { throw new IllegalArgumentException("0-length encryptedData"); } this.params = params; algName = params.getAlgorithm (); algOid = getOid (algName); this.encryptedData = (byte[]) encryptedData.clone(); }
4,534
private void encode() throws IOException { List algId = new ArrayList(2); algId.add(new DERValue(DER.OBJECT_IDENTIFIER, algOid)); getAlgParameters(); if (params != null) { algId.add(DERReader.read(params.getEncoded())); } List epki = new ArrayList(2); epki.add(new DERValue(DER.CONSTRUCTED|DER.SEQUENCE, algId)); epki.add(new DERValue(DER.OCTET_STRING, encryptedData)); encoded = new DERValue(DER.CONSTRUCTED|DER.SEQUENCE, epki).getEncoded(); }
private void encode() throws IOException { List algId = new ArrayList(2); algId.add(new DERValue(DER.OBJECT_IDENTIFIER, algOid)); getAlgParameters(); if (params != null) { algId.add (DERReader.read (params.getEncoded())); } else { algId.add (new DERValue (DER.NULL, null)); } List epki = new ArrayList(2); epki.add(new DERValue(DER.CONSTRUCTED|DER.SEQUENCE, algId)); epki.add(new DERValue(DER.OCTET_STRING, encryptedData)); encoded = new DERValue(DER.CONSTRUCTED|DER.SEQUENCE, epki).getEncoded(); }
4,535
public final void init(byte[]params) throws IOException { paramSpi.engineInit(params); }
public final void init(AlgorithmParameterSpec paramSpec) throws InvalidParameterSpecException { paramSpi.engineInit(params); }
4,536
public final void init(byte[]params) throws IOException { paramSpi.engineInit(params); }
public final void init(byte[]params) throws IOException { paramSpi.engineInit(paramSpec); }
4,537
public final void clear() { isTimeSet = false; areFieldsSet = false; for (int i = 0; i < FIELD_COUNT; i++) { isSet[i] = false; fields[i] = 0; } }
public final void clear() { isTimeSet = false; areFieldsSet = false; for (int i = 0; i < FIELD_COUNT; i++) { isSet[i] = false; fields[i] = 0; } }
4,539
public final void clear() { isTimeSet = false; areFieldsSet = false; for (int i = 0; i < FIELD_COUNT; i++) { isSet[i] = false; fields[i] = 0; } }
public final void clear() { isTimeSet = false; areFieldsSet = false; for (int i = 0; i < FIELD_COUNT; i++) { isSet[i] = false; fields[i] = 0; } }
4,540
public void set(int field, int value) { isTimeSet = false; fields[field] = value; isSet[field] = true; switch (field) { case YEAR: case MONTH: case DATE: isSet[WEEK_OF_YEAR] = false; isSet[DAY_OF_YEAR] = false; isSet[WEEK_OF_MONTH] = false; isSet[DAY_OF_WEEK] = false; isSet[DAY_OF_WEEK_IN_MONTH] = false; break; case AM_PM: isSet[HOUR_OF_DAY] = false; break; case HOUR_OF_DAY: isSet[AM_PM] = false; isSet[HOUR] = false; break; case HOUR: isSet[HOUR_OF_DAY] = false; break; case DST_OFFSET: explicitDSTOffset = true; } // May have crossed over a DST boundary. if (! explicitDSTOffset && (field != DST_OFFSET && field != ZONE_OFFSET)) isSet[DST_OFFSET] = false; }
public void set(int field, int value) { isTimeSet = false; fields[field] = value; isSet[field] = true; switch (field) { case YEAR: case MONTH: case DATE: isSet[WEEK_OF_YEAR] = false; isSet[DAY_OF_YEAR] = false; isSet[WEEK_OF_MONTH] = false; isSet[DAY_OF_WEEK] = false; isSet[DAY_OF_WEEK_IN_MONTH] = false; break; case AM_PM: isSet[HOUR_OF_DAY] = false; break; case HOUR_OF_DAY: isSet[AM_PM] = false; isSet[HOUR] = false; break; case HOUR: isSet[HOUR_OF_DAY] = false; break; case DST_OFFSET: explicitDSTOffset = true; } // May have crossed over a DST boundary. if (! explicitDSTOffset && (field != DST_OFFSET && field != ZONE_OFFSET)) isSet[DST_OFFSET] = false; }
4,541
public void propertyChange(PropertyChangeEvent e) { JLabel c = (JLabel) e.getSource(); c.revalidate(); c.repaint(); }
public void propertyChange(PropertyChangeEvent e) { JLabel c = (JLabel) e.getSource(); c.revalidate(); c.repaint(); }
4,543
public void setPosition(Component c, int position) { int layer = getLayer (c); int[] range = layerToRange(new Integer(layer)); if (range[0] == range[1]) throw new IllegalArgumentException (); int top = range[0]; int bot = range[1]; if (position == -1) position = (bot - top) - 1; int targ = Math.min(top + position, bot-1); int curr = -1; Component[] comps = getComponents(); for (int i = top; i < bot; ++i) { if (comps[i] == c) { curr = i; break; } } if (curr == -1) // should have found it throw new IllegalArgumentException(); super.swapComponents (curr, targ); revalidate(); repaint(); }
public void setPosition(Component c, int position) { int layer = getLayer (c); int[] range = layerToRange(new Integer(layer)); if (range[0] == range[1]) throw new IllegalArgumentException (); int top = range[0]; int bot = range[1]; if (position == -1) position = (bot - top) - 1; int targ = Math.min(top + position, bot-1); int curr = -1; Component[] comps = getComponents(); for (int i = top; i < bot; ++i) { if (comps[i] == c) { curr = i; break; } } if (curr == -1) // should have found it throw new IllegalArgumentException(); if (curr == 0) super.swapComponents(curr, targ); else while (curr > 0) super.swapComponents (curr, --curr); revalidate(); repaint(); }
4,544
public NamedValue add(int a_flags) { return add_value(null, null, a_flags); }
public NamedValue add(int a_flags) { return add_value(null, new gnuAny(), a_flags); }
4,545
public NamedValue add_item(String a_name, int a_flags) { return add_value(a_name, null, a_flags); }
public NamedValue add_item(String a_name, int a_flags) { return add_value(a_name, new gnuAny(), a_flags); }
4,546
public InvalidDriverException(String s) { super(s); }
public InvalidDriverException(String s) { super(s); }
4,547
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map<String, SourceFile> vmFiles = vmDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> classpathFiles = classpathDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs .scanJavaFiles(getProject()); final TreeSet<String> allFiles = new TreeSet<String>(); final Map<String, String> packageDiffs = new TreeMap<String, String>(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; int vmSpecific = 0; for (String name : allFiles) { SourceFile cpFile = classpathFiles.get(name); final SourceFile vmFile = vmFiles.get(name); final SourceFile vmSpecificFile = vmSpecificFiles .get(name); if (vmSpecificFile != null) { // File is found as vm specific source reportVmSpecific(out, vmSpecificFile.getReportName(), "vm-specific"); vmSpecific++; } else if (vmFile == null) { // file is not found as vmspecific source, nor as vm source if (!cpFile.isIgnoreMissing()) { reportMissing(out, cpFile.getReportName(), "classpath", getFlags(cpFile)); missingInCp++; } } else if (cpFile == null) { // File is not found in classpath sources reportMissing(out, vmFile.getReportName(), "vm", 0); missingInVm++; } else { // We have both the classpath version and the vm version. cpFile = cpFile.getBestFileForTarget(vmFile.getTarget()); final String diffFileName = vmFile.getReportName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getReportName(), vmFile .getTarget(), diffFileName, rc & FLAGS_MASK); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if ((rc & FLAG_VM_SPECIFIC) != 0) { diffVmSpecific++; } if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) { diffClasspathBugfix++; } if ((rc & FLAG_NATIVE) != 0) { diffNative++; } if ((rc & FLAG_JNODE) != 0) { diffJNode++; } // Let's compare them } } // Package diffs for (Map.Entry<String, String> entry : packageDiffs.entrySet()) { final String pkg = entry.getKey(); final String diff = entry.getValue(); final String diffFileName = pkg + ".pkgdiff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (vmSpecific > 0) { out.println("Found " + vmSpecific + " VM specific files<br/>"); log("Found " + vmSpecific + " VM specific files"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map<String, SourceFile> vmFiles = vmDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> classpathFiles = classpathDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs .scanJavaFiles(getProject()); final TreeSet<String> allFiles = new TreeSet<String>(); final Map<String, String> packageDiffs = new TreeMap<String, String>(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out, "Class", "Target", "Merge status"); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; int vmSpecific = 0; for (String name : allFiles) { SourceFile cpFile = classpathFiles.get(name); final SourceFile vmFile = vmFiles.get(name); final SourceFile vmSpecificFile = vmSpecificFiles .get(name); if (vmSpecificFile != null) { // File is found as vm specific source reportVmSpecific(out, vmSpecificFile.getReportName(), "vm-specific"); vmSpecific++; } else if (vmFile == null) { // file is not found as vmspecific source, nor as vm source if (!cpFile.isIgnoreMissing()) { reportMissing(out, cpFile.getReportName(), "classpath", getFlags(cpFile)); missingInCp++; } } else if (cpFile == null) { // File is not found in classpath sources reportMissing(out, vmFile.getReportName(), "vm", 0); missingInVm++; } else { // We have both the classpath version and the vm version. cpFile = cpFile.getBestFileForTarget(vmFile.getTarget()); final String diffFileName = vmFile.getReportName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getReportName(), vmFile .getTarget(), diffFileName, rc & FLAGS_MASK); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if ((rc & FLAG_VM_SPECIFIC) != 0) { diffVmSpecific++; } if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) { diffClasspathBugfix++; } if ((rc & FLAG_NATIVE) != 0) { diffNative++; } if ((rc & FLAG_JNODE) != 0) { diffJNode++; } // Let's compare them } } // Package diffs for (Map.Entry<String, String> entry : packageDiffs.entrySet()) { final String pkg = entry.getKey(); final String diff = entry.getValue(); final String diffFileName = pkg + ".pkgdiff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (vmSpecific > 0) { out.println("Found " + vmSpecific + " VM specific files<br/>"); log("Found " + vmSpecific + " VM specific files"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
4,548
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map<String, SourceFile> vmFiles = vmDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> classpathFiles = classpathDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs .scanJavaFiles(getProject()); final TreeSet<String> allFiles = new TreeSet<String>(); final Map<String, String> packageDiffs = new TreeMap<String, String>(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; int vmSpecific = 0; for (String name : allFiles) { SourceFile cpFile = classpathFiles.get(name); final SourceFile vmFile = vmFiles.get(name); final SourceFile vmSpecificFile = vmSpecificFiles .get(name); if (vmSpecificFile != null) { // File is found as vm specific source reportVmSpecific(out, vmSpecificFile.getReportName(), "vm-specific"); vmSpecific++; } else if (vmFile == null) { // file is not found as vmspecific source, nor as vm source if (!cpFile.isIgnoreMissing()) { reportMissing(out, cpFile.getReportName(), "classpath", getFlags(cpFile)); missingInCp++; } } else if (cpFile == null) { // File is not found in classpath sources reportMissing(out, vmFile.getReportName(), "vm", 0); missingInVm++; } else { // We have both the classpath version and the vm version. cpFile = cpFile.getBestFileForTarget(vmFile.getTarget()); final String diffFileName = vmFile.getReportName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getReportName(), vmFile .getTarget(), diffFileName, rc & FLAGS_MASK); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if ((rc & FLAG_VM_SPECIFIC) != 0) { diffVmSpecific++; } if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) { diffClasspathBugfix++; } if ((rc & FLAG_NATIVE) != 0) { diffNative++; } if ((rc & FLAG_JNODE) != 0) { diffJNode++; } // Let's compare them } } // Package diffs for (Map.Entry<String, String> entry : packageDiffs.entrySet()) { final String pkg = entry.getKey(); final String diff = entry.getValue(); final String diffFileName = pkg + ".pkgdiff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (vmSpecific > 0) { out.println("Found " + vmSpecific + " VM specific files<br/>"); log("Found " + vmSpecific + " VM specific files"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map<String, SourceFile> vmFiles = vmDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> classpathFiles = classpathDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs .scanJavaFiles(getProject()); final TreeSet<String> allFiles = new TreeSet<String>(); final Map<String, String> packageDiffs = new TreeMap<String, String>(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; int vmSpecific = 0; for (String name : allFiles) { SourceFile cpFile = classpathFiles.get(name); final SourceFile vmFile = vmFiles.get(name); final SourceFile vmSpecificFile = vmSpecificFiles .get(name); if (vmSpecificFile != null) { // File is found as vm specific source reportVmSpecific(out, vmSpecificFile.getReportName(), "vm-specific"); vmSpecific++; } else if (vmFile == null) { // file is not found as vmspecific source, nor as vm source if (!cpFile.isIgnoreMissing()) { reportMissing(out, cpFile.getReportName(), "classpath", getFlags(cpFile)); missingInCp++; } } else if (cpFile == null) { // File is not found in classpath sources reportMissing(out, vmFile.getReportName(), "vm", new Flags()); missingInVm++; } else { // We have both the classpath version and the vm version. cpFile = cpFile.getBestFileForTarget(vmFile.getTarget()); final String diffFileName = vmFile.getReportName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getReportName(), vmFile .getTarget(), diffFileName, rc & FLAGS_MASK); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if ((rc & FLAG_VM_SPECIFIC) != 0) { diffVmSpecific++; } if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) { diffClasspathBugfix++; } if ((rc & FLAG_NATIVE) != 0) { diffNative++; } if ((rc & FLAG_JNODE) != 0) { diffJNode++; } // Let's compare them } } // Package diffs for (Map.Entry<String, String> entry : packageDiffs.entrySet()) { final String pkg = entry.getKey(); final String diff = entry.getValue(); final String diffFileName = pkg + ".pkgdiff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (vmSpecific > 0) { out.println("Found " + vmSpecific + " VM specific files<br/>"); log("Found " + vmSpecific + " VM specific files"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
4,549
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map<String, SourceFile> vmFiles = vmDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> classpathFiles = classpathDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs .scanJavaFiles(getProject()); final TreeSet<String> allFiles = new TreeSet<String>(); final Map<String, String> packageDiffs = new TreeMap<String, String>(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; int vmSpecific = 0; for (String name : allFiles) { SourceFile cpFile = classpathFiles.get(name); final SourceFile vmFile = vmFiles.get(name); final SourceFile vmSpecificFile = vmSpecificFiles .get(name); if (vmSpecificFile != null) { // File is found as vm specific source reportVmSpecific(out, vmSpecificFile.getReportName(), "vm-specific"); vmSpecific++; } else if (vmFile == null) { // file is not found as vmspecific source, nor as vm source if (!cpFile.isIgnoreMissing()) { reportMissing(out, cpFile.getReportName(), "classpath", getFlags(cpFile)); missingInCp++; } } else if (cpFile == null) { // File is not found in classpath sources reportMissing(out, vmFile.getReportName(), "vm", 0); missingInVm++; } else { // We have both the classpath version and the vm version. cpFile = cpFile.getBestFileForTarget(vmFile.getTarget()); final String diffFileName = vmFile.getReportName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getReportName(), vmFile .getTarget(), diffFileName, rc & FLAGS_MASK); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if ((rc & FLAG_VM_SPECIFIC) != 0) { diffVmSpecific++; } if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) { diffClasspathBugfix++; } if ((rc & FLAG_NATIVE) != 0) { diffNative++; } if ((rc & FLAG_JNODE) != 0) { diffJNode++; } // Let's compare them } } // Package diffs for (Map.Entry<String, String> entry : packageDiffs.entrySet()) { final String pkg = entry.getKey(); final String diff = entry.getValue(); final String diffFileName = pkg + ".pkgdiff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (vmSpecific > 0) { out.println("Found " + vmSpecific + " VM specific files<br/>"); log("Found " + vmSpecific + " VM specific files"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map<String, SourceFile> vmFiles = vmDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> classpathFiles = classpathDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs .scanJavaFiles(getProject()); final TreeSet<String> allFiles = new TreeSet<String>(); final Map<String, String> packageDiffs = new TreeMap<String, String>(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; int vmSpecific = 0; for (String name : allFiles) { SourceFile cpFile = classpathFiles.get(name); final SourceFile vmFile = vmFiles.get(name); final SourceFile vmSpecificFile = vmSpecificFiles .get(name); if (vmSpecificFile != null) { // File is found as vm specific source reportVmSpecific(out, vmSpecificFile.getReportName(), "vm-specific"); vmSpecific++; } else if (vmFile == null) { // file is not found as vmspecific source, nor as vm source if (!cpFile.isIgnoreMissing()) { reportMissing(out, cpFile.getReportName(), "classpath", getFlags(cpFile)); missingInCp++; } } else if (cpFile == null) { // File is not found in classpath sources reportMissing(out, vmFile.getReportName(), "vm", 0); missingInVm++; } else { // We have both the classpath version and the vm version. cpFile = cpFile.getBestFileForTarget(vmFile.getTarget()); final String diffFileName = vmFile.getReportName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getReportName(), vmFile .getTarget(), diffFileName, rc & FLAGS_MASK); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if ((rc & FLAG_VM_SPECIFIC) != 0) { diffVmSpecific++; } if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) { diffClasspathBugfix++; } if ((rc & FLAG_NATIVE) != 0) { diffNative++; } if ((rc & FLAG_JNODE) != 0) { diffJNode++; } // Let's compare them } } // Package diffs for (Map.Entry<String, String> entry : packageDiffs.entrySet()) { final String pkg = entry.getKey(); final String diff = entry.getValue(); final String diffFileName = pkg + ".pkgdiff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (vmSpecific > 0) { out.println("Found " + vmSpecific + " VM specific files<br/>"); log("Found " + vmSpecific + " VM specific files"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
4,550
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map<String, SourceFile> vmFiles = vmDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> classpathFiles = classpathDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs .scanJavaFiles(getProject()); final TreeSet<String> allFiles = new TreeSet<String>(); final Map<String, String> packageDiffs = new TreeMap<String, String>(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; int vmSpecific = 0; for (String name : allFiles) { SourceFile cpFile = classpathFiles.get(name); final SourceFile vmFile = vmFiles.get(name); final SourceFile vmSpecificFile = vmSpecificFiles .get(name); if (vmSpecificFile != null) { // File is found as vm specific source reportVmSpecific(out, vmSpecificFile.getReportName(), "vm-specific"); vmSpecific++; } else if (vmFile == null) { // file is not found as vmspecific source, nor as vm source if (!cpFile.isIgnoreMissing()) { reportMissing(out, cpFile.getReportName(), "classpath", getFlags(cpFile)); missingInCp++; } } else if (cpFile == null) { // File is not found in classpath sources reportMissing(out, vmFile.getReportName(), "vm", 0); missingInVm++; } else { // We have both the classpath version and the vm version. cpFile = cpFile.getBestFileForTarget(vmFile.getTarget()); final String diffFileName = vmFile.getReportName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getReportName(), vmFile .getTarget(), diffFileName, rc & FLAGS_MASK); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if ((rc & FLAG_VM_SPECIFIC) != 0) { diffVmSpecific++; } if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) { diffClasspathBugfix++; } if ((rc & FLAG_NATIVE) != 0) { diffNative++; } if ((rc & FLAG_JNODE) != 0) { diffJNode++; } // Let's compare them } } // Package diffs for (Map.Entry<String, String> entry : packageDiffs.entrySet()) { final String pkg = entry.getKey(); final String diff = entry.getValue(); final String diffFileName = pkg + ".pkgdiff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (vmSpecific > 0) { out.println("Found " + vmSpecific + " VM specific files<br/>"); log("Found " + vmSpecific + " VM specific files"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map<String, SourceFile> vmFiles = vmDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> classpathFiles = classpathDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs .scanJavaFiles(getProject()); final TreeSet<String> allFiles = new TreeSet<String>(); final Map<String, String> packageDiffs = new TreeMap<String, String>(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; int vmSpecific = 0; for (String name : allFiles) { SourceFile cpFile = classpathFiles.get(name); final SourceFile vmFile = vmFiles.get(name); final SourceFile vmSpecificFile = vmSpecificFiles .get(name); if (vmSpecificFile != null) { // File is found as vm specific source reportVmSpecific(out, vmSpecificFile.getReportName(), "vm-specific"); vmSpecific++; } else if (vmFile == null) { // file is not found as vmspecific source, nor as vm source if (!cpFile.isIgnoreMissing()) { reportMissing(out, cpFile.getReportName(), "classpath", getFlags(cpFile)); missingInCp++; } } else if (cpFile == null) { // File is not found in classpath sources reportMissing(out, vmFile.getReportName(), "vm", 0); missingInVm++; } else { // We have both the classpath version and the vm version. cpFile = cpFile.getBestFileForTarget(vmFile.getTarget()); final String diffFileName = vmFile.getReportName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getReportName(), vmFile .getTarget(), diffFileName, rc.mask(FLAGS_MASK)); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if ((rc & FLAG_VM_SPECIFIC) != 0) { diffVmSpecific++; } if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) { diffClasspathBugfix++; } if ((rc & FLAG_NATIVE) != 0) { diffNative++; } if ((rc & FLAG_JNODE) != 0) { diffJNode++; } // Let's compare them } } // Package diffs for (Map.Entry<String, String> entry : packageDiffs.entrySet()) { final String pkg = entry.getKey(); final String diff = entry.getValue(); final String diffFileName = pkg + ".pkgdiff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (vmSpecific > 0) { out.println("Found " + vmSpecific + " VM specific files<br/>"); log("Found " + vmSpecific + " VM specific files"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
4,551
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map<String, SourceFile> vmFiles = vmDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> classpathFiles = classpathDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs .scanJavaFiles(getProject()); final TreeSet<String> allFiles = new TreeSet<String>(); final Map<String, String> packageDiffs = new TreeMap<String, String>(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; int vmSpecific = 0; for (String name : allFiles) { SourceFile cpFile = classpathFiles.get(name); final SourceFile vmFile = vmFiles.get(name); final SourceFile vmSpecificFile = vmSpecificFiles .get(name); if (vmSpecificFile != null) { // File is found as vm specific source reportVmSpecific(out, vmSpecificFile.getReportName(), "vm-specific"); vmSpecific++; } else if (vmFile == null) { // file is not found as vmspecific source, nor as vm source if (!cpFile.isIgnoreMissing()) { reportMissing(out, cpFile.getReportName(), "classpath", getFlags(cpFile)); missingInCp++; } } else if (cpFile == null) { // File is not found in classpath sources reportMissing(out, vmFile.getReportName(), "vm", 0); missingInVm++; } else { // We have both the classpath version and the vm version. cpFile = cpFile.getBestFileForTarget(vmFile.getTarget()); final String diffFileName = vmFile.getReportName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getReportName(), vmFile .getTarget(), diffFileName, rc & FLAGS_MASK); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if ((rc & FLAG_VM_SPECIFIC) != 0) { diffVmSpecific++; } if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) { diffClasspathBugfix++; } if ((rc & FLAG_NATIVE) != 0) { diffNative++; } if ((rc & FLAG_JNODE) != 0) { diffJNode++; } // Let's compare them } } // Package diffs for (Map.Entry<String, String> entry : packageDiffs.entrySet()) { final String pkg = entry.getKey(); final String diff = entry.getValue(); final String diffFileName = pkg + ".pkgdiff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (vmSpecific > 0) { out.println("Found " + vmSpecific + " VM specific files<br/>"); log("Found " + vmSpecific + " VM specific files"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map<String, SourceFile> vmFiles = vmDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> classpathFiles = classpathDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs .scanJavaFiles(getProject()); final TreeSet<String> allFiles = new TreeSet<String>(); final Map<String, String> packageDiffs = new TreeMap<String, String>(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; int vmSpecific = 0; for (String name : allFiles) { SourceFile cpFile = classpathFiles.get(name); final SourceFile vmFile = vmFiles.get(name); final SourceFile vmSpecificFile = vmSpecificFiles .get(name); if (vmSpecificFile != null) { // File is found as vm specific source reportVmSpecific(out, vmSpecificFile.getReportName(), "vm-specific"); vmSpecific++; } else if (vmFile == null) { // file is not found as vmspecific source, nor as vm source if (!cpFile.isIgnoreMissing()) { reportMissing(out, cpFile.getReportName(), "classpath", getFlags(cpFile)); missingInCp++; } } else if (cpFile == null) { // File is not found in classpath sources reportMissing(out, vmFile.getReportName(), "vm", 0); missingInVm++; } else { // We have both the classpath version and the vm version. cpFile = cpFile.getBestFileForTarget(vmFile.getTarget()); final String diffFileName = vmFile.getReportName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getReportName(), vmFile .getTarget(), diffFileName, rc & FLAGS_MASK); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if (rc.isSet(FLAG_VM_SPECIFIC)) { diffVmSpecific++; } if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) { diffClasspathBugfix++; } if ((rc & FLAG_NATIVE) != 0) { diffNative++; } if ((rc & FLAG_JNODE) != 0) { diffJNode++; } // Let's compare them } } // Package diffs for (Map.Entry<String, String> entry : packageDiffs.entrySet()) { final String pkg = entry.getKey(); final String diff = entry.getValue(); final String diffFileName = pkg + ".pkgdiff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (vmSpecific > 0) { out.println("Found " + vmSpecific + " VM specific files<br/>"); log("Found " + vmSpecific + " VM specific files"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
4,552
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map<String, SourceFile> vmFiles = vmDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> classpathFiles = classpathDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs .scanJavaFiles(getProject()); final TreeSet<String> allFiles = new TreeSet<String>(); final Map<String, String> packageDiffs = new TreeMap<String, String>(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; int vmSpecific = 0; for (String name : allFiles) { SourceFile cpFile = classpathFiles.get(name); final SourceFile vmFile = vmFiles.get(name); final SourceFile vmSpecificFile = vmSpecificFiles .get(name); if (vmSpecificFile != null) { // File is found as vm specific source reportVmSpecific(out, vmSpecificFile.getReportName(), "vm-specific"); vmSpecific++; } else if (vmFile == null) { // file is not found as vmspecific source, nor as vm source if (!cpFile.isIgnoreMissing()) { reportMissing(out, cpFile.getReportName(), "classpath", getFlags(cpFile)); missingInCp++; } } else if (cpFile == null) { // File is not found in classpath sources reportMissing(out, vmFile.getReportName(), "vm", 0); missingInVm++; } else { // We have both the classpath version and the vm version. cpFile = cpFile.getBestFileForTarget(vmFile.getTarget()); final String diffFileName = vmFile.getReportName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getReportName(), vmFile .getTarget(), diffFileName, rc & FLAGS_MASK); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if ((rc & FLAG_VM_SPECIFIC) != 0) { diffVmSpecific++; } if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) { diffClasspathBugfix++; } if ((rc & FLAG_NATIVE) != 0) { diffNative++; } if ((rc & FLAG_JNODE) != 0) { diffJNode++; } // Let's compare them } } // Package diffs for (Map.Entry<String, String> entry : packageDiffs.entrySet()) { final String pkg = entry.getKey(); final String diff = entry.getValue(); final String diffFileName = pkg + ".pkgdiff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (vmSpecific > 0) { out.println("Found " + vmSpecific + " VM specific files<br/>"); log("Found " + vmSpecific + " VM specific files"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map<String, SourceFile> vmFiles = vmDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> classpathFiles = classpathDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs .scanJavaFiles(getProject()); final TreeSet<String> allFiles = new TreeSet<String>(); final Map<String, String> packageDiffs = new TreeMap<String, String>(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; int vmSpecific = 0; for (String name : allFiles) { SourceFile cpFile = classpathFiles.get(name); final SourceFile vmFile = vmFiles.get(name); final SourceFile vmSpecificFile = vmSpecificFiles .get(name); if (vmSpecificFile != null) { // File is found as vm specific source reportVmSpecific(out, vmSpecificFile.getReportName(), "vm-specific"); vmSpecific++; } else if (vmFile == null) { // file is not found as vmspecific source, nor as vm source if (!cpFile.isIgnoreMissing()) { reportMissing(out, cpFile.getReportName(), "classpath", getFlags(cpFile)); missingInCp++; } } else if (cpFile == null) { // File is not found in classpath sources reportMissing(out, vmFile.getReportName(), "vm", 0); missingInVm++; } else { // We have both the classpath version and the vm version. cpFile = cpFile.getBestFileForTarget(vmFile.getTarget()); final String diffFileName = vmFile.getReportName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getReportName(), vmFile .getTarget(), diffFileName, rc & FLAGS_MASK); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if ((rc & FLAG_VM_SPECIFIC) != 0) { diffVmSpecific++; } if (rc.isSet(FLAG_CLASSPATH_BUGFIX)) { diffClasspathBugfix++; } if ((rc & FLAG_NATIVE) != 0) { diffNative++; } if ((rc & FLAG_JNODE) != 0) { diffJNode++; } // Let's compare them } } // Package diffs for (Map.Entry<String, String> entry : packageDiffs.entrySet()) { final String pkg = entry.getKey(); final String diff = entry.getValue(); final String diffFileName = pkg + ".pkgdiff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (vmSpecific > 0) { out.println("Found " + vmSpecific + " VM specific files<br/>"); log("Found " + vmSpecific + " VM specific files"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
4,553
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map<String, SourceFile> vmFiles = vmDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> classpathFiles = classpathDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs .scanJavaFiles(getProject()); final TreeSet<String> allFiles = new TreeSet<String>(); final Map<String, String> packageDiffs = new TreeMap<String, String>(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; int vmSpecific = 0; for (String name : allFiles) { SourceFile cpFile = classpathFiles.get(name); final SourceFile vmFile = vmFiles.get(name); final SourceFile vmSpecificFile = vmSpecificFiles .get(name); if (vmSpecificFile != null) { // File is found as vm specific source reportVmSpecific(out, vmSpecificFile.getReportName(), "vm-specific"); vmSpecific++; } else if (vmFile == null) { // file is not found as vmspecific source, nor as vm source if (!cpFile.isIgnoreMissing()) { reportMissing(out, cpFile.getReportName(), "classpath", getFlags(cpFile)); missingInCp++; } } else if (cpFile == null) { // File is not found in classpath sources reportMissing(out, vmFile.getReportName(), "vm", 0); missingInVm++; } else { // We have both the classpath version and the vm version. cpFile = cpFile.getBestFileForTarget(vmFile.getTarget()); final String diffFileName = vmFile.getReportName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getReportName(), vmFile .getTarget(), diffFileName, rc & FLAGS_MASK); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if ((rc & FLAG_VM_SPECIFIC) != 0) { diffVmSpecific++; } if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) { diffClasspathBugfix++; } if ((rc & FLAG_NATIVE) != 0) { diffNative++; } if ((rc & FLAG_JNODE) != 0) { diffJNode++; } // Let's compare them } } // Package diffs for (Map.Entry<String, String> entry : packageDiffs.entrySet()) { final String pkg = entry.getKey(); final String diff = entry.getValue(); final String diffFileName = pkg + ".pkgdiff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (vmSpecific > 0) { out.println("Found " + vmSpecific + " VM specific files<br/>"); log("Found " + vmSpecific + " VM specific files"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map<String, SourceFile> vmFiles = vmDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> classpathFiles = classpathDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs .scanJavaFiles(getProject()); final TreeSet<String> allFiles = new TreeSet<String>(); final Map<String, String> packageDiffs = new TreeMap<String, String>(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; int vmSpecific = 0; for (String name : allFiles) { SourceFile cpFile = classpathFiles.get(name); final SourceFile vmFile = vmFiles.get(name); final SourceFile vmSpecificFile = vmSpecificFiles .get(name); if (vmSpecificFile != null) { // File is found as vm specific source reportVmSpecific(out, vmSpecificFile.getReportName(), "vm-specific"); vmSpecific++; } else if (vmFile == null) { // file is not found as vmspecific source, nor as vm source if (!cpFile.isIgnoreMissing()) { reportMissing(out, cpFile.getReportName(), "classpath", getFlags(cpFile)); missingInCp++; } } else if (cpFile == null) { // File is not found in classpath sources reportMissing(out, vmFile.getReportName(), "vm", 0); missingInVm++; } else { // We have both the classpath version and the vm version. cpFile = cpFile.getBestFileForTarget(vmFile.getTarget()); final String diffFileName = vmFile.getReportName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getReportName(), vmFile .getTarget(), diffFileName, rc & FLAGS_MASK); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if ((rc & FLAG_VM_SPECIFIC) != 0) { diffVmSpecific++; } if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) { diffClasspathBugfix++; } if (rc.isSet(FLAG_NATIVE)) { diffNative++; } if ((rc & FLAG_JNODE) != 0) { diffJNode++; } // Let's compare them } } // Package diffs for (Map.Entry<String, String> entry : packageDiffs.entrySet()) { final String pkg = entry.getKey(); final String diff = entry.getValue(); final String diffFileName = pkg + ".pkgdiff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (vmSpecific > 0) { out.println("Found " + vmSpecific + " VM specific files<br/>"); log("Found " + vmSpecific + " VM specific files"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
4,554
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map<String, SourceFile> vmFiles = vmDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> classpathFiles = classpathDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs .scanJavaFiles(getProject()); final TreeSet<String> allFiles = new TreeSet<String>(); final Map<String, String> packageDiffs = new TreeMap<String, String>(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; int vmSpecific = 0; for (String name : allFiles) { SourceFile cpFile = classpathFiles.get(name); final SourceFile vmFile = vmFiles.get(name); final SourceFile vmSpecificFile = vmSpecificFiles .get(name); if (vmSpecificFile != null) { // File is found as vm specific source reportVmSpecific(out, vmSpecificFile.getReportName(), "vm-specific"); vmSpecific++; } else if (vmFile == null) { // file is not found as vmspecific source, nor as vm source if (!cpFile.isIgnoreMissing()) { reportMissing(out, cpFile.getReportName(), "classpath", getFlags(cpFile)); missingInCp++; } } else if (cpFile == null) { // File is not found in classpath sources reportMissing(out, vmFile.getReportName(), "vm", 0); missingInVm++; } else { // We have both the classpath version and the vm version. cpFile = cpFile.getBestFileForTarget(vmFile.getTarget()); final String diffFileName = vmFile.getReportName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getReportName(), vmFile .getTarget(), diffFileName, rc & FLAGS_MASK); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if ((rc & FLAG_VM_SPECIFIC) != 0) { diffVmSpecific++; } if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) { diffClasspathBugfix++; } if ((rc & FLAG_NATIVE) != 0) { diffNative++; } if ((rc & FLAG_JNODE) != 0) { diffJNode++; } // Let's compare them } } // Package diffs for (Map.Entry<String, String> entry : packageDiffs.entrySet()) { final String pkg = entry.getKey(); final String diff = entry.getValue(); final String diffFileName = pkg + ".pkgdiff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (vmSpecific > 0) { out.println("Found " + vmSpecific + " VM specific files<br/>"); log("Found " + vmSpecific + " VM specific files"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map<String, SourceFile> vmFiles = vmDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> classpathFiles = classpathDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs .scanJavaFiles(getProject()); final TreeSet<String> allFiles = new TreeSet<String>(); final Map<String, String> packageDiffs = new TreeMap<String, String>(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; int vmSpecific = 0; for (String name : allFiles) { SourceFile cpFile = classpathFiles.get(name); final SourceFile vmFile = vmFiles.get(name); final SourceFile vmSpecificFile = vmSpecificFiles .get(name); if (vmSpecificFile != null) { // File is found as vm specific source reportVmSpecific(out, vmSpecificFile.getReportName(), "vm-specific"); vmSpecific++; } else if (vmFile == null) { // file is not found as vmspecific source, nor as vm source if (!cpFile.isIgnoreMissing()) { reportMissing(out, cpFile.getReportName(), "classpath", getFlags(cpFile)); missingInCp++; } } else if (cpFile == null) { // File is not found in classpath sources reportMissing(out, vmFile.getReportName(), "vm", 0); missingInVm++; } else { // We have both the classpath version and the vm version. cpFile = cpFile.getBestFileForTarget(vmFile.getTarget()); final String diffFileName = vmFile.getReportName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getReportName(), vmFile .getTarget(), diffFileName, rc & FLAGS_MASK); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if ((rc & FLAG_VM_SPECIFIC) != 0) { diffVmSpecific++; } if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) { diffClasspathBugfix++; } if ((rc & FLAG_NATIVE) != 0) { diffNative++; } if (rc.isSet(FLAG_JNODE)) { diffJNode++; } // Let's compare them } } // Package diffs for (Map.Entry<String, String> entry : packageDiffs.entrySet()) { final String pkg = entry.getKey(); final String diff = entry.getValue(); final String diffFileName = pkg + ".pkgdiff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (vmSpecific > 0) { out.println("Found " + vmSpecific + " VM specific files<br/>"); log("Found " + vmSpecific + " VM specific files"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
4,555
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map<String, SourceFile> vmFiles = vmDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> classpathFiles = classpathDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs .scanJavaFiles(getProject()); final TreeSet<String> allFiles = new TreeSet<String>(); final Map<String, String> packageDiffs = new TreeMap<String, String>(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; int vmSpecific = 0; for (String name : allFiles) { SourceFile cpFile = classpathFiles.get(name); final SourceFile vmFile = vmFiles.get(name); final SourceFile vmSpecificFile = vmSpecificFiles .get(name); if (vmSpecificFile != null) { // File is found as vm specific source reportVmSpecific(out, vmSpecificFile.getReportName(), "vm-specific"); vmSpecific++; } else if (vmFile == null) { // file is not found as vmspecific source, nor as vm source if (!cpFile.isIgnoreMissing()) { reportMissing(out, cpFile.getReportName(), "classpath", getFlags(cpFile)); missingInCp++; } } else if (cpFile == null) { // File is not found in classpath sources reportMissing(out, vmFile.getReportName(), "vm", 0); missingInVm++; } else { // We have both the classpath version and the vm version. cpFile = cpFile.getBestFileForTarget(vmFile.getTarget()); final String diffFileName = vmFile.getReportName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getReportName(), vmFile .getTarget(), diffFileName, rc & FLAGS_MASK); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if ((rc & FLAG_VM_SPECIFIC) != 0) { diffVmSpecific++; } if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) { diffClasspathBugfix++; } if ((rc & FLAG_NATIVE) != 0) { diffNative++; } if ((rc & FLAG_JNODE) != 0) { diffJNode++; } // Let's compare them } } // Package diffs for (Map.Entry<String, String> entry : packageDiffs.entrySet()) { final String pkg = entry.getKey(); final String diff = entry.getValue(); final String diffFileName = pkg + ".pkgdiff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (vmSpecific > 0) { out.println("Found " + vmSpecific + " VM specific files<br/>"); log("Found " + vmSpecific + " VM specific files"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local classpath bugfixes<br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
public void execute() { if (destDir == null) { throw new BuildException("The destdir attribute must be set"); } final Map<String, SourceFile> vmFiles = vmDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> classpathFiles = classpathDirs .scanJavaFiles(getProject()); final Map<String, SourceFile> vmSpecificFiles = vmSpecificDirs .scanJavaFiles(getProject()); final TreeSet<String> allFiles = new TreeSet<String>(); final Map<String, String> packageDiffs = new TreeMap<String, String>(); allFiles.addAll(vmFiles.keySet()); allFiles.addAll(classpathFiles.keySet()); try { destDir.mkdirs(); final File outFile = new File(destDir, "classpath-compare.html"); final PrintWriter out = new PrintWriter(new FileWriter(outFile)); reportHeader(out); int missingInCp = 0; int missingInVm = 0; int needsMerge = 0; int diffVmSpecific = 0; int diffClasspathBugfix = 0; int diffNative = 0; int diffJNode = 0; int vmSpecific = 0; for (String name : allFiles) { SourceFile cpFile = classpathFiles.get(name); final SourceFile vmFile = vmFiles.get(name); final SourceFile vmSpecificFile = vmSpecificFiles .get(name); if (vmSpecificFile != null) { // File is found as vm specific source reportVmSpecific(out, vmSpecificFile.getReportName(), "vm-specific"); vmSpecific++; } else if (vmFile == null) { // file is not found as vmspecific source, nor as vm source if (!cpFile.isIgnoreMissing()) { reportMissing(out, cpFile.getReportName(), "classpath", getFlags(cpFile)); missingInCp++; } } else if (cpFile == null) { // File is not found in classpath sources reportMissing(out, vmFile.getReportName(), "vm", 0); missingInVm++; } else { // We have both the classpath version and the vm version. cpFile = cpFile.getBestFileForTarget(vmFile.getTarget()); final String diffFileName = vmFile.getReportName() + ".diff"; int rc = runDiff(vmFile, cpFile, diffFileName, packageDiffs); switch (rc & ~FLAGS_MASK) { case NO_CHANGE: break; case NEEDS_MERGE: reportNeedsMerge(out, vmFile.getReportName(), vmFile .getTarget(), diffFileName, rc & FLAGS_MASK); needsMerge++; break; default: throw new RuntimeException("Invalid rc " + rc); } if ((rc & FLAG_VM_SPECIFIC) != 0) { diffVmSpecific++; } if ((rc & FLAG_CLASSPATH_BUGFIX) != 0) { diffClasspathBugfix++; } if ((rc & FLAG_NATIVE) != 0) { diffNative++; } if ((rc & FLAG_JNODE) != 0) { diffJNode++; } // Let's compare them } } // Package diffs for (Map.Entry<String, String> entry : packageDiffs.entrySet()) { final String pkg = entry.getKey(); final String diff = entry.getValue(); final String diffFileName = pkg + ".pkgdiff"; processPackageDiff(diffFileName, pkg, diff); reportPackageDiff(out, pkg, diffFileName, getFlags(diff)); } out.println("</table><p/>"); // Summary out.println("<a name='summary'/><h2>Summary</h2>"); if (missingInCp > 0) { out.println("Found " + missingInCp + " files missing in classpath</br>"); log("Found " + missingInCp + " files missing in classpath"); } if (missingInVm > 0) { out.println("Found " + missingInVm + " files missing in vm<br/>"); log("Found " + missingInVm + " files missing in vm"); } if (needsMerge > 0) { out.println("Found " + needsMerge + " files that needs merging<br/>"); log("Found " + needsMerge + " files that needs merging"); } if (diffVmSpecific > 0) { out.println("Found " + diffVmSpecific + " VM specific differences<br/>"); log("Found " + diffVmSpecific + " VM specific differences"); } if (vmSpecific > 0) { out.println("Found " + vmSpecific + " VM specific files<br/>"); log("Found " + vmSpecific + " VM specific files"); } if (diffClasspathBugfix > 0) { out.println("Found " + diffClasspathBugfix + " local <a href=\"classpath-bugfix.html\">classpath bugfixes</a><br/>"); log("Found " + diffClasspathBugfix + " local classpath bugfixes"); } if (diffNative > 0) { out.println("Found " + diffNative + " changes with native in it<br/>"); log("Found " + diffNative + " changes with native in it"); } if (diffJNode > 0) { out.println("Found " + diffJNode + " changes with JNode in it<br/>"); log("Found " + diffJNode + " changes with JNode in it"); } reportFooter(out); out.flush(); out.close(); } catch (IOException ex) { throw new BuildException(ex); } catch (InterruptedException ex) { throw new BuildException(ex); } }
4,557
protected int getFlags(String code) { int flags = 0; if (code.indexOf("native") >= 0) { flags |= FLAG_NATIVE; } if (code.toLowerCase().indexOf("jnode") >= 0) { flags |= FLAG_JNODE; } if (code.indexOf(vmSpecificTag) >= 0) { flags |= FLAG_VM_SPECIFIC; } if (code.indexOf(classpathBugfixTag) >= 0) { flags |= FLAG_CLASSPATH_BUGFIX; } return flags; }
protected int getFlags(String code) { int flags = 0; if (code.indexOf("native") >= 0) { flags |= FLAG_NATIVE; } if (code.toLowerCase().indexOf("jnode") >= 0) { flags |= FLAG_JNODE; } if (code.indexOf(vmSpecificTag) >= 0) { flags |= FLAG_VM_SPECIFIC; } if (code.indexOf(classpathBugfixTag) >= 0) { flags |= FLAG_CLASSPATH_BUGFIX; } return flags; }
4,559
protected void reportFlags(PrintWriter out, int flags) { final StringBuffer b = new StringBuffer(); if ((flags & FLAG_TARGET_DIFF) != 0) { if (b.length() > 0) { b.append(", "); } b.append("different target"); } if ((flags & FLAG_VM_SPECIFIC) != 0) { if (b.length() > 0) { b.append(", "); } b.append("vm-specific"); } if ((flags & FLAG_CLASSPATH_BUGFIX) != 0) { if (b.length() > 0) { b.append(", "); } b.append("cp-bugfix"); } if ((flags & FLAG_NATIVE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("native"); } if ((flags & FLAG_JNODE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("jnode"); } if (b.length() > 0) { out.println(" <i>("); out.println(b.toString()); out.println(")</i>"); } }
protected void reportFlags(PrintWriter out, Flags flags) { final StringBuffer b = new StringBuffer(); if ((flags & FLAG_TARGET_DIFF) != 0) { if (b.length() > 0) { b.append(", "); } b.append("different target"); } if ((flags & FLAG_VM_SPECIFIC) != 0) { if (b.length() > 0) { b.append(", "); } b.append("vm-specific"); } if ((flags & FLAG_CLASSPATH_BUGFIX) != 0) { if (b.length() > 0) { b.append(", "); } b.append("cp-bugfix"); } if ((flags & FLAG_NATIVE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("native"); } if ((flags & FLAG_JNODE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("jnode"); } if (b.length() > 0) { out.println(" <i>("); out.println(b.toString()); out.println(")</i>"); } }
4,560
protected void reportFlags(PrintWriter out, int flags) { final StringBuffer b = new StringBuffer(); if ((flags & FLAG_TARGET_DIFF) != 0) { if (b.length() > 0) { b.append(", "); } b.append("different target"); } if ((flags & FLAG_VM_SPECIFIC) != 0) { if (b.length() > 0) { b.append(", "); } b.append("vm-specific"); } if ((flags & FLAG_CLASSPATH_BUGFIX) != 0) { if (b.length() > 0) { b.append(", "); } b.append("cp-bugfix"); } if ((flags & FLAG_NATIVE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("native"); } if ((flags & FLAG_JNODE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("jnode"); } if (b.length() > 0) { out.println(" <i>("); out.println(b.toString()); out.println(")</i>"); } }
protected void reportFlags(PrintWriter out, int flags) { final StringBuffer b = new StringBuffer(); if (flags.isSet(FLAG_TARGET_DIFF)) { if (b.length() > 0) { b.append(", "); } b.append("different target"); } if ((flags & FLAG_VM_SPECIFIC) != 0) { if (b.length() > 0) { b.append(", "); } b.append("vm-specific"); } if ((flags & FLAG_CLASSPATH_BUGFIX) != 0) { if (b.length() > 0) { b.append(", "); } b.append("cp-bugfix"); } if ((flags & FLAG_NATIVE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("native"); } if ((flags & FLAG_JNODE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("jnode"); } if (b.length() > 0) { out.println(" <i>("); out.println(b.toString()); out.println(")</i>"); } }
4,561
protected void reportFlags(PrintWriter out, int flags) { final StringBuffer b = new StringBuffer(); if ((flags & FLAG_TARGET_DIFF) != 0) { if (b.length() > 0) { b.append(", "); } b.append("different target"); } if ((flags & FLAG_VM_SPECIFIC) != 0) { if (b.length() > 0) { b.append(", "); } b.append("vm-specific"); } if ((flags & FLAG_CLASSPATH_BUGFIX) != 0) { if (b.length() > 0) { b.append(", "); } b.append("cp-bugfix"); } if ((flags & FLAG_NATIVE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("native"); } if ((flags & FLAG_JNODE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("jnode"); } if (b.length() > 0) { out.println(" <i>("); out.println(b.toString()); out.println(")</i>"); } }
protected void reportFlags(PrintWriter out, int flags) { final StringBuffer b = new StringBuffer(); if ((flags & FLAG_TARGET_DIFF) != 0) { if (b.length() > 0) { b.append(", "); } b.append("different target"); } if (flags.isSet(FLAG_VM_SPECIFIC)) { if (b.length() > 0) { b.append(", "); } b.append("vm-specific"); } if ((flags & FLAG_CLASSPATH_BUGFIX) != 0) { if (b.length() > 0) { b.append(", "); } b.append("cp-bugfix"); } if ((flags & FLAG_NATIVE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("native"); } if ((flags & FLAG_JNODE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("jnode"); } if (b.length() > 0) { out.println(" <i>("); out.println(b.toString()); out.println(")</i>"); } }
4,562
protected void reportFlags(PrintWriter out, int flags) { final StringBuffer b = new StringBuffer(); if ((flags & FLAG_TARGET_DIFF) != 0) { if (b.length() > 0) { b.append(", "); } b.append("different target"); } if ((flags & FLAG_VM_SPECIFIC) != 0) { if (b.length() > 0) { b.append(", "); } b.append("vm-specific"); } if ((flags & FLAG_CLASSPATH_BUGFIX) != 0) { if (b.length() > 0) { b.append(", "); } b.append("cp-bugfix"); } if ((flags & FLAG_NATIVE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("native"); } if ((flags & FLAG_JNODE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("jnode"); } if (b.length() > 0) { out.println(" <i>("); out.println(b.toString()); out.println(")</i>"); } }
protected void reportFlags(PrintWriter out, int flags) { final StringBuffer b = new StringBuffer(); if ((flags & FLAG_TARGET_DIFF) != 0) { if (b.length() > 0) { b.append(", "); } b.append("different target"); } if ((flags & FLAG_VM_SPECIFIC) != 0) { if (b.length() > 0) { b.append(", "); } b.append("vm-specific"); } if (flags.isSet(FLAG_CLASSPATH_BUGFIX)) { if (b.length() > 0) { b.append(", "); } b.append("cp-bugfix"); } if ((flags & FLAG_NATIVE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("native"); } if ((flags & FLAG_JNODE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("jnode"); } if (b.length() > 0) { out.println(" <i>("); out.println(b.toString()); out.println(")</i>"); } }
4,563
protected void reportFlags(PrintWriter out, int flags) { final StringBuffer b = new StringBuffer(); if ((flags & FLAG_TARGET_DIFF) != 0) { if (b.length() > 0) { b.append(", "); } b.append("different target"); } if ((flags & FLAG_VM_SPECIFIC) != 0) { if (b.length() > 0) { b.append(", "); } b.append("vm-specific"); } if ((flags & FLAG_CLASSPATH_BUGFIX) != 0) { if (b.length() > 0) { b.append(", "); } b.append("cp-bugfix"); } if ((flags & FLAG_NATIVE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("native"); } if ((flags & FLAG_JNODE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("jnode"); } if (b.length() > 0) { out.println(" <i>("); out.println(b.toString()); out.println(")</i>"); } }
protected void reportFlags(PrintWriter out, int flags) { final StringBuffer b = new StringBuffer(); if ((flags & FLAG_TARGET_DIFF) != 0) { if (b.length() > 0) { b.append(", "); } b.append("different target"); } if ((flags & FLAG_VM_SPECIFIC) != 0) { if (b.length() > 0) { b.append(", "); } b.append("vm-specific"); } if ((flags & FLAG_CLASSPATH_BUGFIX) != 0) { if (b.length() > 0) { b.append(", "); } b.append("cp-bugfix"); } if (flags.isSet(FLAG_NATIVE)) { if (b.length() > 0) { b.append(", "); } b.append("native"); } if ((flags & FLAG_JNODE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("jnode"); } if (b.length() > 0) { out.println(" <i>("); out.println(b.toString()); out.println(")</i>"); } }
4,564
protected void reportFlags(PrintWriter out, int flags) { final StringBuffer b = new StringBuffer(); if ((flags & FLAG_TARGET_DIFF) != 0) { if (b.length() > 0) { b.append(", "); } b.append("different target"); } if ((flags & FLAG_VM_SPECIFIC) != 0) { if (b.length() > 0) { b.append(", "); } b.append("vm-specific"); } if ((flags & FLAG_CLASSPATH_BUGFIX) != 0) { if (b.length() > 0) { b.append(", "); } b.append("cp-bugfix"); } if ((flags & FLAG_NATIVE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("native"); } if ((flags & FLAG_JNODE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("jnode"); } if (b.length() > 0) { out.println(" <i>("); out.println(b.toString()); out.println(")</i>"); } }
protected void reportFlags(PrintWriter out, int flags) { final StringBuffer b = new StringBuffer(); if ((flags & FLAG_TARGET_DIFF) != 0) { if (b.length() > 0) { b.append(", "); } b.append("different target"); } if ((flags & FLAG_VM_SPECIFIC) != 0) { if (b.length() > 0) { b.append(", "); } b.append("vm-specific"); } if ((flags & FLAG_CLASSPATH_BUGFIX) != 0) { if (b.length() > 0) { b.append(", "); } b.append("cp-bugfix"); } if ((flags & FLAG_NATIVE) != 0) { if (b.length() > 0) { b.append(", "); } b.append("native"); } if (flags.isSet(FLAG_JNODE)) { if (b.length() > 0) { b.append(", "); } b.append("jnode"); } if (b.length() > 0) { out.println(" <i>("); out.println(b.toString()); out.println(")</i>"); } }
4,565
protected void reportHeader(PrintWriter out) { out.println("<html>"); out.println("<title>Classpath compare</title>"); out.println("<style type='text/css'>"); out.println(".classpath-only { background-color: #FFFFAA; }"); out.println(".vm-only { background-color: #CCCCFF; }"); out.println(".needsmerge { background-color: #FF9090; }"); out.println(".vm-specific { background-color: #119911; }"); out.println(".vm-specific-source { background-color: #22FF22; }"); out.println(".classpath-bugfix { background-color: #CCFFCC; }"); out.println("</style>"); out.println("<body>"); out.println("<h1>Classpath compare results</h1>"); out.println("Created at " + new Date()); out.println("<table border='1' width='100%' style='border: solid 1'>"); out.println("<tr>"); out.println("<th align='left'>Class</th>"); out.println("<th align='left'>Target</th>"); out.println("<th align='left'>Merge status</th>"); out.println("</tr>"); out.flush(); }
protected void reportHeader(PrintWriter out, String... headers) { out.println("<html>"); out.println("<title>Classpath compare</title>"); out.println("<style type='text/css'>"); out.println(".classpath-only { background-color: #FFFFAA; }"); out.println(".vm-only { background-color: #CCCCFF; }"); out.println(".needsmerge { background-color: #FF9090; }"); out.println(".vm-specific { background-color: #119911; }"); out.println(".vm-specific-source { background-color: #22FF22; }"); out.println(".classpath-bugfix { background-color: #CCFFCC; }"); out.println("</style>"); out.println("<body>"); out.println("<h1>Classpath compare results</h1>"); out.println("Created at " + new Date()); out.println("<table border='1' width='100%' style='border: solid 1'>"); out.println("<tr>"); out.println("<th align='left'>Class</th>"); out.println("<th align='left'>Target</th>"); out.println("<th align='left'>Merge status</th>"); out.println("</tr>"); out.flush(); }
4,566
protected void reportHeader(PrintWriter out) { out.println("<html>"); out.println("<title>Classpath compare</title>"); out.println("<style type='text/css'>"); out.println(".classpath-only { background-color: #FFFFAA; }"); out.println(".vm-only { background-color: #CCCCFF; }"); out.println(".needsmerge { background-color: #FF9090; }"); out.println(".vm-specific { background-color: #119911; }"); out.println(".vm-specific-source { background-color: #22FF22; }"); out.println(".classpath-bugfix { background-color: #CCFFCC; }"); out.println("</style>"); out.println("<body>"); out.println("<h1>Classpath compare results</h1>"); out.println("Created at " + new Date()); out.println("<table border='1' width='100%' style='border: solid 1'>"); out.println("<tr>"); out.println("<th align='left'>Class</th>"); out.println("<th align='left'>Target</th>"); out.println("<th align='left'>Merge status</th>"); out.println("</tr>"); out.flush(); }
protected void reportHeader(PrintWriter out) { out.println("<html>"); out.println("<title>Classpath compare</title>"); out.println("<style type='text/css'>"); out.println(".classpath-only { background-color: #FFFFAA; }"); out.println(".vm-only { background-color: #CCCCFF; }"); out.println(".needsmerge { background-color: #FF9090; }"); out.println(".vm-specific { background-color: #119911; }"); out.println(".vm-specific-source { background-color: #22FF22; }"); out.println(".classpath-bugfix { background-color: #CCFFCC; }"); out.println("</style>"); out.println("<body>"); out.println("<h1>Classpath compare results</h1>"); out.println("Created at " + new Date()); out.println("<table border='1' width='100%' style='border: solid 1'>"); out.println("<tr>"); out.println("<th align='left'>Class</th>"); out.println("<th align='left'>Target</th>"); out.println("<th align='left'>Merge status</th>"); out.println("</tr>"); out.flush(); }
4,567
protected void reportMissing(PrintWriter out, String fname, String existsIn, int flags) { out.println("<tr class='" + existsIn + "-only'>"); out.println("<td>" + fname + "</td>"); out.println("<td>&nbsp;</td>"); out.println("<td>Exists only in " + existsIn); reportFlags(out, flags); out.println("</td>"); out.println("</tr>"); out.flush(); }
protected void reportMissing(PrintWriter out, String fname, String existsIn, Flags flags) { out.println("<tr class='" + existsIn + "-only'>"); out.println("<td>" + fname + "</td>"); out.println("<td>&nbsp;</td>"); out.println("<td>Exists only in " + existsIn); reportFlags(out, flags); out.println("</td>"); out.println("</tr>"); out.flush(); }
4,568
protected void reportNeedsMerge(PrintWriter out, String fname, String target, String diffFileName, int flags) { out.println("<tr class='" + flagsToStyleClass(flags) + "'>"); out.println("<td>" + fname + "</td>"); if (target.equals(TargetedFileSet.DEFAULT_TARGET)) { target = "&nbsp;"; } out.println("<td>" + target + "</td>"); out.println("<td><a href='" + diffFileName + "'>Diff</a>"); reportFlags(out, flags); out.println("</td>"); out.println("</tr>"); out.flush(); }
protected void reportNeedsMerge(PrintWriter out, String fname, String target, String diffFileName, int flags) { out.println("<tr class='" + flagsToStyleClass(flags) + "'>"); out.println("<td>" + fname + "</td>"); if (target.equals(TargetedFileSet.DEFAULT_TARGET)) { target = "&nbsp;"; } out.println("<td>" + target + "</td>"); out.println("<td><a href='" + diffFileName + "'>Diff</a>"); reportFlags(out, flags); out.println("</td>"); out.println("</tr>"); out.flush(); }
4,569
protected void reportPackageDiff(PrintWriter out, String pkg, String diffFileName, int flags) { out.println("<tr class='needsmerge'>"); out.println("<td>" + pkg + "</td>"); out.println("<td>&nbsp;</td>"); out.println("<td><a href='" + diffFileName + "'>diff</a>"); reportFlags(out, flags); out.println("</td>"); out.println("</tr>"); out.flush(); }
protected void reportPackageDiff(PrintWriter out, String pkg, String diffFileName, Flags flags) { out.println("<tr class='needsmerge'>"); out.println("<td>" + pkg + "</td>"); out.println("<td>&nbsp;</td>"); out.println("<td><a href='" + diffFileName + "'>diff</a>"); reportFlags(out, flags); out.println("</td>"); out.println("</tr>"); out.flush(); }
4,570
protected int runDiff(SourceFile vmFile, SourceFile cpFile, String diffFileName, Map<String, String> packageDiffs) throws IOException, InterruptedException { final String[] cmd = { "diff", "-b", // Ignore white space change "-au", "-I", ".*$" + "Id:.*$.*", // Avoid cvs keyword // expansion in this string vmFile.getFileName(), cpFile.getFile().getAbsolutePath() }; final ByteArrayOutputStream out = new ByteArrayOutputStream(); final ByteArrayOutputStream err = new ByteArrayOutputStream(); final PumpStreamHandler streamHandler = new PumpStreamHandler(out, err); final Execute exe = new Execute(streamHandler); exe.setCommandline(cmd); exe.setWorkingDirectory(vmFile.getBaseDir()); final int rc = exe.execute(); if (rc != 0) { File diffFile = new File(destDir, diffFileName); FileOutputStream os = new FileOutputStream(diffFile); try { final byte[] diff = out.toByteArray(); os.write(diff); os.flush(); final String diffStr = new String(diff); final String pkg = vmFile.getPackageName(); String pkgDiff; if (packageDiffs.containsKey(pkg)) { pkgDiff = packageDiffs.get(pkg); pkgDiff = pkgDiff + "diff\n" + diffStr; } else { pkgDiff = diffStr; } packageDiffs.put(pkg, pkgDiff); int flags = getFlags(diffStr); if (!vmFile.getTarget().equals(cpFile.getTarget())) { flags |= FLAG_TARGET_DIFF; } return flags | NEEDS_MERGE; } finally { os.close(); } } else { return NO_CHANGE; } }
protected Flags runDiff(SourceFile vmFile, SourceFile cpFile, String diffFileName, Map<String, String> packageDiffs) throws IOException, InterruptedException { final String[] cmd = { "diff", "-b", // Ignore white space change "-au", "-I", ".*$" + "Id:.*$.*", // Avoid cvs keyword // expansion in this string vmFile.getFileName(), cpFile.getFile().getAbsolutePath() }; final ByteArrayOutputStream out = new ByteArrayOutputStream(); final ByteArrayOutputStream err = new ByteArrayOutputStream(); final PumpStreamHandler streamHandler = new PumpStreamHandler(out, err); final Execute exe = new Execute(streamHandler); exe.setCommandline(cmd); exe.setWorkingDirectory(vmFile.getBaseDir()); final int rc = exe.execute(); if (rc != 0) { File diffFile = new File(destDir, diffFileName); FileOutputStream os = new FileOutputStream(diffFile); try { final byte[] diff = out.toByteArray(); os.write(diff); os.flush(); final String diffStr = new String(diff); final String pkg = vmFile.getPackageName(); String pkgDiff; if (packageDiffs.containsKey(pkg)) { pkgDiff = packageDiffs.get(pkg); pkgDiff = pkgDiff + "diff\n" + diffStr; } else { pkgDiff = diffStr; } packageDiffs.put(pkg, pkgDiff); int flags = getFlags(diffStr); if (!vmFile.getTarget().equals(cpFile.getTarget())) { flags |= FLAG_TARGET_DIFF; } return flags | NEEDS_MERGE; } finally { os.close(); } } else { return NO_CHANGE; } }
4,571
protected int runDiff(SourceFile vmFile, SourceFile cpFile, String diffFileName, Map<String, String> packageDiffs) throws IOException, InterruptedException { final String[] cmd = { "diff", "-b", // Ignore white space change "-au", "-I", ".*$" + "Id:.*$.*", // Avoid cvs keyword // expansion in this string vmFile.getFileName(), cpFile.getFile().getAbsolutePath() }; final ByteArrayOutputStream out = new ByteArrayOutputStream(); final ByteArrayOutputStream err = new ByteArrayOutputStream(); final PumpStreamHandler streamHandler = new PumpStreamHandler(out, err); final Execute exe = new Execute(streamHandler); exe.setCommandline(cmd); exe.setWorkingDirectory(vmFile.getBaseDir()); final int rc = exe.execute(); if (rc != 0) { File diffFile = new File(destDir, diffFileName); FileOutputStream os = new FileOutputStream(diffFile); try { final byte[] diff = out.toByteArray(); os.write(diff); os.flush(); final String diffStr = new String(diff); final String pkg = vmFile.getPackageName(); String pkgDiff; if (packageDiffs.containsKey(pkg)) { pkgDiff = packageDiffs.get(pkg); pkgDiff = pkgDiff + "diff\n" + diffStr; } else { pkgDiff = diffStr; } packageDiffs.put(pkg, pkgDiff); int flags = getFlags(diffStr); if (!vmFile.getTarget().equals(cpFile.getTarget())) { flags |= FLAG_TARGET_DIFF; } return flags | NEEDS_MERGE; } finally { os.close(); } } else { return NO_CHANGE; } }
protected int runDiff(SourceFile vmFile, SourceFile cpFile, String diffFileName, Map<String, String> packageDiffs) throws IOException, InterruptedException { final String[] cmd = { "diff", "-E", "-w", "-B", "-N", // Ignore white space change "-au", "-I", ".*$" + "Id:.*$.*", // Avoid cvs keyword // expansion in this string vmFile.getFileName(), cpFile.getFile().getAbsolutePath() }; final ByteArrayOutputStream out = new ByteArrayOutputStream(); final ByteArrayOutputStream err = new ByteArrayOutputStream(); final PumpStreamHandler streamHandler = new PumpStreamHandler(out, err); final Execute exe = new Execute(streamHandler); exe.setCommandline(cmd); exe.setWorkingDirectory(vmFile.getBaseDir()); final int rc = exe.execute(); if (rc != 0) { File diffFile = new File(destDir, diffFileName); FileOutputStream os = new FileOutputStream(diffFile); try { final byte[] diff = out.toByteArray(); os.write(diff); os.flush(); final String diffStr = new String(diff); final String pkg = vmFile.getPackageName(); String pkgDiff; if (packageDiffs.containsKey(pkg)) { pkgDiff = packageDiffs.get(pkg); pkgDiff = pkgDiff + "diff\n" + diffStr; } else { pkgDiff = diffStr; } packageDiffs.put(pkg, pkgDiff); int flags = getFlags(diffStr); if (!vmFile.getTarget().equals(cpFile.getTarget())) { flags |= FLAG_TARGET_DIFF; } return flags | NEEDS_MERGE; } finally { os.close(); } } else { return NO_CHANGE; } }
4,572
protected int runDiff(SourceFile vmFile, SourceFile cpFile, String diffFileName, Map<String, String> packageDiffs) throws IOException, InterruptedException { final String[] cmd = { "diff", "-b", // Ignore white space change "-au", "-I", ".*$" + "Id:.*$.*", // Avoid cvs keyword // expansion in this string vmFile.getFileName(), cpFile.getFile().getAbsolutePath() }; final ByteArrayOutputStream out = new ByteArrayOutputStream(); final ByteArrayOutputStream err = new ByteArrayOutputStream(); final PumpStreamHandler streamHandler = new PumpStreamHandler(out, err); final Execute exe = new Execute(streamHandler); exe.setCommandline(cmd); exe.setWorkingDirectory(vmFile.getBaseDir()); final int rc = exe.execute(); if (rc != 0) { File diffFile = new File(destDir, diffFileName); FileOutputStream os = new FileOutputStream(diffFile); try { final byte[] diff = out.toByteArray(); os.write(diff); os.flush(); final String diffStr = new String(diff); final String pkg = vmFile.getPackageName(); String pkgDiff; if (packageDiffs.containsKey(pkg)) { pkgDiff = packageDiffs.get(pkg); pkgDiff = pkgDiff + "diff\n" + diffStr; } else { pkgDiff = diffStr; } packageDiffs.put(pkg, pkgDiff); int flags = getFlags(diffStr); if (!vmFile.getTarget().equals(cpFile.getTarget())) { flags |= FLAG_TARGET_DIFF; } return flags | NEEDS_MERGE; } finally { os.close(); } } else { return NO_CHANGE; } }
protected int runDiff(SourceFile vmFile, SourceFile cpFile, String diffFileName, Map<String, String> packageDiffs) throws IOException, InterruptedException { final String[] cmd = { "diff", "-b", // Ignore white space change "-au", "-I", ".*$" + "Id:.*$.*", // Avoid cvs keyword // expansion in this string vmFile.getFileName(), cpFile.getFile().getAbsolutePath() }; final ByteArrayOutputStream out = new ByteArrayOutputStream(); final ByteArrayOutputStream err = new ByteArrayOutputStream(); final PumpStreamHandler streamHandler = new PumpStreamHandler(out, err); final Execute exe = new Execute(streamHandler); exe.setCommandline(cmd); exe.setWorkingDirectory(vmFile.getBaseDir()); final int rc = exe.execute(); if (rc != 0) { File diffFile = new File(destDir, diffFileName); FileOutputStream os = new FileOutputStream(diffFile); try { final byte[] diff = out.toByteArray(); os.write(diff); os.flush(); final String diffStr = new String(diff); final String pkg = vmFile.getPackageName(); String pkgDiff; if (packageDiffs.containsKey(pkg)) { pkgDiff = packageDiffs.get(pkg); pkgDiff = pkgDiff + "diff\n" + diffStr; } else { pkgDiff = diffStr; } packageDiffs.put(pkg, pkgDiff); Flags flags = getFlags(diffStr); if (!vmFile.getTarget().equals(cpFile.getTarget())) { flags |= FLAG_TARGET_DIFF; } return flags | NEEDS_MERGE; } finally { os.close(); } } else { return NO_CHANGE; } }
4,573
protected int runDiff(SourceFile vmFile, SourceFile cpFile, String diffFileName, Map<String, String> packageDiffs) throws IOException, InterruptedException { final String[] cmd = { "diff", "-b", // Ignore white space change "-au", "-I", ".*$" + "Id:.*$.*", // Avoid cvs keyword // expansion in this string vmFile.getFileName(), cpFile.getFile().getAbsolutePath() }; final ByteArrayOutputStream out = new ByteArrayOutputStream(); final ByteArrayOutputStream err = new ByteArrayOutputStream(); final PumpStreamHandler streamHandler = new PumpStreamHandler(out, err); final Execute exe = new Execute(streamHandler); exe.setCommandline(cmd); exe.setWorkingDirectory(vmFile.getBaseDir()); final int rc = exe.execute(); if (rc != 0) { File diffFile = new File(destDir, diffFileName); FileOutputStream os = new FileOutputStream(diffFile); try { final byte[] diff = out.toByteArray(); os.write(diff); os.flush(); final String diffStr = new String(diff); final String pkg = vmFile.getPackageName(); String pkgDiff; if (packageDiffs.containsKey(pkg)) { pkgDiff = packageDiffs.get(pkg); pkgDiff = pkgDiff + "diff\n" + diffStr; } else { pkgDiff = diffStr; } packageDiffs.put(pkg, pkgDiff); int flags = getFlags(diffStr); if (!vmFile.getTarget().equals(cpFile.getTarget())) { flags |= FLAG_TARGET_DIFF; } return flags | NEEDS_MERGE; } finally { os.close(); } } else { return NO_CHANGE; } }
protected int runDiff(SourceFile vmFile, SourceFile cpFile, String diffFileName, Map<String, String> packageDiffs) throws IOException, InterruptedException { final String[] cmd = { "diff", "-b", // Ignore white space change "-au", "-I", ".*$" + "Id:.*$.*", // Avoid cvs keyword // expansion in this string vmFile.getFileName(), cpFile.getFile().getAbsolutePath() }; final ByteArrayOutputStream out = new ByteArrayOutputStream(); final ByteArrayOutputStream err = new ByteArrayOutputStream(); final PumpStreamHandler streamHandler = new PumpStreamHandler(out, err); final Execute exe = new Execute(streamHandler); exe.setCommandline(cmd); exe.setWorkingDirectory(vmFile.getBaseDir()); final int rc = exe.execute(); if (rc != 0) { File diffFile = new File(destDir, diffFileName); FileOutputStream os = new FileOutputStream(diffFile); try { final byte[] diff = out.toByteArray(); os.write(diff); os.flush(); final String diffStr = new String(diff); final String pkg = vmFile.getPackageName(); String pkgDiff; if (packageDiffs.containsKey(pkg)) { pkgDiff = packageDiffs.get(pkg); pkgDiff = pkgDiff + "diff\n" + diffStr; } else { pkgDiff = diffStr; } packageDiffs.put(pkg, pkgDiff); int flags = getFlags(diffStr); if (!vmFile.getTarget().equals(cpFile.getTarget())) { flags.set(FLAG_TARGET_DIFF); } return flags | NEEDS_MERGE; } finally { os.close(); } } else { return NO_CHANGE; } }
4,574
protected int runDiff(SourceFile vmFile, SourceFile cpFile, String diffFileName, Map<String, String> packageDiffs) throws IOException, InterruptedException { final String[] cmd = { "diff", "-b", // Ignore white space change "-au", "-I", ".*$" + "Id:.*$.*", // Avoid cvs keyword // expansion in this string vmFile.getFileName(), cpFile.getFile().getAbsolutePath() }; final ByteArrayOutputStream out = new ByteArrayOutputStream(); final ByteArrayOutputStream err = new ByteArrayOutputStream(); final PumpStreamHandler streamHandler = new PumpStreamHandler(out, err); final Execute exe = new Execute(streamHandler); exe.setCommandline(cmd); exe.setWorkingDirectory(vmFile.getBaseDir()); final int rc = exe.execute(); if (rc != 0) { File diffFile = new File(destDir, diffFileName); FileOutputStream os = new FileOutputStream(diffFile); try { final byte[] diff = out.toByteArray(); os.write(diff); os.flush(); final String diffStr = new String(diff); final String pkg = vmFile.getPackageName(); String pkgDiff; if (packageDiffs.containsKey(pkg)) { pkgDiff = packageDiffs.get(pkg); pkgDiff = pkgDiff + "diff\n" + diffStr; } else { pkgDiff = diffStr; } packageDiffs.put(pkg, pkgDiff); int flags = getFlags(diffStr); if (!vmFile.getTarget().equals(cpFile.getTarget())) { flags |= FLAG_TARGET_DIFF; } return flags | NEEDS_MERGE; } finally { os.close(); } } else { return NO_CHANGE; } }
protected int runDiff(SourceFile vmFile, SourceFile cpFile, String diffFileName, Map<String, String> packageDiffs) throws IOException, InterruptedException { final String[] cmd = { "diff", "-b", // Ignore white space change "-au", "-I", ".*$" + "Id:.*$.*", // Avoid cvs keyword // expansion in this string vmFile.getFileName(), cpFile.getFile().getAbsolutePath() }; final ByteArrayOutputStream out = new ByteArrayOutputStream(); final ByteArrayOutputStream err = new ByteArrayOutputStream(); final PumpStreamHandler streamHandler = new PumpStreamHandler(out, err); final Execute exe = new Execute(streamHandler); exe.setCommandline(cmd); exe.setWorkingDirectory(vmFile.getBaseDir()); final int rc = exe.execute(); if (rc != 0) { File diffFile = new File(destDir, diffFileName); FileOutputStream os = new FileOutputStream(diffFile); try { final byte[] diff = out.toByteArray(); os.write(diff); os.flush(); final String diffStr = new String(diff); final String pkg = vmFile.getPackageName(); String pkgDiff; if (packageDiffs.containsKey(pkg)) { pkgDiff = packageDiffs.get(pkg); pkgDiff = pkgDiff + "diff\n" + diffStr; } else { pkgDiff = diffStr; } packageDiffs.put(pkg, pkgDiff); int flags = getFlags(diffStr); if (!vmFile.getTarget().equals(cpFile.getTarget())) { flags |= FLAG_TARGET_DIFF; } flags.set(NEEDS_MERGE); return flags; } finally { os.close(); } } else { return NO_CHANGE; } }
4,575
protected int runDiff(SourceFile vmFile, SourceFile cpFile, String diffFileName, Map<String, String> packageDiffs) throws IOException, InterruptedException { final String[] cmd = { "diff", "-b", // Ignore white space change "-au", "-I", ".*$" + "Id:.*$.*", // Avoid cvs keyword // expansion in this string vmFile.getFileName(), cpFile.getFile().getAbsolutePath() }; final ByteArrayOutputStream out = new ByteArrayOutputStream(); final ByteArrayOutputStream err = new ByteArrayOutputStream(); final PumpStreamHandler streamHandler = new PumpStreamHandler(out, err); final Execute exe = new Execute(streamHandler); exe.setCommandline(cmd); exe.setWorkingDirectory(vmFile.getBaseDir()); final int rc = exe.execute(); if (rc != 0) { File diffFile = new File(destDir, diffFileName); FileOutputStream os = new FileOutputStream(diffFile); try { final byte[] diff = out.toByteArray(); os.write(diff); os.flush(); final String diffStr = new String(diff); final String pkg = vmFile.getPackageName(); String pkgDiff; if (packageDiffs.containsKey(pkg)) { pkgDiff = packageDiffs.get(pkg); pkgDiff = pkgDiff + "diff\n" + diffStr; } else { pkgDiff = diffStr; } packageDiffs.put(pkg, pkgDiff); int flags = getFlags(diffStr); if (!vmFile.getTarget().equals(cpFile.getTarget())) { flags |= FLAG_TARGET_DIFF; } return flags | NEEDS_MERGE; } finally { os.close(); } } else { return NO_CHANGE; } }
protected int runDiff(SourceFile vmFile, SourceFile cpFile, String diffFileName, Map<String, String> packageDiffs) throws IOException, InterruptedException { final String[] cmd = { "diff", "-b", // Ignore white space change "-au", "-I", ".*$" + "Id:.*$.*", // Avoid cvs keyword // expansion in this string vmFile.getFileName(), cpFile.getFile().getAbsolutePath() }; final ByteArrayOutputStream out = new ByteArrayOutputStream(); final ByteArrayOutputStream err = new ByteArrayOutputStream(); final PumpStreamHandler streamHandler = new PumpStreamHandler(out, err); final Execute exe = new Execute(streamHandler); exe.setCommandline(cmd); exe.setWorkingDirectory(vmFile.getBaseDir()); final int rc = exe.execute(); if (rc != 0) { File diffFile = new File(destDir, diffFileName); FileOutputStream os = new FileOutputStream(diffFile); try { final byte[] diff = out.toByteArray(); os.write(diff); os.flush(); final String diffStr = new String(diff); final String pkg = vmFile.getPackageName(); String pkgDiff; if (packageDiffs.containsKey(pkg)) { pkgDiff = packageDiffs.get(pkg); pkgDiff = pkgDiff + "diff\n" + diffStr; } else { pkgDiff = diffStr; } packageDiffs.put(pkg, pkgDiff); int flags = getFlags(diffStr); if (!vmFile.getTarget().equals(cpFile.getTarget())) { flags |= FLAG_TARGET_DIFF; } return flags | NEEDS_MERGE; } finally { os.close(); } } else { return new Flags(NO_CHANGE); } }
4,576
public void init() { try { jbInit(); } catch(Exception e) { log.warn("In constructor: ", e); } }
public void init() { try { jbInit(); } catch(Exception e) { if (log == null) System.out.println(e.getMessage()); else log.warn("In constructor: ", e); } }
4,577
private void jbInit() throws Exception { this.setSize(new Dimension(400,300)); Properties sesProps = new Properties(); log.info(" We have loaded a new one"); // Start loading properties - Host must exist sesProps.put(SESSION_HOST,getParameter("host")); if (isSpecified("-e")) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p")) { sesProps.put(SESSION_HOST_PORT,getParameter("-p")); }// if (isSpecified("-f",args))// propFileName = getParm("-f",args); if (isSpecified("-cp")) sesProps.put(SESSION_CODE_PAGE ,getParameter("-cp")); if (isSpecified("-gui")) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132")) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // socks proxy host argument if (isSpecified("-sph")) { sesProps.put(SESSION_PROXY_HOST ,getParameter("-sph")); } // socks proxy port argument if (isSpecified("-spp")) sesProps.put(SESSION_PROXY_PORT ,getParameter("-spp")); // check if device name is specified if (isSpecified("-dn")) sesProps.put(SESSION_DEVICE_NAME ,getParameter("-dn")); if (isSpecified("-L")) LangTool.init(parseLocale(getParameter("-L"))); else LangTool.init(); loadSystemProperty("SESSION_CONNECT_USER"); loadSystemProperty("SESSION_CONNECT_PASSWORD"); loadSystemProperty("SESSION_CONNECT_PROGRAM"); loadSystemProperty("SESSION_CONNECT_LIBRARY"); loadSystemProperty("SESSION_CONNECT_MENU"); manager = new SessionManager(); final Session s = manager.openSession(sesProps,"","Test Applet"); this.getContentPane().add(s); s.connect(); SwingUtilities.invokeLater(new Runnable() { public void run() { s.grabFocus(); } }); }
private void jbInit() throws Exception { this.setSize(new Dimension(400,300)); Properties sesProps = new Properties(); log.info(" We have loaded a new one"); // Start loading properties - Host must exist sesProps.put(SESSION_HOST,getParameter("host")); if (isSpecified("-e")) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p")) { sesProps.put(SESSION_HOST_PORT,getParameter("-p")); }// if (isSpecified("-f",args))// propFileName = getParm("-f",args); if (isSpecified("-cp")) sesProps.put(SESSION_CODE_PAGE ,getParameter("-cp")); if (isSpecified("-gui")) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132")) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // socks proxy host argument if (isSpecified("-sph")) { sesProps.put(SESSION_PROXY_HOST ,getParameter("-sph")); } // socks proxy port argument if (isSpecified("-spp")) sesProps.put(SESSION_PROXY_PORT ,getParameter("-spp")); // check if device name is specified if (isSpecified("-dn")) sesProps.put(SESSION_DEVICE_NAME ,getParameter("-dn")); if (isSpecified("-L")) LangTool.init(parseLocale(getParameter("-L"))); else LangTool.init(); loadSystemProperty("SESSION_CONNECT_USER"); loadSystemProperty("SESSION_CONNECT_PASSWORD"); loadSystemProperty("SESSION_CONNECT_PROGRAM"); loadSystemProperty("SESSION_CONNECT_LIBRARY"); loadSystemProperty("SESSION_CONNECT_MENU"); manager = new SessionManager(); final Session s = manager.openSession(sesProps,"","Test Applet"); this.getContentPane().add(s); s.connect(); SwingUtilities.invokeLater(new Runnable() { public void run() { s.grabFocus(); } }); }
4,578
private void parseURI(String str) throws URISyntaxException { Pattern pattern = Pattern.compile(URI_REGEXP); Matcher matcher = pattern.matcher(str); if (matcher.matches()) { scheme = getURIGroup(matcher, SCHEME_GROUP); rawSchemeSpecificPart = getURIGroup(matcher, SCHEME_SPEC_PART_GROUP); rawAuthority = getURIGroup(matcher, AUTHORITY_GROUP); rawPath = getURIGroup(matcher, PATH_GROUP); rawQuery = getURIGroup(matcher, QUERY_GROUP); rawFragment = getURIGroup(matcher, FRAGMENT_GROUP); } else throw new URISyntaxException(str, "doesn't match URI regular expression"); if (rawAuthority != null) { pattern = Pattern.compile(AUTHORITY_REGEXP); matcher = pattern.matcher(rawAuthority); if (matcher.matches()) { rawUserInfo = getURIGroup(matcher, AUTHORITY_USERINFO_GROUP); rawHost = getURIGroup(matcher, AUTHORITY_HOST_GROUP); String portStr = getURIGroup(matcher, AUTHORITY_PORT_GROUP); if (portStr != null) try { port = Integer.parseInt(portStr); } catch (NumberFormatException e) { URISyntaxException use = new URISyntaxException (str, "doesn't match URI regular expression"); use.initCause(e); throw use; } } else throw new URISyntaxException(str, "doesn't match URI regular expression"); } // We must eagerly unquote the parts, because this is the only time // we may throw an exception. schemeSpecificPart = unquote(rawSchemeSpecificPart); authority = unquote(rawAuthority); userInfo = unquote(rawUserInfo); host = unquote(rawHost); path = unquote(rawPath); query = unquote(rawQuery); fragment = unquote(rawFragment); }
private void parseURI(String str) throws URISyntaxException { Pattern pattern = Pattern.compile(URI_REGEXP); Matcher matcher = pattern.matcher(str); if (matcher.matches()) { scheme = getURIGroup(matcher, SCHEME_GROUP); rawSchemeSpecificPart = matcher.group(SCHEME_SPEC_PART_GROUP); schemeSpecificPart = unquote(rawSchemeSpecificPart); if (!isOpaque()) { rawAuthority = getURIGroup(matcher, AUTHORITY_GROUP); rawPath = getURIGroup(matcher, PATH_GROUP); rawQuery = getURIGroup(matcher, QUERY_GROUP); rawFragment = getURIGroup(matcher, FRAGMENT_GROUP); } else throw new URISyntaxException(str, "doesn't match URI regular expression"); if (rawAuthority != null) { pattern = Pattern.compile(AUTHORITY_REGEXP); matcher = pattern.matcher(rawAuthority); if (matcher.matches()) { rawUserInfo = getURIGroup(matcher, AUTHORITY_USERINFO_GROUP); rawHost = getURIGroup(matcher, AUTHORITY_HOST_GROUP); String portStr = getURIGroup(matcher, AUTHORITY_PORT_GROUP); if (portStr != null) try { port = Integer.parseInt(portStr); } catch (NumberFormatException e) { URISyntaxException use = new URISyntaxException (str, "doesn't match URI regular expression"); use.initCause(e); throw use; } } else throw new URISyntaxException(str, "doesn't match URI regular expression"); } // We must eagerly unquote the parts, because this is the only time // we may throw an exception. schemeSpecificPart = unquote(rawSchemeSpecificPart); authority = unquote(rawAuthority); userInfo = unquote(rawUserInfo); host = unquote(rawHost); path = unquote(rawPath); query = unquote(rawQuery); fragment = unquote(rawFragment); }
4,579
private void parseURI(String str) throws URISyntaxException { Pattern pattern = Pattern.compile(URI_REGEXP); Matcher matcher = pattern.matcher(str); if (matcher.matches()) { scheme = getURIGroup(matcher, SCHEME_GROUP); rawSchemeSpecificPart = getURIGroup(matcher, SCHEME_SPEC_PART_GROUP); rawAuthority = getURIGroup(matcher, AUTHORITY_GROUP); rawPath = getURIGroup(matcher, PATH_GROUP); rawQuery = getURIGroup(matcher, QUERY_GROUP); rawFragment = getURIGroup(matcher, FRAGMENT_GROUP); } else throw new URISyntaxException(str, "doesn't match URI regular expression"); if (rawAuthority != null) { pattern = Pattern.compile(AUTHORITY_REGEXP); matcher = pattern.matcher(rawAuthority); if (matcher.matches()) { rawUserInfo = getURIGroup(matcher, AUTHORITY_USERINFO_GROUP); rawHost = getURIGroup(matcher, AUTHORITY_HOST_GROUP); String portStr = getURIGroup(matcher, AUTHORITY_PORT_GROUP); if (portStr != null) try { port = Integer.parseInt(portStr); } catch (NumberFormatException e) { URISyntaxException use = new URISyntaxException (str, "doesn't match URI regular expression"); use.initCause(e); throw use; } } else throw new URISyntaxException(str, "doesn't match URI regular expression"); } // We must eagerly unquote the parts, because this is the only time // we may throw an exception. schemeSpecificPart = unquote(rawSchemeSpecificPart); authority = unquote(rawAuthority); userInfo = unquote(rawUserInfo); host = unquote(rawHost); path = unquote(rawPath); query = unquote(rawQuery); fragment = unquote(rawFragment); }
private void parseURI(String str) throws URISyntaxException { Pattern pattern = Pattern.compile(URI_REGEXP); Matcher matcher = pattern.matcher(str); if (matcher.matches()) { scheme = getURIGroup(matcher, SCHEME_GROUP); rawSchemeSpecificPart = getURIGroup(matcher, SCHEME_SPEC_PART_GROUP); rawAuthority = getURIGroup(matcher, AUTHORITY_GROUP); rawPath = matcher.group(PATH_GROUP); rawQuery = getURIGroup(matcher, QUERY_GROUP); rawFragment = getURIGroup(matcher, FRAGMENT_GROUP); } else throw new URISyntaxException(str, "doesn't match URI regular expression"); if (rawAuthority != null) { pattern = Pattern.compile(AUTHORITY_REGEXP); matcher = pattern.matcher(rawAuthority); if (matcher.matches()) { rawUserInfo = getURIGroup(matcher, AUTHORITY_USERINFO_GROUP); rawHost = getURIGroup(matcher, AUTHORITY_HOST_GROUP); String portStr = getURIGroup(matcher, AUTHORITY_PORT_GROUP); if (portStr != null) try { port = Integer.parseInt(portStr); } catch (NumberFormatException e) { URISyntaxException use = new URISyntaxException (str, "doesn't match URI regular expression"); use.initCause(e); throw use; } } else throw new URISyntaxException(str, "doesn't match URI regular expression"); } // We must eagerly unquote the parts, because this is the only time // we may throw an exception. schemeSpecificPart = unquote(rawSchemeSpecificPart); authority = unquote(rawAuthority); userInfo = unquote(rawUserInfo); host = unquote(rawHost); path = unquote(rawPath); query = unquote(rawQuery); fragment = unquote(rawFragment); }
4,580
private void parseURI(String str) throws URISyntaxException { Pattern pattern = Pattern.compile(URI_REGEXP); Matcher matcher = pattern.matcher(str); if (matcher.matches()) { scheme = getURIGroup(matcher, SCHEME_GROUP); rawSchemeSpecificPart = getURIGroup(matcher, SCHEME_SPEC_PART_GROUP); rawAuthority = getURIGroup(matcher, AUTHORITY_GROUP); rawPath = getURIGroup(matcher, PATH_GROUP); rawQuery = getURIGroup(matcher, QUERY_GROUP); rawFragment = getURIGroup(matcher, FRAGMENT_GROUP); } else throw new URISyntaxException(str, "doesn't match URI regular expression"); if (rawAuthority != null) { pattern = Pattern.compile(AUTHORITY_REGEXP); matcher = pattern.matcher(rawAuthority); if (matcher.matches()) { rawUserInfo = getURIGroup(matcher, AUTHORITY_USERINFO_GROUP); rawHost = getURIGroup(matcher, AUTHORITY_HOST_GROUP); String portStr = getURIGroup(matcher, AUTHORITY_PORT_GROUP); if (portStr != null) try { port = Integer.parseInt(portStr); } catch (NumberFormatException e) { URISyntaxException use = new URISyntaxException (str, "doesn't match URI regular expression"); use.initCause(e); throw use; } } else throw new URISyntaxException(str, "doesn't match URI regular expression"); } // We must eagerly unquote the parts, because this is the only time // we may throw an exception. schemeSpecificPart = unquote(rawSchemeSpecificPart); authority = unquote(rawAuthority); userInfo = unquote(rawUserInfo); host = unquote(rawHost); path = unquote(rawPath); query = unquote(rawQuery); fragment = unquote(rawFragment); }
private void parseURI(String str) throws URISyntaxException { Pattern pattern = Pattern.compile(URI_REGEXP); Matcher matcher = pattern.matcher(str); if (matcher.matches()) { scheme = getURIGroup(matcher, SCHEME_GROUP); rawSchemeSpecificPart = getURIGroup(matcher, SCHEME_SPEC_PART_GROUP); rawAuthority = getURIGroup(matcher, AUTHORITY_GROUP); rawPath = getURIGroup(matcher, PATH_GROUP); rawQuery = getURIGroup(matcher, QUERY_GROUP); rawFragment = getURIGroup(matcher, FRAGMENT_GROUP); } else throw new URISyntaxException(str, "doesn't match URI regular expression"); if (rawAuthority != null) { pattern = Pattern.compile(AUTHORITY_REGEXP); matcher = pattern.matcher(rawAuthority); if (matcher.matches()) { rawUserInfo = getURIGroup(matcher, AUTHORITY_USERINFO_GROUP); rawHost = getURIGroup(matcher, AUTHORITY_HOST_GROUP); String portStr = getURIGroup(matcher, AUTHORITY_PORT_GROUP); if (portStr != null) try { port = Integer.parseInt(portStr); } catch (NumberFormatException e) { URISyntaxException use = new URISyntaxException (str, "doesn't match URI regular expression"); use.initCause(e); throw use; } } else throw new URISyntaxException(str, "doesn't match URI regular expression"); } // We must eagerly unquote the parts, because this is the only time // we may throw an exception. authority = unquote(rawAuthority); userInfo = unquote(rawUserInfo); host = unquote(rawHost); path = unquote(rawPath); query = unquote(rawQuery); fragment = unquote(rawFragment); }
4,581
public String toString() { return (getScheme() == null ? "" : getScheme() + ":") + (getRawAuthority() == null ? "" : "//" + getRawAuthority()) + (getRawPath() == null ? "" : getRawPath()) + (getRawQuery() == null ? "" : "?" + getRawQuery()) + (getRawFragment() == null ? "" : "#" + getRawFragment()); }
public String toString() { return (getScheme() == null ? "" : getScheme() + ":") + (getRawAuthority() == null ? "" : "//" + getRawAuthority()) + (getRawPath() == null ? "" : getRawPath()) + (getRawQuery() == null ? "" : "?" + getRawQuery()) + (getRawFragment() == null ? "" : "#" + getRawFragment()); }
4,582
public JFrame() { super("JFrame"); frameInit(); }
public JFrame() { super(""); frameInit(); }
4,583
public int getDefaultCloseOperation() { return close_action; }
public int getDefaultCloseOperation() { return closeAction; }
4,584
protected String paramString() { return "JFrame"; }
protected String paramString() { StringBuffer sb = new StringBuffer(super.paramString()); sb.append(",defaultCloseOperation="); sb.append(SwingUtilities.convertWindowConstantToString( getDefaultCloseOperation())); sb.append(",rootPane="); if (rootPane != null) sb.append(rootPane); sb.append(",rootPaneCheckingEnabled=").append(rootPaneCheckingEnabled); return sb.toString(); }
4,585
protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); switch (e.getID()) { case WindowEvent.WINDOW_CLOSING: { switch (close_action) { case EXIT_ON_CLOSE: { System.exit(0); break; } case DISPOSE_ON_CLOSE: { dispose(); break; } case HIDE_ON_CLOSE: { setVisible(false); break; } case DO_NOTHING_ON_CLOSE: break; } break; } case WindowEvent.WINDOW_CLOSED: case WindowEvent.WINDOW_OPENED: case WindowEvent.WINDOW_ICONIFIED: case WindowEvent.WINDOW_DEICONIFIED: case WindowEvent.WINDOW_ACTIVATED: case WindowEvent.WINDOW_DEACTIVATED: break; } }
protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); switch (e.getID()) { case WindowEvent.WINDOW_CLOSING: { switch (closeAction) { case EXIT_ON_CLOSE: { System.exit(0); break; } case DISPOSE_ON_CLOSE: { dispose(); break; } case HIDE_ON_CLOSE: { setVisible(false); break; } case DO_NOTHING_ON_CLOSE: break; } break; } case WindowEvent.WINDOW_CLOSED: case WindowEvent.WINDOW_OPENED: case WindowEvent.WINDOW_ICONIFIED: case WindowEvent.WINDOW_DEICONIFIED: case WindowEvent.WINDOW_ACTIVATED: case WindowEvent.WINDOW_DEACTIVATED: break; } }
4,586
public void setDefaultCloseOperation(int operation) { SecurityManager sm = System.getSecurityManager(); if (sm != null && operation == EXIT_ON_CLOSE) sm.checkExit(0); if (operation != EXIT_ON_CLOSE && operation != DISPOSE_ON_CLOSE && operation != HIDE_ON_CLOSE && operation != DO_NOTHING_ON_CLOSE) throw new IllegalArgumentException("defaultCloseOperation must be EXIT_ON_CLOSE, HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or DO_NOTHING_ON_CLOSE"); close_action = operation; }
public void setDefaultCloseOperation(int operation) { SecurityManager sm = System.getSecurityManager(); if (sm != null && operation == EXIT_ON_CLOSE) sm.checkExit(0); if (operation != EXIT_ON_CLOSE && operation != DISPOSE_ON_CLOSE && operation != HIDE_ON_CLOSE && operation != DO_NOTHING_ON_CLOSE) throw new IllegalArgumentException("operation must be EXIT_ON_CLOSE, " + "HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or DO_NOTHING_ON_CLOSE"); close_action = operation; }
4,587
public void setDefaultCloseOperation(int operation) { SecurityManager sm = System.getSecurityManager(); if (sm != null && operation == EXIT_ON_CLOSE) sm.checkExit(0); if (operation != EXIT_ON_CLOSE && operation != DISPOSE_ON_CLOSE && operation != HIDE_ON_CLOSE && operation != DO_NOTHING_ON_CLOSE) throw new IllegalArgumentException("defaultCloseOperation must be EXIT_ON_CLOSE, HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or DO_NOTHING_ON_CLOSE"); close_action = operation; }
public void setDefaultCloseOperation(int operation) { SecurityManager sm = System.getSecurityManager(); if (sm != null && operation == EXIT_ON_CLOSE) sm.checkExit(0); if (operation != EXIT_ON_CLOSE && operation != DISPOSE_ON_CLOSE && operation != HIDE_ON_CLOSE && operation != DO_NOTHING_ON_CLOSE) throw new IllegalArgumentException("defaultCloseOperation must be EXIT_ON_CLOSE, HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or DO_NOTHING_ON_CLOSE"); closeAction = operation; }
4,588
public boolean isOptimizedDrawingEnabled() { int numChildren = getComponentCount(); boolean result = false; // We implement a heuristic here in order to return a quick result: // - For 0 or 1 children it is clear that they do not overlap, return true. // - For 2 children we check their bounding rectangles and if they don't // interect, return true. // - For more than 2 children we return false. Comparing all the bounding // rectangles costs too much time and in most cases this will return // false anyway, since JLayeredPane are mostly used in JRootPane and then // have at least one child (the contentPane) that takes up the whole // area of the JLayeredPane. switch (numChildren) { case 0: case 1: result = true; break; case 2: Rectangle r1 = getComponent(0).getBounds(); Rectangle r2 = getComponent(1).getBounds(); result = !r1.intersects(r2); break; default: result = false; } return result; }
public boolean isOptimizedDrawingEnabled() { int numChildren = getComponentCount(); boolean result = false; // We implement a heuristic here in order to return a quick result: // - For 0 or 1 children it is clear that they do not overlap, return true. // - For 2 children we check their bounding rectangles and if they don't // interect, return true. // - For more than 2 children we return false. Comparing all the bounding // rectangles costs too much time and in most cases this will return // false anyway, since JLayeredPane are mostly used in JRootPane and then // have at least one child (the contentPane) that takes up the whole // area of the JLayeredPane. switch (numChildren) { case 0: case 1: result = true; break; case 2: Rectangle r1 = getComponent(0).getBounds(); Rectangle r2 = getComponent(1).getBounds(); result = !r1.intersects(r2); break; default: result = false; } return result; }
4,589
public boolean isOptimizedDrawingEnabled() { int numChildren = getComponentCount(); boolean result = false; // We implement a heuristic here in order to return a quick result: // - For 0 or 1 children it is clear that they do not overlap, return true. // - For 2 children we check their bounding rectangles and if they don't // interect, return true. // - For more than 2 children we return false. Comparing all the bounding // rectangles costs too much time and in most cases this will return // false anyway, since JLayeredPane are mostly used in JRootPane and then // have at least one child (the contentPane) that takes up the whole // area of the JLayeredPane. switch (numChildren) { case 0: case 1: result = true; break; case 2: Rectangle r1 = getComponent(0).getBounds(); Rectangle r2 = getComponent(1).getBounds(); result = !r1.intersects(r2); break; default: result = false; } return result; }
public boolean isOptimizedDrawingEnabled() { int numChildren = getComponentCount(); boolean result = false; // We implement a heuristic here in order to return a quick result: // - For 0 or 1 children it is clear that they do not overlap, return true. // - For 2 children we check their bounding rectangles and if they don't // interect, return true. // - For more than 2 children we return false. Comparing all the bounding // rectangles costs too much time and in most cases this will return // false anyway, since JLayeredPane are mostly used in JRootPane and then // have at least one child (the contentPane) that takes up the whole // area of the JLayeredPane. switch (numChildren) { case 0: case 1: result = true; break; case 2: Rectangle r1 = getComponent(0).getBounds(); Rectangle r2 = getComponent(1).getBounds(); result = !r1.intersects(r2); break; default: result = false; } return result; }
4,590
public boolean isOptimizedDrawingEnabled() { int numChildren = getComponentCount(); boolean result = false; // We implement a heuristic here in order to return a quick result: // - For 0 or 1 children it is clear that they do not overlap, return true. // - For 2 children we check their bounding rectangles and if they don't // interect, return true. // - For more than 2 children we return false. Comparing all the bounding // rectangles costs too much time and in most cases this will return // false anyway, since JLayeredPane are mostly used in JRootPane and then // have at least one child (the contentPane) that takes up the whole // area of the JLayeredPane. switch (numChildren) { case 0: case 1: result = true; break; case 2: Rectangle r1 = getComponent(0).getBounds(); Rectangle r2 = getComponent(1).getBounds(); result = !r1.intersects(r2); break; default: result = false; } return result; }
public boolean isOptimizedDrawingEnabled() { int numChildren = getComponentCount(); boolean result = false; // We implement a heuristic here in order to return a quick result: // - For 0 or 1 children it is clear that they do not overlap, return true. // - For 2 children we check their bounding rectangles and if they don't // interect, return true. // - For more than 2 children we return false. Comparing all the bounding // rectangles costs too much time and in most cases this will return // false anyway, since JLayeredPane are mostly used in JRootPane and then // have at least one child (the contentPane) that takes up the whole // area of the JLayeredPane. switch (numChildren) { case 0: case 1: result = true; break; case 2: Rectangle r1 = getComponent(0).getBounds(); Rectangle r2 = getComponent(1).getBounds(); result = !r1.intersects(r2); break; default: result = false; } return result; }
4,591
public boolean isOptimizedDrawingEnabled() { int numChildren = getComponentCount(); boolean result = false; // We implement a heuristic here in order to return a quick result: // - For 0 or 1 children it is clear that they do not overlap, return true. // - For 2 children we check their bounding rectangles and if they don't // interect, return true. // - For more than 2 children we return false. Comparing all the bounding // rectangles costs too much time and in most cases this will return // false anyway, since JLayeredPane are mostly used in JRootPane and then // have at least one child (the contentPane) that takes up the whole // area of the JLayeredPane. switch (numChildren) { case 0: case 1: result = true; break; case 2: Rectangle r1 = getComponent(0).getBounds(); Rectangle r2 = getComponent(1).getBounds(); result = !r1.intersects(r2); break; default: result = false; } return result; }
public boolean isOptimizedDrawingEnabled() { int numChildren = getComponentCount(); boolean result = false; // We implement a heuristic here in order to return a quick result: // - For 0 or 1 children it is clear that they do not overlap, return true. // - For 2 children we check their bounding rectangles and if they don't // interect, return true. // - For more than 2 children we return false. Comparing all the bounding // rectangles costs too much time and in most cases this will return // false anyway, since JLayeredPane are mostly used in JRootPane and then // have at least one child (the contentPane) that takes up the whole // area of the JLayeredPane. switch (numChildren) { case 0: case 1: result = true; break; case 2: Rectangle r1 = getComponent(0).getBounds(); Rectangle r2 = getComponent(1).getBounds(); result = !r1.intersects(r2); break; default: result = false; } return result; }
4,592
RETokenRepeated(int subIndex, REToken token, int min, int max) { super(subIndex); this.token = token; this.min = min; this.max = max; alwaysEmpty = (min == 0 && max == 0); }
RETokenRepeated(int subIndex, REToken token, int min, int max) { super(subIndex); this.token = token; this.min = min; this.max = max; }
4,594
boolean match(CharIndexed input, REMatch mymatch) { // Possible positions for the next repeat to match at REMatch newMatch = mymatch; // {0} needs some special treatment. if (alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); return true; } else { return false; } } // number of times we've matched so far int numRepeats = 0; REMatch doables; int lastIndex = mymatch.index; boolean emptyMatchFound = false; while (numRepeats < min) { doables = findDoables(token, input, newMatch); // if none of the possibilities worked out, // it means that minimum number of repeats could not be found. if (doables == null) return false; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; if (newMatch.empty) { numRepeats = min; emptyMatchFound = true; break; } lastIndex = newMatch.index; } Vector positions = new Vector(); while (numRepeats <= max) { // We want to check something like // if (stingy) // and neglect the further matching. But experience tells // such neglection may cause incomplete matching. // For example, if we neglect the seemingly unnecessay // matching, /^(b+?|a){1,2}?c/ cannot match "bbc". // On the other hand, if we do not stop the unnecessary // matching, /(([a-c])b*?\2)*/ matches "ababbbcbc" // entirely when we wan to find only "ababb". // In order to make regression tests pass, we do as we did. if (stopMatchingIfSatisfied && stingy) { REMatch results = matchRest(input, newMatch); if (results != null) { mymatch.assignFrom(results); return true; } } positions.add(newMatch); if (emptyMatchFound) break; doables = findDoables(token, input, newMatch); if (doables == null) break; // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. // In this case, we do not have to go further until // numRepeats == max because the more numRepeats grows, // the shorter the substring matching this token becomes. // So the previous succesful match must have bee the best // match. But this is not necessarily the case if stingy. if (doables.index == lastIndex) { if (doables.empty) { emptyMatchFound = true; } else { if (!stingy) break; } } numRepeats++; newMatch = doables; lastIndex = newMatch.index; } // We're greedy, but ease off until a true match is found. // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch.REMatchList allResults = new REMatch.REMatchList(); int posCount = positions.size(); int posIndex = (stingy ? 0 : posCount - 1); while (posCount-- > 0) { REMatch m = (REMatch) positions.elementAt(posIndex); if (stingy) posIndex++; else posIndex--; REMatch results = matchRest(input, m); if (results != null) { // Order these from longest to shortest // Start by assuming longest (more repeats) // If stingy the order is shortest to longest. allResults.addTail(results); } else { if (possessive) break; } } if (allResults.head != null) { mymatch.assignFrom(allResults.head); // does this get all? return true; } // If we fall out, no matches. return false; }
boolean match(CharIndexed input, REMatch mymatch) { // Possible positions for the next repeat to match at // {0} needs some special treatment. if (alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); return true; } else { return false; } } // number of times we've matched so far int numRepeats = 0; REMatch doables; int lastIndex = mymatch.index; boolean emptyMatchFound = false; while (numRepeats < min) { doables = findDoables(token, input, newMatch); // if none of the possibilities worked out, // it means that minimum number of repeats could not be found. if (doables == null) return false; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; if (newMatch.empty) { numRepeats = min; emptyMatchFound = true; break; } lastIndex = newMatch.index; } Vector positions = new Vector(); while (numRepeats <= max) { // We want to check something like // if (stingy) // and neglect the further matching. But experience tells // such neglection may cause incomplete matching. // For example, if we neglect the seemingly unnecessay // matching, /^(b+?|a){1,2}?c/ cannot match "bbc". // On the other hand, if we do not stop the unnecessary // matching, /(([a-c])b*?\2)*/ matches "ababbbcbc" // entirely when we wan to find only "ababb". // In order to make regression tests pass, we do as we did. if (stopMatchingIfSatisfied && stingy) { REMatch results = matchRest(input, newMatch); if (results != null) { mymatch.assignFrom(results); return true; } } positions.add(newMatch); if (emptyMatchFound) break; doables = findDoables(token, input, newMatch); if (doables == null) break; // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. // In this case, we do not have to go further until // numRepeats == max because the more numRepeats grows, // the shorter the substring matching this token becomes. // So the previous succesful match must have bee the best // match. But this is not necessarily the case if stingy. if (doables.index == lastIndex) { if (doables.empty) { emptyMatchFound = true; } else { if (!stingy) break; } } numRepeats++; newMatch = doables; lastIndex = newMatch.index; } // We're greedy, but ease off until a true match is found. // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch.REMatchList allResults = new REMatch.REMatchList(); int posCount = positions.size(); int posIndex = (stingy ? 0 : posCount - 1); while (posCount-- > 0) { REMatch m = (REMatch) positions.elementAt(posIndex); if (stingy) posIndex++; else posIndex--; REMatch results = matchRest(input, m); if (results != null) { // Order these from longest to shortest // Start by assuming longest (more repeats) // If stingy the order is shortest to longest. allResults.addTail(results); } else { if (possessive) break; } } if (allResults.head != null) { mymatch.assignFrom(allResults.head); // does this get all? return true; } // If we fall out, no matches. return false; }
4,596
boolean match(CharIndexed input, REMatch mymatch) { // Possible positions for the next repeat to match at REMatch newMatch = mymatch; // {0} needs some special treatment. if (alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); return true; } else { return false; } } // number of times we've matched so far int numRepeats = 0; REMatch doables; int lastIndex = mymatch.index; boolean emptyMatchFound = false; while (numRepeats < min) { doables = findDoables(token, input, newMatch); // if none of the possibilities worked out, // it means that minimum number of repeats could not be found. if (doables == null) return false; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; if (newMatch.empty) { numRepeats = min; emptyMatchFound = true; break; } lastIndex = newMatch.index; } Vector positions = new Vector(); while (numRepeats <= max) { // We want to check something like // if (stingy) // and neglect the further matching. But experience tells // such neglection may cause incomplete matching. // For example, if we neglect the seemingly unnecessay // matching, /^(b+?|a){1,2}?c/ cannot match "bbc". // On the other hand, if we do not stop the unnecessary // matching, /(([a-c])b*?\2)*/ matches "ababbbcbc" // entirely when we wan to find only "ababb". // In order to make regression tests pass, we do as we did. if (stopMatchingIfSatisfied && stingy) { REMatch results = matchRest(input, newMatch); if (results != null) { mymatch.assignFrom(results); return true; } } positions.add(newMatch); if (emptyMatchFound) break; doables = findDoables(token, input, newMatch); if (doables == null) break; // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. // In this case, we do not have to go further until // numRepeats == max because the more numRepeats grows, // the shorter the substring matching this token becomes. // So the previous succesful match must have bee the best // match. But this is not necessarily the case if stingy. if (doables.index == lastIndex) { if (doables.empty) { emptyMatchFound = true; } else { if (!stingy) break; } } numRepeats++; newMatch = doables; lastIndex = newMatch.index; } // We're greedy, but ease off until a true match is found. // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch.REMatchList allResults = new REMatch.REMatchList(); int posCount = positions.size(); int posIndex = (stingy ? 0 : posCount - 1); while (posCount-- > 0) { REMatch m = (REMatch) positions.elementAt(posIndex); if (stingy) posIndex++; else posIndex--; REMatch results = matchRest(input, m); if (results != null) { // Order these from longest to shortest // Start by assuming longest (more repeats) // If stingy the order is shortest to longest. allResults.addTail(results); } else { if (possessive) break; } } if (allResults.head != null) { mymatch.assignFrom(allResults.head); // does this get all? return true; } // If we fall out, no matches. return false; }
boolean match(CharIndexed input, REMatch mymatch) { // Possible positions for the next repeat to match at REMatch newMatch = mymatch; // {0} needs some special treatment. if (alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); return true; } else { return false; } } // number of times we've matched so far int numRepeats = 0; REMatch doables; int lastIndex = mymatch.index; boolean emptyMatchFound = false; while (numRepeats < min) { doables = findDoables(token, input, newMatch); // if none of the possibilities worked out, // it means that minimum number of repeats could not be found. if (doables == null) return false; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; if (newMatch.empty) { numRepeats = min; emptyMatchFound = true; break; } lastIndex = newMatch.index; } Vector positions = new Vector(); while (numRepeats <= max) { // We want to check something like // if (stingy) // and neglect the further matching. But experience tells // such neglection may cause incomplete matching. // For example, if we neglect the seemingly unnecessay // matching, /^(b+?|a){1,2}?c/ cannot match "bbc". // On the other hand, if we do not stop the unnecessary // matching, /(([a-c])b*?\2)*/ matches "ababbbcbc" // entirely when we wan to find only "ababb". // In order to make regression tests pass, we do as we did. if (stopMatchingIfSatisfied && stingy) { REMatch results = matchRest(input, newMatch); if (results != null) { mymatch.assignFrom(results); return true; } } positions.add(newMatch); if (emptyMatchFound) break; doables = findDoables(token, input, newMatch); if (doables == null) break; // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. // In this case, we do not have to go further until // numRepeats == max because the more numRepeats grows, // the shorter the substring matching this token becomes. // So the previous succesful match must have bee the best // match. But this is not necessarily the case if stingy. if (doables.index == lastIndex) { if (doables.empty) { emptyMatchFound = true; } else { if (!stingy) break; } } numRepeats++; newMatch = doables; lastIndex = newMatch.index; } // We're greedy, but ease off until a true match is found. // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch.REMatchList allResults = new REMatch.REMatchList(); int posCount = positions.size(); int posIndex = (stingy ? 0 : posCount - 1); while (posCount-- > 0) { REMatch m = (REMatch) positions.elementAt(posIndex); if (stingy) posIndex++; else posIndex--; REMatch results = matchRest(input, m); if (results != null) { // Order these from longest to shortest // Start by assuming longest (more repeats) // If stingy the order is shortest to longest. allResults.addTail(results); } else { if (possessive) break; } } if (allResults.head != null) { mymatch.assignFrom(allResults.head); // does this get all? return true; } // If we fall out, no matches. return false; }
4,597
boolean match(CharIndexed input, REMatch mymatch) { // Possible positions for the next repeat to match at REMatch newMatch = mymatch; // {0} needs some special treatment. if (alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); return true; } else { return false; } } // number of times we've matched so far int numRepeats = 0; REMatch doables; int lastIndex = mymatch.index; boolean emptyMatchFound = false; while (numRepeats < min) { doables = findDoables(token, input, newMatch); // if none of the possibilities worked out, // it means that minimum number of repeats could not be found. if (doables == null) return false; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; if (newMatch.empty) { numRepeats = min; emptyMatchFound = true; break; } lastIndex = newMatch.index; } Vector positions = new Vector(); while (numRepeats <= max) { // We want to check something like // if (stingy) // and neglect the further matching. But experience tells // such neglection may cause incomplete matching. // For example, if we neglect the seemingly unnecessay // matching, /^(b+?|a){1,2}?c/ cannot match "bbc". // On the other hand, if we do not stop the unnecessary // matching, /(([a-c])b*?\2)*/ matches "ababbbcbc" // entirely when we wan to find only "ababb". // In order to make regression tests pass, we do as we did. if (stopMatchingIfSatisfied && stingy) { REMatch results = matchRest(input, newMatch); if (results != null) { mymatch.assignFrom(results); return true; } } positions.add(newMatch); if (emptyMatchFound) break; doables = findDoables(token, input, newMatch); if (doables == null) break; // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. // In this case, we do not have to go further until // numRepeats == max because the more numRepeats grows, // the shorter the substring matching this token becomes. // So the previous succesful match must have bee the best // match. But this is not necessarily the case if stingy. if (doables.index == lastIndex) { if (doables.empty) { emptyMatchFound = true; } else { if (!stingy) break; } } numRepeats++; newMatch = doables; lastIndex = newMatch.index; } // We're greedy, but ease off until a true match is found. // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch.REMatchList allResults = new REMatch.REMatchList(); int posCount = positions.size(); int posIndex = (stingy ? 0 : posCount - 1); while (posCount-- > 0) { REMatch m = (REMatch) positions.elementAt(posIndex); if (stingy) posIndex++; else posIndex--; REMatch results = matchRest(input, m); if (results != null) { // Order these from longest to shortest // Start by assuming longest (more repeats) // If stingy the order is shortest to longest. allResults.addTail(results); } else { if (possessive) break; } } if (allResults.head != null) { mymatch.assignFrom(allResults.head); // does this get all? return true; } // If we fall out, no matches. return false; }
boolean match(CharIndexed input, REMatch mymatch) { // Possible positions for the next repeat to match at REMatch newMatch = mymatch; // {0} needs some special treatment. if (alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); return true; } return false; } } // number of times we've matched so far int numRepeats = 0; REMatch doables; int lastIndex = mymatch.index; boolean emptyMatchFound = false; while (numRepeats < min) { doables = findDoables(token, input, newMatch); // if none of the possibilities worked out, // it means that minimum number of repeats could not be found. if (doables == null) return false; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; if (newMatch.empty) { numRepeats = min; emptyMatchFound = true; break; } lastIndex = newMatch.index; } Vector positions = new Vector(); while (numRepeats <= max) { // We want to check something like // if (stingy) // and neglect the further matching. But experience tells // such neglection may cause incomplete matching. // For example, if we neglect the seemingly unnecessay // matching, /^(b+?|a){1,2}?c/ cannot match "bbc". // On the other hand, if we do not stop the unnecessary // matching, /(([a-c])b*?\2)*/ matches "ababbbcbc" // entirely when we wan to find only "ababb". // In order to make regression tests pass, we do as we did. if (stopMatchingIfSatisfied && stingy) { REMatch results = matchRest(input, newMatch); if (results != null) { mymatch.assignFrom(results); return true; } } positions.add(newMatch); if (emptyMatchFound) break; doables = findDoables(token, input, newMatch); if (doables == null) break; // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. // In this case, we do not have to go further until // numRepeats == max because the more numRepeats grows, // the shorter the substring matching this token becomes. // So the previous succesful match must have bee the best // match. But this is not necessarily the case if stingy. if (doables.index == lastIndex) { if (doables.empty) { emptyMatchFound = true; } if (!stingy) break; } } numRepeats++; newMatch = doables; lastIndex = newMatch.index; } // We're greedy, but ease off until a true match is found. // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch.REMatchList allResults = new REMatch.REMatchList(); int posCount = positions.size(); int posIndex = (stingy ? 0 : posCount - 1); while (posCount-- > 0) { REMatch m = (REMatch) positions.elementAt(posIndex); if (stingy) posIndex++; else posIndex--; REMatch results = matchRest(input, m); if (results != null) { // Order these from longest to shortest // Start by assuming longest (more repeats) // If stingy the order is shortest to longest. allResults.addTail(results); } if (possessive) break; } } if (allResults.head != null) { mymatch.assignFrom(allResults.head); // does this get all? return true; } // If we fall out, no matches. return false; }
4,598
boolean match(CharIndexed input, REMatch mymatch) { // Possible positions for the next repeat to match at REMatch newMatch = mymatch; // {0} needs some special treatment. if (alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); return true; } else { return false; } } // number of times we've matched so far int numRepeats = 0; REMatch doables; int lastIndex = mymatch.index; boolean emptyMatchFound = false; while (numRepeats < min) { doables = findDoables(token, input, newMatch); // if none of the possibilities worked out, // it means that minimum number of repeats could not be found. if (doables == null) return false; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; if (newMatch.empty) { numRepeats = min; emptyMatchFound = true; break; } lastIndex = newMatch.index; } Vector positions = new Vector(); while (numRepeats <= max) { // We want to check something like // if (stingy) // and neglect the further matching. But experience tells // such neglection may cause incomplete matching. // For example, if we neglect the seemingly unnecessay // matching, /^(b+?|a){1,2}?c/ cannot match "bbc". // On the other hand, if we do not stop the unnecessary // matching, /(([a-c])b*?\2)*/ matches "ababbbcbc" // entirely when we wan to find only "ababb". // In order to make regression tests pass, we do as we did. if (stopMatchingIfSatisfied && stingy) { REMatch results = matchRest(input, newMatch); if (results != null) { mymatch.assignFrom(results); return true; } } positions.add(newMatch); if (emptyMatchFound) break; doables = findDoables(token, input, newMatch); if (doables == null) break; // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. // In this case, we do not have to go further until // numRepeats == max because the more numRepeats grows, // the shorter the substring matching this token becomes. // So the previous succesful match must have bee the best // match. But this is not necessarily the case if stingy. if (doables.index == lastIndex) { if (doables.empty) { emptyMatchFound = true; } else { if (!stingy) break; } } numRepeats++; newMatch = doables; lastIndex = newMatch.index; } // We're greedy, but ease off until a true match is found. // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch.REMatchList allResults = new REMatch.REMatchList(); int posCount = positions.size(); int posIndex = (stingy ? 0 : posCount - 1); while (posCount-- > 0) { REMatch m = (REMatch) positions.elementAt(posIndex); if (stingy) posIndex++; else posIndex--; REMatch results = matchRest(input, m); if (results != null) { // Order these from longest to shortest // Start by assuming longest (more repeats) // If stingy the order is shortest to longest. allResults.addTail(results); } else { if (possessive) break; } } if (allResults.head != null) { mymatch.assignFrom(allResults.head); // does this get all? return true; } // If we fall out, no matches. return false; }
boolean match(CharIndexed input, REMatch mymatch) { // Possible positions for the next repeat to match at REMatch newMatch = mymatch; // {0} needs some special treatment. if (alwaysEmpty) { REMatch result = matchRest(input, newMatch); if (result != null) { mymatch.assignFrom(result); return true; } else { return false; } } // number of times we've matched so far int numRepeats = 0; REMatch doables; int lastIndex = mymatch.index; boolean emptyMatchFound = false; while (numRepeats < min) { doables = findDoables(token, input, newMatch); // if none of the possibilities worked out, // it means that minimum number of repeats could not be found. if (doables == null) return false; // reassign where the next repeat can match newMatch = doables; // increment how many repeats we've successfully found ++numRepeats; if (newMatch.empty) { numRepeats = min; emptyMatchFound = true; break; } lastIndex = newMatch.index; } Vector positions = new Vector(); while (numRepeats <= max) { // We want to check something like // if (stingy) // and neglect the further matching. But experience tells // such neglection may cause incomplete matching. // For example, if we neglect the seemingly unnecessay // matching, /^(b+?|a){1,2}?c/ cannot match "bbc". // On the other hand, if we do not stop the unnecessary // matching, /(([a-c])b*?\2)*/ matches "ababbbcbc" // entirely when we wan to find only "ababb". // In order to make regression tests pass, we do as we did. if (stopMatchingIfSatisfied && stingy) { REMatch results = matchRest(input, newMatch); if (results != null) { mymatch.assignFrom(results); return true; } } positions.add(newMatch); if (emptyMatchFound) break; doables = findDoables(token, input, newMatch); if (doables == null) break; // doables.index == lastIndex occurs either // (1) when an empty string was the longest // that matched this token. // or // (2) when the same string matches this token many times. // For example, "acbab" itself matches "a.*b" and // its substrings "acb" and "ab" also match. // In this case, we do not have to go further until // numRepeats == max because the more numRepeats grows, // the shorter the substring matching this token becomes. // So the previous succesful match must have bee the best // match. But this is not necessarily the case if stingy. if (doables.index == lastIndex) { if (doables.empty) { emptyMatchFound = true; } else { if (!stingy) break; } } numRepeats++; newMatch = doables; lastIndex = newMatch.index; } // We're greedy, but ease off until a true match is found. // At this point we've either got too many or just the right amount. // See if this numRepeats works with the rest of the regexp. REMatch.REMatchList allResults = new REMatch.REMatchList(); int posCount = positions.size(); int posIndex = (stingy ? 0 : posCount - 1); while (posCount-- > 0) { REMatch m = (REMatch) positions.elementAt(posIndex); if (stingy) posIndex++; else posIndex--; REMatch results = matchRest(input, m); if (results != null) { // Order these from longest to shortest // Start by assuming longest (more repeats) // If stingy the order is shortest to longest. allResults.addTail(results); } else { if (possessive) break; } } if (allResults.head != null) { mymatch.assignFrom(allResults.head); // does this get all? return true; } // If we fall out, no matches. return false; }
4,599
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) writeOut(outputstream, " href = \"" + href + "\""); String checksum = getChecksum(); if (checksum != null) writeOut(outputstream, " checksum = \"" + checksum.toString() + "\""); writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { //write out to another file, try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { //oops, sth. is wrong, writ out to the passed in OutputStream dataOutputStream = outputstream; } } else { // no *href* attribute specified, write out to the passed in OutputStream dataOutputStream = outputstream; } Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String NoDataValues[] = new String[fastestAxis.getLength()]; if (parentArray.hasFieldAxis()) { DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); } } else { DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); } } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } else { writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } } //close the data section appropriately if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) writeOut(outputstream, " href = \"" + href + "\""); String checksum = getChecksum(); if (checksum != null) writeOut(outputstream, " checksum = \"" + checksum.toString() + "\""); writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { //write out to another file, try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { //oops, sth. is wrong, writ out to the passed in OutputStream dataOutputStream = outputstream; } } else { // no *href* attribute specified, write out to the passed in OutputStream dataOutputStream = outputstream; } Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String NoDataValues[] = new String[fastestAxis.getLength()]; if (parentArray.hasFieldAxis()) { DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); } } else { DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); } } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } else { writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } } //close the data section appropriately if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
4,601
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) writeOut(outputstream, " href = \"" + href + "\""); String checksum = getChecksum(); if (checksum != null) writeOut(outputstream, " checksum = \"" + checksum.toString() + "\""); writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { //write out to another file, try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { //oops, sth. is wrong, writ out to the passed in OutputStream dataOutputStream = outputstream; } } else { // no *href* attribute specified, write out to the passed in OutputStream dataOutputStream = outputstream; } Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String NoDataValues[] = new String[fastestAxis.getLength()]; if (parentArray.hasFieldAxis()) { DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); } } else { DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); } } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } else { writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } } //close the data section appropriately if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); String indent = ""; indent = indent + strIndent; String nodeName = getClassXDFNodeName(); //open node if (niceOutput) writeOut(outputstream, indent); writeOut(outputstream, "<" + nodeName ); String href = getHref(); if (href !=null) writeOut(outputstream, " href = \"" + href + "\""); String checksum = getChecksum(); if (checksum != null) writeOut(outputstream, " checksum = \"" + checksum.toString() + "\""); writeOut(outputstream, ">"); //end of opening code //write out just the data XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle(); OutputStream dataOutputStream; if (href !=null) { //write out to another file, try { dataOutputStream = new FileOutputStream(getHref()); } catch (IOException e) { //oops, sth. is wrong, writ out to the passed in OutputStream dataOutputStream = outputstream; } } else { // no *href* attribute specified, write out to the passed in OutputStream dataOutputStream = outputstream; } Locator currentLocator = parentArray.createLocator(); AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0); //stores the NoDataValues for the parentArray, //used in writing out when NoDataException is caught String NoDataValues[] = new String[fastestAxis.getLength()]; if (parentArray.hasFieldAxis()) { DataFormat[] dataFormatList = parentArray.getDataFormatList(); for (int i = 0; i < NoDataValues.length; i++) { DataFormat d = dataFormatList[i]; if (d != null && d.getNoDataValue() != null) NoDataValues[i]=d.getNoDataValue().toString(); } } else { DataFormat d = parentArray.getDataFormat(); for (int i = 0; i < NoDataValues.length; i++) { if (d!=null && d.getNoDataValue() != null) NoDataValues[i] = d.getNoDataValue().toString(); } } if (readObj instanceof TaggedXMLDataIOStyle) { String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags(); int stop = tagOrder.length; String[] tags = new String[stop]; for (int i = stop-1; i >= 0 ; i--) { tags[stop-i-1] = tagOrder[i]; // System.out.println(tagOrder.get(i)); } int[] axes = getMaxDataIndex(); stop =axes.length; int[] axisLength = new int[stop]; for (int i = 0; i < stop; i++) { axisLength[i] =axes[stop - 1 - i]; } writeTaggedData(dataOutputStream, currentLocator, indent, axisLength, tags, 0, fastestAxis, NoDataValues); } //done dealing with with TaggedXMLDataIOSytle else { if (readObj instanceof DelimitedXMLDataIOStyle) { writeDelimitedData( dataOutputStream, currentLocator, (DelimitedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } else { writeFormattedData(dataOutputStream, currentLocator, (FormattedXMLDataIOStyle) readObj, fastestAxis, NoDataValues ); } } //close the data section appropriately if (niceOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } writeOut(outputstream, "</" + nodeName + ">"); if (niceOutput) writeOut(outputstream, Constants.NEW_LINE); }
4,602
public void flush() { if(!dirty) return; //XXX... Ext2Debugger.error("BLOCK FLUSHED FROM CACHE",1); }
public void flush() { if(!dirty) return; //XXX... log.error("BLOCK FLUSHED FROM CACHE"); }
4,603
public float getLayoutAlignmentX(Container target) { return target.getAlignmentX(); }
public float getLayoutAlignmentX(Container target) { return 0.0F; }
4,604
public float getLayoutAlignmentY(Container target) { return target.getAlignmentY(); }
public float getLayoutAlignmentY(Container target) { return 0.0F; }
4,605
public void layoutContainer(Container c) { Dimension menuBarSize; int containerWidth = c.getBounds().width - getInsets().left - getInsets().right; int containerHeight = c.getBounds().height - getInsets().top - getInsets().bottom; Dimension contentPaneSize = contentPane.getPreferredSize(); // 1. the glassPane fills entire viewable region (bounds - insets). // 2. the layeredPane filles entire viewable region. // 3. the menuBar is positioned at the upper edge of layeredPane. // 4. the contentPane fills viewable region minus menuBar, if present. /* if size of top-level window wasn't set then just set contentPane and menuBar to its preferred sizes. Otherwise, if the size of top-level window was specified then set menuBar to its preferred size and make content pane to fit into the remaining space +-------------------------------+ | JLayeredPane | | +--------------------------+ | | | menuBar | | | +--------------------------+ | | +--------------------------+ | | |contentPane | | | | | | | | | | | | | | | +--------------------------+ | +-------------------------------+ */ if (containerWidth == 0 && containerHeight == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); menuBar.setBounds(0, 0, maxWidth, menuBarSize.height); glassPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); contentPane.setBounds(0, menuBarSize.height, maxWidth, contentPaneSize.height); layeredPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); } else { glassPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); contentPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); layeredPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); } } else { if (menuBar != null) { menuBarSize = menuBar.getPreferredSize(); if (menuBarSize.height > containerHeight) menuBarSize.height = containerHeight; menuBar.setBounds(0, 0, containerWidth, menuBarSize.height); glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, menuBarSize.height, containerWidth, (containerHeight - menuBarSize.height)); } else { glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, 0, containerWidth, containerHeight); } layeredPane.setBounds(0, 0, containerWidth, containerHeight); } }
public void layoutContainer(Container c) { Dimension menuBarSize; int containerWidth = c.getBounds().width - getInsets().left - getInsets().right; int containerHeight = c.getBounds().height - getInsets().top - getInsets().bottom; Dimension contentPaneSize = contentPane.getPreferredSize(); // 1. the glassPane fills entire viewable region (bounds - insets). // 2. the layeredPane filles entire viewable region. // 3. the menuBar is positioned at the upper edge of layeredPane. // 4. the contentPane fills viewable region minus menuBar, if present. /* if size of top-level window wasn't set then just set contentPane and menuBar to its preferred sizes. Otherwise, if the size of top-level window was specified then set menuBar to its preferred size and make content pane to fit into the remaining space +-------------------------------+ | JLayeredPane | | +--------------------------+ | | | menuBar | | | +--------------------------+ | | +--------------------------+ | | |contentPane | | | | | | | | | | | | | | | +--------------------------+ | +-------------------------------+ */ if (containerWidth == 0 && containerHeight == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); menuBar.setBounds(0, 0, maxWidth, menuBarSize.height); glassPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); contentPane.setBounds(0, menuBarSize.height, maxWidth, contentPaneSize.height); layeredPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); } else { glassPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); contentPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); layeredPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); } } else { if (menuBar != null) { menuBarSize = menuBar.getPreferredSize(); if (menuBarSize.height > containerHeight) menuBarSize.height = containerHeight; menuBar.setBounds(0, 0, containerWidth, menuBarSize.height); glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, menuBarSize.height, containerWidth, (containerHeight - menuBarSize.height)); } else { glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, 0, containerWidth, containerHeight); } layeredPane.setBounds(0, 0, containerWidth, containerHeight); } }
4,607
public void layoutContainer(Container c) { Dimension menuBarSize; int containerWidth = c.getBounds().width - getInsets().left - getInsets().right; int containerHeight = c.getBounds().height - getInsets().top - getInsets().bottom; Dimension contentPaneSize = contentPane.getPreferredSize(); // 1. the glassPane fills entire viewable region (bounds - insets). // 2. the layeredPane filles entire viewable region. // 3. the menuBar is positioned at the upper edge of layeredPane. // 4. the contentPane fills viewable region minus menuBar, if present. /* if size of top-level window wasn't set then just set contentPane and menuBar to its preferred sizes. Otherwise, if the size of top-level window was specified then set menuBar to its preferred size and make content pane to fit into the remaining space +-------------------------------+ | JLayeredPane | | +--------------------------+ | | | menuBar | | | +--------------------------+ | | +--------------------------+ | | |contentPane | | | | | | | | | | | | | | | +--------------------------+ | +-------------------------------+ */ if (containerWidth == 0 && containerHeight == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); menuBar.setBounds(0, 0, maxWidth, menuBarSize.height); glassPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); contentPane.setBounds(0, menuBarSize.height, maxWidth, contentPaneSize.height); layeredPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); } else { glassPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); contentPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); layeredPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); } } else { if (menuBar != null) { menuBarSize = menuBar.getPreferredSize(); if (menuBarSize.height > containerHeight) menuBarSize.height = containerHeight; menuBar.setBounds(0, 0, containerWidth, menuBarSize.height); glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, menuBarSize.height, containerWidth, (containerHeight - menuBarSize.height)); } else { glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, 0, containerWidth, containerHeight); } layeredPane.setBounds(0, 0, containerWidth, containerHeight); } }
public void layoutContainer(Container c) { Dimension menuBarSize; int containerWidth = c.getBounds().width - getInsets().left - getInsets().right; int containerHeight = c.getBounds().height - getInsets().top - getInsets().bottom; Dimension contentPaneSize = contentPane.getPreferredSize(); // 1. the glassPane fills entire viewable region (bounds - insets). // 2. the layeredPane filles entire viewable region. // 3. the menuBar is positioned at the upper edge of layeredPane. // 4. the contentPane fills viewable region minus menuBar, if present. /* if size of top-level window wasn't set then just set contentPane and menuBar to its preferred sizes. Otherwise, if the size of top-level window was specified then set menuBar to its preferred size and make content pane to fit into the remaining space +-------------------------------+ | JLayeredPane | | +--------------------------+ | | | menuBar | | | +--------------------------+ | | +--------------------------+ | | |contentPane | | | | | | | | | | | | | | | +--------------------------+ | +-------------------------------+ */ if (containerWidth == 0 && containerHeight == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); menuBar.setBounds(0, 0, maxWidth, menuBarSize.height); glassPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); contentPane.setBounds(0, menuBarSize.height, maxWidth, contentPaneSize.height); layeredPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); } else { glassPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); contentPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); layeredPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); } } else { if (menuBar != null) { menuBarSize = menuBar.getPreferredSize(); if (menuBarSize.height > containerHeight) menuBarSize.height = containerHeight; menuBar.setBounds(0, 0, containerWidth, menuBarSize.height); glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, menuBarSize.height, containerWidth, (containerHeight - menuBarSize.height)); } else { glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, 0, containerWidth, containerHeight); } layeredPane.setBounds(0, 0, containerWidth, containerHeight); } }
4,608
public void layoutContainer(Container c) { Dimension menuBarSize; int containerWidth = c.getBounds().width - getInsets().left - getInsets().right; int containerHeight = c.getBounds().height - getInsets().top - getInsets().bottom; Dimension contentPaneSize = contentPane.getPreferredSize(); // 1. the glassPane fills entire viewable region (bounds - insets). // 2. the layeredPane filles entire viewable region. // 3. the menuBar is positioned at the upper edge of layeredPane. // 4. the contentPane fills viewable region minus menuBar, if present. /* if size of top-level window wasn't set then just set contentPane and menuBar to its preferred sizes. Otherwise, if the size of top-level window was specified then set menuBar to its preferred size and make content pane to fit into the remaining space +-------------------------------+ | JLayeredPane | | +--------------------------+ | | | menuBar | | | +--------------------------+ | | +--------------------------+ | | |contentPane | | | | | | | | | | | | | | | +--------------------------+ | +-------------------------------+ */ if (containerWidth == 0 && containerHeight == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); menuBar.setBounds(0, 0, maxWidth, menuBarSize.height); glassPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); contentPane.setBounds(0, menuBarSize.height, maxWidth, contentPaneSize.height); layeredPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); } else { glassPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); contentPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); layeredPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); } } else { if (menuBar != null) { menuBarSize = menuBar.getPreferredSize(); if (menuBarSize.height > containerHeight) menuBarSize.height = containerHeight; menuBar.setBounds(0, 0, containerWidth, menuBarSize.height); glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, menuBarSize.height, containerWidth, (containerHeight - menuBarSize.height)); } else { glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, 0, containerWidth, containerHeight); } layeredPane.setBounds(0, 0, containerWidth, containerHeight); } }
public void layoutContainer(Container c) { Dimension menuBarSize; int containerWidth = c.getBounds().width - getInsets().left - getInsets().right; int containerHeight = c.getBounds().height - getInsets().top - getInsets().bottom; Dimension contentPaneSize = contentPane.getPreferredSize(); // 1. the glassPane fills entire viewable region (bounds - insets). // 2. the layeredPane filles entire viewable region. // 3. the menuBar is positioned at the upper edge of layeredPane. // 4. the contentPane fills viewable region minus menuBar, if present. /* if size of top-level window wasn't set then just set contentPane and menuBar to its preferred sizes. Otherwise, if the size of top-level window was specified then set menuBar to its preferred size and make content pane to fit into the remaining space +-------------------------------+ | JLayeredPane | | +--------------------------+ | | | menuBar | | | +--------------------------+ | | +--------------------------+ | | |contentPane | | | | | | | | | | | | | | | +--------------------------+ | +-------------------------------+ */ if (containerWidth == 0 && containerHeight == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); menuBar.setBounds(0, 0, maxWidth, menuBarSize.height); glassPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); contentPane.setBounds(0, menuBarSize.height, maxWidth, contentPaneSize.height); layeredPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); } else { glassPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); contentPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); layeredPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); } } else { if (menuBar != null) { menuBarSize = menuBar.getPreferredSize(); if (menuBarSize.height > containerHeight) menuBarSize.height = containerHeight; menuBar.setBounds(0, 0, containerWidth, menuBarSize.height); glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, menuBarSize.height, containerWidth, (containerHeight - menuBarSize.height)); } else { glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, 0, containerWidth, containerHeight); } layeredPane.setBounds(0, 0, containerWidth, containerHeight); } }
4,609
public void layoutContainer(Container c) { Dimension menuBarSize; int containerWidth = c.getBounds().width - getInsets().left - getInsets().right; int containerHeight = c.getBounds().height - getInsets().top - getInsets().bottom; Dimension contentPaneSize = contentPane.getPreferredSize(); // 1. the glassPane fills entire viewable region (bounds - insets). // 2. the layeredPane filles entire viewable region. // 3. the menuBar is positioned at the upper edge of layeredPane. // 4. the contentPane fills viewable region minus menuBar, if present. /* if size of top-level window wasn't set then just set contentPane and menuBar to its preferred sizes. Otherwise, if the size of top-level window was specified then set menuBar to its preferred size and make content pane to fit into the remaining space +-------------------------------+ | JLayeredPane | | +--------------------------+ | | | menuBar | | | +--------------------------+ | | +--------------------------+ | | |contentPane | | | | | | | | | | | | | | | +--------------------------+ | +-------------------------------+ */ if (containerWidth == 0 && containerHeight == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); menuBar.setBounds(0, 0, maxWidth, menuBarSize.height); glassPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); contentPane.setBounds(0, menuBarSize.height, maxWidth, contentPaneSize.height); layeredPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); } else { glassPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); contentPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); layeredPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); } } else { if (menuBar != null) { menuBarSize = menuBar.getPreferredSize(); if (menuBarSize.height > containerHeight) menuBarSize.height = containerHeight; menuBar.setBounds(0, 0, containerWidth, menuBarSize.height); glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, menuBarSize.height, containerWidth, (containerHeight - menuBarSize.height)); } else { glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, 0, containerWidth, containerHeight); } layeredPane.setBounds(0, 0, containerWidth, containerHeight); } }
public void layoutContainer(Container c) { Dimension menuBarSize; int containerWidth = c.getBounds().width - getInsets().left - getInsets().right; int containerHeight = c.getBounds().height - getInsets().top - getInsets().bottom; Dimension contentPaneSize = contentPane.getPreferredSize(); // 1. the glassPane fills entire viewable region (bounds - insets). // 2. the layeredPane filles entire viewable region. // 3. the menuBar is positioned at the upper edge of layeredPane. // 4. the contentPane fills viewable region minus menuBar, if present. /* if size of top-level window wasn't set then just set contentPane and menuBar to its preferred sizes. Otherwise, if the size of top-level window was specified then set menuBar to its preferred size and make content pane to fit into the remaining space +-------------------------------+ | JLayeredPane | | +--------------------------+ | | | menuBar | | | +--------------------------+ | | +--------------------------+ | | |contentPane | | | | | | | | | | | | | | | +--------------------------+ | +-------------------------------+ */ if (containerWidth == 0 && containerHeight == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); menuBar.setBounds(0, 0, maxWidth, menuBarSize.height); glassPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); contentPane.setBounds(0, menuBarSize.height, maxWidth, contentPaneSize.height); layeredPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); } else { glassPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); contentPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); layeredPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); } } else { if (menuBar != null) { menuBarSize = menuBar.getPreferredSize(); if (menuBarSize.height > containerHeight) menuBarSize.height = containerHeight; menuBar.setBounds(0, 0, containerWidth, menuBarSize.height); glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, menuBarSize.height, containerWidth, (containerHeight - menuBarSize.height)); } else { glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, 0, containerWidth, containerHeight); } layeredPane.setBounds(0, 0, containerWidth, containerHeight); } }
4,610
public void layoutContainer(Container c) { Dimension menuBarSize; int containerWidth = c.getBounds().width - getInsets().left - getInsets().right; int containerHeight = c.getBounds().height - getInsets().top - getInsets().bottom; Dimension contentPaneSize = contentPane.getPreferredSize(); // 1. the glassPane fills entire viewable region (bounds - insets). // 2. the layeredPane filles entire viewable region. // 3. the menuBar is positioned at the upper edge of layeredPane. // 4. the contentPane fills viewable region minus menuBar, if present. /* if size of top-level window wasn't set then just set contentPane and menuBar to its preferred sizes. Otherwise, if the size of top-level window was specified then set menuBar to its preferred size and make content pane to fit into the remaining space +-------------------------------+ | JLayeredPane | | +--------------------------+ | | | menuBar | | | +--------------------------+ | | +--------------------------+ | | |contentPane | | | | | | | | | | | | | | | +--------------------------+ | +-------------------------------+ */ if (containerWidth == 0 && containerHeight == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); menuBar.setBounds(0, 0, maxWidth, menuBarSize.height); glassPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); contentPane.setBounds(0, menuBarSize.height, maxWidth, contentPaneSize.height); layeredPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); } else { glassPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); contentPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); layeredPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); } } else { if (menuBar != null) { menuBarSize = menuBar.getPreferredSize(); if (menuBarSize.height > containerHeight) menuBarSize.height = containerHeight; menuBar.setBounds(0, 0, containerWidth, menuBarSize.height); glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, menuBarSize.height, containerWidth, (containerHeight - menuBarSize.height)); } else { glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, 0, containerWidth, containerHeight); } layeredPane.setBounds(0, 0, containerWidth, containerHeight); } }
public void layoutContainer(Container c) { Dimension menuBarSize; int containerWidth = c.getBounds().width - getInsets().left - getInsets().right; int containerHeight = c.getBounds().height - getInsets().top - getInsets().bottom; Dimension contentPaneSize = contentPane.getPreferredSize(); // 1. the glassPane fills entire viewable region (bounds - insets). // 2. the layeredPane filles entire viewable region. // 3. the menuBar is positioned at the upper edge of layeredPane. // 4. the contentPane fills viewable region minus menuBar, if present. /* if size of top-level window wasn't set then just set contentPane and menuBar to its preferred sizes. Otherwise, if the size of top-level window was specified then set menuBar to its preferred size and make content pane to fit into the remaining space +-------------------------------+ | JLayeredPane | | +--------------------------+ | | | menuBar | | | +--------------------------+ | | +--------------------------+ | | |contentPane | | | | | | | | | | | | | | | +--------------------------+ | +-------------------------------+ */ if (containerWidth == 0 && containerHeight == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); menuBar.setBounds(0, 0, maxWidth, menuBarSize.height); glassPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); contentPane.setBounds(0, menuBarSize.height, maxWidth, contentPaneSize.height); layeredPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); } else { glassPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); contentPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); layeredPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); } } else { if (menuBar != null) { menuBarSize = menuBar.getPreferredSize(); if (menuBarSize.height > containerHeight) menuBarSize.height = containerHeight; menuBar.setBounds(0, 0, containerWidth, menuBarSize.height); glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, menuBarSize.height, containerWidth, (containerHeight - menuBarSize.height)); } else { glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, 0, containerWidth, containerHeight); } layeredPane.setBounds(0, 0, containerWidth, containerHeight); } }
4,611
public void layoutContainer(Container c) { Dimension menuBarSize; int containerWidth = c.getBounds().width - getInsets().left - getInsets().right; int containerHeight = c.getBounds().height - getInsets().top - getInsets().bottom; Dimension contentPaneSize = contentPane.getPreferredSize(); // 1. the glassPane fills entire viewable region (bounds - insets). // 2. the layeredPane filles entire viewable region. // 3. the menuBar is positioned at the upper edge of layeredPane. // 4. the contentPane fills viewable region minus menuBar, if present. /* if size of top-level window wasn't set then just set contentPane and menuBar to its preferred sizes. Otherwise, if the size of top-level window was specified then set menuBar to its preferred size and make content pane to fit into the remaining space +-------------------------------+ | JLayeredPane | | +--------------------------+ | | | menuBar | | | +--------------------------+ | | +--------------------------+ | | |contentPane | | | | | | | | | | | | | | | +--------------------------+ | +-------------------------------+ */ if (containerWidth == 0 && containerHeight == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); menuBar.setBounds(0, 0, maxWidth, menuBarSize.height); glassPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); contentPane.setBounds(0, menuBarSize.height, maxWidth, contentPaneSize.height); layeredPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); } else { glassPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); contentPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); layeredPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); } } else { if (menuBar != null) { menuBarSize = menuBar.getPreferredSize(); if (menuBarSize.height > containerHeight) menuBarSize.height = containerHeight; menuBar.setBounds(0, 0, containerWidth, menuBarSize.height); glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, menuBarSize.height, containerWidth, (containerHeight - menuBarSize.height)); } else { glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, 0, containerWidth, containerHeight); } layeredPane.setBounds(0, 0, containerWidth, containerHeight); } }
public void layoutContainer(Container c) { Dimension menuBarSize; int containerWidth = c.getBounds().width - getInsets().left - getInsets().right; int containerHeight = c.getBounds().height - getInsets().top - getInsets().bottom; Dimension contentPaneSize = contentPane.getPreferredSize(); // 1. the glassPane fills entire viewable region (bounds - insets). // 2. the layeredPane filles entire viewable region. // 3. the menuBar is positioned at the upper edge of layeredPane. // 4. the contentPane fills viewable region minus menuBar, if present. /* if size of top-level window wasn't set then just set contentPane and menuBar to its preferred sizes. Otherwise, if the size of top-level window was specified then set menuBar to its preferred size and make content pane to fit into the remaining space +-------------------------------+ | JLayeredPane | | +--------------------------+ | | | menuBar | | | +--------------------------+ | | +--------------------------+ | | |contentPane | | | | | | | | | | | | | | | +--------------------------+ | +-------------------------------+ */ if (containerWidth == 0 && containerHeight == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); menuBar.setBounds(0, 0, maxWidth, menuBarSize.height); glassPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); contentPane.setBounds(0, menuBarSize.height, maxWidth, contentPaneSize.height); layeredPane.setBounds(0, 0, maxWidth, menuBarSize.height + contentPaneSize.height); } else { glassPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); contentPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); layeredPane.setBounds(0, 0, contentPaneSize.width, contentPaneSize.height); } } else { if (menuBar != null) { menuBarSize = menuBar.getPreferredSize(); if (menuBarSize.height > containerHeight) menuBarSize.height = containerHeight; menuBar.setBounds(0, 0, containerWidth, menuBarSize.height); glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, menuBarSize.height, containerWidth, (containerHeight - menuBarSize.height)); } else { glassPane.setBounds(0, 0, containerWidth, containerHeight); contentPane.setBounds(0, 0, containerWidth, containerHeight); } layeredPane.setBounds(0, 0, containerWidth, containerHeight); } }
4,612
public Dimension preferredLayoutSize(Container c) { Dimension menuBarSize; Dimension prefSize; Dimension containerSize = c.getSize(); Dimension contentPaneSize = contentPane.getPreferredSize(); if (containerSize.width == 0 && containerSize.height == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); prefSize = new Dimension(maxWidth, contentPaneSize.height + menuBarSize.height); } else prefSize = contentPaneSize; } else prefSize = c.getSize(); return prefSize; }
public Dimension preferredLayoutSize(Container c) { Dimension menuBarSize; Dimension prefSize; Dimension containerSize = c.getSize(); Dimension contentPaneSize = contentPane.getPreferredSize(); if (containerSize.width == 0 && containerSize.height == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); prefSize = new Dimension(maxWidth, contentPaneSize.height + menuBarSize.height); } else prefSize = contentPaneSize; } else prefSize = c.getSize(); return prefSize; }
4,613
public Dimension preferredLayoutSize(Container c) { Dimension menuBarSize; Dimension prefSize; Dimension containerSize = c.getSize(); Dimension contentPaneSize = contentPane.getPreferredSize(); if (containerSize.width == 0 && containerSize.height == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); prefSize = new Dimension(maxWidth, contentPaneSize.height + menuBarSize.height); } else prefSize = contentPaneSize; } else prefSize = c.getSize(); return prefSize; }
public Dimension preferredLayoutSize(Container c) { Dimension menuBarSize; Dimension prefSize; Dimension containerSize = c.getSize(); Dimension contentPaneSize = contentPane.getPreferredSize(); if (containerSize.width == 0 && containerSize.height == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); prefSize = new Dimension(maxWidth, contentPaneSize.height + menuBarSize.height); } else prefSize = contentPaneSize; } else prefSize = c.getSize(); return prefSize; }
4,614
public Dimension preferredLayoutSize(Container c) { Dimension menuBarSize; Dimension prefSize; Dimension containerSize = c.getSize(); Dimension contentPaneSize = contentPane.getPreferredSize(); if (containerSize.width == 0 && containerSize.height == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); prefSize = new Dimension(maxWidth, contentPaneSize.height + menuBarSize.height); } else prefSize = contentPaneSize; } else prefSize = c.getSize(); return prefSize; }
public Dimension preferredLayoutSize(Container c) { Dimension menuBarSize; Dimension prefSize; Dimension containerSize = c.getSize(); Dimension contentPaneSize = contentPane.getPreferredSize(); if (containerSize.width == 0 && containerSize.height == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); prefSize = new Dimension(maxWidth, contentPaneSize.height + menuBarSize.height); } else prefSize = contentPaneSize; } else prefSize = c.getSize(); return prefSize; }
4,615
public Dimension preferredLayoutSize(Container c) { Dimension menuBarSize; Dimension prefSize; Dimension containerSize = c.getSize(); Dimension contentPaneSize = contentPane.getPreferredSize(); if (containerSize.width == 0 && containerSize.height == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); prefSize = new Dimension(maxWidth, contentPaneSize.height + menuBarSize.height); } else prefSize = contentPaneSize; } else prefSize = c.getSize(); return prefSize; }
public Dimension preferredLayoutSize(Container c) { Dimension menuBarSize; Dimension prefSize; Dimension containerSize = c.getSize(); Dimension contentPaneSize = contentPane.getPreferredSize(); if (containerSize.width == 0 && containerSize.height == 0) { if (menuBar != null) { int maxWidth; menuBarSize = menuBar.getPreferredSize(); maxWidth = Math.max(menuBarSize.width, contentPaneSize.width); prefSize = new Dimension(maxWidth, contentPaneSize.height + menuBarSize.height); } else prefSize = contentPaneSize; } else prefSize = c.getSize(); return prefSize; }
4,616
Runtime getRunTimeCodeBase();
RunTime getRunTimeCodeBase();
4,617
Serializable readValue(InputStream in, int offset, Class clz, String repositoryID, Runtime sender);
Serializable readValue(InputStream in, int offset, Class clz, String repositoryID, RunTime sender);
4,618
public void setCellRenderer(ListCellRenderer renderer) { if (cellRenderer == renderer) return; ListCellRenderer old = cellRenderer; cellRenderer = renderer; firePropertyChange(CELL_RENDERER_PROPERTY_CHANGED, old, renderer); revalidate(); repaint(); }
public void setCellRenderer(ListCellRenderer renderer) { if (cellRenderer == renderer) return; ListCellRenderer old = cellRenderer; cellRenderer = renderer; firePropertyChange("cellRenderer", old, renderer); revalidate(); repaint(); }
4,619
public void setFixedCellHeight(int h) { int old = fixedCellHeight; fixedCellHeight = h; firePropertyChange(FIXED_CELL_WIDTH_PROPERTY_CHANGED, old, h); }
public void setFixedCellHeight(int h) { int old = fixedCellHeight; fixedCellHeight = h; firePropertyChange("fixedCellWidth", old, h); }
4,620
public void setFixedCellWidth(int h) { int old = fixedCellHeight; fixedCellHeight = h; firePropertyChange(FIXED_CELL_HEIGHT_PROPERTY_CHANGED, old, h); }
public void setFixedCellWidth(int w) { int old = fixedCellHeight; fixedCellHeight = h; firePropertyChange(FIXED_CELL_HEIGHT_PROPERTY_CHANGED, old, h); }
4,621
public void setFixedCellWidth(int h) { int old = fixedCellHeight; fixedCellHeight = h; firePropertyChange(FIXED_CELL_HEIGHT_PROPERTY_CHANGED, old, h); }
public void setFixedCellWidth(int h) { int old = fixedCellHeight; fixedCellHeight = h; firePropertyChange(FIXED_CELL_HEIGHT_PROPERTY_CHANGED, old, h); }
4,622
public void setModel(ListModel model) { if (this.model == model) return; if (this.model != null) this.model.removeListDataListener(listListener); ListModel old = this.model; this.model = model; if (this.model != null) this.model.addListDataListener(listListener); firePropertyChange(MODEL_PROPERTY_CHANGED, old, model); revalidate(); repaint(); }
public void setModel(ListModel model) { if (this.model == model) return; if (this.model != null) this.model.removeListDataListener(listListener); ListModel old = this.model; this.model = model; if (this.model != null) this.model.addListDataListener(listListener); firePropertyChange("model", old, model); revalidate(); repaint(); }
4,623
public void setPrototypeCellValue(Object obj) { Object old = prototypeCellValue; Component comp = getCellRenderer() .getListCellRendererComponent(this, obj, 0, false, false); Dimension d = comp.getPreferredSize(); fixedCellWidth = d.width; fixedCellHeight = d.height; prototypeCellValue = obj; firePropertyChange(PROTOTYPE_CELL_VALUE_PROPERTY_CHANGED, old, obj); }
public void setPrototypeCellValue(Object obj) { Object old = prototypeCellValue; Component comp = getCellRenderer() .getListCellRendererComponent(this, obj, 0, false, false); Dimension d = comp.getPreferredSize(); fixedCellWidth = d.width; fixedCellHeight = d.height; prototypeCellValue = obj; firePropertyChange("prototypeCellValue", old, obj); }
4,624
public void setSelectionBackground(Color c) { Color old = selectionBackground; selectionBackground = c; firePropertyChange(SELECTION_BACKGROUND_PROPERTY_CHANGED, old, c); repaint(); }
public void setSelectionBackground(Color c) { Color old = selectionBackground; selectionBackground = c; firePropertyChange("selectionBackground", old, c); repaint(); }
4,625
public void setSelectionForeground(Color c) { Color old = selectionForeground; selectionForeground = c; firePropertyChange(SELECTION_FOREGROUND_PROPERTY_CHANGED, old, c); }
public void setSelectionForeground(Color c) { Color old = selectionForeground; selectionForeground = c; firePropertyChange("selectionForeground", old, c); }
4,626
public void setSelectionModel(ListSelectionModel model) { if (selectionModel == model) return; if (selectionModel != null) selectionModel.removeListSelectionListener(listListener); ListSelectionModel old = selectionModel; selectionModel = model; if (selectionModel != null) selectionModel.addListSelectionListener(listListener); firePropertyChange(SELECTION_MODEL_PROPERTY_CHANGED, old, model); revalidate(); repaint(); }
public void setSelectionModel(ListSelectionModel model) { if (selectionModel == model) return; if (selectionModel != null) selectionModel.removeListSelectionListener(listListener); ListSelectionModel old = selectionModel; selectionModel = model; if (selectionModel != null) selectionModel.addListSelectionListener(listListener); firePropertyChange("selectionModel", old, model); revalidate(); repaint(); }
4,627
public PhiAssignQuad(IRBasicBlock dfb, int lhsIndex) { this(dfb.getStartPC(), dfb, lhsIndex); }
public PhiAssignQuad(IRBasicBlock dfb, int lhsIndex) { this(dfb.getStartPC(), dfb, lhsIndex); }
4,628
public void removeSessionView(Session targetSession) { if (hideTabBar && sessionPane.getTabCount() == 0) { for (int x=0; x < getContentPane().getComponentCount(); x++) { if (getContentPane().getComponent(x) instanceof Session) { getContentPane().remove(x); } } } else { int index = sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); int tabs = sessionPane.getTabCount(); sessionPane.remove(index); tabs--; if (index < tabs) { sessionPane.setSelectedIndex(index); sessionPane.setForegroundAt(index,Color.blue); sessionPane.setIconAt(index,focused); ((Session)sessionPane.getComponentAt(index)).requestFocus(); } else { if (tabs > 0) { sessionPane.setSelectedIndex(0); sessionPane.setForegroundAt(0,Color.blue); sessionPane.setIconAt(0,focused); ((Session)sessionPane.getComponentAt(0)).requestFocus(); } } } }
public void removeSessionView(Session targetSession) { if (hideTabBar && sessionPane.getTabCount() == 0) { for (int x=0; x < getContentPane().getComponentCount(); x++) { if (getContentPane().getComponent(x) instanceof Session) { getContentPane().remove(x); } } } else { int index = sessionPane.indexOfComponent(targetSession); log.info("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); int tabs = sessionPane.getTabCount(); sessionPane.remove(index); tabs--; if (index < tabs) { sessionPane.setSelectedIndex(index); sessionPane.setForegroundAt(index,Color.blue); sessionPane.setIconAt(index,focused); ((Session)sessionPane.getComponentAt(index)).requestFocus(); } else { if (tabs > 0) { sessionPane.setSelectedIndex(0); sessionPane.setForegroundAt(0,Color.blue); sessionPane.setIconAt(0,focused); ((Session)sessionPane.getComponentAt(0)).requestFocus(); } } } }
4,629
protected void onClose() { log.debug("onClose"); // Stop the repaint manager if (repaintManager != null) { repaintManager.shutdown(); repaintManager = null; } // Close the desktop desktopFrame.dispose(); desktopFrame = null; }
protected void onClose() { log.debug("onClose"); // Stop the repaint manager if (repaintManager != null) { repaintManager.shutdown(); repaintManager = null; } // Close the desktop desktopFrame.dispose(); desktopFrame = null; }
4,632
public void addImpl(Component comp, Object constraints, int index) { if (getComponentCount() > 0) remove(getComponents()[0]); super.addImpl(comp, constraints, index); }
protected void addImpl(Component comp, Object constraints, int index) { if (getComponentCount() > 0) remove(getComponents()[0]); super.addImpl(comp, constraints, index); }
4,633
public int getOffset() { // Check precondition. assert(mark <= gapStart || mark > gapEnd); if (mark <= gapStart) return mark; else return mark - (gapEnd - gapStart); }
public int getOffset() { // Check precondition. assert mark <= gapStart || mark > gapEnd : "mark: " + mark + ", gapStart: " + gapStart + ", gapEnd: " + gapEnd; if (mark <= gapStart) return mark; else return mark - (gapEnd - gapStart); }
4,634
protected void replace(int position, int rmSize, Object addItems, int addSize) { // Remove content shiftGap(position); gapEnd += rmSize; // If gap is too small, enlarge the gap. if ((gapEnd - gapStart) < addSize) shiftEnd(addSize); // Add new items to the buffer. if (addItems != null) { System.arraycopy(addItems, 0, buffer, gapStart, addSize); gapStart += addSize; } }
protected void replace(int position, int rmSize, Object addItems, int addSize) { // Remove content shiftGap(position); shiftGapEndUp(gapEnd + rmSize); // If gap is too small, enlarge the gap. if ((gapEnd - gapStart) < addSize) shiftEnd(addSize); // Add new items to the buffer. if (addItems != null) { System.arraycopy(addItems, 0, buffer, gapStart, addSize); gapStart += addSize; } }
4,635