Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Re: [ptp-cvs-commit] crecoskie org.eclipse.ptp/core/org.eclipse.ptp.remote.core/src/org/eclipse/ptp/remote/core IRemoteProcessBuilder.java AbstractRemoteProcessBuilder.java PTPRemoteCorePlugin.java

I think you have a point there. I think it was Mike that originally put it where it is.

I don't mind changing it as you suggest. Probably it will be several days before I can do so though, as I have all the CDT mess to deal with right now, which I'm sure you have seen. If you get antsy and want to change it yourself, go ahead.

===========================
Chris Recoskie
Team Lead, IBM CDT and RDT
IBM Toronto

Inactive hide details for Greg Watson ---05/12/2010 06:26:08 PM---Ok, well I think this is more logically a property of a conneGreg Watson ---05/12/2010 06:26:08 PM---Ok, well I think this is more logically a property of a connection. IRemoteConnection already has ge


From:

Greg Watson <g.watson@xxxxxxxxxxxx>

To:

Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>

Date:

05/12/2010 06:26 PM

Subject:

Re: [ptp-dev] Re: [ptp-cvs-commit] crecoskie org.eclipse.ptp/core/org.eclipse.ptp.remote.core/src/org/eclipse/ptp/remote/core IRemoteProcessBuilder.java AbstractRemoteProcessBuilder.java PTPRemoteCorePlugin.java

Sent by:

ptp-dev-bounces@xxxxxxxxxxx




Ok, well I think this is more logically a property of a connection. IRemoteConnection already has getProperty(), so you could easily add "user.home" as a property and not have to add any new interface.

Greg

