[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [pdt-dev] Content outline page for editor

Hi Lukasz,

You should access the PHP model using the static call:
PHPWorkspaceModelManager.getInstance().getModelForFile(file, false); 
or
PHPWorkspaceModelManager.getInstance().getModelForProject(project,
false);

(Interfaces are 
   public PHPFileData getModelForFile(IFile, boolean)
   public PHPProjectModel getModelForProject(IProject, boolean) {
)

Then you can have the PHPFileData or PHPProjectModel objects that hold
all classes, methods and variables.

Also if you want to be fully synchronized with the changes of the PHP
model don't forget to add a listener (to the project model) by 

addProjectModelListener(IProjectModelListener) (part of PHPProjectModel)

If you need any farther help, don't hesitate to ask,
Roy.

-----Original Message-----
From: pdt-dev-bounces@xxxxxxxxxxx [mailto:pdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of lukasz@xxxxxxxxxx
Sent: Wednesday, July 11, 2007 15:50
To: pdt-dev@xxxxxxxxxxx
Subject: [pdt-dev] Content outline page for editor



Hello everyone,
I trying to do simple ui bridge for Mylyn but it's really hard because
there are classes without documentation and/or magic relations.

For AbstractContextUiBridge (mapping between mylyn context and tools UI)
i must get outline viewer for given editor (PHPStructuredEditor) but i
don't know how (i got editor and can't get tree viewer for outline
view).
JavaUIBridge using IJavaElements (parts of java model) for outline
decoration, but i don't know how to get PHPCodeData for editor/editor
input.

Regards,
Lukasz




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