AccessorsPlugin 

HOME INDEX SEARCH GO  

 <<O>>  Difference Topic AccessorsPlugin (r1.2 - 29 Jan 2007 - JensVoss)
Changed:
<
<

IDEA will highlight the two illegal references to Foo's private bar member. The Accessors plugin will offer to replace these references with a setter or getter method call, respectively. Invoking these two intention actions will turn the second class into the followin:

>
>

IDEA will highlight the two illegal references to Foo's private bar member. The Accessors plugin will offer to replace these references with a setter or getter method call, respectively. Invoking these two intention actions will turn the second class into the following:

Added:
>
>

Changed:
<
<

%META:FILEATTACHMENT{name="Accessors-0.9.1-src.zip" attr="" comment="Accessors Plugin version 0.9.1 bundled sources" date="1170065429" path="C:\work\Projects\IDEA\Accessors-0.9.1-src.zip" size="4798" user="JensVoss" version="1.1"}%

>
>

%META:FILEATTACHMENT{name="Accessors-0.9.1-src.zip" attr="" comment="Accessors Plugin version 0.9.1 bundled sources " date="1170072302" path="C:\work\Projects\IDEA\Accessors-0.9.1-src.zip" size="6994" user="JensVoss" version="1.2"}%


 <<O>>  Difference Topic AccessorsPlugin (r1.1 - 29 Jan 2007 - JensVoss)
Added:
>
>

%META:TOPICINFO{author="JensVoss" date="1170065340" format="1.0" version="1.1"}%

AccessorsPlugin

Description

The Accessor Plugin provides two intention action which can be used to replace direct accesses of a property of a class with a suitable getter or setter method.

Using

Consider the following two classes:

public class Foo {
  private int bar;
  public int getBar() { return bar; }
  public void setBar(int bar) {this.bar = bar; }
}

public class FooTest {
  public static void main(String[] args) {
    Foo foo = new Foo();
    foo.bar = 42;
    System.out.println(foo.bar);
  }
}
IDEA will highlight the two illegal references to Foo's private bar member. The Accessors plugin will offer to replace these references with a setter or getter method call, respectively. Invoking these two intention actions will turn the second class into the followin:
public class FooTest {
  public static void main(String[] args) {
    Foo foo = new Foo();
    foo.setBar(42);
    System.out.println(foo.getBar());
  }
}

Plugin Development

Any feedback is welcome smile

-- JensVoss - 29 Jan 2007

%META:FORM{name="IntelliJPluginWebForm"}% %META:FIELD{name="IntelliJPluginName" title="IntelliJPluginName" value="Accessors"}% %META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.9.1"}% %META:FIELD{name="IntelliJPluginVendor" title="IntelliJPluginVendor" value="Jens Voss"}% %META:FIELD{name="IntelliJPluginBinary" title="IntelliJPluginBinary" value=""}% %META:FIELD{name="IntelliJPluginSource" title="IntelliJPluginSource" value="http://www.intellij.org/twiki/pub/Main/AccessorsPlugin/Accessors-0.9.1-src.zip"}% %META:FIELD{name="IntelliJPluginClassification" title="IntelliJPluginClassification" value="CodeHelper"}% %META:FIELD{name="TopicClassification" title="TopicClassification" value=""}% %META:FIELD{name="TopicShortDescription" title="TopicShortDescription" value=""}% %META:FIELD{name="TestedOnOS" title="TestedOnOS" value="OsWinXP"}% %META:FIELD{name="ShouldRunOnOS" title="ShouldRunOnOS" value="AnyOS"}% %META:FILEATTACHMENT{name="Accessors.jar" attr="h" comment="" date="1170065213" path="C:\Programme\JetBrains\IntelliJ IDEA 5.1\Projects\Accessors.jar" size="9687" user="JensVoss" version="1.1"}% %META:FILEATTACHMENT{name="Accessors-0.9.1-src.zip" attr="" comment="Accessors Plugin version 0.9.1 bundled sources" date="1170065429" path="C:\work\Projects\IDEA\Accessors-0.9.1-src.zip" size="4798" user="JensVoss" version="1.1"}%


View | Diffs | r1.2 | > | r1.1 | More

e d i t a t t a c h r e f - b y d i f f s
Ideas,requests,problems regarding this site? Send feedback.
Copyright @ 2000-2003 by the contribution authors. All material on this collaboration tool is the property of the contributing authors.

Revision r1.1 - 29 Jan 2007 - 10:09 GMT - JensVoss
Revision r1.2 - 29 Jan 2007 - 12:07 GMT - JensVoss
Copyright © 2001 by the contributing authors. All material on this collaboration tool is the property of the contributing authors.
Ideas, requests, problems regarding this site? Send feedback.