Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Urgent : Problem with importing resources
Urgent : Problem with importing resources [message #80829] Mon, 23 June 2003 12:23
Eclipse UserFriend
Originally posted by: bharatkhatri2000.yahoo.com

Hi All,

I have created a view which shows all resources in workspace, rooted at
workspace root. The components of the view are objects of my own class.
Then I have a context menu on top of my view where I do normal operations
like copy/paste/delete/move/rename. To do these operations, I am using the
wprksapce api. I implement a resoucechangeListener, which updates my view
when any of these operations in my context menu is executed. So far so
good.

The next menu item I added is import, and implemented is using the class
ImportResourcesAction (all implementation is already provided, I just
added this action to my menu). When the action is executed, the import is
done successfully, but I get an error when I try to refresh my view after
updating it. The exception is as follows:

org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:2332)
at org.eclipse.swt.SWT.error(SWT.java:2262)
at org.eclipse.swt.widgets.Widget.error(Widget.java:385)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:315)
at org.eclipse.swt.widgets.Tree.setSelection(Tree.java:996)
at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer .java:226)
at
org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToW idget(AbstractTreeViewer.java:1249)
at
org.eclipse.jface.viewers.StructuredViewer.setSelectionToWid get(StructuredViewer.java:1055)
at
org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:808)
at
org.eclipse.jface.viewers.StructuredViewer.refresh(Structure dViewer.java:859)
at
org.eclipse.jface.viewers.StructuredViewer.refresh(Structure dViewer.java:821)
at TreeViewer.AdaTreeView.refresh(AdaTreeView.java:357)
at
Actions.ResourceChangeListener.resourceChanged(ResourceChang eListener.java:54)
at
org.eclipse.core.internal.events.NotificationManager$1.run(N otificationManager.java:137)
at
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java:889)
at org.eclipse.core.runtime.Platform.run(Platform.java:413)
at
org.eclipse.core.internal.events.NotificationManager.notify( NotificationManager.java:152)
at
org.eclipse.core.internal.events.NotificationManager.broadca stChanges(NotificationManager.java:67)
at
org.eclipse.core.internal.resources.Workspace.broadcastChang es(Workspace.java:161)
at
org.eclipse.core.internal.resources.Workspace.endOperation(W orkspace.java:892)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1600)
at
org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:85)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:101)


Any help will be appreciated

Thanks

Bharat
Previous Topic:Eclipse regularly crashes with "out of memory" errors
Next Topic:Using "Generic Java" in Eclipse
Goto Forum:
  


Current Time: Thu May 08 17:25:27 EDT 2025

Powered by FUDForum. Page generated in 0.05261 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top