Re: Eclipse code completion in Views

2007-11-26 Thread avairet

Hello Michael,

All it's clear for Code completion now and I will search the better
method to get this completion in Eclipse PDT, whitout surcharging
files.

Otherwise my question about Helpers/Components loading is not about
the Code completion but about Cake himself!
Because of sentence in your post at 16 november: Now here we have the
problem that the stuff in these arrays is actually loaded.
But it does not matter, I will baking again and again to understand
very well, how to make a good cooking ;o))

Thank's again for your sympathy!

Aurélien



On 21 nov, 18:16, schneimi [EMAIL PROTECTED] wrote:
 Hi Aurélien,

  Hi Michael and thank you very much for your baking advice!

 You're very welcome!

  For a small application like yours, obviously it's nice to write all
  PHPDoc comments for Models in AppController and more nice if nothing
  is loading!
  But in my case, the application is big and we are 4 developpers to
  code... so I think it's not good to surcharge the AppController file
  with many PHPDocs comments.
  Because the file will become unreadable and because we don't know all
  the models we are using or we will use along the application's life.
  (Sorry, I'm not sure this sentence is clear?!)

 I agree, it's not nice to have that code in the AppController, but
 it's at least one central place where you can put it, update it and if
 you want, remove it before delivering. You can also put it in the root
 Controller-Class so it will not appear directly in your application,
 but you will always have to update that code along the development.

  Otherwise, why Helpers/Components are loaded and Models are not?

 Helpers aren't loaded either (Components are treated like Models), in
 this case it's code that is even never executed (because of the
 exit()). So both times it's pretty much nothing but useless code to
 get eclipse doing thecompletion.

 The difference is that one time you want thecompletionon certain
 class-variables ($this-...), the other time you want to have thecompletionin 
 your views on basically undefined variables.

 Happy baking,

 Michael

 avairet schrieb:

  Hi Michael and thank you very much for your baking advice!

  For a small application like yours, obviously it's nice to write all
  PHPDoc comments for Models in AppController and more nice if nothing
  is loading!
  But in my case, the application is big and we are 4 developpers to
  code... so I think it's not good to surcharge the AppController file
  with many PHPDocs comments.
  Because the file will become unreadable and because we don't know all
  the models we are using or we will use along the application's life.
  (Sorry, I'm not sure this sentence is clear?!)

  Otherwise, why Helpers/Components are loaded and Models are not?

  Bye,

  Aur�lien
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-11-21 Thread avairet

Hi Michael and thank you very much for your baking advice!

For a small application like yours, obviously it's nice to write all
PHPDoc comments for Models in AppController and more nice if nothing
is loading!
But in my case, the application is big and we are 4 developpers to
code... so I think it's not good to surcharge the AppController file
with many PHPDocs comments.
Because the file will become unreadable and because we don't know all
the models we are using or we will use along the application's life.
(Sorry, I'm not sure this sentence is clear?!)

Otherwise, why Helpers/Components are loaded and Models are not?

Bye,

Aurélien
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-11-21 Thread schneimi

Hi Aurélien,

 Hi Michael and thank you very much for your baking advice!

You're very welcome!

 For a small application like yours, obviously it's nice to write all
 PHPDoc comments for Models in AppController and more nice if nothing
 is loading!
 But in my case, the application is big and we are 4 developpers to
 code... so I think it's not good to surcharge the AppController file
 with many PHPDocs comments.
 Because the file will become unreadable and because we don't know all
 the models we are using or we will use along the application's life.
 (Sorry, I'm not sure this sentence is clear?!)

I agree, it's not nice to have that code in the AppController, but
it's at least one central place where you can put it, update it and if
you want, remove it before delivering. You can also put it in the root
Controller-Class so it will not appear directly in your application,
but you will always have to update that code along the development.

 Otherwise, why Helpers/Components are loaded and Models are not?

Helpers aren't loaded either (Components are treated like Models), in
this case it's code that is even never executed (because of the
exit()). So both times it's pretty much nothing but useless code to
get eclipse doing the completion.

The difference is that one time you want the completion on certain
class-variables ($this-...), the other time you want to have the
completion in your views on basically undefined variables.

Happy baking,

Michael


avairet schrieb:
 Hi Michael and thank you very much for your baking advice!

 For a small application like yours, obviously it's nice to write all
 PHPDoc comments for Models in AppController and more nice if nothing
 is loading!
 But in my case, the application is big and we are 4 developpers to
 code... so I think it's not good to surcharge the AppController file
 with many PHPDocs comments.
 Because the file will become unreadable and because we don't know all
 the models we are using or we will use along the application's life.
 (Sorry, I'm not sure this sentence is clear?!)

 Otherwise, why Helpers/Components are loaded and Models are not?

 Bye,

 Aur�lien
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-11-16 Thread avairet

OK, thank's Michael!

But is it a good idea to load all models in AppController whereas
this models are not used in all Controllers that extends
AppController?
Or your trick doesn't load the models but just indicates it for code
completion to PDT Eclipse?

In the same way, HtmlHelper is declared in CakeCore's Controller Class
so it's not necessary to write $helpers = array('html'); in our own
controllers, views and helpers? In this case, why couldn't we write
all available Models, Helpers, Components in a unique place (e.g.
AppController)?
Because in practice, there are a lot of same declarations, like
'$helpers = array('html','form'), in our applications!

I'm sorry but this kind of details are not trivial for me...

Thank's for explanations...

Aurélien


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-11-16 Thread schneimi

Hi Aurélien,

 But is it a good idea to load all models in AppController whereas
 this models are not used in all Controllers that extends
 AppController?
 Or your trick doesn't load the models but just indicates it for code
 completion to PDT Eclipse?

Yes nothing is loaded here, it's just a declaration but no
initialisation. So this has no effect on the execution of the code.
The only thing is that you also get the completion on models you don't
use (with $uses) in a controller, but that's not a real problem,
because you should always know what you do. ;-)

 In the same way, HtmlHelper is declared in CakeCore's Controller Class
 so it's not necessary to write $helpers = array('html'); in our own
 controllers, views and helpers? In this case, why couldn't we write
 all available Models, Helpers, Components in a unique place (e.g.
 AppController)?
 Because in practice, there are a lot of same declarations, like
 '$helpers = array('html','form'), in our applications!

Now here we have the problem that the stuff in these arrays is
actually loaded. Its always best practise to only load what you really
need, so I cannot recommend to load helpers and components for all
controllers in the AppController, but for my small application I don't
care much if almost all of my controllers need it.

Michael
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-11-14 Thread avairet

Hello Michael,

Thank's a lot for your answer. I've just need some precisions:

 Model completion works in all controllers for me with the phpdoc in
the AppController. Maybe your controllers extend Controller and not
AppController.

No, my controllers extends AppController. e.g. :

[code]
class ArticlesController extends AppController {
public $name = 'Articles';
}
[/code]

If I write this in my AppController class, the code completion doesn't
work in the controller ArticlesController:
[code]
class AppController extends Controller {
  /**
   * @var Model
   */
var Model
}
[/code]

Must I write the name of all my models with PHPDoc in AppController?


I use to create a PHP
project first and then use the import for that project to get the data
from SVN.

OK, I will test that.


t should be possible to extend the completion to the other stuff,
e.g. this works for the Session-Component.

Must I write the PHPDoc comment in all my controllers which are using
SessionComponent? Or I must write it in AppController too?

I hope my message is understandable...

Have a nice day !

Aurélien (avairet)



On 13 nov, 18:47, schneimi [EMAIL PROTECTED] wrote:
 Hi Avairet,

  - the schneimi's method for modelscompletionin controllers works
  fine, but it's necessary to copy it in each controllers you create and
  replace model by your model name... I've tried to put this in
  AppController, but it doesn't work. Any ideas to addcompletionfor
  all controllers in one place?

 Modelcompletionworks in all controllers for me with the phpdoc in
 the AppController. Maybe your controllers extend Controller and not
 AppController.

  - this 2 methods doesn't work if I use Subclipse and check out a cake
  app directory as an Eclipse project. In this case, there are no code
 completion, even Php builtin functions! Any ideas why codecompletion
  doesn't work with a SVN shared project?

 I also remember problems with SVN checkout as a project, it seems like
 it isn't handled as a PHP project that way. I use to create a PHP
 project first and then use the import for that project to get the data
 from SVN.

  - and last, is it possible to take codecompletionfor components',
  behaviors, elements and so on?

 It should be possible to extend thecompletionto the other stuff,
 e.g. this works for the Session-Component:
   /**
* @var SessionComponent
*/
   var $Session;

 -
 Michael

 On 13 Nov., 17:56, avairet [EMAIL PROTECTED] wrote:

  Hi everybody!

  Firstly, excuse me for my simple English...

  Then I tell you my own experience with PDT/Cake CodeCompletion.
  My config : Eclipse Europa 3.3 + PDT 1.0 + Cake 1.2 with advanced
  install/config(Cake core, app dir and webroot dir in three
  different paths) )

  - the voidstate example is very cool for helpers methodscompletion
  in view (file with $helper = new Helper())

  - the schneimi's method for modelscompletionin controllers works
  fine, but it's necessary to copy it in each controllers you create and
  replace model by your model name... I've tried to put this in
  AppController, but it doesn't work. Any ideas to addcompletionfor
  all controllers in one place?

  - this 2 methods doesn't work if I use Subclipse and check out a cake
  app directory as an Eclipse project. In this case, there are no code
 completion, even Php builtin functions! Any ideas why codecompletion
  doesn't work with a SVN shared project?

  - and last, is it possible to take codecompletionfor components',
  behaviors, elements and so on?

  Thank's for your kind attention and best regards!

  Avairet

  On 15 oct, 05:35, Mandy [EMAIL PROTECTED] wrote:

   I use Easy Eclipse for PHP. I created eclipse_helper.php, copied all
   of the above and pasted it in the file. Then placed the file in
   webroot folder, did a Project-Clean-Build (made sure .thtml files
   are opened by PHP editor).

   However, I still couldn't see codecompletionwhen I typed $html-
   (and then ctrl + space).

   ?

-Mandy.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-11-14 Thread avairet

Michael,

Sorry, I've made an error in code. This is the code I write in my
AppController (var $model):

[code]
class AppController extends Controller {
  /**
   * @var Model
   */
var $model
}
[/code]

Otherwise, I've tested your solution for SVN, but it doesn't work.
Even I use Import SVN in an existing PHP project, no code completion
is available, even PHP built'in functions like mysql_close or
str_replace are unavailable!

Moreover, the Eclipse Outline View doesn't work too with a SVN
checkout project! It's impossible to take some Eclipse/PDT utilities
with that kind of project!
Currently I think create 2 projects in Eclipse: one for SVN checkout
and one for my real web project. And then I will merge all files
before making my SVN commits...

See you another solution?

BR,

Aurélien (avairet)




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-11-14 Thread schneimi

 Must I write the name of all my models with PHPDoc in AppController?

Yes you must! Each model,component,... must be put in like that code
example, each var must have the phpDoc in its comment above, but only
one time in the AppController.

Good to see the SVN problem is solved, I wasn't sure about that.

Michael

 Otherwise, I've tested your solution for SVN, but it doesn't work.
 Even I use Import SVN in an existing PHP project, no code completion
 is available, even PHP built'in functions like mysql_close or
 str_replace are unavailable!

 Moreover, the Eclipse Outline View doesn't work too with a SVN
 checkout project! It's impossible to take some Eclipse/PDT utilities
 with that kind of project
 Currently I think create 2 projects in Eclipse: one for SVN checkout
 and one for my real web project. And then I will merge all files
 before making my SVN commits...

 See you another solution?

 BR,

 Aurélien (avairet)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-11-13 Thread avairet

Hi everybody!

Firstly, excuse me for my simple English...

Then I tell you my own experience with PDT/Cake Code Completion.
My config : Eclipse Europa 3.3 + PDT 1.0 + Cake 1.2 with advanced
install/config(Cake core, app dir and webroot dir in three
different paths) )

