Perl::Critic integration

jploski wrote on Sat Oct 28 19:15:44 MEST 2006:
Jae: we can discuss the Perl::Critic integration here. I had a look at your
checked in code and also committed some minor fixes myself. Here are some
outstanding issues which I did not fix (I do realize that it is work in

1) The markers do not appear on the margin like the warning markers. I think
they should.
2) The Critique action runs on the UI thread. However, it can take several
seconds to complete (see my favorite example in org.epic.perleditor-test),
so it should run as a job (preferably cancelable).
3) The Clear Critic Markers action is in the context menu, but not in the
Source menu.
4) The Clear Critic Markers action does not work (the Problems view is not
emptied as expected).
jploski wrote on Sat Oct 28 19:17:01 MEST 2006:
I am also confused by the references to Perl::Critic in
I thought Pod::Checker and Perl::Critic were two different things?
jploski wrote on Sat Oct 28 19:19:17 MEST 2006:
Also, the book references produced by Perl::Critic should not be discarded
by EPIC (they should appear either in the message text or more discreetly
in a property of the problem marker).
jgangemi wrote on Sun Oct 29 17:58:16 CET 2006:
the podchecker and critic are two seperate things, that was a fat finger
pasting mistake. 

the book references are there, but aren't currently being displayed. that
will be next on the list after the background thread change.

i'm not sure why things aren't working correctly for you - i'm wondering
if there is some difference between 3.1.x and 3.2 that is causing the problem.
did you try starting w/ the '-clean' option just to be sure?

i do not get an error that you committed a fix for - there actually isn't
supposed to be a "command" for the clear markers action b/c there is no
keyboard shortcut for it. also - the definitionId for the clear markers
action has to be the name of the marker owner b/c that is used to clear
the markers. the idea was to have a generic action that could clear any
type of marker, with an eventual "clear all" action planned. changing that
value would definately cause clearing of the markers not to work. 

i'm quite confused by this odd behavior nonetheless. i think i'll post in
the other forum to see if others are seeing the same issues. 
jploski wrote on Sun Oct 29 18:23:42 CET 2006:
Ok, it does not work for me because I broke it. The action's definitionId
turns out to be needed by your implementation...

I think that the 'owner' attribute is unnecessary - why not just use the
marker type (see references to org.epic.core.Constants.PROBLEM_MARKER to
see what I mean)? The definitionId attribute of an action should be used
to associate it with a command and not for other purposes.
jgangemi wrote on Sun Oct 29 18:44:53 CET 2006:
yeah - that is probably the better idea - it would make adding a "clear
all" action much easier as well. 

upon further investigation, it seems that if i change the clear marker action
to be a "command", then i can specify a command parameter and pass the marker
type that way. 
jploski wrote on Sat Nov  4 18:14:37 CET 2006:
FYI, I just released the current version of your Perl::Critic integration
code in 0.5.18.
jploski wrote on Sun Nov 12 20:31:44 CET 2006:
I'm still getting these "command not found" errors in the log with the current
code. The error appears upon the first opening of a Perl editor:

The command ("org.epic.perleditor.commands.clearMarker") is undefined

	at org.eclipse.jface.action.ExternalActionManager$CommandCallback.isActive(
	at org.eclipse.jface.action.ActionContributionItem.isCommandActive(
	at org.eclipse.jface.action.ActionContributionItem.isVisible(
	at org.eclipse.ui.internal.PluginActionContributionItem.isVisible(
	at org.eclipse.jface.action.SubContributionItem.isVisible(
	at org.eclipse.jface.action.MenuManager.update(
	at org.eclipse.jface.action.MenuManager.update(
	at org.eclipse.jface.action.MenuManager.fill(
	at org.eclipse.jface.action.SubContributionItem.fill(
	at org.eclipse.jface.action.MenuManager.update(
	at org.eclipse.jface.action.MenuManager.updateAll(
	at org.eclipse.ui.internal.WorkbenchWindow.updateActionBars(
	at org.eclipse.ui.internal.WorkbenchWindow.largeUpdateEnd(
	at org.eclipse.ui.internal.Workbench.largeUpdateEnd(
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(
	at org.eclipse.ui.internal.WorkbenchPage.access$9(
	at org.eclipse.ui.internal.WorkbenchPage$
	at org.eclipse.swt.custom.BusyIndicator.showWhile(
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(
	at org.eclipse.ui.ide.IDE.openEditor(
	at org.eclipse.ui.ide.IDE.openEditor(
	at org.eclipse.ui.ide.IDE.openEditor(
	at org.eclipse.ui.views.markers.internal.MarkerView.handleOpenEvent(
	at org.eclipse.ui.views.markers.internal.TableView$
	at org.eclipse.jface.viewers.StructuredViewer$
	at org.eclipse.ui.internal.JFaceUtil$
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(
	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(
	at org.eclipse.jface.util.OpenStrategy.access$2(
	at org.eclipse.jface.util.OpenStrategy$1.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(

The stack trace is from 3.1.2.

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