I think I have found your problem, Jeff. The highlighted line below includes
a space after the "()" of the method signature. I have jde-gen-k&r set to
true, but I am getting the following type of signature:

  public Date getWorkDate()  {
    return this.m_workDate;
  }

Note the double spaces between the () and the {. I tried simply deleting the
trailing space in the line below, and that seems to work fine. Maybe that's
it, Paul?

/ Petter

           
(defun jde-wiz-get-get-method(type name &optional staticp &optional
class-name) 
  "Returns a string representing a get method"
  (let ((filtered-name (jde-wiz-get-name name))
        get (javadoc "") temp temp2)
    (setq 
     get 
     (concat 
      "\n"
      (if jde-wiz-include-javadoc
          (progn 
            (setq temp2 jde-wiz-get-javadoc-template)
            (while temp2
              (setq temp (car temp2))
              (while (string-match "%n" temp)
                (setq 
                 temp 
                 (replace-match 
                  (jde-wiz-downcase-initials filtered-name) nil nil temp)))
              (while (string-match "%t" temp)
                (setq temp (replace-match type nil nil temp)))
              (setq javadoc (concat javadoc temp "\n"))
              (setq temp2 (cdr temp2)))
            javadoc))
      "public " (if staticp "static ")
      type " " (if (string= type "boolean") "is" "get")
==>      (upcase-initials filtered-name) "() "
      (if jde-gen-k&r " {" "\n{") "\n"
      "return " (if staticp (concat class-name ".") "this.")
      name ";\n}\n"))
    get))

> -----Original Message-----
> From: Jeff Jensen [mailto:[EMAIL PROTECTED] 
> Sent: den 19 februari 2004 17:08
> To: [EMAIL PROTECTED]
> Subject: RE: gen get/set methods leaves trailing space on gets
> 
> 
> Thanks a lot for checking, Paul.
> 
> I have not customized any of the templates.
> 
> I have reviewed "Jde Gen Get Set Var Template" and 
> "jde-gen-method-signature", 
> and see no extra space even possible (but I am no lisp 
> expert, so could have 
> missed something simple)!
> 
> It is even more odd that it happens on gets and not sets!  To 
> me, that points 
> to the template.  The template is unmodified from the 2.3.3 release.
> 
> I will wait for the next release and hopefully this minor nit is gone!
> 
> Thanks again....
> 
> 
> > -----Original Message-----
> > From: Paul Kinnucan [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, February 19, 2004 12:15 AM
> > To: Jeff Jensen
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: gen get/set methods leaves trailing space on gets
> > 
> > 
> > Jeff Jensen writes:
> >  > Hi Paul,
> >  >
> >  > Attached is a sample class with the trailing space on the 
> > get signature
> > lines.
> >  > Note the sets do not have one.
> >  >
> >  > To create, I created the two instance variables, placed 
> > point at the end
> > of the
> >  > class, clicked JDE --> Code Generation --> Wizards --> 
> > Generate Get Set.
> >  >
> >  > Using JDE 2.3.3.
> >  >
> >  > Thanks Paul...
> >  >
> >  >
> > 
> > Hi Jeff,
> > 
> > I still cannot reproduce this problem. I've made some changes to the
> > jde-gen-get-set
> > template. My changes could have fixed the problem. Another 
> > possibility is
> > that you have a customized version of the template in a prj.el file
> > that has the extra space in it.
> > 
> > Paul
> > 
> > 
> >  > > -----Original Message-----
> >  > > From: Paul Kinnucan [mailto:[EMAIL PROTECTED]
> >  > > Sent: Tuesday, February 17, 2004 12:31 AM
> >  > > To: Jeff Jensen
> >  > > Cc: ed
> >  > > Subject: gen get/set methods leaves trailing space on gets
> >  > >
> >  > >
> >  > > Jeff Jensen writes:
> >  > >  > Hi Paul,
> >  > >  >
> >  > >  > Generating get/set methods leaves a trailing space on the
> >  > > generated get
> >  > >  > methods' signature, and not on the sets.  Would you mind
> >  > > removing the
> >  > >  > trailing space from the generated gets?
> >  > >  >
> >  > >  > This is obviously a very minor nit, but it triggers a
> >  > > Checkstyle rule,
> >  > >  > requiring manually deleting that space all the time.
> >  > >  >
> >  > >
> >  > > Hi Jeff,
> >  > >
> >  > > Please you send me an example of the generated code 
> pointing out
> >  > > where the trailing space occurs. I can't reproduced it 
> > on my system.
> >  > >
> >  > > Paulpublic class TrailingSpace
> >  > {
> >  >     int num = 4;
> >  >     String name = "Fred";
> >  >
> >  >
> >  >     /**
> >  >      * Gets the value of num
> >  >      *
> >  >      * @return the value of num
> >  >      */
> >  >     public int getNum()
> >  >     {
> >  >         return this.num;
> >  >     }
> >  >
> >  >     /**
> >  >      * Sets the value of num
> >  >      *
> >  >      * @param argNum Value to assign to this.num
> >  >      */
> >  >     public void setNum(int argNum)
> >  >     {
> >  >         this.num = argNum;
> >  >     }
> >  >
> >  >     /**
> >  >      * Gets the value of name
> >  >      *
> >  >      * @return the value of name
> >  >      */
> >  >     public String getName()
> >  >     {
> >  >         return this.name;
> >  >     }
> >  >
> >  >     /**
> >  >      * Sets the value of name
> >  >      *
> >  >      * @param argName Value to assign to this.name
> >  >      */
> >  >     public void setName(String argName)
> >  >     {
> >  >         this.name = argName;
> >  >     }
> >  >
> >  > }
> 

Reply via email to