Fix #1693310 Missing function/method declaration in the completion list
authortoshihiro <toshihiro>
Tue, 3 Apr 2007 01:00:12 +0000 (01:00 +0000)
committertoshihiro <toshihiro>
Tue, 3 Apr 2007 01:00:12 +0000 (01:00 +0000)
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/DeclarationProposal.java

index d2edd51..4786adc 100644 (file)
@@ -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;
        }