Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Automatically add "final" keyword to method parameters?
Automatically add "final" keyword to method parameters? [message #249219] Mon, 18 February 2008 18:00 Go to next message
Eclipse UserFriend
Originally posted by: pschoenb.gmx.de

Hi,

is there a way to automatically add a "final" keyword to newly inputted
method parameters?

--
Regards,
Patrick
Re: Automatically add "final" keyword to method parameters? [message #249256 is a reply to message #249219] Mon, 18 February 2008 22:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Patrick Schoenbach wrote:
> Hi,
>
> is there a way to automatically add a "final" keyword to newly inputted
> method parameters?
>

If something about the way you use them (for example, in an annonymous
inner class declared inside the method), there will be a Quick Fix to
correct the corresponding error. Place cursor over the error (red
squiggly underline) and hit Ctrl+1

Hope this helps,
Eric
Re: Automatically add "final" keyword to method parameters? [message #249399 is a reply to message #249256] Tue, 19 February 2008 12:25 Go to previous message
Eclipse UserFriend
Originally posted by: 4cs6fcg02.sneakemail.com

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig4332138CFB72F719BA81E044
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Eric Rizzo schreef:
> Patrick Schoenbach wrote:
>> Hi,
>>
>> is there a way to automatically add a "final" keyword to newly inputte=
d
>> method parameters?
>>
>=20
> If something about the way you use them (for example, in an annonymous =

> inner class declared inside the method), there will be a Quick Fix to=20
> correct the corresponding error. Place cursor over the error (red=20
> squiggly underline) and hit Ctrl+1

You can set up save actions to do that for you (since 3.3).

Preferences -> Java -> Editor -> Save actions
from the top of my head, I am unsure, my system is broken at the moment. =

It works the same as cleanup, you can have it do a lot of things (I do =

formatting, adding annotations, adding final, qualifying all accesses,=20
organize imports...)

H.
--=20
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html


--------------enig4332138CFB72F719BA81E044
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFHusq8e+7xMGD3itQRAoKLAJ9/7OTe+uGJqcnPGjvgSMqjpkkK5ACf UgRT
QmF8PH4bdkMixmBfUB/QqKQ=
=QMyt
-----END PGP SIGNATURE-----

--------------enig4332138CFB72F719BA81E044--
Previous Topic:Unable to untar eclipse in hp-unix
Next Topic:Eclipse Source Code
Goto Forum:
  


Current Time: Fri Apr 19 01:16:11 GMT 2024

Powered by FUDForum. Page generated in 0.03233 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top