Re: [pdt-dev] Use of PHPMixinModel

2009-06-13 Thread Michael Spector
Hi Robert,
We are planning to remove any usage of PHPMixinModel. We should move to DLTK
indexing mechanism instead, once it's improved.
For now, only global variables, global constants and include statements are
indexed using PHPMixinModel.
If you need to find some model element, please use one of the following
utilities:

PHPModelUtils
PHPTypeInferenceUtils

Thanks,
Michael

On Fri, Jun 12, 2009 at 8:52 PM, Robert Gruendler  wrote:

> Hi all,
>
>
> i'm member of a sourceforge team which is working on an eclipse plugin for
> the symfony php framework.
>
> Currently i'm trying to dig into the pdt code to get some basic
> understanding of how the pdt php-model works.
>
> As far as i've understood, we can use the PHPMixinModel class to search for
> elements in the workspace PHP-Model.
>
> So let's say, there's a class "Foo" somewhere inside an pdt project, should
> we be able to retrieve an instance of
> IMixinElement when searching the model with the following code:
>
> PHPMixinModel.getWorkspaceInstance().getRawModel().get("Foo");
>
> This call would query the model cache and return all elements that match to
> the key "Foo", if i understood it right.
> For some reason however, i never get any elements back, no matter what i'm
> searching, also tried find() instead of get() btw.
> Do we need to add some PHP extension point to our plugin to make use of the
> MixinModel ?
>
>
> Any hints would be greatly appreciated, thanks !
>
>
> -robert
>
>
> ps: Is there any API documentation available somewhere for either PDT of
> DLTK ?
>
>
> ___
> pdt-dev mailing list
> pdt-dev@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/pdt-dev
>
___
pdt-dev mailing list
pdt-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/pdt-dev


Re: [pdt-dev] Use of PHPMixinModel

2009-06-13 Thread Robert Gruendler

Hi Michael,

thanks for the info.

I have a couple of other questions though:


1. We have framework libraries assignend to each project, which we would 
like to add to the pdt BuildPath of the project.
   Is BuildPathUtils.addEntriesToBuildPath() the preferred way to do 
this ? If so, at which point in the plugin life-cycle should this happen ?



2. Basically, in our model specific functions of specific classes can 
have one or more ISourceModules as child elements, based on the mvc
   architecture of the framework. Is it possible to contribute those 
ISourceModules as child nodes to php methods of the pdt model, ie those

   children would be visible in the outline of that class mehod ?

I have found this wiki entry 
http://wiki.eclipse.org/API_Document_for_Extension_Points_PDT_2.0#PHP_Source_Element_Requestor. 
Is

this the intended way of achieving what i described in the 2nd question ?


thanks for your help !


-robert





 



Michael Spector schrieb:

Hi Robert,

We are planning to remove any usage of PHPMixinModel. We should move 
to DLTK indexing mechanism instead, once it's improved.
For now, only global variables, global constants and include 
statements are indexed using PHPMixinModel.
If you need to find some model element, please use one of the 
following utilities:


PHPModelUtils
PHPTypeInferenceUtils

Thanks,
Michael

On Fri, Jun 12, 2009 at 8:52 PM, Robert Gruendler > wrote:


Hi all,


i'm member of a sourceforge team which is working on an eclipse
plugin for the symfony php framework.

Currently i'm trying to dig into the pdt code to get some basic
understanding of how the pdt php-model works.

As far as i've understood, we can use the PHPMixinModel class to
search for elements in the workspace PHP-Model.

So let's say, there's a class "Foo" somewhere inside an pdt
project, should we be able to retrieve an instance of
IMixinElement when searching the model with the following code:

PHPMixinModel.getWorkspaceInstance().getRawModel().get("Foo");

This call would query the model cache and return all elements that
match to the key "Foo", if i understood it right.
For some reason however, i never get any elements back, no matter
what i'm searching, also tried find() instead of get() btw.
Do we need to add some PHP extension point to our plugin to make
use of the MixinModel ?


Any hints would be greatly appreciated, thanks !


-robert


