facebook

Errors in Formatting on Linux

  1. CodeMix & Angular IDE
  2.  > 
  3. Webclipse 1.x Help
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #582006 Reply

    pramod1
    Participant

    Hi,
    My Webeclipse throws this exception whenever I try to format.

    java.lang.NullPointerException
    at com.genuitec.eclipse.typescript.text.FileLanguageService.getFormattingEditsForRange(FileLanguageService.java:326)
    at com.genuitec.eclipse.typescript.text.ContentFormatter.format(ContentFormatter.java:60)
    at com.genuitec.eclipse.typescript.saveparticipant.internal.FormatAllSaveListener.saved(FormatAllSaveListener.java:23)
    at com.genuitec.eclipse.typescript.text.TypeScriptEditor.doSave(TypeScriptEditor.java:183)
    at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.doSave(AbstractTextEditor.java:7117)
    at org.eclipse.ui.Saveable.doSave(Saveable.java:220)
    at org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:340)
    at org.eclipse.ui.internal.SaveableHelper.lambda$1(SaveableHelper.java:193)
    at org.eclipse.ui.internal.SaveableHelper.lambda$3(SaveableHelper.java:271)
    at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:437)
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:353)
    at org.eclipse.ui.internal.WorkbenchWindow$14.run(WorkbenchWindow.java:2195)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2191)
    at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:278)
    at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:259)
    at org.eclipse.ui.internal.SaveableHelper.saveModels(SaveableHelper.java:204)
    at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:148)
    at org.eclipse.ui.internal.WorkbenchPage.saveSaveable(WorkbenchPage.java:3917)
    at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3931)
    at org.eclipse.ui.internal.handlers.SaveHandler.execute(SaveHandler.java:54)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:291)
    at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:92)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:305)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:239)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
    at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:287)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:527)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:577)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:385)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:331)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:88)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
    at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1653)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1347)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1374)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1357)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1386)
    at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:768)
    at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:3550)
    at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:785)
    at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1977)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:6193)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:5608)
    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:9282)
    at org.eclipse.swt.widgets.Display.eventProc(Display.java:1328)
    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:2116)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4181)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1472)

    #582033 Reply

    Brian Fernandes
    Moderator

    Pramod,

    I have a few questions based on the trace you provided.

    1) Does formatting work if you use the context menu Formatting action?
    2) Does it fail in other editors too or just typescript? Have you tried formatting other TypeScript files or do all TypeScript files fail similarly?
    3) What if you try to format a selection?
    4) Was formatting working earlier and did it start failing only now?

    Thanks!

    #582052 Reply

    pramod1
    Participant

    Hi Brian,
    Answering your questions in order.

    1. No! Formatting does not work from the context menu. I tried enabling the formatting on save action. As soon as I enable that, save stops working. I tried enabling all the options under “Save Actions” and formatting is the only thing which has errors.

    2. It works for all other editors, just does not work for typescript.

    3. Same issue if I try to format a section.

    4. Formatting has never been working. It worked on my Mac in evaluation mode but never on the linux box.

    Some other things I have tried. Installing a fresh copy of eclipse and webeclipse. It still does not work. Tried installing a fresh copy of eclipse and webeclipse under a new id, it still does not work.

    My install is on Linux Mint 18.3 Sylvia.
    Java version: Java(TM) SE Runtime Environment (build 9.0.1+11)
    Eclipse version: Version: Oxygen.2 Release (4.7.2)
    Build id: 20171218-0600 4/20 so I am assuming it picked up the 4/18 release.

    Anything else you need ?

    Pramod

    I am not sure how to get the webeclipse version but I installed the latest from

    #582055 Reply

    Brian Fernandes
    Moderator

    Pramod,

    Use Preferences > Webclipse to see the version.

    A new installation typically won’t help in this case – have you tried a new workspace and / or new projects? Just as a test you can use File > Switch Workspace, to create a new workspace and then create a new dummy project where you try to format some sample TS file (in case there is something peculiar about the files you are trying to format).

    Do send us the entire error log from your workspace, (it’s at [workspace_location]/.metadata/.log) might help narrow down the problem.

    Apologies for the inconvenience caused – hope we’re able to track down this problem with your details.

    #582056 Reply

    pramod1
    Participant

    Brian,
    As I mentioned before I had actually gone to the extent of creating a new user id on linux to ensure there is no state being picked up from the user’s home directory, which included creating a new workspace, trying it on the existing angular project. When that did not work I created new dummy project with a dummy ts file. But the same issue.
    Here is the log

    Thanks
    Pramod

    Attachments:
    You must be logged in to view attached files.
    #583059 Reply

    pramod1
    Participant

    Any luck with this or do I just assume the license fee is sunk cost for me ?

    #583065 Reply

    Brian Fernandes
    Moderator

    Pramod,

    I apologize, somehow this feel through the cracks over the last weekend.

    Here’s a very quick suggestion – your log revealed that you have LiClipseText installed. Given the type of error we’re seeing in your logs, it’s possible that this plugin is interfering with some of our tooling. Can you uninstall this and try the formatting again?

    #583281 Reply

    Brian Fernandes
    Moderator

    Pramod,

    Didn’t hear back from you, so I’m unsure if the LiClipse removal helped.

    I’d like to point out an alternative solution to your problem – CodeMix. You can install this into your existing install, or into a completely clean Eclipse install (though again, please do not include LiClipse). CodeMix includes Angular and TypeScript functionality too (among many other technologies), and we will be eventually be building the Angular support in Webclipse/Angular IDE on the CodeMix platform.

    CodeMix will work with your current license, so no additional purchase will be necessary.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Errors in Formatting on Linux

You must be logged in to post in the forum log in