Refactoring & help offer

perlguy67 wrote on Fri Sep 16 14:59:17 MEST 2005:

I have Eclipse running at work on WinXP and at home running on Fedora Core

I am running the latest "testing" version of e-p-i-c on both.

Refactoring - extract subroutine - does not work on either system. I get
a java error complaining about an array out of bounds.

Since it looks like I am going to be doing a lot more here at work with
this tool, it would benefit me - and everyone else, if I helped out when

Where is a good place to start with trying to make the e-p-i-c code better?
 I can do some java, but am mostly a Perl person.

Any help would be great, I would love to make eclipse work MUCH better with

matisse wrote on Fri Sep 16 18:39:23 MEST 2005:
I use EPIC with refactoring a lot and it worksd for me, so maybe we can
figure out what's up.

Which version of Eclipse and EPIC are you using?
Also, can you find our which version of Devel::Refactor is installed in
the EPIC directory - which will be something like:
  {eclipse folder}\plugins\org.epic.perleditor_2.2.0\perlutils\modules\Devel\

look in that file and see which version you have.
perlguy67 wrote on Fri Sep 16 18:44:06 MEST 2005:

I am using Eclipse 3.1.0 and Epic 0.3.11

The that came with Epic was 0.03, I tried replacing that with
0.05 (the latest ver), but the results were the same.

I am using the same versions for both Eclipse and Epic on my WinXP work
box, and my home Linux box.

Here is the error that I get when I try to refactor.  I get the popup to
enter the subroutine name, enter the name and click 'OK'.  Then I get this:

Error 2005-09-16 11:43:02.709 0
java.lang.ArrayIndexOutOfBoundsException: 0
	at org.eclipse.ui.internal.PluginAction.runWithEvent(
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(
	at org.eclipse.jface.action.ActionContributionItem.access$2(
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(
	at org.eclipse.swt.widgets.EventTable.sendEvent(
	at org.eclipse.swt.widgets.Widget.sendEvent(
	at org.eclipse.swt.widgets.Display.runDeferredEvents(
	at org.eclipse.swt.widgets.Display.readAndDispatch(
	at org.eclipse.ui.internal.Workbench.runEventLoop(
	at org.eclipse.ui.internal.Workbench.runUI(
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(
	at org.eclipse.core.internal.runtime.PlatformActivator$
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.eclipse.core.launcher.Main.invokeFramework(
	at org.eclipse.core.launcher.Main.basicRun(
	at org.eclipse.core.launcher.Main.main(

matisse wrote on Fri Sep 16 19:02:34 MEST 2005:
Try replacing with version 0.02 and see what happens.

I have a suspicion here....
perlguy67 wrote on Fri Sep 16 20:07:58 MEST 2005:
Nope, same error message...

I replaced in

Shut down, then restarted Eclipse.

Could the module be in any other location as well?  Or, could it be picking
it up from my computers Perl libraries?

Thanks again,

perlguy67 wrote on Fri Sep 16 20:29:32 MEST 2005:

I replaced the in my Perl installation as well.

Then, I re-ran eclipse with the -clean option.

This time it worked!

Now, I think I'll try to figure out WHY!  :o)

Thanks for your help! I am still open to suggestions, ideas!  I would love
to add more Perl things to Eclipse!

perlguy67 wrote on Fri Sep 16 20:56:05 MEST 2005:
A couple items...

I was able to make changes to v0.05 to make it work. Basically,
I took v0.02 and saw that the new() method had changed greatly in what was

So, I made it so that the v0.05 would run the extract_subroutine() code
whenever new() was called. I also made sure that the right vars were passed

This limits what can do, but for now I am ok with that.

One thing I noticed, Eclipse picks up the from my Perl distro,
NOT the e-p-i-c plugin directory.

Now. Does anyone have info on how to fiddle with the Java so that I can
add the other "hooks" from the newest Refactor module into Eclipse?

I've tried the CVS source but ended up with so many errors I stopped and
decided I need to figure out a bit more.

Any good guides out there?  Or, at least how to get started writing e-p-i-c
plugins using Eclipse???


matisse wrote on Sat Sep 17 05:04:44 MEST 2005:
I think I have a version of the EPIC java code that will work with Devel::Refactor

Who should I send it to?
perlguy67 wrote on Sat Sep 17 05:37:58 MEST 2005:
I'd love to see it!

As far as who to send it to, I would send it to the people who are listed
on this project as the owners.


Note: The above is an archived snapshot of a forum thread. Use the original thread at to post comments.