ps: Is there any API documentation available somewhere for either
PDT of DLTK ?


___
pdt-dev mailing list
pdt-dev@eclipse.org 
https://dev.eclipse.org/mailman/listinfo/pdt-dev




___
pdt-dev mailing list
pdt-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/pdt-dev
  


___
pdt-dev mailing list
pdt-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/pdt-dev


Re: [pdt-dev] Use of PHPMixinModel

2009-06-13 Thread Michael Spector
Hi Robert,

On Sat, Jun 13, 2009 at 12:45 PM, Robert Gruendler  wrote:

> Hi Michael,
>
> thanks for the info.
>
> I have a couple of other questions though:
>
>
> 1. We have framework libraries assignend to each project, which we would
> like to add to the pdt BuildPath of the project.
>   Is BuildPathUtils.addEntriesToBuildPath() the preferred way to do this ?
> If so, at which point in the plugin life-cycle should this happen ?
>

You should implement your library initializer just like PHP Language library
is initialized:







>
>
> 2. Basically, in our model specific functions of specific classes can have
> one or more ISourceModules as child elements, based on the mvc
>   architecture of the framework. Is it possible to contribute those
> ISourceModules as child nodes to php methods of the pdt model, ie those
>   children would be visible in the outline of that class mehod ?


I'm not sure that you can create an ISourceModule as a child element of
IMethod using Source Element Requestor.
BTW, there is new extension point in DLTK called "model", which is intended
for using in order to provide custom model elements to DLTK structured
model.
But we never used it - it's too new :)

I'm CC'ing DLTK developers list, may be they can shed some light on this
question.


>
>
> I have found this wiki entry
> http://wiki.eclipse.org/API_Document_for_Extension_Points_PDT_2.0#PHP_Source_Element_Requestor.
> Is
> this the intended way of achieving what i described in the 2nd question ?
>
>
> thanks for your help !
>
>
> -robert
>
>
>
>
>
>
>
> Michael Spector schrieb:
>
>> Hi Robert,
>>
>> We are planning to remove any usage of PHPMixinModel. We should move to
>> DLTK indexing mechanism instead, once it's improved.
>> For now, only global variables, global constants and include statements
>> are indexed using PHPMixinModel.
>> If you need to find some model element, please use one of the following
>> utilities:
>>
>> PHPModelUtils
>> PHPTypeInferenceUtils
>>
>> Thanks,
>> Michael
>>
>> On Fri, Jun 12, 2009 at 8:52 PM, Robert Gruendler > doo...@gmail.com>> wrote:
>>
>>Hi all,
>>
>>
>>i'm member of a sourceforge team which is working on an eclipse
>>plugin for the symfony php framework.
>>
>>Currently i'm trying to dig into the pdt code to get some basic
>>understanding of how the pdt php-model works.
>>
>>As far as i've understood, we can use the PHPMixinModel class to
>>search for elements in the workspace PHP-Model.
>>
>>So let's say, there's a class "Foo" somewhere inside an pdt
>>project, should we be able to retrieve an instance of
>>IMixinElement when searching the model with the following code:
>>
>>PHPMixinModel.getWorkspaceInstance().getRawModel().get("Foo");
>>
>>This call would query the model cache and return all elements that
>>match to the key "Foo", if i understood it right.
>>For some reason however, i never get any elements back, no matter
>>what i'm searching, also tried find() instead of get() btw.
>>Do we need to add some PHP extension point to our plugin to make
>>use of the MixinModel ?
>>
>>
>>Any hints would be greatly appreciated, thanks !
>>
>>
>>-robert
>>
>>
>>ps: Is there any API documentation available somewhere for either
>>PDT of DLTK ?
>>
>>
>>___
>>pdt-dev mailing list
>>pdt-dev@eclipse.org 
>>https://dev.eclipse.org/mailman/listinfo/pdt-dev
>>
>>
>> 
>>
>> ___
>> pdt-dev mailing list
>> pdt-dev@eclipse.org
>> https://dev.eclipse.org/mailman/listinfo/pdt-dev
>>
>>
>
> ___
> pdt-dev mailing list
> pdt-dev@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/pdt-dev
>
___
pdt-dev mailing list
pdt-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/pdt-dev


