Skip to main content



      Home
Home » Newcomers » Newcomers » why Eclipse automatically added "MyClass." to a static variable?
why Eclipse automatically added "MyClass." to a static variable? [message #263642] Mon, 25 August 2008 10:13 Go to next message
Eclipse UserFriend
Originally posted by: www.nospam.net

Hi,

I am not sure what I have touched on the Eclipse configuration. Right
now, when I save a Java file, Eclipse automatically adds something. For
example, I have a Java class file:

public class MyClass
{
final static String NAME = "HELLO";
...
public void doIt()
{
String newName = NAME + " WORLD";
...
}
}

After I hit "Save" button, the file automatically becomes:

public class MyClass
{
final static String NAME = "HELLO";
...
public void doIt()
{
String newName = MyClass.NAME + " WORLD";
...
}
}

I don't like this feature. I hope to turn it off. Could you help me?
Thank you.
Re: why Eclipse automatically added "MyClass." to a static variable? [message #263645 is a reply to message #263642] Mon, 25 August 2008 10:37 Go to previous message
Eclipse UserFriend
Originally posted by: www.nospam.net

I found the solution/problem. Window > Preferences > Java > Editor >
Save Actions

click Configure... button, at the second tab "Member Access", un-check
"Use declaring class as qualifier"
Previous Topic:Templates issue
Next Topic:problem in strting Eclipse in LINUX
Goto Forum:
  


Current Time: Sun Jun 22 08:28:13 EDT 2025

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

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

Back to the top