Reuse WTP CSS editing [message #175652] |
Thu, 27 July 2006 21:04 |
Konstantin Scheglov Messages: 555 Registered: July 2009 |
Senior Member |
|
|
Hi, All.
How can I reuse CSS editor features existing in WTP?
I found StructuredTextViewerConfigurationCSS, but when I try to apply
it to SourceViewer, I receive following exception. It seems that it
requires some internal WTP class as text viewer. Is it correct?
Are there any better alternatives for simple CSS editor that can be
embedded into dialog?
Exception:
java.lang.ClassCastException: org.eclipse.jface.text.source.SourceViewer
at
org.eclipse.wst.sse.ui.StructuredTextViewerUndoManager.conne ct(StructuredTextViewerUndoManager.java:73)
at org.eclipse.jface.text.TextViewer.activatePlugins(TextViewer .java:1546)
at
org.eclipse.jface.text.source.SourceViewer.activatePlugins(S ourceViewer.java:446)
at
org.eclipse.jface.text.source.SourceViewer.configure(SourceV iewer.java:417)
at
wtpusetest.actions.SampleAction$TitleEditDialog.createDialog Area(SampleAction.java:108)
at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java: 802)
at org.eclipse.jface.window.Window.create(Window.java:426)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1124)
at org.eclipse.jface.window.Window.open(Window.java:785)
at wtpusetest.actions.SampleAction.run(SampleAction.java:47)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:254)
at
org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPl uginAction.java:229)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:441)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.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(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
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:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
--
SY, Konstantin.
Advanced Eclipse SWT Designer (http://www.swt-designer.com)
Konstantin Scheglov,
Google, Inc.
|
|
|
Re: Reuse WTP CSS editing [message #179246 is a reply to message #175652] |
Sun, 17 September 2006 02:56 |
|
Konstantin Scheglov wrote:
> Hi, All.
>
> How can I reuse CSS editor features existing in WTP?
>
> I found StructuredTextViewerConfigurationCSS, but when I try to apply
> it to SourceViewer, I receive following exception. It seems that it
> requires some internal WTP class as text viewer. Is it correct?
Yes, we made the StructuredTextEditor public API, but the
StructuredTextViewer is currently still an internal class. The
viewer configurations and the viewer are meant to be used together.
--
- Nitin
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
Powered by
FUDForum. Page generated in 0.02841 seconds