- the voidstate example is very cool for helpers methods completion
in view (file with $helper = new Helper())

- the schneimi's method for models completion in controllers works
fine, but it's necessary to copy it in each controllers you create and
replace model by your model name... I've tried to put this in
AppController, but it doesn't work. Any ideas to add completion for
all controllers in one place?

- this 2 methods doesn't work if I use Subclipse and check out a cake
app directory as an Eclipse project. In this case, there are no code
completion, even Php builtin functions! Any ideas why code completion
doesn't work with a SVN shared project?

- and last, is it possible to take code completion for components',
behaviors, elements and so on?

Thank's for your kind attention and best regards!

Avairet



On 15 oct, 05:35, Mandy [EMAIL PROTECTED] wrote:
 I use Easy Eclipse for PHP. I created eclipse_helper.php, copied all
 of the above and pasted it in the file. Then placed the file in
 webroot folder, did a Project-Clean-Build (made sure .thtml files
 are opened by PHP editor).

 However, I still couldn't see code completion when I typed $html-
 (and then ctrl + space).

 ?

 -Mandy.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-11-13 Thread schneimi

Hi Avairet,

 - the schneimi's method for models completion in controllers works
 fine, but it's necessary to copy it in each controllers you create and
 replace model by your model name... I've tried to put this in
 AppController, but it doesn't work. Any ideas to add completion for
 all controllers in one place?

