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 87682 Details for
Bug 209703
Remote File Property Pages should be able to pick up changes from other property pages
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]
patch to allow remote file property pages to pick up changes from other property pages
patch.txt (text/plain), 4.86 KB, created by
David McKnight
on 2008-01-23 13:16:24 EST
(
hide
)
Description:
patch to allow remote file property pages to pick up changes from other property pages
Filename:
MIME Type:
Creator:
David McKnight
Created:
2008-01-23 13:16:24 EST
Size:
4.86 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.files.ui >Index: src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java,v >retrieving revision 1.15 >diff -u -r1.15 SystemFilePropertyPage.java >--- src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java 13 Nov 2007 17:25:07 -0000 1.15 >+++ src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java 23 Jan 2008 18:14:26 -0000 >@@ -30,6 +30,7 @@ > > import org.eclipse.core.resources.IFile; > import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IAdaptable; > import org.eclipse.core.runtime.NullProgressMonitor; > import org.eclipse.rse.core.RSECorePlugin; > import org.eclipse.rse.core.events.ISystemResourceChangeEvents; >@@ -102,6 +103,8 @@ > { > super(); > } >+ >+ > /** > * Create the page's GUI contents. > */ >@@ -374,7 +377,9 @@ > protected IRemoteFile getRemoteFile() > { > Object element = getElement(); >- return ((IRemoteFile)element); >+ IRemoteFile file = (IRemoteFile)element; >+ >+ return file; > } > > /** >@@ -515,6 +520,8 @@ > // refresh > ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry(); > >+ remoteFile.markStale(true); >+ > // oldCanWrite and updatedValue may not be the same depending on the underlying file service > // If the file service updates the underlying object, then there is no need for a remote refresh > if (oldCanWrite == updatedValue) >@@ -572,11 +579,26 @@ > } catch (CoreException e) { > } > } >+ > } > > return ok; > } > >+ protected boolean wantDefaultAndApplyButton() >+ { >+ return true; >+ } >+ >+ protected void performApply() { >+ performOk(); >+ } >+ >+ protected void performDefaults() { >+ doInitializeFields(); >+ } >+ >+ > /** > * Validate all the widgets on the page > * <p> >@@ -597,4 +619,24 @@ > > } > >+ >+ public void setVisible(boolean visible) { >+ if (visible){ >+ IRemoteFile file = getRemoteFile(); >+ if (file.isStale()){ // has file changed? >+ try >+ { >+ file = file.getParentRemoteFileSubSystem().getRemoteFileObject(file.getAbsolutePath(), new NullProgressMonitor()); >+ } >+ catch (Exception e){ >+ } >+ setElement((IAdaptable)file); >+ >+ // reset according to the changed file >+ performDefaults(); >+ } >+ } >+ super.setVisible(visible); >+ } >+ > } >\ No newline at end of file >Index: src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePermissionsPropertyPage.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePermissionsPropertyPage.java,v >retrieving revision 1.6 >diff -u -r1.6 SystemFilePermissionsPropertyPage.java >--- src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePermissionsPropertyPage.java 23 Jan 2008 14:52:32 -0000 1.6 >+++ src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePermissionsPropertyPage.java 23 Jan 2008 18:14:26 -0000 >@@ -69,7 +69,10 @@ > protected IRemoteFile getRemoteFile() > { > Object element = getElement(); >- return ((IRemoteFile)element); >+ IRemoteFile file = (IRemoteFile)element; >+ >+ >+ return file; > } > > protected Control createContentArea(Composite parent) { >@@ -414,6 +417,7 @@ > } > > if (changed){ >+ remoteFile.markStale(true); > // notify views of change > ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry(); > registry.fireEvent(new SystemResourceChangeEvent(remoteFile, ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE, remoteFile)); >@@ -423,4 +427,37 @@ > return super.performOk(); > } > >+ protected boolean wantDefaultAndApplyButton() >+ { >+ return true; >+ } >+ >+ protected void performApply() { >+ performOk(); >+ } >+ >+ protected void performDefaults() { >+ IRemoteFile file = getRemoteFile(); >+ IFilePermissionsService service = (IFilePermissionsService)((IAdaptable)file).getAdapter(IFilePermissionsService.class); >+ initPermissionFields(file, service); >+ } >+ >+ public void setVisible(boolean visible) { >+ if (visible){ >+ IRemoteFile file = getRemoteFile(); >+ if (file.isStale()){ // has file changed? >+ try >+ { >+ file = file.getParentRemoteFileSubSystem().getRemoteFileObject(file.getAbsolutePath(), new NullProgressMonitor()); >+ } >+ catch (Exception e){ >+ } >+ setElement((IAdaptable)file); >+ >+ // reset according to the changed file >+ performDefaults(); >+ } >+ } >+ super.setVisible(visible); >+ } > }
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 209703
: 87682