{
String results = "";
String signalName = text;
Vector<OutlineElement> definitions = doc.getDefinitionList(signalName, offset);
OutlineElement component = getComponentElement(signalName, doc,offset);
boolean atLeftOfComponentInstantion = false;
if(component instanceof ComponentInstElement) {
String doccontent = doc.get();
int indexArrow = doccontent.indexOf("=>", offset);
int lineNrArrow,lineNrString;
try {
lineNrArrow = doc.getLineOfOffset(indexArrow);
lineNrString = doc.getLineOfOffset(offset);
if (lineNrString == lineNrArrow) {
atLeftOfComponentInstantion = true;
} else {
atLeftOfComponentInstantion = false;
}
} catch (BadLocationException e) {
}
}
if(!atLeftOfComponentInstantion) {
for(OutlineElement element:definitions) {
String commentString;
OutlineDatabase cc=doc.getOutlineDatabase();
OutlineContainer pp=cc.getOutlineContainer(element.getFile());
results+=pp.getCommentsNear(element);
if(doc instanceof VhdlDocument){
commentString="--";
}
else{
commentString="//";
}
results=results.trim();
if(results.length() > 0){
results=results.replaceAll("^",commentString+" ");
results=results.replaceAll("\n","\n"+commentString+" ");
results+="\n";
}
// ULTRANO
//results+=element.getLongName()+"\n";
results+=element.getFullSourceCode();
}
} else {
VhdlOutlineElement component1 = (VhdlOutlineElement) component;
String componentName = component1.getTypePart1();
OutlineElement componentDef = searchComponent(doc,
componentName);
String signalType = searchSignalType(componentDef, signalName);
results += signalType;
}