I start out with a class like this:
public class Registry
{
private HashMap storage;
public void Registry()
{
storage = new HashMap();
}
}
Choose Code|Generate Delegate,
Choose storage as my target.
Select the methods I want to surface.
I end up with this:
public class Registry
{
private HashMap storage;
public void Registry()
{
storage = new HashMap();
}
public int size() {
return storage.size();
}
public boolean isEmpty() {
return storage.isEmpty();
}
public Object get(Object key) {
return storage.get(key);
}
public Object put(Object key, Object value) {
return storage.put(key, value);
}
public Object remove(Object key) {
return storage.remove(key);
}
public Set keySet() {
return storage.keySet();
}
}
Hit Ctrl+Alt+F, and I get the following as expected:
public class Registry
{
private HashMap storage;
public void Registry()
{
storage = new HashMap();
}
public int size()
{
return storage.size();
}
public boolean isEmpty()
{
return storage.isEmpty();
}
public Object get(Object key)
{
return storage.get(key);
}
public Object put(Object key, Object value)
{
return storage.put(key, value);
}
public Object remove(Object key)
{
return storage.remove(key);
}
public Set keySet()
{
return storage.keySet();
}
}
I've attached my code.style.xml settings.
Let me know if you need anything else.
--Richie.
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Mike Aizatsky
> Sent: 04 April 2002 10:10
> To: [EMAIL PROTECTED]
> Subject: RE: [Eap-list] 615 - GenerateDelegate cosmetic bug
>
>
> Richie,
>
> Can you give an example of code and setting it doesn't respect?
>
> Best regards,
> Mike Aizatsky.
> ------------------------------
> JetBrains, Inc / IntelliJ Software
> http://www.intellij.com
> "Develop with pleasure!"
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> On
> > Behalf Of Richie McMahon
> > Sent: Thursday, April 04, 2002 12:51 PM
> > To: Eap-List@Intellij. Com
> > Subject: [Eap-list] 615 - GenerateDelegate cosmetic bug
> >
> > The new GenerateDelegate feature looks really useful, but it
> > currently does not respect your code layout preferences.
> >
> > --Richie.
> >
> >
> ________________________________________________________________________
> >
> > E-mail is an informal method of communication and may be subject to
> data
> > corruption, interception and unauthorised amendment for which Digital
> > Bridges Ltd will accept no liability. Therefore, it will normally be
> > inappropriate to rely on information contained on e-mail without
> obtaining
> > written confirmation.
> >
> > This e-mail may contain confidential and/or privileged information. If
> you
> > are not the intended recipient (or have received this e-mail in error)
> > please notify the sender immediately and destroy this e-mail. Any
> > unauthorized copying, disclosure or distribution of the material in
> this
> > e-mail is strictly forbidden.
> >
> >
> ________________________________________________________________________
> >
> >
> > _______________________________________________
> > Eap-list mailing list
> > [EMAIL PROTECTED]
> > http://www.intellij.com/mailman/listinfo/eap-list
>
>
> _______________________________________________
> Eap-list mailing list
> [EMAIL PROTECTED]
> http://www.intellij.com/mailman/listinfo/eap-list
________________________________________________________________________
E-mail is an informal method of communication and may be subject to data corruption,
interception and unauthorised amendment for which Digital Bridges Ltd will accept no
liability. Therefore, it will normally be inappropriate to rely on information
contained on e-mail without obtaining written confirmation.
This e-mail may contain confidential and/or privileged information. If you are not the
intended recipient (or have received this e-mail in error) please notify the sender
immediately and destroy this e-mail. Any unauthorized copying, disclosure or
distribution of the material in this e-mail is strictly forbidden.
________________________________________________________________________
<?xml version="1.0" encoding="UTF-8"?>
<application>
<component class="com.intellij.psi.codeStyle.CodeStyleManager">
<option name="LINE_SEPARATOR" />
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="KEEP_LINE_BREAKS" value="true" />
<option name="KEEP_FIRST_COLUMN_COMMENT" value="true" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="true" />
<option name="BRACE_STYLE" value="2" />
<option name="CLASS_BRACE_STYLE" value="2" />
<option name="METHOD_BRACE_STYLE" value="2" />
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="WHILE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
<option name="INDENT_CASE_FROM_SWITCH" value="true" />
<option name="SPECIAL_ELSE_IF_TREATMENT" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
<option name="ALIGN_MULTILINE_FOR" value="true" />
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="2" />
<option name="KEEP_BLANK_LINES_IN_CODE" value="2" />
<option name="BLANK_LINES_BEFORE_PACKAGE" value="0" />
<option name="BLANK_LINES_AFTER_PACKAGE" value="1" />
<option name="BLANK_LINES_BEFORE_IMPORTS" value="2" />
<option name="BLANK_LINES_AFTER_IMPORTS" value="2" />
<option name="BLANK_LINES_AROUND_CLASS" value="1" />
<option name="BLANK_LINES_AROUND_FIELD" value="0" />
<option name="BLANK_LINES_AROUND_METHOD" value="1" />
<option name="BLANK_LINES_AFTER_CLASS_HEADER" value="0" />
<option name="SPACE_AROUND_ASSIGNMENT_OPERATORS" value="true" />
<option name="SPACE_AROUND_LOGICAL_OPERATORS" value="true" />
<option name="SPACE_AROUND_EQUALITY_OPERATORS" value="true" />
<option name="SPACE_AROUND_RELATIONAL_OPERATORS" value="true" />
<option name="SPACE_AROUND_BITWISE_OPERATORS" value="true" />
<option name="SPACE_AROUND_ADDITIVE_OPERATORS" value="true" />
<option name="SPACE_AROUND_MULTIPLICATIVE_OPERATORS" value="true" />
<option name="SPACE_AROUND_SHIFT_OPERATORS" value="true" />
<option name="SPACE_AFTER_COMMA" value="true" />
<option name="SPACE_BEFORE_COMMA" value="false" />
<option name="SPACE_AFTER_SEMICOLON" value="true" />
<option name="SPACE_BEFORE_SEMICOLON" value="false" />
<option name="SPACE_WITHIN_PARENTHESES" value="false" />
<option name="SPACE_WITHIN_METHOD_CALL_PARENTHESES" value="false" />
<option name="SPACE_WITHIN_METHOD_PARENTHESES" value="false" />
<option name="SPACE_WITHIN_IF_PARENTHESES" value="false" />
<option name="SPACE_WITHIN_WHILE_PARENTHESES" value="false" />
<option name="SPACE_WITHIN_FOR_PARENTHESES" value="false" />
<option name="SPACE_WITHIN_CATCH_PARENTHESES" value="false" />
<option name="SPACE_WITHIN_SWITCH_PARENTHESES" value="false" />
<option name="SPACE_WITHIN_SYNCHRONIZED_PARENTHESES" value="false" />
<option name="SPACE_WITHIN_CAST_PARENTHESES" value="false" />
<option name="SPACE_WITHIN_BRACKETS" value="false" />
<option name="SPACE_AFTER_TYPE_CAST" value="true" />
<option name="SPACE_BEFORE_METHOD_CALL_PARENTHESES" value="false" />
<option name="SPACE_BEFORE_METHOD_PARENTHESES" value="false" />
<option name="SPACE_BEFORE_IF_PARENTHESES" value="true" />
<option name="SPACE_BEFORE_WHILE_PARENTHESES" value="true" />
<option name="SPACE_BEFORE_FOR_PARENTHESES" value="true" />
<option name="SPACE_BEFORE_CATCH_PARENTHESES" value="true" />
<option name="SPACE_BEFORE_SWITCH_PARENTHESES" value="true" />
<option name="SPACE_BEFORE_SYNCHRONIZED_PARENTHESES" value="true" />
<option name="SPACE_BEFORE_CLASS_LBRACE" value="true" />
<option name="SPACE_BEFORE_METHOD_LBRACE" value="true" />
<option name="SPACE_BEFORE_IF_LBRACE" value="true" />
<option name="SPACE_BEFORE_ELSE_LBRACE" value="true" />
<option name="SPACE_BEFORE_WHILE_LBRACE" value="true" />
<option name="SPACE_BEFORE_FOR_LBRACE" value="true" />
<option name="SPACE_BEFORE_DO_LBRACE" value="true" />
<option name="SPACE_BEFORE_SWITCH_LBRACE" value="true" />
<option name="SPACE_BEFORE_TRY_LBRACE" value="true" />
<option name="SPACE_BEFORE_CATCH_LBRACE" value="true" />
<option name="SPACE_BEFORE_FINALLY_LBRACE" value="true" />
<option name="SPACE_BEFORE_SYNCHRONIZED_LBRACE" value="true" />
<option name="CLASS_TEMPLATE" value="// Copyright (c) 2002 Digital Bridges Ltd. All rights reserved. package $PACKAGE_NAME$; /** * $NAME$ * @author $USER$ */ public class $NAME$ { } " />
<option name="ADJUST_CLASS_TEMPLATE" value="true" />
<option name="INTERFACE_TEMPLATE" value="// Copyright (c) 2002 Digital Bridges Ltd. All rights reserved. package $PACKAGE_NAME$; /** * $NAME$ * @author $USER$ */ public interface $NAME$ { } " />
<option name="ADJUST_INTERFACE_TEMPLATE" value="true" />
<option name="FIELD_NAME_PREFIX" value="" />
<option name="STATIC_FIELD_NAME_PREFIX" value="" />
<option name="PARAMETER_NAME_PREFIX" value="" />
<option name="LOCAL_VARIABLE_NAME_PREFIX" value="" />
<option name="FIELD_TYPE_TO_NAME">
<value />
</option>
<option name="STATIC_FIELD_TYPE_TO_NAME">
<value />
</option>
<option name="PARAMETER_TYPE_TO_NAME">
<value>
<pair name="i" type="int" />
<pair name="b" type="byte" />
<pair name="c" type="char" />
<pair name="l" type="long" />
<pair name="i" type="short" />
<pair name="b" type="boolean" />
<pair name="v" type="double" />
<pair name="v" type="float" />
<pair name="o" type="java.lang.Object" />
<pair name="s" type="java.lang.String" />
<pair name="e" type="*Exception" />
<pair name="event" type="*Event" />
</value>
</option>
<option name="LOCAL_VARIABLE_TYPE_TO_NAME">
<value>
<pair name="i" type="int" />
<pair name="b" type="byte" />
<pair name="c" type="char" />
<pair name="l" type="long" />
<pair name="i" type="short" />
<pair name="b" type="boolean" />
<pair name="v" type="double" />
<pair name="v" type="float" />
<pair name="o" type="java.lang.Object" />
<pair name="s" type="java.lang.String" />
<pair name="event" type="*Event" />
</value>
</option>
<option name="USE_FQ_CLASS_NAMES" value="false" />
<option name="USE_SINGLE_CLASS_IMPORTS" value="true" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="2" />
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
<value>
<package name="java.awt" withSubpackages="true" />
<package name="javax.swing" withSubpackages="true" />
</value>
</option>
<option name="IMPORT_LAYOUT_TABLE">
<value>
<package name="java" withSubpackages="true" />
<package name="javax" withSubpackages="true" />
<package name="" withSubpackages="true" />
</value>
</option>
<option name="FIELDS_ORDER_WEIGHT" value="1" />
<option name="METHODS_ORDER_WEIGHT" value="3" />
<option name="CONSTRUCTORS_ORDER_WEIGHT" value="2" />
<option name="INNER_CLASSES_ORDER_WEIGHT" value="4" />
</component>
</application>