[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ptp-dev] Questions about remote support
|
Greg
I just updated from head a few minutes ago and now I'm getting a null
pointer exception (see bottom of this email) when I try to create a new
resource manager. This happens when I open the resource manager wizard,
click PE from the list and click next. This worked correctly this morning.
If I updated while you were in the middle of commits, that's fine, just
let me know to try again later.
Also, the way my parallel tab works, I have a text entry field with a
ModifyListener registered, and an accompanying Text field that gets filled
in with a path name. This gets filled in either by the user typing in a
path name or by my code as a result of the user selecting a file from the
file selector, in which case I get the IPath object returned by calling
browseFile, call toString() on that object and then fill in the text field
with that value.
I don't attempt to validate the pathname until the ModifyListener
registered on the text field gets called, which occurs either when the
user types in the field or when my code fills in the field using the
pathname obtained from the IPath object. If the user has typed in a field,
I don't see any way to validate that pathname, since I only know the
pathname and the remote connection at that point (I don't have an IPath
object). If I do have an IPath object, because the user clicked the
browse button, then is the intent I call getResource() to get the
associated IRemoteResource, then validate using that object?
Thanks
java.lang.NullPointerException
at
org.eclipse.ptp.internal.remote.RemoteServicesProxy.loadServices(RemoteServicesProxy.java:152)
at
org.eclipse.ptp.internal.remote.RemoteServicesProxy.initialize(RemoteServicesProxy.java:135)
at
org.eclipse.ptp.remote.PTPRemotePlugin.retrieveRemoteServices(PTPRemotePlugin.java:163)
at
org.eclipse.ptp.remote.PTPRemotePlugin.getAllRemoteServices(PTPRemotePlugin.java:182)
at
org.eclipse.ptp.remote.ui.wizards.AbstractRemoteResourceManagerConfigurationWizardPage.initializeRemoteServicesCombo(AbstractRemoteResourceManagerConfigurationWizardPage.java:552)
at
org.eclipse.ptp.remote.ui.wizards.AbstractRemoteResourceManagerConfigurationWizardPage.createContents(AbstractRemoteResourceManagerConfigurationWizardPage.java:272)
at
org.eclipse.ptp.remote.ui.wizards.AbstractRemoteResourceManagerConfigurationWizardPage.createControl(AbstractRemoteResourceManagerConfigurationWizardPage.java:177)
at
org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1147)
at
org.eclipse.jface.wizard.WizardDialog.access$2(WizardDialog.java:1139)
at
org.eclipse.jface.wizard.WizardDialog$4.run(WizardDialog.java:1128)
at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at
org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1126)
at
org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:820)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:369)
at
org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3319)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at
org.eclipse.ptp.ui.actions.AddResourceManagerAction.run(AddResourceManagerAction.java:58)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3319)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
Dave
Greg Watson <g.watson@xxxxxxxxxxxx>
Sent by: ptp-dev-bounces@xxxxxxxxxxx
10/08/2007 01:10 PM
Please respond to
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
To
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
cc
Subject
Re: [ptp-dev] Questions about remote support
On Oct 8, 2007, at 12:21 PM, Dave Wootton wrote:
> Greg
> I don't understand the comment about subclassing
> AbstractRemoteResourceManager in order to have the resource manager
> wizard
> correctly look at the remote system when validating the path to my
> proxy.
> I have a class PEResourceManagerConfigurationWizardPage that is
> subclassed
> from AbstractRemoteResourceManagerConfigurationWizardPage. When
> that page
> of the wizard dialog is displayed and I fill in a proxy path, it
> expects
> that path to exist on the local system, not the remote system.
>
> If I run the wizard, I can click the browse button for the proxy
> server
> executable and navigate to find the pathname of the proxy on the
> remote
> system. When I click OK, the pathname appears in the path to proxy
> server
> executable text field, but is flagged in error since no file by that
> pathname exists on the local server. I don't have any pathname
> validation
> logic in my PEResourceManagerConfigurationWizardPage, so I suspect
> this
> error is coming from validation code in the superclass.
Ugh, yes I see the problem. I'll fix this asap.
>
> I'm also trying to use the browseRemoteFile method in
> IRemoteFileManager,
> just to be able to get the remote file dialog to appear (I realize
> this
> will need to change, but I'm just trying to get this part working
> now). I
> think that I need to create an instance of RSEFileManager in order
> to call
> browseRemoteFile. So I added org.eclipse.ptp.remote.rse to the list of
> dependencies in the build.xml file for the package containing my
> parallel
> tab class. I then tried importing
> org.eclipse.ptp.remote.rse.RSEFileManager and I get an error
> message that
> this is invalid due to access restrictions for package
> org.eclipse.ptp.remote.rse
You should never need to create instances of the file manager
implementation directly. Always use the IRemote* interfaces. Assuming
you've subclassed AbstractRemoteResourceManagerConfiguration, use the
getRemoteServicesId() method on your configuration to get the name of
the remote service provider that has been selected. Then use
PTPRemotePlugin.getRemoteServices() to get the IRemoteServices
object. You then get the file manager by calling
IRemoteServices.getFileManager().
I've committed some changes to the way this works, as well as added
support for direct file manipulation. I'm just documenting it now.
Greg
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev