Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Reuse WTP CSS editing
Reuse WTP CSS editing [message #175652] Thu, 27 July 2006 21:04 Go to next message
Konstantin Scheglov is currently offline Konstantin ScheglovFriend
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 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

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
Previous Topic:Generic Server Startup - Infinite
Next Topic:WSDL editor doesn't work from a fresh install
Goto Forum:
  


Current Time: Thu Apr 25 07:00:22 GMT 2024

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

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

Back to the top