Bug 605417 - StringIndexOutOfBoundsException thrown if script contains the word 'function'
Summary: StringIndexOutOfBoundsException thrown if script contains the word 'function'
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: eclipse-shelled
Version: 13
Hardware: i686
OS: Linux
low
high
Target Milestone: ---
Assignee: Alexander Kurtakov
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-17 21:20 UTC by Jim Fischer
Modified: 2010-07-22 11:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-22 11:28:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jim Fischer 2010-06-17 21:20:43 UTC
Description of problem:

Assume you have a shell script 'test.bash' that has the word 'function' in it, or any variation of the word function (e.g., functionality). If the shelled plugin is installed and you try to open 'test.bash' with Eclipse, the open fails; instead, Eclipse displays the error message "Could not open the editor: Editor could not be initialized." Clicking on the "Details" button shows that Java is throwing a out-of-bounds string index exception:

java.lang.StringIndexOutOfBoundsException: String index out of range: <-#>
   ...

If I uninstall the shelled plugin, Eclipse successfully opens the file 'test.bash' for editing in a text editor.


Version-Release number of selected component (if applicable):

eclipse-platform-3.5.2-1.fc13.i686
eclipse-shelled-2.0.0-0.M2.1.fc13.noarch


How reproducible:

100% of the time.


Steps to Reproduce:

1. Create a text file named 'test.bash' and place the word 'function' into that file (or any derivation of the word 'function', e.g., 'functionality'):

   $ echo function > test.bash

2. Install the eclipse-shelled plugin:

   # yum install eclipse-shelled

3. Start Eclipse and attempt to open the file 'try.bash'.

  
Actual results:

File open fails as described above in section "Description of problem".


Expected results:

File open succeeds; the file is opened for editing in a text editor.


Additional info:

None.

Comment 1 Jim Fischer 2010-06-17 21:24:36 UTC
Typo: Steps to Reproduce: Step #3: Change 'try.bash' to 'test.bash'.

Comment 2 Alexander Kurtakov 2010-07-22 11:28:06 UTC
This problem is fixed in rawhide with the new ShellEd milestone. But it requires new dltk 2.0 which also requires Eclipse 3.6 and all these are available in rawhide only.


Note You need to log in before you can comment on or make changes to this bug.