Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Problems about pageDesignerExtension(I want to add some attributes to the Element)
Problems about pageDesignerExtension [message #890421] Fri, 22 June 2012 05:14 Go to next message
Wang Zhaoliang is currently offline Wang Zhaoliang
Messages: 9
Registered: April 2012
Junior Member
In my project, I have declared a tagConverterFactory with extending the pageDesignerExtension extension. And when I drag a custom tag from the palette, I want to add some custom attributes to the element in the method createConverter(for example: element.setAttribute("id", "XXX")). The operation finished normaly, but when I want to drag another tag to the editor, problem comes, I can't drop it anywhere.

Is there any other way to realize my request? Just like MetaDataFile and other extension.

I have tried to use MetaDataFile like below:

<entity id="attrSiteMap" type="tag">
<trait id="tag-create">
<value xsi:type="pi:TagCreationInfo">
<attribute id="id" value="XXXX" />
<attribute id="name" value="XXXX" />
</value>
</trait>
</entity>

it works, but unfortunately I want to use dynamic attribute value, so I need some help.


Thanks and best regards!! Shocked Shocked
Re: Problems about pageDesignerExtension [message #890424 is a reply to message #890421] Fri, 22 June 2012 05:18 Go to previous message
Wang Zhaoliang is currently offline Wang Zhaoliang
Messages: 9
Registered: April 2012
Junior Member
Exception below:

!ENTRY org.eclipse.ui 4 0 2012-06-22 17:17:46.210
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
at org.eclipse.jst.pagedesigner.dom.DOMRange.isOrdered(DOMRange.java:59)
at org.eclipse.jst.pagedesigner.actions.range.ChangeStyleAction.isApplied(ChangeStyleAction.java:67)
at org.eclipse.jst.pagedesigner.actions.range.ChangeStyleAction.updateStatus(ChangeStyleAction.java:148)
at org.eclipse.jst.pagedesigner.actions.range.ChangeStyleAction.update(ChangeStyleAction.java:130)
at org.eclipse.jst.pagedesigner.actions.range.DesignerToolBarAction.selectionChanged(DesignerToolBarAction.java:54)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.fireSelectionChanged(AbstractEditPartViewer.java:247)
at org.eclipse.jst.pagedesigner.viewer.HTMLGraphicalViewer.fireSelectionChanged(HTMLGraphicalViewer.java:272)
at org.eclipse.jst.pagedesigner.viewer.HTMLGraphicalViewer.setRange(HTMLGraphicalViewer.java:407)
at org.eclipse.jst.pagedesigner.commands.nav.HorizontalMoveCommand.performObjectMode(HorizontalMoveCommand.java:82)
at org.eclipse.jst.pagedesigner.commands.nav.HorizontalMoveCommand.execute(HorizontalMoveCommand.java:71)
at org.eclipse.jst.pagedesigner.tools.RangeSelectionTool.handleKeyDown(RangeSelectionTool.java:173)
at org.eclipse.gef.tools.AbstractTool.keyDown(AbstractTool.java:1016)
at org.eclipse.gef.tools.SelectionTool.keyDown(SelectionTool.java:491)
at org.eclipse.gef.EditDomain.keyDown(EditDomain.java:169)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchKeyPressed(DomainEventDispatcher.java:252)
at org.eclipse.draw2d.LightweightSystem$EventHandler.keyPressed(LightweightSystem.java:497)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:167)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1104)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1100)
at org.eclipse.swt.widgets.Widget.wmKeyDown(Widget.java:1809)
at org.eclipse.swt.widgets.Control.WM_KEYDOWN(Control.java:4892)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4560)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

!ENTRY org.eclipse.ui 4 0 2012-06-22 17:17:46.444
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
at org.eclipse.jst.pagedesigner.dom.EditModelQuery.getPreviousSibling(EditModelQuery.java:998)
at org.eclipse.jst.pagedesigner.dom.EditModelQuery.getSibling(EditModelQuery.java:1043)
at org.eclipse.jst.pagedesigner.dom.CaretMoveIterator.moveToNextPosition(CaretMoveIterator.java:187)
at org.eclipse.jst.pagedesigner.dom.CaretMoveIterator.moveToNextEditPosition(CaretMoveIterator.java:257)
at org.eclipse.jst.pagedesigner.dom.EditHelper.moveToNextEditPosition(EditHelper.java:143)
at org.eclipse.jst.pagedesigner.dom.EditHelper.moveToNextEditPosition(EditHelper.java:116)
at org.eclipse.jst.pagedesigner.commands.nav.HorizontalMoveCommand.performInlineMode(HorizontalMoveCommand.java:116)
at org.eclipse.jst.pagedesigner.commands.nav.HorizontalMoveCommand.execute(HorizontalMoveCommand.java:68)
at org.eclipse.jst.pagedesigner.tools.RangeSelectionTool.handleKeyDown(RangeSelectionTool.java:173)
at org.eclipse.gef.tools.AbstractTool.keyDown(AbstractTool.java:1016)
at org.eclipse.gef.tools.SelectionTool.keyDown(SelectionTool.java:491)
at org.eclipse.gef.EditDomain.keyDown(EditDomain.java:169)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchKeyPressed(DomainEventDispatcher.java:252)
at org.eclipse.draw2d.LightweightSystem$EventHandler.keyPressed(LightweightSystem.java:497)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:167)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1104)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1100)
at org.eclipse.swt.widgets.Widget.wmKeyDown(Widget.java:1809)
at org.eclipse.swt.widgets.Control.WM_KEYDOWN(Control.java:4892)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4560)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Previous Topic:Axis2 Namespace for every element at soap response
Next Topic:Selection must be WSDL
Goto Forum:
  


Current Time: Wed Jul 30 11:34:21 EDT 2014

Powered by FUDForum. Page generated in 0.02286 seconds