Can snippets be submitted back to the SnipEx server from within the Snip Tree View in Eclipse?

33 views
Skip to first unread message

K

unread,
Oct 30, 2010, 11:22:02 AM10/30/10
to CFEclipse Snipex
Hi,

I think the question in the subject speaks for itself.

Judging the description given here http://snipex.riaforge.org/, I'd
say it is supposed to be possible:
SnipEx is a XML based service that allows CFEclipse users to susbcribe
to snippet servers as well as submitting their own snippets to SnipEx
servers.

However, if I try to do this, nothing happens. If I look in the logs,
I see this error:
!ENTRY org.eclipse.ui 4 0 2010-10-30 16:58:00.232
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.ClassCastException: org.cfeclipse.snippet.snipex.Library
cannot be cast to java.io.File
at
org.cfeclipse.cfml.snippets.views.snips.SnipTreeView.getSelectedFile(SnipTreeView.java:
665)
at
org.cfeclipse.cfml.snippets.views.snips.SnipTreeView.createSnippet(SnipTreeView.java:
750)
at org.cfeclipse.cfml.snippets.views.snips.SnipTreeView
$6.run(SnipTreeView.java:428)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:
498)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:
584)
at org.eclipse.jface.action.ActionContributionItem.access
$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem
$6.handleEvent(ActionContributionItem.java:452)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:
2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:
2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:
332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:
493)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:
113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:
194)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:
110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:
79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
368)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:
559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

I tried with both some public servers and also with a local server
implementation, but I cannot see any incoming request on the server
that is either asking if the server allows submits or an actual
attempt to submit a snippet.

Judging the error, I guess it already bombs out before accessing the
server.

Any thoughts?

TIA,

K.

K

unread,
Oct 31, 2010, 7:13:38 AM10/31/10
to CFEclipse Snipex
I think I can already answer my own question: yes, you can, but the
Snip Tree view has a few bugs, so that is why I didn't spot the
functionality straight away.

Somehow, the Snip Tree View doesn't initialize it's context menu's
properly all the time. Before I didn't get any context menu when right-
clicking nodes, but somehow I managed to get them now and then off
course I can see the option to export to a SnipEx server. i have to
try to figure out what is causing the context menu's to not be shown
in the first place.

However, when I try to use the create Folder/insert snippet options
form the context menu to snippets/libraries that come from a SnipEx
server, the ClassCast exception I posted above does still happen and
thus I cannot add libs/snips to libs hosted on a SnipEx server. So the
question of that should be possible still remains.

Now, I know this is the forum for SnipEx server related stuff, so I'll
try to find the appropriate location to repost this stuff.

K

On Oct 30, 4:22 pm, K <kyd...@gmail.com> wrote:
> Hi,
>
> I think the question in the subject speaks for itself.
>
> Judging the description given herehttp://snipex.riaforge.org/, I'd
Reply all
Reply to author
Forward
0 new messages