Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 367460 | Differences between
and this patch

Collapse All | Expand All

(-)serverui/org/eclipse/wst/server/ui/editor/ServerEditorPart.java (-3 / +16 lines)
Lines 15-20 Link Here
15
import org.eclipse.core.commands.operations.IUndoableOperation;
15
import org.eclipse.core.commands.operations.IUndoableOperation;
16
import org.eclipse.core.runtime.IProgressMonitor;
16
import org.eclipse.core.runtime.IProgressMonitor;
17
import org.eclipse.core.runtime.IStatus;
17
import org.eclipse.core.runtime.IStatus;
18
import org.eclipse.core.runtime.SubProgressMonitor;
18
import org.eclipse.swt.widgets.Composite;
19
import org.eclipse.swt.widgets.Composite;
19
import org.eclipse.swt.widgets.Display;
20
import org.eclipse.swt.widgets.Display;
20
import org.eclipse.ui.IEditorInput;
21
import org.eclipse.ui.IEditorInput;
Lines 69-82 Link Here
69
	 * @see org.eclipse.ui.IEditorPart#doSave(IProgressMonitor)
70
	 * @see org.eclipse.ui.IEditorPart#doSave(IProgressMonitor)
70
	 */
71
	 */
71
	public void doSave(IProgressMonitor monitor) {
72
	public void doSave(IProgressMonitor monitor) {
72
		// do nothing
73
		Iterator iterator = getSections().iterator();
74
		List<IStatus> list = new ArrayList<IStatus>();
75
		int s = list.size();
76
		monitor.beginTask("", s*100);
77
		while (iterator.hasNext()) {
78
			ServerEditorSection section = (ServerEditorSection) iterator.next();
79
			section.doSave(new SubProgressMonitor(monitor, 100));
80
		}
73
	}
81
	}
74
82
75
	/**
83
	/**
76
	 * @see org.eclipse.ui.IEditorPart#doSaveAs()
84
	 * @see org.eclipse.ui.IEditorPart#doSaveAs()
77
	 */
85
	 */
78
	public void doSaveAs() {
86
	public void doSaveAs() {
79
		// do nothing
87
		Iterator iterator = getSections().iterator();
88
		List<IStatus> list = new ArrayList<IStatus>();
89
		while (iterator.hasNext()) {
90
			ServerEditorSection section = (ServerEditorSection) iterator.next();
91
			section.doSaveAs();
92
		}
80
	}
93
	}
81
94
82
	/**
95
	/**
Lines 193-199 Link Here
193
		return status;
206
		return status;
194
	}
207
	}
195
208
196
	private List getSections() {
209
	private List<ServerEditorSection> getSections() {
197
		if (sections == null) {
210
		if (sections == null) {
198
			sections = new ArrayList<ServerEditorSection>();
211
			sections = new ArrayList<ServerEditorSection>();
199
			sectionToInsertionId = new HashMap<String, List<ServerEditorSection>>();
212
			sectionToInsertionId = new HashMap<String, List<ServerEditorSection>>();
(-)serverui/org/eclipse/wst/server/ui/editor/ServerEditorSection.java (+18 lines)
Lines 11-16 Link Here
11
package org.eclipse.wst.server.ui.editor;
11
package org.eclipse.wst.server.ui.editor;
12
12
13
import org.eclipse.core.commands.operations.IUndoableOperation;
13
import org.eclipse.core.commands.operations.IUndoableOperation;
14
import org.eclipse.core.runtime.IProgressMonitor;
14
import org.eclipse.core.runtime.IStatus;
15
import org.eclipse.core.runtime.IStatus;
15
import org.eclipse.core.runtime.Status;
16
import org.eclipse.core.runtime.Status;
16
import org.eclipse.swt.widgets.Composite;
17
import org.eclipse.swt.widgets.Composite;
Lines 168-173 Link Here
168
	}
169
	}
169
170
170
	/**
171
	/**
172
	 * Allow a section an opportunity to respond to a doSave request on the editor.
173
	 * @param monitor
174
	 */
175
	public void doSave(IProgressMonitor monitor) {
176
		// do nothing
177
	}
178
179
	/**
180
	 * Allow a section an opportunity to respond to a doSaveAs request on the editor.
181
	 * @param monitor
182
	 */
183
	public void doSaveAs() {
184
		// do nothing
185
	}
186
187
	
188
	/**
171
	 * Disposes of the section.
189
	 * Disposes of the section.
172
	 */
190
	 */
173
	public void dispose() {
191
	public void dispose() {

Return to bug 367460