Model completion works in all controllers for me with the phpdoc in
the AppController. Maybe your controllers extend Controller and not
AppController.

 - this 2 methods doesn't work if I use Subclipse and check out a cake
 app directory as an Eclipse project. In this case, there are no code
 completion, even Php builtin functions! Any ideas why code completion
 doesn't work with a SVN shared project?

I also remember problems with SVN checkout as a project, it seems like
it isn't handled as a PHP project that way. I use to create a PHP
project first and then use the import for that project to get the data
from SVN.

 - and last, is it possible to take code completion for components',
 behaviors, elements and so on?

It should be possible to extend the completion to the other stuff,
e.g. this works for the Session-Component:
  /**
   * @var SessionComponent
   */
  var $Session;

-
Michael

On 13 Nov., 17:56, avairet [EMAIL PROTECTED] wrote:
 Hi everybody!

 Firstly, excuse me for my simple English...

 Then I tell you my own experience with PDT/Cake Code Completion.
 My config : Eclipse Europa 3.3 + PDT 1.0 + Cake 1.2 with advanced
 install/config(Cake core, app dir and webroot dir in three
 different paths) )

 - the voidstate example is very cool for helpers methods completion
 in view (file with $helper = new Helper())

 - the schneimi's method for models completion in controllers works
 fine, but it's necessary to copy it in each controllers you create and
 replace model by your model name... I've tried to put this in
 AppController, but it doesn't work. Any ideas to add completion for
 all controllers in one place?

 - this 2 methods doesn't work if I use Subclipse and check out a cake
 app directory as an Eclipse project. In this case, there are no code
 completion, even Php builtin functions! Any ideas why code completion
 doesn't work with a SVN shared project?

 - and last, is it possible to take code completion for components',
 behaviors, elements and so on?

 Thank's for your kind attention and best regards!

 Avairet

 On 15 oct, 05:35, Mandy [EMAIL PROTECTED] wrote:

  I use Easy Eclipse for PHP. I created eclipse_helper.php, copied all
  of the above and pasted it in the file. Then placed the file in
  webroot folder, did a Project-Clean-Build (made sure .thtml files
  are opened by PHP editor).

  However, I still couldn't see code completion when I typed $html-
  (and then ctrl + space).

  ?

  -Mandy.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-10-14 Thread Mandy

