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 185923 Details for
Bug 255619
[resolver][external tools] External tools variable ${selected_text} strips double quotes, whitespace.
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]
proposed patch v1 - patches SelectedTextResolver.java
SelectedTextResolver.patch.txt (text/plain), 1.75 KB, created by
Andre Berg
on 2010-12-31 05:23:25 EST
(
hide
)
Description:
proposed patch v1 - patches SelectedTextResolver.java
Filename:
MIME Type:
Creator:
Andre Berg
Created:
2010-12-31 05:23:25 EST
Size:
1.75 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.debug.ui >Index: ui/org/eclipse/debug/internal/ui/stringsubstitution/SelectedTextResolver.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/SelectedTextResolver.java,v >retrieving revision 1.6 >diff -u -r1.6 SelectedTextResolver.java >--- ui/org/eclipse/debug/internal/ui/stringsubstitution/SelectedTextResolver.java 24 Feb 2005 06:55:34 -0000 1.6 >+++ ui/org/eclipse/debug/internal/ui/stringsubstitution/SelectedTextResolver.java 31 Dec 2010 08:49:59 -0000 >@@ -11,8 +11,10 @@ > > package org.eclipse.debug.internal.ui.stringsubstitution; > >+import org.eclipse.core.runtime.Platform; > import org.eclipse.core.variables.IDynamicVariable; > import org.eclipse.core.variables.IDynamicVariableResolver; >+import org.eclipse.osgi.service.environment.Constants; > > public class SelectedTextResolver implements IDynamicVariableResolver { > private SelectedResourceManager selectedResourceManager; >@@ -27,9 +29,20 @@ > public String resolveValue(IDynamicVariable variable, String argument) { > String selection = selectedResourceManager.getSelectedText(); > String selectedText = argument; >+ > if (selection != null && selection.length() > 0) { > selectedText = selection; >+ if (Platform.getOS().equals(Constants.OS_MACOSX)) { >+ // @see Bug 255619. Mac OS X needs escaping before ArgumentParser.parseString(). >+ if (selectedText.indexOf('\\') > -1) { >+ selectedText = selectedText.replace("\\", "\\\\"); //$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ if (selectedText.indexOf('"') > -1) { >+ selectedText = selectedText.replace("\"", "\\\""); //$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ } > } >+ > return selectedText; > } > }
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 255619
: 185923 |
185924
|
186050