Re: [pdt-dev] Use of PHPMixinModel

2009-06-13 Thread Robert Gruendler


You should implement your library initializer just like PHP Language 
library is initialized:








I've tried this, but our Initializer never gets created. Does our 
ProjectNature need to extend ScriptNature for this to work ?


The extension point looks like this right now:


  

class="net.sourceforge.sfdt.core.SfBuildpathContainerInitializer"

   id="net.sourceforge.sfdt.core.SYMFONY">
 
  

The implementation looks similar to LanguageModelInitializer of PDT.


thanks,

-robert
 




2. Basically, in our model specific functions of specific classes
can have one or more ISourceModules as child elements, based on
the mvc
  architecture of the framework. Is it possible to contribute
those ISourceModules as child nodes to php methods of the pdt
model, ie those
  children would be visible in the outline of that class mehod ?


I'm not sure that you can create an ISourceModule as a child element 
of IMethod using Source Element Requestor.
BTW, there is new extension point in DLTK called "model", which is 
intended for using in order to provide custom model elements to DLTK 
structured model.

But we never used it - it's too new :)

I'm CC'ing DLTK developers list, may be they can shed some light on 
this question.
 




I have found this wiki entry

http://wiki.eclipse.org/API_Document_for_Extension_Points_PDT_2.0#PHP_Source_Element_Requestor.
Is
this the intended way of achieving what i described in the 2nd
question ?


thanks for your help !


-robert





 


Michael Spector schrieb:

Hi Robert,

We are planning to remove any usage of PHPMixinModel. We
should move to DLTK indexing mechanism instead, once it's
improved.
For now, only global variables, global constants and include
statements are indexed using PHPMixinModel.
If you need to find some model element, please use one of the
following utilities:

PHPModelUtils
PHPTypeInferenceUtils

Thanks,
Michael

On Fri, Jun 12, 2009 at 8:52 PM, Robert Gruendler
mailto:doo...@gmail.com>
>> wrote:

   Hi all,


   i'm member of a sourceforge team which is working on an eclipse
   plugin for the symfony php framework.

   Currently i'm trying to dig into the pdt code to get some basic
   understanding of how the pdt php-model works.

   As far as i've understood, we can use the PHPMixinModel
class to
   search for elements in the workspace PHP-Model.

   So let's say, there's a class "Foo" somewhere inside an pdt
   project, should we be able to retrieve an instance of
   IMixinElement when searching the model with the following code:

   PHPMixinModel.getWorkspaceInstance().getRawModel().get("Foo");

   This call would query the model cache and return all
elements that
   match to the key "Foo", if i understood it right.
   For some reason however, i never get any elements back, no
matter
   what i'm searching, also tried find() instead of get() btw.
   Do we need to add some PHP extension point to our plugin to
make
   use of the MixinModel ?


   Any hints would be greatly appreciated, thanks !


   -robert


   ps: Is there any API documentation available somewhere for
either
   PDT of DLTK ?


   ___
   pdt-dev mailing list
   pdt-dev@eclipse.org 
>

   https://dev.eclipse.org/mailman/listinfo/pdt-dev






___
pdt-dev mailing list
pdt-dev@eclipse.org 
https://dev.eclipse.org/mailman/listinfo/pdt-dev
 



___
pdt-dev mailing list
pdt-dev@eclipse.org 
https://dev.eclipse.org/mailman/listinfo/pdt-dev




___
pdt-dev mailing list
pdt-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/pdt-dev


RE: [Dltk-dev] Re: [pdt-dev] Use of PHPMixinModel

2009-06-13 Thread Roy Ganor
You should also add an extension to buildpathContainerPage, so users
will be able to add it through the Project properties -> Buildpath ->
Libraries:

   
  
  
   
   
  
  
   
   
Roy
-Original Message-
From: dltk-dev-boun...@eclipse.org [mailto:dltk-dev-boun...@eclipse.org]
On Behalf Of Robert Gruendler
Sent: Saturday, June 13, 2009 3:33 PM
To: Michael Spector
Cc: DLTK Developer Discussions; PDT Developers
Subject: [Dltk-dev] Re: [pdt-dev] Use of PHPMixinModel


