From: toshihiro Date: Tue, 3 Apr 2007 01:00:12 +0000 (+0000) Subject: Fix #1693310 Missing function/method declaration in the completion list X-Git-Url: http://git.phpeclipse.com Fix #1693310 Missing function/method declaration in the completion list --- diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/DeclarationProposal.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/DeclarationProposal.java index d2edd51..4786adc 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/DeclarationProposal.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/DeclarationProposal.java @@ -213,22 +213,25 @@ public class DeclarationProposal extends AbstractProposal { // implements */ public String getDisplayString() { String workspaceLocation; + String workspaceName; if (fProject != null) { - workspaceLocation = fProject.getName().toString() + '/'; + workspaceLocation = fProject.getLocation().toString() + '/'; + workspaceName = fProject.getName().toString() + '/'; } else { // should never happen? workspaceLocation = PHPeclipsePlugin.getWorkspace().getRoot() .getLocation().toString(); + workspaceName = workspaceLocation; } - String filename = workspaceLocation + fLocation.getFilename(); - String usage = PHPDocUtil.getUsage(filename, fLocation); + String filename = fLocation.getFilename(); + String usage = PHPDocUtil.getUsage(workspaceLocation + filename, fLocation); String result = fIdentifierName + TemplateMessages.getString("TemplateProposal.delimiter"); if (usage.length() > 0) { result += usage + TemplateMessages.getString("TemplateProposal.delimiter"); } - result += filename; + result += workspaceName + filename; return result; }