On May 12, 2010, at 6:17 PM, Chris Recoskie wrote:
      We specifically needed the home directory, as opposed to the working directory. The indexing service and the build service both need to put files in ~/.eclipse.

      BTW, I think I changed the behaviour so that the working directory is not the home directory if you don't pass in a working directory to IRemoteConnection. Instead it's whatever the working directory of the server was when it was launched. Having it be the home directory was causing a lot of weird behaviour.

      ===========================
      Chris Recoskie
      Team Lead, IBM CDT and RDT
      IBM Toronto

      <graycol.gif>
      Greg Watson ---05/12/2010 11:44:11 AM---Chris, I noticed that you added getHomeDirectory() to IRemoteProcessBuilder. Did you know that IRemo
      <ecblank.gif>
      From:
      <ecblank.gif>
      Greg Watson <g.watson@xxxxxxxxxxxx>
      <ecblank.gif>
      To:
      <ecblank.gif>
      Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
      <ecblank.gif>
      Date:
      <ecblank.gif>
      05/12/2010 11:44 AM
      <ecblank.gif>
      Subject:
      <ecblank.gif>
      [ptp-dev] Re: [ptp-cvs-commit] crecoskie org.eclipse.ptp/core/org.eclipse.ptp.remote.core/src/org/eclipse/ptp/remote/core IRemoteProcessBuilder.java AbstractRemoteProcessBuilder.java PTPRemoteCorePlugin.java
      <ecblank.gif>
      Sent by:
      <ecblank.gif>
      ptp-dev-bounces@xxxxxxxxxxx




      Chris,

      I noticed that you added getHomeDirectory() to IRemoteProcessBuilder. Did you know that IRemoteConnection already provides g/setWorkingDirectory()? Did you specifically want to get the user's home directory? It's usually the user's home directory when the connection is first established, but can be changed using this interface if required.

      Regards,
      Greg

      On May 11, 2010, at 6:50 PM, Eclipse CVS Genie wrote:

      > Update of /cvsroot/tools/org.eclipse.ptp/core/org.eclipse.ptp.remote.core/src/org/eclipse/ptp/remote/core
      > In directory node1:/tmp/cvs-serv131960/src/org/eclipse/ptp/remote/core
      >
      > Modified Files:
      > IRemoteProcessBuilder.java AbstractRemoteProcessBuilder.java
      > PTPRemoteCorePlugin.java
      > Log Message:
      > - merged ptp_2_1 to HEAD
      >
      > Index: AbstractRemoteProcessBuilder.java
      > ===================================================================
      > RCS file: /cvsroot/tools/org.eclipse.ptp/core/org.eclipse.ptp.remote.core/src/org/eclipse/ptp/remote/core/AbstractRemoteProcessBuilder.java,v
      > retrieving revision 1.3
      > retrieving revision 1.4
      > diff -C2 -d -r1.3 -r1.4
      > *** AbstractRemoteProcessBuilder.java 28 Jan 2010 13:15:04 -0000 1.3
      > --- AbstractRemoteProcessBuilder.java 11 May 2010 22:50:48 -0000 1.4
      > ***************
      > *** 1,4 ****
      >  /*******************************************************************************
      > !  * Copyright (c) 2007 IBM Corporation and others.
      >   * All rights reserved. This program and the accompanying materials
      >   * are made available under the terms of the Eclipse Public License v1.0
      > --- 1,4 ----
      >  /*******************************************************************************
      > !  * Copyright (c) 2007, 2010 IBM Corporation and others.
      >   * All rights reserved. This program and the accompanying materials
      >   * are made available under the terms of the Eclipse Public License v1.0
      > ***************
      > *** 77,80 ****
      > --- 77,87 ----
      >   return fRemoteDir;
      >   }
      > +
      > + /* (non-Javadoc)
      > +  * @see org.eclipse.ptp.remote.core.IRemoteProcessBuilder#getHomeDirectory()
      > +  */
      > + public IFileStore getHomeDirectory() {
      > + return null;
      > + }
      >
      >   /* (non-Javadoc)
      >
      > Index: PTPRemoteCorePlugin.java
      > ===================================================================
      > RCS file: /cvsroot/tools/org.eclipse.ptp/core/org.eclipse.ptp.remote.core/src/org/eclipse/ptp/remote/core/PTPRemoteCorePlugin.java,v
      > retrieving revision 1.10
      > retrieving revision 1.11
      > diff -C2 -d -r1.10 -r1.11
      > *** PTPRemoteCorePlugin.java 22 Apr 2010 14:56:20 -0000 1.10
      > --- PTPRemoteCorePlugin.java 11 May 2010 22:50:48 -0000 1.11
      > ***************
      > *** 1,4 ****
      >  /*******************************************************************************
      > !  * Copyright (c) 2007 IBM Corporation and others.
      >   * All rights reserved. This program and the accompanying materials
      >   * are made available under the terms of the Eclipse Public License v1.0
      > --- 1,4 ----
      >  /*******************************************************************************
      > !  * Copyright (c) 2007, 2010 IBM Corporation and others.
      >   * All rights reserved. This program and the accompanying materials
      >   * are made available under the terms of the Eclipse Public License v1.0
      > ***************
      > *** 221,226 ****
      >   if (proxy != null) {
      >   return proxy.getServices();
      >   }
      > - return null;
      >   }
      >
      > --- 221,230 ----
      >   if (proxy != null) {
      >   return proxy.getServices();
      > + } else {
      > + // initialization might have failed for that set of services previously... try to load it again
      > + retrieveRemoteServices(id);
      > + proxy = allRemoteServicesById.get(id);
      > + return proxy.getServices();
      >   }
      >   }
      >
      > ***************
      > *** 291,293 ****
      > --- 295,325 ----
      >   }
      >   }
      > +
      > + /**
      > +  * Attempts to load the remote services with a given ID.  If no services are loaded, it
      > +  * loads them all.
      > +  *
      > +  * @param id
      > +  */
      > + private void retrieveRemoteServices(String id) {
      > + if (allRemoteServicesById == null) {
      > + retrieveRemoteServices();
      > + } else {
      > + IExtensionRegistry registry = Platform.getExtensionRegistry();
      > + IExtensionPoint extensionPoint = registry.getExtensionPoint(PLUGIN_ID, REMOTE_SERVICES_EXTENSION_POINT_ID);
      > + final IExtension[] extensions = extensionPoint.getExtensions();
      > +
      > + for (IExtension ext : extensions) {
      > + final IConfigurationElement[] elements = ext.getConfigurationElements();
      > +
      > + for (IConfigurationElement ce : elements) {
      > + RemoteServicesProxy proxy = new RemoteServicesProxy(ce);
      > + if (proxy.getId().equals(id)) {
      > + allRemoteServicesById.put(proxy.getId(), proxy);
      > + allRemoteServicesByScheme.put(proxy.getScheme(), proxy);
      > + }
      > + }
      > + }
      > + }
      > + }
      >  }
      >
      > Index: IRemoteProcessBuilder.java
      > ===================================================================
      > RCS file: /cvsroot/tools/org.eclipse.ptp/core/org.eclipse.ptp.remote.core/src/org/eclipse/ptp/remote/core/IRemoteProcessBuilder.java,v
      > retrieving revision 1.2
      > retrieving revision 1.3
      > diff -C2 -d -r1.2 -r1.3
      > *** IRemoteProcessBuilder.java 2 Nov 2009 23:27:22 -0000 1.2
      > --- IRemoteProcessBuilder.java 11 May 2010 22:50:48 -0000 1.3
      > ***************
      > *** 1,4 ****
      >  /*******************************************************************************
      > !  * Copyright (c) 2007 IBM Corporation and others.
      >   * All rights reserved. This program and the accompanying materials
      >   * are made available under the terms of the Eclipse Public License v1.0
      > --- 1,4 ----
      >  /*******************************************************************************
      > !  * Copyright (c) 2007, 2010 IBM Corporation and others.
      >   * All rights reserved. This program and the accompanying materials
      >   * are made available under the terms of the Eclipse Public License v1.0
      > ***************
      > *** 63,66 ****
      > --- 63,73 ----
      >    */
      >   public IFileStore directory();
      > +
      > + /**
      > +  * Returns the user's home directory on the target system.
      > +  *
      > +  * @return IFileStore corresponding to the location, or <code>null</code> if the home directory cannot be determined.
      > +  */
      > + public IFileStore getHomeDirectory();
      >
      >   /**
      >
      > _______________________________________________
      > ptp-cvs-commit mailing list
      >
      ptp-cvs-commit@xxxxxxxxxxx
      >
      https://dev.eclipse.org/mailman/listinfo/ptp-cvs-commit

      _______________________________________________
      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


GIF image

GIF image


Back to the top