I use Easy Eclipse for PHP. I created eclipse_helper.php, copied all
of the above and pasted it in the file. Then placed the file in
webroot folder, did a Project-Clean-Build (made sure .thtml files
are opened by PHP editor).

However, I still couldn't see code completion when I typed $html-
(and then ctrl + space).

?

-Mandy.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-10-12 Thread Mech7

Btw does anybody know how to have the codeassist popup automatically?
Like with Zend neon? no ctrl + space needed?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-10-11 Thread wluigi

That's great.

So in the controller, you can use

if(false) {
$this-Model = new Model();
}

but you've to add this in every action of every controller.

How to add it to one and only one place ?

On Oct 10, 9:34 pm, Stu [EMAIL PROTECTED] wrote:
 That is brilliant, and worked flawlessly first time, and just makes
 something awesome even more awesome.

 Thanks very much

 Stu

 On Oct 10, 7:14 pm, schneimi [EMAIL PROTECTED] wrote:

  You can put it in the index.php and it works for every view. :-)

  schneimi schrieb:

   I just tested this code in a view:

   if(false) {
 $html = new HtmlHelper();
   }

   Not that beautiful, but it will never be executed and Eclipse does the
   completion anyway. Maybe that helps.

   Michael

   Not very beautiful but will never run and
   voidstate schrieb:
But the names are standardised. Could you perhaps put some kind of
alias for the helper objects in the app during development using those
names then remove them for production?

On Oct 8, 9:53 pm, schneimi [EMAIL PROTECTED] wrote:
 Yes that would be nice, but i think it's not possible, because these
 variables are handled by cake.

 Stu schrieb:

  Well, I unfortunately can't get code completion on methods in 
  $form-,
  or $html- in a view (*.ctp file).

  It's no big deal, but it would be very nice.

  On Oct 8, 1:58 pm, schneimi [EMAIL PROTECTED] wrote:
   Yes, you are right, the second step is not necessary.

   Stu schrieb:

Ah ok, I'd done the first step but not the second step. I'm at 
work at
the moment, but I'll do the second step when I get home.

Thanks

