templates not working

Help
2007-05-04
2013-05-20
  • Tauchsieder
    Tauchsieder
    2007-05-04

    Hi,

    I am using Eclipse 3.2.2 running under Win XP Prof and EPIC 0.5.35. But two features are not working: code completion and templates. The eclipse error log gives me this error message:

    org.epic.perleditor.editors.PerlEditor cannot be cast to org.eclipse.jdt.internal.ui.javaeditor.JavaEditor

    Any ideas are very welcome!

    Cheers,
    Stefan

     
    • Jan Ploski
      Jan Ploski
      2007-05-04

      Could you also provide a complete stack trace from the error log?

       
      • Tauchsieder
        Tauchsieder
        2007-05-07

        Sure:

        java.lang.ClassCastException: org.epic.perleditor.editors.PerlEditor cannot be cast to org.eclipse.jdt.internal.ui.javaeditor.JavaEditor
        at org.eclipse.jdt.internal.ui.text.java.JavaContentAssistHandler.getActiveEditor(JavaContentAssistHandler.java:60)
        at org.eclipse.jdt.internal.ui.text.java.JavaContentAssistHandler.execute(JavaContentAssistHandler.java:40)
        at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:151)
        at org.eclipse.core.commands.Command.executeWithChecks(Command.java:461)
        at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:424)
        at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:160)
        at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:466)
        at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:799)
        at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:846)
        at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:564)
        at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:506)
        at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:122)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
        at org.eclipse.swt.widgets.Display.filterEvent(Display.java:982)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:927)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)
        at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:965)
        at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:961)
        at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1275)
        at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3346)
        at org.eclipse.swt.widgets.Control.windowProc(Control.java:3246)
        at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025)
        at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
        at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1932)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1930)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
        at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.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(EclipseStarter.java:400)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        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)

        Cheers,
        Stefan

         
        • Jan Ploski
          Jan Ploski
          2007-05-08

          The problem seems to be that the "command" associated with a key stroke is routed to the wrong handler (the Java handler, not the Perl handler). Normally, when you switch focus from Java editor to Perl editor, the associations of commands such as autocomplete with handlers are updated to reflect the current context. For some strange reason this did not/does not occur in your case.

          Can you reproduce this problem still? Is there anything "special" about your Eclipse configuration? For example, could you try with a fresh Eclipse 3.2.2 install and see if this problem can be reproduced in it?

           
          • Tauchsieder
            Tauchsieder
            2007-05-09

            I am working with a fresh and new Eclipse 3.2.2 Build id: M20070212-1330 installation, the only plugin installed is EPIC. In my company my computer is not the only one with this problem, but there also computers where templates are working.

            Cheers,
            Stefan