case PHPIdentifierLocation.FUNCTION :
document.replace(start, end - start, fIdentifierName + "()");
break;
-
+ case PHPIdentifierLocation.CONSTRUCTOR :
+ document.replace(start, end - start, fIdentifierName + "()");
+ break;
case PHPIdentifierLocation.METHOD :
document.replace(start, end - start, fIdentifierName + "()");
break;
case PHPIdentifierLocation.FUNCTION :
editor.setFinalCaretOffset(fIdentifierName.length() + start + 1);
break;
-
+ case PHPIdentifierLocation.CONSTRUCTOR :
+ editor.setFinalCaretOffset(fIdentifierName.length() + start + 1);
+ break;
case PHPIdentifierLocation.METHOD :
editor.setFinalCaretOffset(fIdentifierName.length() + start + 1);
break;
* @see ICompletionProposal#getDisplayString()
*/
public String getDisplayString() {
- return fIdentifierName + TemplateMessages.getString("TemplateProposal.delimiter") + fIdentifierName; // $NON-NLS-1$ //$NON-NLS-1$
- // return fTemplate.getName() + ObfuscatorMessages.getString("TemplateProposal.delimiter") + fTemplate.getDescription(); // $NON-NLS-1$ //$NON-NLS-1$
+ String workspaceLocation = PHPeclipsePlugin.getWorkspace().getRoot().getLocation().toString();
+ String filename = workspaceLocation + fLocation.getFilename();
+ return fIdentifierName + TemplateMessages.getString("TemplateProposal.delimiter") + PHPDocUtil.getUsage(filename, fLocation) + TemplateMessages.getString("TemplateProposal.delimiter") + filename; // $NON-NLS-1$ //$NON-NLS-1$
}
/*
return PHPUiImages.get(PHPUiImages.IMG_FUN);
case PHPIdentifierLocation.CLASS :
return PHPUiImages.get(PHPUiImages.IMG_CLASS);
+ case PHPIdentifierLocation.CONSTRUCTOR :
+ return PHPUiImages.get(PHPUiImages.IMG_CLASS);
case PHPIdentifierLocation.METHOD :
return PHPUiImages.get(PHPUiImages.IMG_FUN);
case PHPIdentifierLocation.DEFINE :
case '\n' :
case '\t' :
return 90;
-
+ case '>' : // ->
+ case ':' : // ::
+ return 95;
default :
return 0;
}