Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] How to add Resource Managers Factories?

Hi,

PTPCorePlugin
.getDefault().getModelManager().getResourceManagerFactories() just checks for, and loads, "resourceManagers" extension plugins. If it can't find any, then the method will return null. Since you've removed the three existing resource managers, have you supplied your own?

I'm not sure where the message you are seeing is coming from, but it's not from PTP.

Greg

On Mar 4, 2009, at 9:21 AM, 邹园斌 wrote:

Hi, Greg
I tried to write a simple project which contained only a perspective
and a resource manager view, and wanted to check if the resources
managers factories were plugged to the platform or not. My project is
as attached. Lots of codes were copied from the project
"org.eclipse.ptp.ui", in the start method of PTPUIPlugin, I canceled
the invoking of registerAdapterFactories() method and
retrieveConfigurationWizardPageFactories() method and deleted the
three managers, which seemed nothing related with my aim. Then I
called
IResourceManagerFactory[] resourceManagerFactories =
PTPCorePlugin .getDefault().getModelManager().getResourceManagerFactories();
and checked whether there is resource manager factories or not. The
result is that "There is no Resource Manager Factories on this
platform!"
So I am not very clear what the mistake have I made in this project.
Could you please take a look at it.

Thanks,
Zou Yuanbin

2009/3/2 Greg Watson <g.watson@xxxxxxxxxxxx>:
Hi Yuanbin Zou,
Resource managers are added by contributing an extension to the
"resourceManagers" extension point. This is managed by
org.eclipse.ptp.internal.core.ModelManager. Resource persistence
(resourceManagers.xml) is handled by
org.eclipse.ptp.internal.rmsystem.ResourceManagerPersistence. Both these are in the org.eclipse.ptp.core plugin, so replacing the org.eclipse.ptp.ui plugin should not change how this is handled. However, if you're bypassing
code in the org.eclipse.ptp.core plugin by reading/writing
resourceManagers.xml directly, then the org.eclipse.ptp.ui plugin is
probably not going to work correctly.
Greg
On Mar 1, 2009, at 2:16 AM, Grandet wrote:

Hi, all
I am trying to develop a new UI plug-in, which can creat links and resources managers with a configuration gotten from a database. I have read the codes checked out from the CVS site, and tried to write codes imitating the codes of project "org.eclipse.ptp.ui". Now, when I run the application with the project "org.eclipse.ptp.ui", my plugin can read the configuration file ".metadata\.plugins\org.eclipse.ptp.core \resourceManagers.xml"; while I tried to run without this project, I trie to add a resource manager, a message box was opened with infomation like this:"No Resource Managers Factories are plugged into this application". In my final release, I would like to replace the "org.eclipse.ptp.ui" with my plug-in, so, I want to know which part in the project "org.eclipse.ptp.ui" is responsible for the task
of "plug the resources managers to the application"?
     I am hoping to get response from you.

-Regards,
________________________________
2009-03-01 15:03:04
Yuanbin Zou
FIT 1-111, Tsinghua University, Beijing,China
100084
Residence: +86-10-6279-6954
Mobile: +86-135-8154-2786
E-mail: stgrandet@xxxxxxxxx
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev


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


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



Back to the top