On Oct 7, 5:28 pm, schneimi [EMAIL PROTECTED] wrote:
 Hi,

 You have to do two steps:

 - Add *.thtml to Preferences-General-Content Types-PHP 
 Content
 Type
 - Add *.thtml and assign the PHP-Editor in 
 Preferences-General-

 Editors-File Associations

 regards,

 Michael

 Stu schrieb:

  Hi Bakers,

  Does anyone know if it is possible to get code completion 
  working for
  Views in eclipse? I've got it working for Models in a 
  controller, but
  can't seem to get any code completion when in a View, and 
  do something
  like div?php echo $html- I'm just wondering if 
  there is some
  configuration option I'm missing or something like that.

  Any help would be appreciated,

  thanks

  Stu


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-10-11 Thread Mech7

I think in ZDE this worked by default just not on Eclipse + PDT :(


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-10-11 Thread Luigi
no it doesn't.

at least for me.

On 10/11/07, Mech7 [EMAIL PROTECTED] wrote:


 I think in ZDE this worked by default just not on Eclipse + PDT :(


 



-- 
Luigi

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-10-11 Thread schneimi

In Controllers you can do something else with phpDoc, like:

  /**
   * @var Model
   */
  var $model;

If you put this in your AppController, it should work in every action
in your controllers.

This all works for me with PDT Eclipse.

On 11 Okt., 14:29, wluigi [EMAIL PROTECTED] wrote:
 That's great.

 So in the controller, you can use

 if(false) {
 $this-Model = new Model();

 }

 but you've to add this in every action of every controller.

 How to add it to one and only one place ?

 On Oct 10, 9:34 pm, Stu [EMAIL PROTECTED] wrote:



  That is brilliant, and worked flawlessly first time, and just makes
  something awesome even more awesome.

  Thanks very much

  Stu

  On Oct 10, 7:14 pm, schneimi [EMAIL PROTECTED] wrote:

   You can put it in the index.php and it works for every view. :-)

   schneimi schrieb:

I just tested this code in a view:

if(false) {
  $html = new HtmlHelper();
}

Not that beautiful, but it will never be executed and Eclipse does the
completion anyway. Maybe that helps.

Michael

Not very beautiful but will never run and
voidstate schrieb:
 But the names are standardised. Could you perhaps put some kind of
 alias for the helper objects in the app during development using those
 names then remove them for production?

 On Oct 8, 9:53 pm, schneimi [EMAIL PROTECTED] wrote:
  Yes that would be nice, but i think it's not possible, because these
  variables are handled by cake.

  Stu schrieb:

   Well, I unfortunately can't get code completion on methods in 
   $form-,
   or $html- in a view (*.ctp file).

   It's no big deal, but it would be very nice.

   On Oct 8, 1:58 pm, schneimi [EMAIL PROTECTED] wrote:
Yes, you are right, the second step is not necessary.

Stu schrieb:

 Ah ok, I'd done the first step but not the second step. I'm 
 at work at
 the moment, but I'll do the second step when I get home.

 Thanks

 On Oct 7, 5:28 pm, schneimi [EMAIL PROTECTED] wrote:
  Hi,

  You have to do two steps:

  - Add *.thtml to Preferences-General-Content Types-PHP 
  Content
  Type
  - Add *.thtml and assign the PHP-Editor in 
  Preferences-General-

  Editors-File Associations

  regards,

  Michael

  Stu schrieb:

   Hi Bakers,

   Does anyone know if it is possible to get code completion 
   working for
   Views in eclipse? I've got it working for Models in a 
   controller, but
   can't seem to get any code completion when in a View, and 
   do something
   like div?php echo $html- I'm just wondering if 
   there is some
   configuration option I'm missing or something like that.

   Any help would be appreciated,

   thanks

   Stu- Zitierten Text ausblenden -

 - Zitierten Text anzeigen -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-10-11 Thread Mech7

Strange it does for me ?

On Oct 11, 3:19 pm, Luigi [EMAIL PROTECTED] wrote:
 no it doesn't.

 at least for me.

 On 10/11/07, Mech7 [EMAIL PROTECTED] wrote:



  I think in ZDE this worked by default just not on Eclipse + PDT :(

 --
 Luigi


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-10-11 Thread voidstate

To develop the idea a bit further.

Better surely to just create a file in the root of you dev site
(called eclipse_helper.php or something) so it never get called and
you don't have to put code into working pages.

Something like:

-

?
// stop page loading
exit;

// reference helpers so Eclipse provides code completion
$ajax = new AjaxHelper();
$cache = new CacheHelper();
$form = new FormHelper();
$html = new HtmlHelper();
$javascript = new JavascriptHelper();
$number = new NumberHelper();
$session = new SessionHelper();
$text = new TextHelper();
$time = new TimeHelper();
?

-

voidstate

On Oct 11, 6:39 pm, Mech7 [EMAIL PROTECTED] wrote:
 Strange it does for me ?

 On Oct 11, 3:19 pm, Luigi [EMAIL PROTECTED] wrote:

  no it doesn't.

  at least for me.

  On 10/11/07, Mech7 [EMAIL PROTECTED] wrote:

   I think in ZDE this worked by default just not on Eclipse + PDT :(

  --
  Luigi


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-10-10 Thread voidstate

But the names are standardised. Could you perhaps put some kind of
alias for the helper objects in the app during development using those
names then remove them for production?

On Oct 8, 9:53 pm, schneimi [EMAIL PROTECTED] wrote:
 Yes that would be nice, but i think it's not possible, because these
 variables are handled by cake.

 Stu schrieb:

  Well, I unfortunately can't get code completion on methods in $form-,
  or $html- in a view (*.ctp file).

  It's no big deal, but it would be very nice.

  On Oct 8, 1:58 pm, schneimi [EMAIL PROTECTED] wrote:
   Yes, you are right, the second step is not necessary.

   Stu schrieb:

Ah ok, I'd done the first step but not the second step. I'm at work at
the moment, but I'll do the second step when I get home.

Thanks

On Oct 7, 5:28 pm, schneimi [EMAIL PROTECTED] wrote:
 Hi,

 You have to do two steps:

 - Add *.thtml to Preferences-General-Content Types-PHP Content
 Type
 - Add *.thtml and assign the PHP-Editor in Preferences-General-

 Editors-File Associations

 regards,

 Michael

 Stu schrieb:

  Hi Bakers,

  Does anyone know if it is possible to get code completion working 
  for
  Views in eclipse? I've got it working for Models in a controller, 
  but
  can't seem to get any code completion when in a View, and do 
  something
  like div?php echo $html- I'm just wondering if there is some
  configuration option I'm missing or something like that.

  Any help would be appreciated,

  thanks

  Stu


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-10-10 Thread schneimi

I just tested this code in a view:

if(false) {
  $html = new HtmlHelper();
}

Not that beautiful, but it will never be executed and Eclipse does the
completion anyway. Maybe that helps.

Michael

Not very beautiful but will never run and
voidstate schrieb:
 But the names are standardised. Could you perhaps put some kind of
 alias for the helper objects in the app during development using those
 names then remove them for production?

 On Oct 8, 9:53 pm, schneimi [EMAIL PROTECTED] wrote:
  Yes that would be nice, but i think it's not possible, because these
  variables are handled by cake.
 
  Stu schrieb:
 
   Well, I unfortunately can't get code completion on methods in $form-,
   or $html- in a view (*.ctp file).
 
   It's no big deal, but it would be very nice.
 
   On Oct 8, 1:58 pm, schneimi [EMAIL PROTECTED] wrote:
Yes, you are right, the second step is not necessary.
 
Stu schrieb:
 
 Ah ok, I'd done the first step but not the second step. I'm at work at
 the moment, but I'll do the second step when I get home.
 
 Thanks
 
 On Oct 7, 5:28 pm, schneimi [EMAIL PROTECTED] wrote:
  Hi,
 
  You have to do two steps:
 
  - Add *.thtml to Preferences-General-Content Types-PHP Content
  Type
  - Add *.thtml and assign the PHP-Editor in Preferences-General-
 
  Editors-File Associations
 
  regards,
 
  Michael
 
  Stu schrieb:
 
   Hi Bakers,
 
   Does anyone know if it is possible to get code completion working 
   for
   Views in eclipse? I've got it working for Models in a controller, 
   but
   can't seem to get any code completion when in a View, and do 
   something
   like div?php echo $html- I'm just wondering if there is 
   some
   configuration option I'm missing or something like that.
 
   Any help would be appreciated,
 
   thanks
 
   Stu


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-10-10 Thread schneimi

You can put it in the index.php and it works for every view. :-)

schneimi schrieb:
 I just tested this code in a view:

 if(false) {
   $html = new HtmlHelper();
 }

 Not that beautiful, but it will never be executed and Eclipse does the
 completion anyway. Maybe that helps.

 Michael

 Not very beautiful but will never run and
 voidstate schrieb:
  But the names are standardised. Could you perhaps put some kind of
  alias for the helper objects in the app during development using those
  names then remove them for production?
 
  On Oct 8, 9:53 pm, schneimi [EMAIL PROTECTED] wrote:
   Yes that would be nice, but i think it's not possible, because these
   variables are handled by cake.
  
   Stu schrieb:
  
Well, I unfortunately can't get code completion on methods in $form-,
or $html- in a view (*.ctp file).
  
It's no big deal, but it would be very nice.
  
On Oct 8, 1:58 pm, schneimi [EMAIL PROTECTED] wrote:
 Yes, you are right, the second step is not necessary.
  
 Stu schrieb:
  
  Ah ok, I'd done the first step but not the second step. I'm at work 
  at
  the moment, but I'll do the second step when I get home.
  
  Thanks
  
  On Oct 7, 5:28 pm, schneimi [EMAIL PROTECTED] wrote:
   Hi,
  
   You have to do two steps:
  
   - Add *.thtml to Preferences-General-Content Types-PHP Content
   Type
   - Add *.thtml and assign the PHP-Editor in Preferences-General-
  
   Editors-File Associations
  
   regards,
  
   Michael
  
   Stu schrieb:
  
Hi Bakers,
  
Does anyone know if it is possible to get code completion 
working for
Views in eclipse? I've got it working for Models in a 
controller, but
can't seem to get any code completion when in a View, and do 
something
like div?php echo $html- I'm just wondering if there is 
some
configuration option I'm missing or something like that.
  
Any help would be appreciated,
  
thanks
  
Stu


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-10-10 Thread Stu

That is brilliant, and worked flawlessly first time, and just makes
something awesome even more awesome.

Thanks very much

Stu

On Oct 10, 7:14 pm, schneimi [EMAIL PROTECTED] wrote:
 You can put it in the index.php and it works for every view. :-)

 schneimi schrieb:

  I just tested this code in a view:

  if(false) {
$html = new HtmlHelper();
  }

  Not that beautiful, but it will never be executed and Eclipse does the
  completion anyway. Maybe that helps.

  Michael

  Not very beautiful but will never run and
  voidstate schrieb:
   But the names are standardised. Could you perhaps put some kind of
   alias for the helper objects in the app during development using those
   names then remove them for production?

   On Oct 8, 9:53 pm, schneimi [EMAIL PROTECTED] wrote:
Yes that would be nice, but i think it's not possible, because these
variables are handled by cake.

Stu schrieb:

 Well, I unfortunately can't get code completion on methods in $form-,
 or $html- in a view (*.ctp file).

 It's no big deal, but it would be very nice.

 On Oct 8, 1:58 pm, schneimi [EMAIL PROTECTED] wrote:
  Yes, you are right, the second step is not necessary.

  Stu schrieb:

   Ah ok, I'd done the first step but not the second step. I'm at 
   work at
   the moment, but I'll do the second step when I get home.

   Thanks

   On Oct 7, 5:28 pm, schneimi [EMAIL PROTECTED] wrote:
Hi,

You have to do two steps:

- Add *.thtml to Preferences-General-Content Types-PHP 
Content
Type
- Add *.thtml and assign the PHP-Editor in Preferences-General-

Editors-File Associations

regards,

Michael

Stu schrieb:

 Hi Bakers,

 Does anyone know if it is possible to get code completion 
 working for
 Views in eclipse? I've got it working for Models in a 
 controller, but
 can't seem to get any code completion when in a View, and do 
 something
 like div?php echo $html- I'm just wondering if there 
 is some
 configuration option I'm missing or something like that.

 Any help would be appreciated,

 thanks

 Stu


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-10-08 Thread Stu

Ah ok, I'd done the first step but not the second step. I'm at work at
the moment, but I'll do the second step when I get home.

Thanks

On Oct 7, 5:28 pm, schneimi [EMAIL PROTECTED] wrote:
 Hi,

 You have to do two steps:

 - Add *.thtml to Preferences-General-Content Types-PHP Content
 Type
 - Add *.thtml and assign the PHP-Editor in Preferences-General-

 Editors-File Associations

 regards,

 Michael

 Stu schrieb:

  Hi Bakers,

  Does anyone know if it is possible to get code completion working for
  Views in eclipse? I've got it working for Models in a controller, but
  can't seem to get any code completion when in a View, and do something
  like div?php echo $html- I'm just wondering if there is some
  configuration option I'm missing or something like that.

  Any help would be appreciated,

  thanks

  Stu


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-10-08 Thread schneimi

Yes, you are right, the second step is not necessary.

Stu schrieb:
 Ah ok, I'd done the first step but not the second step. I'm at work at
 the moment, but I'll do the second step when I get home.

 Thanks

 On Oct 7, 5:28 pm, schneimi [EMAIL PROTECTED] wrote:
  Hi,
 
  You have to do two steps:
 
  - Add *.thtml to Preferences-General-Content Types-PHP Content
  Type
  - Add *.thtml and assign the PHP-Editor in Preferences-General-
 
  Editors-File Associations
 
  regards,
 
  Michael
 
  Stu schrieb:
 
   Hi Bakers,
 
   Does anyone know if it is possible to get code completion working for
   Views in eclipse? I've got it working for Models in a controller, but
   can't seem to get any code completion when in a View, and do something
   like div?php echo $html- I'm just wondering if there is some
   configuration option I'm missing or something like that.
 
   Any help would be appreciated,
 
   thanks
 
   Stu


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-10-08 Thread Stu

Well, I unfortunately can't get code completion on methods in $form-,
or $html- in a view (*.ctp file).

It's no big deal, but it would be very nice.

On Oct 8, 1:58 pm, schneimi [EMAIL PROTECTED] wrote:
 Yes, you are right, the second step is not necessary.

 Stu schrieb:

  Ah ok, I'd done the first step but not the second step. I'm at work at
  the moment, but I'll do the second step when I get home.

  Thanks

  On Oct 7, 5:28 pm, schneimi [EMAIL PROTECTED] wrote:
   Hi,

   You have to do two steps:

   - Add *.thtml to Preferences-General-Content Types-PHP Content
   Type
   - Add *.thtml and assign the PHP-Editor in Preferences-General-

   Editors-File Associations

   regards,

   Michael

   Stu schrieb:

Hi Bakers,

Does anyone know if it is possible to get code completion working for
Views in eclipse? I've got it working for Models in a controller, but
can't seem to get any code completion when in a View, and do something
like div?php echo $html- I'm just wondering if there is some
configuration option I'm missing or something like that.

Any help would be appreciated,

thanks

Stu


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-10-08 Thread schneimi

Yes that would be nice, but i think it's not possible, because these
variables are handled by cake.

Stu schrieb:
 Well, I unfortunately can't get code completion on methods in $form-,
 or $html- in a view (*.ctp file).

 It's no big deal, but it would be very nice.

 On Oct 8, 1:58 pm, schneimi [EMAIL PROTECTED] wrote:
  Yes, you are right, the second step is not necessary.
 
  Stu schrieb:
 
   Ah ok, I'd done the first step but not the second step. I'm at work at
   the moment, but I'll do the second step when I get home.
 
   Thanks
 
   On Oct 7, 5:28 pm, schneimi [EMAIL PROTECTED] wrote:
Hi,
 
You have to do two steps:
 
- Add *.thtml to Preferences-General-Content Types-PHP Content
Type
- Add *.thtml and assign the PHP-Editor in Preferences-General-
 
Editors-File Associations
 
regards,
 
Michael
 
Stu schrieb:
 
 Hi Bakers,
 
 Does anyone know if it is possible to get code completion working for
 Views in eclipse? I've got it working for Models in a controller, but
 can't seem to get any code completion when in a View, and do something
 like div?php echo $html- I'm just wondering if there is some
 configuration option I'm missing or something like that.
 
 Any help would be appreciated,
 
 thanks
 
 Stu


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Eclipse code completion in Views

2007-10-07 Thread Stu

Hi Bakers,

Does anyone know if it is possible to get code completion working for
Views in eclipse? I've got it working for Models in a controller, but
can't seem to get any code completion when in a View, and do something
like div?php echo $html- I'm just wondering if there is some
configuration option I'm missing or something like that.

Any help would be appreciated,

thanks

Stu


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Eclipse code completion in Views

2007-10-07 Thread schneimi

Hi,

You have to do two steps:

- Add *.thtml to Preferences-General-Content Types-PHP Content
Type
- Add *.thtml and assign the PHP-Editor in Preferences-General-
Editors-File Associations

regards,

Michael

Stu schrieb:
 Hi Bakers,

 Does anyone know if it is possible to get code completion working for
 Views in eclipse? I've got it working for Models in a controller, but
 can't seem to get any code completion when in a View, and do something
 like div?php echo $html- I'm just wondering if there is some
 configuration option I'm missing or something like that.

 Any help would be appreciated,

 thanks

 Stu


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---