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 208755 Details for
Bug 367460
ServerEditorSection has no ability to take alternative action on doSave(etc)
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]
A patch adding the required API
367460.patch (text/plain), 3.29 KB, created by
Rob Stryker
on 2011-12-22 16:28:34 EST
(
hide
)
Description:
A patch adding the required API
Filename:
MIME Type:
Creator:
Rob Stryker
Created:
2011-12-22 16:28:34 EST
Size:
3.29 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.server.ui >Index: serverui/org/eclipse/wst/server/ui/editor/ServerEditorPart.java >=================================================================== >RCS file: /cvsroot/webtools/servertools/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/editor/ServerEditorPart.java,v >retrieving revision 1.30 >diff -u -r1.30 ServerEditorPart.java >--- serverui/org/eclipse/wst/server/ui/editor/ServerEditorPart.java 11 Aug 2011 19:21:12 -0000 1.30 >+++ serverui/org/eclipse/wst/server/ui/editor/ServerEditorPart.java 22 Dec 2011 21:27:02 -0000 >@@ -15,6 +15,7 @@ > import org.eclipse.core.commands.operations.IUndoableOperation; > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.SubProgressMonitor; > import org.eclipse.swt.widgets.Composite; > import org.eclipse.swt.widgets.Display; > import org.eclipse.ui.IEditorInput; >@@ -69,14 +70,26 @@ > * @see org.eclipse.ui.IEditorPart#doSave(IProgressMonitor) > */ > public void doSave(IProgressMonitor monitor) { >- // do nothing >+ Iterator iterator = getSections().iterator(); >+ List<IStatus> list = new ArrayList<IStatus>(); >+ int s = list.size(); >+ monitor.beginTask("", s*100); >+ while (iterator.hasNext()) { >+ ServerEditorSection section = (ServerEditorSection) iterator.next(); >+ section.doSave(new SubProgressMonitor(monitor, 100)); >+ } > } > > /** > * @see org.eclipse.ui.IEditorPart#doSaveAs() > */ > public void doSaveAs() { >- // do nothing >+ Iterator iterator = getSections().iterator(); >+ List<IStatus> list = new ArrayList<IStatus>(); >+ while (iterator.hasNext()) { >+ ServerEditorSection section = (ServerEditorSection) iterator.next(); >+ section.doSaveAs(); >+ } > } > > /** >@@ -193,7 +206,7 @@ > return status; > } > >- private List getSections() { >+ private List<ServerEditorSection> getSections() { > if (sections == null) { > sections = new ArrayList<ServerEditorSection>(); > sectionToInsertionId = new HashMap<String, List<ServerEditorSection>>(); >Index: serverui/org/eclipse/wst/server/ui/editor/ServerEditorSection.java >=================================================================== >RCS file: /cvsroot/webtools/servertools/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/editor/ServerEditorSection.java,v >retrieving revision 1.18 >diff -u -r1.18 ServerEditorSection.java >--- serverui/org/eclipse/wst/server/ui/editor/ServerEditorSection.java 19 Apr 2011 17:30:40 -0000 1.18 >+++ serverui/org/eclipse/wst/server/ui/editor/ServerEditorSection.java 22 Dec 2011 21:27:02 -0000 >@@ -11,6 +11,7 @@ > package org.eclipse.wst.server.ui.editor; > > import org.eclipse.core.commands.operations.IUndoableOperation; >+import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.Status; > import org.eclipse.swt.widgets.Composite; >@@ -168,6 +169,23 @@ > } > > /** >+ * Allow a section an opportunity to respond to a doSave request on the editor. >+ * @param monitor >+ */ >+ public void doSave(IProgressMonitor monitor) { >+ // do nothing >+ } >+ >+ /** >+ * Allow a section an opportunity to respond to a doSaveAs request on the editor. >+ * @param monitor >+ */ >+ public void doSaveAs() { >+ // do nothing >+ } >+ >+ >+ /** > * Disposes of the section. > */ > public void dispose() {
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
Flags:
eyuen7
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 367460
:
208755
|
208785