java.lang.ClassCastException: org.eclipse.core.internal.resources.Folder cannot be cast to org.eclipse.jdt.core.IJavaElement

GitHub | reprogrammer | 6 years ago
  1. 0

    CodingSpectator throws an exception when trying to rename a regular folder

    GitHub | 6 years ago | reprogrammer
    java.lang.ClassCastException: org.eclipse.core.internal.resources.Folder cannot be cast to org.eclipse.jdt.core.IJavaElement
  2. 0

    java.lang.ClassCastException: com.cenqua.clover.eclipse.views.nodes.LeafPackageFragmentNode cannot be cast to org.eclipse.jdt.core.IJavaElement at org.eclipse.jdt.internal.ui.JavaTaskListAdapter.getAffectedResource(JavaTaskListAdapter.java:28) at org.eclipse.ui.views.markers.internal.MarkerView.focusSelectionChanged(MarkerView.java:1131) at org.eclipse.ui.views.markers.internal.MarkerView$2.selectionChanged(MarkerView.java:482) at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156) at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionService.java:62) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:843) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1976) at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1128) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1154) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:213) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:207) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:374) 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.java:3348) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1930)

    Atlassian JIRA | 8 years ago | Michael Studman [Atlassian]
    java.lang.ClassCastException: com.cenqua.clover.eclipse.views.nodes.LeafPackageFragmentNode cannot be cast to org.eclipse.jdt.core.IJavaElement
  3. 0

    java.lang.ClassCastException: org.eclipse.core.internal.resources.Folder cannot be cast to org.eclipse.core.resources.IFile

    GitHub | 3 years ago | dmitrygusev
    java.lang.ClassCastException: org.eclipse.core.internal.resources.Folder cannot be cast to org.eclipse.core.resources.IFile
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.lang.ClassCastException: com.cenqua.clover.eclipse.views.nodes.LeafPackageFragmentNode cannot be cast to org.eclipse.jdt.core.IJavaElement at org.eclipse.jdt.internal.ui.JavaTaskListAdapter.getAffectedResource(JavaTaskListAdapter.java:28) at org.eclipse.ui.views.markers.internal.MarkerView.focusSelectionChanged(MarkerView.java:1131) at org.eclipse.ui.views.markers.internal.MarkerView$2.selectionChanged(MarkerView.java:482) at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156) at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionService.java:62) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:843) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1976) at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1128) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1154) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:213) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:207) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:374) 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.java:3348) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1930)

    Atlassian JIRA | 8 years ago | Michael Studman [Atlassian]
    java.lang.ClassCastException: com.cenqua.clover.eclipse.views.nodes.LeafPackageFragmentNode cannot be cast to org.eclipse.jdt.core.IJavaElement
  6. 0

    ClassCastException in JavaTaskListAdapter#getAffectedResource(IAdaptable)

    Eclipse Bugzilla | 8 years ago | tombry
    java.lang.ClassCastException: de.tobject.findbugs.view.explorer.BugGroup cannot be cast to org.eclipse.jdt.core.IJavaElement

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.eclipse.core.internal.resources.Folder cannot be cast to org.eclipse.jdt.core.IJavaElement

      at org.eclipse.jdt.internal.corext.refactoring.codingspectator.RefactoringGlobalStore.setStructuredSelection()
    2. org.eclipse.jdt
      RefactoringGlobalStore.setStructuredSelection
      1. org.eclipse.jdt.internal.corext.refactoring.codingspectator.RefactoringGlobalStore.setStructuredSelection(RefactoringGlobalStore.java:87)
      1 frame
    3. Java Development Tools UI
      SelectionDispatchAction.run
      1. org.eclipse.jdt.ui.actions.RenameAction.run(RenameAction.java:123)
      2. org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
      3. org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
      3 frames
    4. JFace
      ActionHandler.execute
      1. org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
      2. org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:119)
      2 frames
    5. Commands
      ParameterizedCommand.executeWithChecks
      1. org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
      2. org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
      2 frames
    6. Workbench
      WorkbenchKeyboard$KeyDownFilter.handleEvent
      1. org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
      2. org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)
      3. org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)
      4. org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
      5. org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567)
      6. org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508)
      7. org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123)
      7 frames
    7. RWT
      Display.windowProc
      1. org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      2. org.eclipse.swt.widgets.Display.filterEvent(Display.java:1524)
      3. org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1257)
      4. org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
      5. org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1267)
      6. org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1294)
      7. org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:730)
      8. org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:2841)
      9. org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:734)
      10. org.eclipse.swt.widgets.Tree.gtk_key_press_event(Tree.java:1977)
      11. org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1743)
      12. org.eclipse.swt.widgets.Control.windowProc(Control.java:4796)
      13. org.eclipse.swt.widgets.Tree.windowProc(Tree.java:3485)
      14. org.eclipse.swt.widgets.Display.windowProc(Display.java:4360)
      14 frames
    8. org.eclipse.swt
      OS.gtk_main_do_event
      1. org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
      2. org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8189)
      2 frames
    9. RWT
      Display.eventProc
      1. org.eclipse.swt.widgets.Display.eventProc(Display.java:1238)
      1 frame
    10. org.eclipse.swt
      OS.g_main_context_iteration
      1. org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
      2. org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2237)
      2 frames
    11. RWT
      Display.readAndDispatch
      1. org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3159)
      1 frame
    12. Eclipse UI
      Workbench$7.run
      1. org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
      2. org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
      3. org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
      4. org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
      4 frames
    13. Databinding
      Realm.runWithDefault
      1. org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      1 frame
    14. Eclipse UI
      Workbench.createAndRunWorkbench
      1. org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
      1 frame
    15. Eclipse UI
      PlatformUI.createAndRunWorkbench
      1. org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
      1 frame
    16. Eclipse IDE
      IDEApplication.start
      1. org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
      1 frame
    17. Equinox Container
      EclipseAppHandle.run
      1. org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      1 frame
    18. Eclipse OSGi
      EclipseStarter.run
      1. org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
      2. org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
      3. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
      4. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
      4 frames
    19. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    20. Equinox
      Main.main
      1. org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
      2. org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
      3. org.eclipse.equinox.launcher.Main.run(Main.java:1408)
      4. org.eclipse.equinox.launcher.Main.main(Main.java:1384)
      4 frames