Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 215990 Details for
Bug 378494
Change RuntimeProcessFactory to use file and process proxies
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
RuntimeProcessFactory: just return command in "which" method if the project is null
0003-just-return-command-if-the-project-is-null.patch (text/plain), 2.81 KB, created by
Rafael Medeiros Teixeira
on 2012-05-21 16:46:41 EDT
(
hide
)
Description:
RuntimeProcessFactory: just return command in "which" method if the project is null
Filename:
MIME Type:
Creator:
Rafael Medeiros Teixeira
Created:
2012-05-21 16:46:41 EDT
Size:
2.81 KB
patch
obsolete
>From 881dfcb92ac8cf157a2f7ccb17a0f8f81e6188a2 Mon Sep 17 00:00:00 2001 >From: Xavier Raynaud <xavier.raynaud@kalray.eu> >Date: Wed, 9 May 2012 16:10:46 +0200 >Subject: [PATCH] just return command if the project is null > >--- > .../launch/core/factory/RuntimeProcessFactory.java | 33 ++++++++++--------- > 1 files changed, 17 insertions(+), 16 deletions(-) > >diff --git a/profiling/org.eclipse.linuxtools.tools.launch.core/src/org/eclipse/linuxtools/tools/launch/core/factory/RuntimeProcessFactory.java b/profiling/org.eclipse.linuxtools.tools.launch.core/src/org/eclipse/linuxtools/tools/launch/core/factory/RuntimeProcessFactory.java >index 8354858..6251d6b 100644 >--- a/profiling/org.eclipse.linuxtools.tools.launch.core/src/org/eclipse/linuxtools/tools/launch/core/factory/RuntimeProcessFactory.java >+++ b/profiling/org.eclipse.linuxtools.tools.launch.core/src/org/eclipse/linuxtools/tools/launch/core/factory/RuntimeProcessFactory.java >@@ -66,24 +66,25 @@ public class RuntimeProcessFactory extends LinuxtoolsProcessFactory { > public String whichCommand(String command, IProject project) throws IOException { > > String[] envp = updateEnvironment(null, project); >- >- try { >- proxy = RemoteProxyManager.getInstance().getFileProxy(project); >- URI whichUri = URI.create(WHICH_CMD); >- IPath whichPath = new Path(proxy.toPath(whichUri)); >- IRemoteCommandLauncher launcher = RemoteProxyManager.getInstance().getLauncher(project); >- Process pProxy = launcher.execute(whichPath, new String[]{command}, envp, null, new NullProgressMonitor()); >- if (pProxy != null){ >- BufferedReader error = new BufferedReader(new InputStreamReader(pProxy.getErrorStream())); >- if(error.readLine() != null){ >- throw new IOException(error.readLine()); >+ if (project != null) { >+ try { >+ proxy = RemoteProxyManager.getInstance().getFileProxy(project); >+ URI whichUri = URI.create(WHICH_CMD); >+ IPath whichPath = new Path(proxy.toPath(whichUri)); >+ IRemoteCommandLauncher launcher = RemoteProxyManager.getInstance().getLauncher(project); >+ Process pProxy = launcher.execute(whichPath, new String[]{command}, envp, null, new NullProgressMonitor()); >+ if (pProxy != null){ >+ BufferedReader error = new BufferedReader(new InputStreamReader(pProxy.getErrorStream())); >+ if(error.readLine() != null){ >+ throw new IOException(error.readLine()); >+ } >+ BufferedReader reader = new BufferedReader(new InputStreamReader(pProxy.getInputStream())); >+ String readLine = reader.readLine(); >+ command = readLine; > } >- BufferedReader reader = new BufferedReader(new InputStreamReader(pProxy.getInputStream())); >- String readLine = reader.readLine(); >- command = readLine; >+ } catch (CoreException e) { >+ e.printStackTrace(); > } >- } catch (CoreException e) { >- e.printStackTrace(); > } > return command; > } >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 378494
:
215063
|
215989
|
215990
|
216600
|
217547
|
217562
|
217688
|
217689