Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 102210 Details for
Bug 223976
[Decorators] Content type decorator: Updating missing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
proposed patch
patch-223976.txt (text/plain), 9.93 KB, created by
Boris Bokowski
on 2008-05-27 14:21:02 EDT
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Boris Bokowski
Created:
2008-05-27 14:21:02 EDT
Size:
9.93 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.ide >Index: extensions/org/eclipse/ui/model/WorkbenchContentProvider.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/extensions/org/eclipse/ui/model/WorkbenchContentProvider.java,v >retrieving revision 1.15 >diff -u -r1.15 WorkbenchContentProvider.java >--- extensions/org/eclipse/ui/model/WorkbenchContentProvider.java 9 May 2008 14:13:07 -0000 1.15 >+++ extensions/org/eclipse/ui/model/WorkbenchContentProvider.java 27 May 2008 18:16:36 -0000 >@@ -204,8 +204,8 @@ > } > // Check the flags for changes the Navigator cares about. > // See ResourceLabelProvider for the aspects it cares about. >- // Notice we don't care about F_MARKERS currently. >- if ((changeFlags & (IResourceDelta.SYNC | IResourceDelta.CONTENT >+ // Notice we don't care about F_CONTENT or F_MARKERS currently. >+ if ((changeFlags & (IResourceDelta.SYNC > | IResourceDelta.TYPE | IResourceDelta.DESCRIPTION)) != 0) { > runnables.add(getUpdateRunnable(resource)); > } >Index: src/org/eclipse/ui/views/navigator/WorkspaceActionGroup.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/WorkspaceActionGroup.java,v >retrieving revision 1.17 >diff -u -r1.17 WorkspaceActionGroup.java >--- src/org/eclipse/ui/views/navigator/WorkspaceActionGroup.java 24 Mar 2008 19:13:35 -0000 1.17 >+++ src/org/eclipse/ui/views/navigator/WorkspaceActionGroup.java 27 May 2008 18:16:36 -0000 >@@ -11,19 +11,28 @@ > *******************************************************************************/ > package org.eclipse.ui.views.navigator; > >+import java.lang.reflect.InvocationTargetException; > import java.util.Iterator; > > import org.eclipse.core.resources.ICommand; > import org.eclipse.core.resources.IProject; > import org.eclipse.core.resources.IncrementalProjectBuilder; > import org.eclipse.core.resources.ResourcesPlugin; >+import org.eclipse.core.resources.WorkspaceJob; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Status; >+import org.eclipse.core.runtime.jobs.ISchedulingRule; > import org.eclipse.jface.action.IMenuManager; > import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.jface.viewers.TreeViewer; > import org.eclipse.jface.window.IShellProvider; >+import org.eclipse.osgi.util.NLS; > import org.eclipse.swt.SWT; > import org.eclipse.swt.events.KeyEvent; >+import org.eclipse.swt.widgets.Shell; > import org.eclipse.ui.IActionBars; > import org.eclipse.ui.actions.ActionFactory; > import org.eclipse.ui.actions.BuildAction; >@@ -31,7 +40,10 @@ > import org.eclipse.ui.actions.CloseUnrelatedProjectsAction; > import org.eclipse.ui.actions.OpenResourceAction; > import org.eclipse.ui.actions.RefreshAction; >+import org.eclipse.ui.actions.WorkspaceModifyOperation; > import org.eclipse.ui.ide.IDEActionFactory; >+import org.eclipse.ui.internal.ide.IDEWorkbenchMessages; >+import org.eclipse.ui.internal.ide.StatusUtil; > > /** > * This is the action group for workspace actions such as Build, Refresh Local, >@@ -181,11 +193,57 @@ > } > > protected void makeActions() { >- IShellProvider provider = navigator.getSite(); >+ final IShellProvider provider = navigator.getSite(); > openProjectAction = new OpenResourceAction(provider); > closeProjectAction = new CloseResourceAction(provider); > closeUnrelatedProjectsAction = new CloseUnrelatedProjectsAction(provider); >- refreshAction = new RefreshAction(provider); >+ refreshAction = new RefreshAction(provider) { >+ public void run() { >+ final IStatus[] errorStatus = new IStatus[1]; >+ errorStatus[0] = Status.OK_STATUS; >+ final WorkspaceModifyOperation op = (WorkspaceModifyOperation) createOperation(errorStatus); >+ WorkspaceJob job = new WorkspaceJob("refresh") { //$NON-NLS-1$ >+ >+ public IStatus runInWorkspace(IProgressMonitor monitor) >+ throws CoreException { >+ try { >+ op.run(monitor); >+ Shell shell = provider.getShell(); >+ if (shell != null && !shell.isDisposed()) { >+ shell.getDisplay().asyncExec(new Runnable() { >+ public void run() { >+ TreeViewer viewer = navigator >+ .getViewer(); >+ if (viewer != null >+ && viewer.getControl() != null >+ && !viewer.getControl() >+ .isDisposed()) { >+ viewer.refresh(); >+ } >+ } >+ }); >+ } >+ } catch (InvocationTargetException e) { >+ String msg = NLS.bind( >+ IDEWorkbenchMessages.WorkspaceAction_logTitle, getClass() >+ .getName(), e.getTargetException()); >+ throw new CoreException(StatusUtil.newStatus(IStatus.ERROR, >+ msg, e.getTargetException())); >+ } catch (InterruptedException e) { >+ return Status.CANCEL_STATUS; >+ } >+ return errorStatus[0]; >+ } >+ >+ }; >+ ISchedulingRule rule = op.getRule(); >+ if (rule != null) { >+ job.setRule(rule); >+ } >+ job.setUser(true); >+ job.schedule(); >+ } >+ }; > refreshAction > .setDisabledImageDescriptor(getImageDescriptor("dlcl16/refresh_nav.gif"));//$NON-NLS-1$ > refreshAction >#P org.eclipse.ui.navigator.resources >Index: src/org/eclipse/ui/internal/navigator/resources/actions/ResourceMgmtActionProvider.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceMgmtActionProvider.java,v >retrieving revision 1.2 >diff -u -r1.2 ResourceMgmtActionProvider.java >--- src/org/eclipse/ui/internal/navigator/resources/actions/ResourceMgmtActionProvider.java 16 Oct 2006 14:10:05 -0000 1.2 >+++ src/org/eclipse/ui/internal/navigator/resources/actions/ResourceMgmtActionProvider.java 27 May 2008 18:16:36 -0000 >@@ -11,17 +11,25 @@ > > package org.eclipse.ui.internal.navigator.resources.actions; > >+import java.lang.reflect.InvocationTargetException; > import java.util.Iterator; > > import org.eclipse.core.resources.ICommand; > import org.eclipse.core.resources.IProject; > import org.eclipse.core.resources.IncrementalProjectBuilder; > import org.eclipse.core.resources.ResourcesPlugin; >+import org.eclipse.core.resources.WorkspaceJob; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Status; >+import org.eclipse.core.runtime.jobs.ISchedulingRule; > import org.eclipse.jface.action.IMenuManager; > import org.eclipse.jface.resource.ImageDescriptor; > import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.jface.viewers.StructuredViewer; >+import org.eclipse.osgi.util.NLS; > import org.eclipse.swt.widgets.Shell; > import org.eclipse.ui.IActionBars; > import org.eclipse.ui.actions.ActionFactory; >@@ -30,8 +38,11 @@ > import org.eclipse.ui.actions.CloseUnrelatedProjectsAction; > import org.eclipse.ui.actions.OpenResourceAction; > import org.eclipse.ui.actions.RefreshAction; >+import org.eclipse.ui.actions.WorkspaceModifyOperation; > import org.eclipse.ui.ide.IDEActionFactory; >+import org.eclipse.ui.internal.ide.IDEWorkbenchMessages; > import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; >+import org.eclipse.ui.internal.ide.StatusUtil; > import org.eclipse.ui.navigator.CommonActionProvider; > import org.eclipse.ui.navigator.ICommonActionExtensionSite; > import org.eclipse.ui.navigator.ICommonMenuConstants; >@@ -187,7 +198,51 @@ > > closeUnrelatedProjectsAction = new CloseUnrelatedProjectsAction(shell); > >- refreshAction = new RefreshAction(shell); >+ refreshAction = new RefreshAction(shell) { >+ public void run() { >+ final IStatus[] errorStatus = new IStatus[1]; >+ errorStatus[0] = Status.OK_STATUS; >+ final WorkspaceModifyOperation op = (WorkspaceModifyOperation) createOperation(errorStatus); >+ WorkspaceJob job = new WorkspaceJob("refresh") { //$NON-NLS-1$ >+ >+ public IStatus runInWorkspace(IProgressMonitor monitor) >+ throws CoreException { >+ try { >+ op.run(monitor); >+ if (shell != null && !shell.isDisposed()) { >+ shell.getDisplay().asyncExec(new Runnable() { >+ public void run() { >+ StructuredViewer viewer = getActionSite().getStructuredViewer(); >+ if (viewer != null >+ && viewer.getControl() != null >+ && !viewer.getControl() >+ .isDisposed()) { >+ viewer.refresh(); >+ } >+ } >+ }); >+ } >+ } catch (InvocationTargetException e) { >+ String msg = NLS.bind( >+ IDEWorkbenchMessages.WorkspaceAction_logTitle, getClass() >+ .getName(), e.getTargetException()); >+ throw new CoreException(StatusUtil.newStatus(IStatus.ERROR, >+ msg, e.getTargetException())); >+ } catch (InterruptedException e) { >+ return Status.CANCEL_STATUS; >+ } >+ return errorStatus[0]; >+ } >+ >+ }; >+ ISchedulingRule rule = op.getRule(); >+ if (rule != null) { >+ job.setRule(rule); >+ } >+ job.setUser(true); >+ job.schedule(); >+ } >+ }; > refreshAction > .setDisabledImageDescriptor(getImageDescriptor("dlcl16/refresh_nav.gif"));//$NON-NLS-1$ > refreshAction
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 223976
: 102210