Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Generator #12

Closed
junichi11 opened this issue Feb 13, 2013 · 3 comments

Comments

@junichi11
Copy link
Owner

commented Feb 13, 2013

For example, generate the followings with GUI (Alt + Insert):

  • public $components = array('Session', 'DebugKit.Toolbar', 'MyCustom');
  • public $helpers = array('Session', 'Html', 'Form', 'MyPlugin.MyHelper');
  • public $uses = array('Post', 'Member', 'Comment');

I'll try to implement on NetBeans7.3+.

@junichi11

This comment has been minimized.

Copy link
Owner Author

commented Feb 18, 2013

Generate uses, helpers, components and actsAs fields.
You have to set each settings yourself.
e.g. Js helper :

// generate code
$helpers = array('Html',...,'Js');
// in case of using jQuery, you have to add "=> array('Jquery')" 
$helpers = array('Html',...,'Js' => array('Jquery'));

cakephp-netbeans-code-generator-mbhc

@junichi11

This comment has been minimized.

Copy link
Owner Author

commented Feb 18, 2013

Generate validations of core to caret position.

// template
'validationName' => array(
    'rule' => 'validationName',
    'message' => 'validationNamemessage'
},

You have to write the following before you run this feature:

public $validate = array(
    'fieldName' => array(
        // please set caret to here 
    ),
);

cakephp-netbeans-code-generator-validation1
cakephp-netbeans-code-generator-validation2

junichi11 added a commit that referenced this issue Feb 19, 2013
@junichi11 junichi11 closed this Feb 19, 2013
@junichi11

This comment has been minimized.

Copy link
Owner Author

commented Feb 19, 2013

Please notice that this feature is able to work following environment.

  • NetBeans 7.3+
  • CakePHP 2.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.