This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 171569 - Create class by selected snippet
Summary: Create class by selected snippet
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-06 12:14 UTC by danilchenko_anton
Modified: 2012-04-24 13:04 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description danilchenko_anton 2009-09-06 12:14:49 UTC
Good idea: create class by selected snippet.

1) I select in context menu: "New -> Rule -> Controller" and type name "About". This file automatically placed in
"Controller/About.php".
2) I select "New -> Rule -> View" and type name "index/index" and created file "View/index/index.html"
3) Select "New -> Rule -> Model" and type name "Table/Catalog/Image" and created file "Model/Table/Catalog/Image.php"

All this rules I enter for current project by mask. For example:
1) Controller: [name] -> "Controller/[name].php"
2) View: [model]/[action] -> "View/[model]/[action].html"
3) Model: {Table|Form}[path] -> "Model/{1}/[path].php"

------------------------

In my framework project exists 3 folder: Controller, Model and View.

1) In controller I create php5 by example (Index - insert automatically):
<?php
class Controller_Index extends Days_Controller {
    public function indexAction() {
    }
}

2) In Model I create hierarchically directories (Catalog_Image - insert automatically):
Model/
  Table/
    Catalog.php
with equialent code:
<?php
class St_Model_Table_Catalog_Image extends Days_Db_Table {
    protected $_name = 'catalog';
}

3) in View I create hierarcrically directories (created empty file - in this case):
View/
  content/
    index/
      index.html
    about/
      feedback.html
  helper/
  layout/

---------------------

I have automatizate this process in my job. Now I create separately directories, files and copy code from existing file
and clear them. This process actual for all frameworks. In some frameworks created code generators. But I have use
generator based on my rules in IDE. Please, add this unique feature in NetBeans for php.

Waiting for you propositions and apply this feature.
Comment 1 Filip Zamboj 2010-09-15 12:30:01 UTC
batch reassigning