A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / text / template / DeclarationProposal.java
index bb65147..d2edd51 100644 (file)
@@ -55,15 +55,16 @@ public class DeclarationProposal extends AbstractProposal { // implements
 
        /**
         * Creates a template proposal with a template and its context.
-        *
+        * 
         * @param template
-        *          the template
+        *            the template
         * @param context
-        *          the context in which the template was requested.
+        *            the context in which the template was requested.
         * @param image
-        *          the icon of the proposal.
+        *            the icon of the proposal.
         */
-       public DeclarationProposal(IProject project, String identifierName, PHPIdentifierLocation location, TemplateContext context,
+       public DeclarationProposal(IProject project, String identifierName,
+                       PHPIdentifierLocation location, TemplateContext context,
                        IRegion region, ITextViewer viewer) {
                super(viewer);
                // Image image_fun,
@@ -121,13 +122,19 @@ public class DeclarationProposal extends AbstractProposal { // implements
                        LinkedPositionUI editor = new LinkedPositionUI(fViewer, manager);
                        switch (fLocation.getType()) {
                        case PHPIdentifierLocation.FUNCTION:
-                               editor.setFinalCaretOffset(fIdentifierName.length() + start + 1);
+                               editor
+                                               .setFinalCaretOffset(fIdentifierName.length() + start
+                                                               + 1);
                                break;
                        case PHPIdentifierLocation.CONSTRUCTOR:
-                               editor.setFinalCaretOffset(fIdentifierName.length() + start + 1);
+                               editor
+                                               .setFinalCaretOffset(fIdentifierName.length() + start
+                                                               + 1);
                                break;
                        case PHPIdentifierLocation.METHOD:
-                               editor.setFinalCaretOffset(fIdentifierName.length() + start + 1);
+                               editor
+                                               .setFinalCaretOffset(fIdentifierName.length() + start
+                                                               + 1);
                                break;
 
                        default:
@@ -166,7 +173,8 @@ public class DeclarationProposal extends AbstractProposal { // implements
                        workspaceLocation = fProject.getLocation().toString() + '/';
                } else {
                        // should never happen?
-                       workspaceLocation = PHPeclipsePlugin.getWorkspace().getRoot().getLocation().toString();
+                       workspaceLocation = PHPeclipsePlugin.getWorkspace().getRoot()
+                                       .getLocation().toString();
                }
                String filename = workspaceLocation + fLocation.getFilename();
                PHPDocUtil.appendPHPDoc(hoverInfoBuffer, filename, fLocation);
@@ -178,14 +186,16 @@ public class DeclarationProposal extends AbstractProposal { // implements
                        if (fLocation != null) {
                                fInfo = fLocation.getUsage();
                                if (fInfo != null) {
-                                       // extract the parameter context information for the function:
+                                       // extract the parameter context information for the
+                                       // function:
                                        int i0 = fInfo.indexOf('(');
                                        int newline = fInfo.indexOf('\n');
                                        if (i0 >= 0 && (i0 < newline || newline < 0)) {
                                                int i1 = fInfo.indexOf(')', i0 + 1);
                                                if (i1 > 0) {
 
-                                                       fContextInfo = new ContextInformation(null, fInfo.substring(i0+1, i1));
+                                                       fContextInfo = new ContextInformation(null, fInfo
+                                                                       .substring(i0 + 1, i1));
                                                } else {
                                                        fContextInfo = new ContextInformation(null, fInfo);
                                                }
@@ -207,13 +217,16 @@ public class DeclarationProposal extends AbstractProposal { // implements
                        workspaceLocation = fProject.getName().toString() + '/';
                } else {
                        // should never happen?
-                       workspaceLocation = PHPeclipsePlugin.getWorkspace().getRoot().getLocation().toString();
+                       workspaceLocation = PHPeclipsePlugin.getWorkspace().getRoot()
+                                       .getLocation().toString();
                }
                String filename = workspaceLocation + fLocation.getFilename();
                String usage = PHPDocUtil.getUsage(filename, fLocation);
-               String result = fIdentifierName + TemplateMessages.getString("TemplateProposal.delimiter");
+               String result = fIdentifierName
+                               + TemplateMessages.getString("TemplateProposal.delimiter");
                if (usage.length() > 0) {
-                       result += usage + TemplateMessages.getString("TemplateProposal.delimiter");
+                       result += usage
+                                       + TemplateMessages.getString("TemplateProposal.delimiter");
                }
                result += filename;
                return result;