> You should implement your library initializer just like PHP Language 
> library is initialized:
>
> 
> 
class="org.eclipse.php.internal.core.language.LanguageModelInitializer"
> id="org.eclipse.php.core.LANGUAGE">
> 
> 

I've tried this, but our Initializer never gets created. Does our 
ProjectNature need to extend ScriptNature for this to work ?

The extension point looks like this right now:


   
  
  
   

The implementation looks similar to LanguageModelInitializer of PDT.


thanks,

-robert
>  
>
>
>
> 2. Basically, in our model specific functions of specific classes
> can have one or more ISourceModules as child elements, based on
> the mvc
>   architecture of the framework. Is it possible to contribute
> those ISourceModules as child nodes to php methods of the pdt
> model, ie those
>   children would be visible in the outline of that class mehod ?
>
>
> I'm not sure that you can create an ISourceModule as a child element 
> of IMethod using Source Element Requestor.
> BTW, there is new extension point in DLTK called "model", which is 
> intended for using in order to provide custom model elements to DLTK 
> structured model.
> But we never used it - it's too new :)
>
> I'm CC'ing DLTK developers list, may be they can shed some light on 
> this question.
>  
>
>
>
> I have found this wiki entry
>
http://wiki.eclipse.org/API_Document_for_Extension_Points_PDT_2.0#PHP_So
urce_Element_Requestor.
> Is
> this the intended way of achieving what i described in the 2nd
> question ?
>
>
> thanks for your help !
>
>
> -robert
>
>
>
>
>
>  
>
> Michael Spector schrieb:
>
> Hi Robert,
>
> We are planning to remove any usage of PHPMixinModel. We
> should move to DLTK indexing mechanism instead, once it's
> improved.
> For now, only global variables, global constants and include
> statements are indexed using PHPMixinModel.
> If you need to find some model element, please use one of the
> following utilities:
>
> PHPModelUtils
> PHPTypeInferenceUtils
>
> Thanks,
> Michael
>
> On Fri, Jun 12, 2009 at 8:52 PM, Robert Gruendler
> mailto:doo...@gmail.com>
> <mailto:doo...@gmail.com <mailto:doo...@gmail.com>>> wrote:
>
>Hi all,
>
>
>i'm member of a sourceforge team which is working on an
eclipse
>plugin for the symfony php framework.
>
>Currently i'm trying to dig into the pdt code to get some
basic
>understanding of how the pdt php-model works.
>
>As far as i've understood, we can use the PHPMixinModel
> class to
>search for elements in the workspace PHP-Model.
>
>So let's say, there's a class "Foo" somewhere inside an pdt
>project, should we be able to retrieve an instance of
>IMixinElement when searching the model with the following
code:
>
>
PHPMixinModel.getWorkspaceInstance().getRawModel().get("Foo");
>
>This call would query the model cache and return all
> elements that
>match to the key "Foo", if i understood it right.
>For some reason however, i never get any elements back, no
> matter
>what i'm searching, also tried find() instead of get() btw.
>Do we need to add some PHP extension point to our plugin to
> make
>use of the MixinModel ?
>
>
>Any hints would be greatly appreciated, thanks !
>
>
>-robert
>
>
>ps: Is there any API documentation available somewhere for
> either
>PDT of DLTK ?
>
>
>___
>pdt-dev mailing list
>pdt-dev@eclipse.org <mailto:pdt-dev@eclipse.org>
> <mailto:pdt-dev@eclipse.org <mailto:pdt-dev@eclipse.org>>
>
>https://dev.ecl

Re: [Dltk-dev] Re: [pdt-dev] Use of PHPMixinModel

2009-06-13 Thread Robert Gruendler

Hi Roy,

thanks for the hint. We intend to implement a global preference page for 
the php framework, where
the user can add different versions of the framework, and set one of 
them as the default. Pretty much like

