Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to add custom command to cheatsheet in eclipse(Cheat sheet)
icon9.gif  How to add custom command to cheatsheet in eclipse [message #641059] Wed, 24 November 2010 07:45
geting  is currently offline geting
Messages: 1
Registered: November 2010
Junior Member
Hi,
I want to add a custom command to my cheat sheet, i had make it work well, except when open the plugin.xml with Plug-in Manifest Editor, there are an error .

**The steps i used to implement the function as below:**
1) Define custom command in plugin.xml.

<extension
point="org.eclipse.ui.commands">
<category
id="com.ting.commands.category"
name="Custom Category">
</category>
<command
categoryId="com.ting.commands.category"
defaultHandler="com.ting.commands.ExampleCommandHandler"
description="Example Command"
id="com.ting.commands.exampleCommand"
name="Custom commands">
</command>
</extension>

2) Add command to cheat sheet item.

<item
title="Example cheat sheet item">
<description>
Example item description
</description>
<command
required="false"
serialization="com.ting.commands.exampleCommand"/>
</item>

**Error message as below:**

Message : Failed to deserialize command: com.ting.commands.ExampleCommandHandler

**Exception Stack Trace:**

org.eclipse.core.commands.common.NotDefinedException: Cannot get the parameters from an undefined command. com.ting.commands.ExampleCommandHandler
at org.eclipse.core.commands.Command.getParameters(Command.java :759)
at org.eclipse.core.commands.CommandManager.deserialize(Command Manager.java:464)
at org.eclipse.ui.internal.commands.CommandService.deserialize( CommandService.java:112)
at org.eclipse.pde.internal.ua.ui.editor.cheatsheet.simple.deta ils.SimpleCSCommandDetails.getParameterizedCommand(SimpleCSC ommandDetails.java:447)
at org.eclipse.pde.internal.ua.ui.editor.cheatsheet.simple.deta ils.SimpleCSCommandDetails.getParameterizedCommand(SimpleCSC ommandDetails.java:469)
at org.eclipse.pde.internal.ua.ui.editor.cheatsheet.simple.deta ils.SimpleCSCommandDetails.updateFields(SimpleCSCommandDetai ls.java:286)
at org.eclipse.pde.internal.ua.ui.editor.cheatsheet.simple.deta ils.SimpleCSItemDetails.updateFields(SimpleCSItemDetails.jav a:277)
at org.eclipse.pde.internal.ua.ui.editor.cheatsheet.simple.deta ils.SimpleCSItemDetails.selectionChanged(SimpleCSItemDetails .java:368)
at org.eclipse.ui.forms.DetailsPart$1.run(DetailsPart.java:274)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
at org.eclipse.ui.forms.DetailsPart.showPage(DetailsPart.java:2 61)
at org.eclipse.ui.forms.DetailsPart.update(DetailsPart.java:234 )
at org.eclipse.ui.forms.DetailsPart.selectionChanged(DetailsPar t.java:219)
at org.eclipse.ui.forms.ManagedForm.fireSelectionChanged(Manage dForm.java:148)
at org.eclipse.pde.internal.ui.editor.TreeSection$PartAdapter.s electionChanged(TreeSection.java:32)
at org.eclipse.pde.internal.ui.parts.TreePart$1.selectionChange d(TreePart.java:45)
at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.runtime.Platform.run(Platform.java:888)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:17 5)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer .java:160)
at org.eclipse.jface.viewers.StructuredViewer.updateSelection(S tructuredViewer.java:2132)
at org.eclipse.jface.viewers.StructuredViewer.setSelection(Stru cturedViewer.java:1669)
at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer .java:1124)
at org.eclipse.pde.internal.ua.ui.editor.cheatsheet.simple.Simp leCSMasterTreeSection.setFormInput(SimpleCSMasterTreeSection .java:1233)
at org.eclipse.pde.internal.ua.ui.editor.cheatsheet.simple.Simp leCSDefinitionPage.setActive(SimpleCSDefinitionPage.java:207 )
at org.eclipse.ui.forms.editor.FormEditor.pageChange(FormEditor .java:480)
at org.eclipse.pde.internal.ui.editor.PDEFormEditor.pageChange( PDEFormEditor.java:262)
at org.eclipse.ui.part.MultiPageEditorPart$2.widgetSelected(Mul tiPageEditorPart.java:291)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1200)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1185)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 025)
at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.ja va:3256)
at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:20 45)
at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.j ava:323)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3493)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3112)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 21)
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(Work bench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.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(EclipseS tarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
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)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Previous Topic:Target Platforms
Next Topic:Product Export creates source for plugin with generateSourceBundle=false
Goto Forum:
  


Current Time: Tue Sep 23 04:22:36 GMT 2014

Powered by FUDForum. Page generated in 0.13039 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software