psevestre / veloeclipse

Automatically exported from code.google.com/p/veloeclipse
Other
0 stars 0 forks source link

ClassCastException opening vm file inside a jar #25

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. add a jar with an included vm file to classpath (e.g. spring-webmvc.jar)
2. open the vm file (e.g. spring.vm)

An error has occurred when activating this view
org.eclipse.jdt.internal.ui.javaeditor.JarEntryEditorInput cannot be cast
to org.eclipse.ui.IFileEditorInput

java.lang.ClassCastException:
org.eclipse.jdt.internal.ui.javaeditor.JarEntryEditorInput cannot be cast
to org.eclipse.ui.IFileEditorInput
at
com.googlecode.veloeclipse.editor.VelocityEditor$MouseClickListener.focusGained(
VelocityEditor.java:1574)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:133)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1008)
at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2583)
at org.eclipse.swt.widgets.Widget.wmSetFocus(Widget.java:2282)
at org.eclipse.swt.widgets.Control.WM_SETFOCUS(Control.java:4573)
at org.eclipse.swt.widgets.Canvas.WM_SETFOCUS(Canvas.java:449)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4014)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:342)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4619)
at org.eclipse.swt.internal.win32.OS.SetFocus(Native Method)
at org.eclipse.swt.widgets.Control.forceFocus(Control.java:978)
at org.eclipse.swt.widgets.Control.setFocus(Control.java:2965)
at org.eclipse.swt.widgets.Composite.setFocus(Composite.java:928)
at
org.eclipse.ui.texteditor.AbstractTextEditor.setFocus(AbstractTextEditor.java:60
79)
at org.eclipse.ui.internal.PartPane.setFocus(PartPane.java:332)
at org.eclipse.ui.internal.EditorPane.setFocus(EditorPane.java:127)
at org.eclipse.ui.internal.WorkbenchPage$3.run(WorkbenchPage.java:626)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.runtime.Platform.run(Platform.java:888)
at org.eclipse.ui.internal.WorkbenchPage.activatePart(WorkbenchPage.java:621)
at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3527)
at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:614)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2
869)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2676)
at
org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.
java:374)
at
org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.
java:178)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208)
at
org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatch
Action.java:274)
at
org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.j
ava:250)
at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(Pa
ckageExplorerActionGroup.java:373)
at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplor
erPart.java:526)
at
org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWith
EditorHelper.java:48)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:842)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.runtime.Platform.run(Platform.java:888)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at
org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:840)
at
org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1101
)
at
org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:12
05)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java
:113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Ecli
pseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLau
ncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

What version of the product are you using? On what operating system?
eclipse.buildId=M20100211-1343
java.version=1.6.0_17
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Command-line arguments:  -os win32 -ws win32 -arch x86_64

Original issue reported on code.google.com by dennis.kieselhorst on 11 Mar 2010 at 8:30

GoogleCodeExporter commented 8 years ago
same issue in my pc.
eclipse Build id: 20130614-0229, 
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Original comment by tjwangk...@gmail.com on 21 Jan 2014 at 9:20