the "Installed JREs" mechanism for java.

So each project has a preference page where the default framework 
version is selected, but can be overridden

by selecting a different one from the global list.

Anyway, i tried the tip you posted, but neither the 
buildpathContainerInitializer nor the buildPathContainerPage

ever gets created.

So far our nature simply implemented IProjectNature, so i tried to 
extend ScriptNature instead, which didn't make any difference.


Any hint what i'm missing out here ?


thanks !


-robert



Roy Ganor schrieb:

You should also add an extension to buildpathContainerPage, so users
will be able to add it through the Project properties -> Buildpath ->
Libraries:

   
   
class="org.eclipse.php.myframework.MyFrameworkContainerInitializer"

id=" org.eclipse.php.myframework.CONTAINER">
  
   
   
  
  
   
   
Roy

-Original Message-
From: dltk-dev-boun...@eclipse.org [mailto:dltk-dev-boun...@eclipse.org]
On Behalf Of Robert Gruendler
Sent: Saturday, June 13, 2009 3:33 PM
To: Michael Spector
Cc: DLTK Developer Discussions; PDT Developers
Subject: [Dltk-dev] Re: [pdt-dev] Use of PHPMixinModel


  
You should implement your library initializer just like PHP Language 
library is initialized:




point="org.eclipse.dltk.core.buildpathContainerInitializer">
  



class="org.eclipse.php.internal.core.language.LanguageModelInitializer"
  

id="org.eclipse.php.core.LANGUAGE">





I've tried this, but our Initializer never gets created. Does our 
ProjectNature need to extend ScriptNature for this to work ?


The extension point looks like this right now:


   
  
class="net.sourceforge.sfdt.core.SfBuildpathContainerInitializer"

id="net.sourceforge.sfdt.core.SYMFONY">
  
   

The implementation looks similar to LanguageModelInitializer of PDT.


thanks,

-robert
  
 




2. Basically, in our model specific functions of specific classes
can have one or more ISourceModules as child elements, based on
the mvc
  architecture of the framework. Is it possible to contribute
those ISourceModules as child nodes to php methods of the pdt
model, ie those
  children would be visible in the outline of that class mehod ?


I'm not sure that you can create an ISourceModule as a child element 
of IMethod using Source Element Requestor.
BTW, there is new extension point in DLTK called "model", which is 
intended for using in order to provide custom model elements to DLTK 
structured model.

But we never used it - it's too new :)

I'm CC'ing DLTK developers list, may be they can shed some light on 
this question.
 




I have found this wiki entry



http://wiki.eclipse.org/API_Document_for_Extension_Points_PDT_2.0#PHP_So
urce_Element_Requestor.
  

Is
this the intended way of achieving what i described in the 2nd
question ?


thanks for your help !


-robert





 


Michael Spector schrieb:

Hi Robert,

We are planning to remove any usage of PHPMixinModel. We
should move to DLTK indexing mechanism instead, once it's
improved.
For now, only global variables, global constants and include
statements are indexed using PHPMixinModel.
If you need to find some model element, please use one of the
following utilities:

PHPModelUtils
PHPTypeInferenceUtils

Thanks,
Michael

On Fri, Jun 12, 2009 at 8:52 PM, Robert Gruendler
mailto:doo...@gmail.com>
<mailto:doo...@gmail.com <mailto:doo...@gmail.com>>> wrote:

   Hi all,


   i'm member of a sourceforge team which is working on an


eclipse
  

   plugin for the symfony php framework.

   Currently i'm trying to dig into the pdt code to get some


basic
  

   understanding of how the pdt php-model works.

   As far as i've understood, we can use the PHPMixinModel
class to
   search for elements in the workspace PHP-Model.

   So let's say, there's a class "Foo" somewhere inside an pdt
   project, should we be able to retrieve an instance of
   IMixinElement when searching the model with the following


code:
  


PHPMixinModel.getWorkspaceInstance().getRawModel().get("Foo");
  

   This call would query the model cache and return all
elements that
   match to the key "Foo", if i understood it right.
   For some reason however, i ne