1) Moved net.sourceforge.phpeclipse.ui\src\net\sourceforge\phpdt back to net.sourcefo...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / text / template / DeclarationProposal.java
index d2edd51..c483035 100644 (file)
@@ -174,7 +174,7 @@ public class DeclarationProposal extends AbstractProposal { // implements
                } else {
                        // should never happen?
                        workspaceLocation = PHPeclipsePlugin.getWorkspace().getRoot()
-                                       .getLocation().toString();
+                                       .getFullPath().toString();
                }
                String filename = workspaceLocation + fLocation.getFilename();
                PHPDocUtil.appendPHPDoc(hoverInfoBuffer, filename, fLocation);
@@ -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.getFullPath().toString() + '/';
+                       workspaceName = fProject.getName().toString() + '/';
                } else {
                        // should never happen?
                        workspaceLocation = PHPeclipsePlugin.getWorkspace().getRoot()
-                                       .getLocation().toString();
+                                       .getFullPath().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;
        }