document.addPosition(SEGMENTS, p);
attributeLabel = document.get(region.getOffset(), region.getLength());
Matcher sig = attributePattern.matcher(attributeLabel);
if (sig.find()){
attributeLabel = sig.group(2);
fContent.add(new Segment(attributeLabel, p, makeIconString("attribute", sig.group(1))));
}
region = frAdapter.find(offset+length, ATTRIBUTE_REGEX, true, false, false, true);
}
// do the virtual attributes
region = frAdapter.find(0, VIRTUAL_ATTRIBUTE_REGEX, true, false, false, true);
attributeLabel = null;
while (region != null){
int offset = region.getOffset();
int length = region.getLength();
Position p = new Position(offset, length);
document.addPosition(SEGMENTS, p);
attributeLabel = document.get(region.getOffset(), region.getLength());
Matcher sig = virtualAttributePattern.matcher(attributeLabel);
if (sig.find()){
attributeLabel = sig.group(2);
fContent.add(new Segment(attributeLabel, p, makeIconString("virtual", sig.group(1))));
}
region = frAdapter.find(offset+length, VIRTUAL_ATTRIBUTE_REGEX, true, false, false, true);
}
// do the window attributes
region = frAdapter.find(0, WINDOW_REGEX, true, false, false, true);
attributeLabel = null;
while (region != null){
int offset = region.getOffset();
int length = region.getLength();
Position p = new Position(offset, length);
document.addPosition(SEGMENTS, p);
attributeLabel = document.get(region.getOffset(), region.getLength());
Matcher sig = windowAttributePattern.matcher(attributeLabel);
if (sig.find()){
attributeLabel = sig.group(1);
fContent.add(new Segment(attributeLabel, p, "icons/window_attribute.gif"));
}
region = frAdapter.find(offset+length, WINDOW_REGEX, true, false, false, true);
}
// do the class constants
region = frAdapter.find(0, CONSTANT_REGEX, true, false, false, true);
attributeLabel = null;
while (region != null){
int offset = region.getOffset();
int length = region.getLength();
Position p = new Position(offset, length);
document.addPosition(SEGMENTS, p);
attributeLabel = document.get(region.getOffset(), region.getLength());
Matcher sig = constantPattern.matcher(attributeLabel);
if (sig.find()){
attributeLabel = sig.group(2);
fContent.add(new Segment(attributeLabel, p, makeIconString("constant", sig.group(1))));
}
region = frAdapter.find(offset+length, CONSTANT_REGEX, true, false, false, true);
}
// do the method implementations
region = frAdapter.find(0, CEX_SIGNATURE_REGEX, true, false, false, true);
String methodSignature = null;
while (region != null){
int offset = region.getOffset();
int length = region.getLength();
Position p = new Position(offset, length);
document.addPosition(SEGMENTS, p);
methodSignature = document.get(region.getOffset(), region.getLength());
Matcher sig = cexSignaturePattern.matcher(methodSignature);
if (sig.find()){
methodSignature = sig.group(1);
fContent.add(new Segment(makeLabel(methodSignature), p, "icons/private_method.gif"));
}
region = frAdapter.find(offset+length, CEX_SIGNATURE_REGEX, true, false, false, true);
}
// // do the event handlers
// region = frAdapter.find(0, ToolEventHandler.CEX_SIGNATURE_REGEX, true, false, false, true);