Perltidy does not work

quarf wrote on Fri Oct 13 13:07:01 MEST 2006:
Hello

Source formatting does not have any effect. Perltidy is correctly installed
via apt on ubuntu.
I'm using Eclipse 3.1.2 and EPIC 0.5.

Any hints?

Thanks
Stephan
jgangemi wrote on Fri Oct 13 15:39:08 MEST 2006:
try upgrading to the latest version - 0.5 is quite old at this point.
quarf wrote on Sun Oct 15 12:07:28 MEST 2006:
Hello,

sorry, I did not mention the full version number of EPIC in my last post.
In fact I'm using EPIC 0.5.14 from http://e-p-i-c.sf.net/updates/testing
Is there any newer version available?
jploski wrote on Sun Oct 15 12:14:21 MEST 2006:
EPIC comes with its own version of perltidy (as of today), so the fact that
you have a system-wide installation does not matter.

Have you looked into the error log yet?
quarf wrote on Tue Oct 17 07:25:38 MEST 2006:
I'm sorry having to admit that I did not look into the error log. Can you
help me with the path where I find it?
jgangemi wrote on Tue Oct 17 15:52:05 MEST 2006:
there is an eclipse view that will display it. if you don't see the view
(it's in one of the pde folders), then you don't have pde development enabled
in your prefererences. 

go enable it and you'll have access to the error log. you can also find
the log in the .metadata directory of your workspace - it's a .log file.
quarf wrote on Tue Oct 17 17:16:13 MEST 2006:
thank you for the hint.
I found the log file but it does not seem to be very helpful for me.
You can find the part of the log wich is created by Source->Format here:
http://user.informatik.uni-goettingen.de/~sjanz/.log
jploski wrote on Tue Oct 17 19:23:52 MEST 2006:
The error in your .log means that the Perl interpreter closes its end of
the stream while EPIC is still writing (source code to be formatted) to
it.

In order to obtain further information:

cd $WORKSPACE/.metadata/.plugins/org.epic.perleditor/perlutils/perltidy

Then run the exact command line which appears in the .log and see if you
get any errors.

If the above works, the next thing you should try is running Eclipse using
the version of Java from Sun (not gcj).

Perhaps you can also provide the source file which causes the problem, so
I could attempt to reproduce it.
quarf wrote on Wed Oct 18 08:16:45 MEST 2006:
running the command I got this error: "Can't open perl script "perltidy":
No such file or directory".
In fact there is no file in the directory. I created a symlink to /usr/bin/perltidy
where my global installation of perltidy is.
Sourceformatting works fine now.
Because I don't know what went wrong in my case: Do you want any further
information to reproduce the problem?
jploski wrote on Wed Oct 18 18:50:16 MEST 2006:
EPIC is supposed to be extracting 'perltidy' (together with the accompanying
module Perl/Tidy.pm) to this directory whenever you run the source formatter
(if these files don't yet exist).

It would be interesting to find out why this does not (did not?) happen
in your case - issues with file/directory ownership or permissions perhaps?
Anyway, the failure to extract the scripts should result in additional messages
in the .log (possibly preceding the one you quoted).

You can try deleting (or moving away) the whole $WORKSPACE/.metadata/.plugins/org.epic.perleditor/perlutils
directory. It should be recreated, together with perltidy, when you run
the formatter.
claudio_sf wrote on Mon Oct 23 09:55:21 MEST 2006:
Same problem here.

Ubuntu 6.06 x64 with epic 3.2.1 (from eclipse.org, not ubuntu) with epic
0.4.0.

The directory $WORKSPACE/.metadata/.plugins/org.epic.perleditor/perlutils
is not created, so no plugins are installed.

I am downloading eclipse 3.1 to check if the bugs exists there. If it doesnt,
I will post a bug report.

Claudio
claudio_sf wrote on Mon Oct 23 11:39:50 MEST 2006:
Eclipse 3.1 works fine with epic 0.4.0, while epic and eclipse 3.2.1 seems
to be broken.  I will file a bug report.

Claudio
claudio_sf wrote on Mon Oct 23 11:44:19 MEST 2006:
I don't seem able to report a bug (No member of project).

Could not extract resources to directory /home/cra/src/.metadata/.plugins/org.epic.perleditor/perlutils;
please report this as a bug in EPIC

java.io.FileNotFoundException: /home/cra/src/.metadata/.plugins/org.epic.perleditor/perlutils/perltidy/perltidy
(No such file or directory)
at gnu.java.nio.channels.FileChannelImpl.open(libgcj.so.7)
at gnu.java.nio.channels.FileChannelImpl.(libgcj.so.7)
at java.io.FileOutputStream.(libgcj.so.7)
at java.io.FileOutputStream.(libgcj.so.7)
at org.epic.core.util.ResourceUtilities.extractZipEntry(ResourceUtilities.java:202)
at org.epic.core.util.ResourceUtilities.extractResources(ResourceUtilities.java:81)
at org.epic.core.util.ScriptExecutor.extractScripts(ScriptExecutor.java:162)
at org.epic.core.util.ScriptExecutor.getWorkingDir(ScriptExecutor.java:136)
at org.epic.core.util.ScriptExecutor.run(ScriptExecutor.java:63)
at org.epic.perleditor.editors.util.SourceFormatter.format(SourceFormatter.java:64)
at org.epic.perleditor.editors.util.SourceFormatter.format(SourceFormatter.java:47)
at org.epic.perleditor.actions.FormatSourceAction.doRun(FormatSourceAction.java:88)
at org.epic.perleditor.actions.PerlEditorAction.run(PerlEditorAction.java:36)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:500)
at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetAction.java:231)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:234)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:541)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:404)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:62)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1087)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3152)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2842)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at java.lang.reflect.Method.invoke(libgcj.so.7)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:281)
at org.eclipse.core.launcher.Main.run(Main.java:978)
at org.eclipse.core.launcher.Main.main(Main.java:952)


eclipse.buildId=M20060921-0945
java.fullversion=GNU libgcj 4.1.0 (Ubuntu 4.1.0-1ubuntu8)
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Command-line arguments:  -os linux -ws gtk -arch x86_64

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