DESCRIPTION

Bug 401545 - Add formatting to SystemTap Editor

- add indent strategy into SystemTap editor based on C/C++ indenter
- add support for overwriting auto-added characters such as
  end-bracket, quote, and right square-bracket
- simplify base SystemTap partitioner to ignore strings and probes
- add additional partitioner with old partitioner logic
- fix completion proposals to look for offsets that start a new
  partition after a default partition
- add formatter test
- fix completion tests to get proper partitioning

Change-Id: Icb1ae2aac9d25d24685204098cf24f11f11c749b


COMMENTS

author: Kaylin Maxwell
date: 2013-07-12 23:21:02.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2013-07-12 23:21:07.000000000

Patch Set 3:

Build Started https://hudson.eclipse.org/sandbox/job/linuxtools/2909/

-------------------------------------
author: Brenden Conley
date: 2013-07-12 23:34:35.000000000

Patch Set 3: Verified+1

Build Successful 

https://hudson.eclipse.org/sandbox/job/linuxtools/2909/ : SUCCESS

-------------------------------------
author: Nathanael Holden
date: 2013-07-15 16:54:54.000000000

Patch Set 3: Code-Review-1

Just a few observations.

When I attempt to comment out a single line, nothing happens, and the Editor freezes. I see the following in the Error View :

org.eclipse.e4.core.di.InjectionException: java.lang.IllegalStateException
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:231)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:212)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:131)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:171)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:277)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:496)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:547)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:368)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:314)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:83)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1484)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1275)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1300)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1285)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1312)
	at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:748)
	at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:3050)
	at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:741)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1773)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:5116)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4377)
	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8317)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1193)
	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2342)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3184)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	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:354)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:638)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:593)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1423)
Caused by: java.lang.IllegalStateException
	at org.eclipse.jface.text.rules.FastPartitioner.startRewriteSession(FastPartitioner.java:737)
	at org.eclipse.jface.text.AbstractDocument.startRewriteSessionOnPartitioners(AbstractDocument.java:1619)
	at org.eclipse.jface.text.AbstractDocument.startRewriteSession(AbstractDocument.java:1590)
	at org.eclipse.jface.text.TextViewer.shift(TextViewer.java:4405)
	at org.eclipse.jface.text.TextViewer.doOperation(TextViewer.java:4047)
	at org.eclipse.jface.text.source.SourceViewer.doOperation(SourceViewer.java:1018)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1507)
	at org.eclipse.linuxtools.internal.systemtap.ui.ide.actions.ToggleCommentHandler$1.run(ToggleCommentHandler.java:88)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.linuxtools.internal.systemtap.ui.ide.actions.ToggleCommentHandler.execute(ToggleCommentHandler.java:85)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:76)
	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	... 50 more

I'm also unable to insert double-quotes in between round brackets (the action is ignored).

-------------------------------------
