|
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 23-28
Link Here
|
| 23 |
import org.eclipse.ui.forms.widgets.FormToolkit; |
24 |
import org.eclipse.ui.forms.widgets.FormToolkit; |
| 24 |
import org.eclipse.ui.part.EditorPart; |
25 |
import org.eclipse.ui.part.EditorPart; |
| 25 |
import org.eclipse.wst.server.core.IServerWorkingCopy; |
26 |
import org.eclipse.wst.server.core.IServerWorkingCopy; |
|
|
27 |
import org.eclipse.wst.server.ui.internal.Messages; |
| 26 |
import org.eclipse.wst.server.ui.internal.Trace; |
28 |
import org.eclipse.wst.server.ui.internal.Trace; |
| 27 |
import org.eclipse.wst.server.ui.internal.editor.*; |
29 |
import org.eclipse.wst.server.ui.internal.editor.*; |
| 28 |
/** |
30 |
/** |
|
Lines 69-82
Link Here
|
| 69 |
* @see org.eclipse.ui.IEditorPart#doSave(IProgressMonitor) |
71 |
* @see org.eclipse.ui.IEditorPart#doSave(IProgressMonitor) |
| 70 |
*/ |
72 |
*/ |
| 71 |
public void doSave(IProgressMonitor monitor) { |
73 |
public void doSave(IProgressMonitor monitor) { |
| 72 |
// do nothing |
74 |
List<ServerEditorSection> curSections = getSections(); |
|
|
75 |
int ticks = 100; |
| 76 |
monitor.beginTask(Messages.savingTask, curSections.size() * ticks); |
| 77 |
for (ServerEditorSection section: curSections) { |
| 78 |
section.doSave(new SubProgressMonitor(monitor, ticks)); |
| 79 |
} |
| 73 |
} |
80 |
} |
| 74 |
|
81 |
|
| 75 |
/** |
82 |
/** |
| 76 |
* @see org.eclipse.ui.IEditorPart#doSaveAs() |
83 |
* @see org.eclipse.ui.IEditorPart#doSaveAs() |
| 77 |
*/ |
84 |
*/ |
| 78 |
public void doSaveAs() { |
85 |
public void doSaveAs() { |
| 79 |
// do nothing |
86 |
for (ServerEditorSection section: getSections()) { |
|
|
87 |
section.doSaveAs(); |
| 88 |
} |
| 80 |
} |
89 |
} |
| 81 |
|
90 |
|
| 82 |
/** |
91 |
/** |
|
Lines 193-199
Link Here
|
| 193 |
return status; |
202 |
return status; |
| 194 |
} |
203 |
} |
| 195 |
|
204 |
|
| 196 |
private List getSections() { |
205 |
private List<ServerEditorSection> getSections() { |
| 197 |
if (sections == null) { |
206 |
if (sections == null) { |
| 198 |
sections = new ArrayList<ServerEditorSection>(); |
207 |
sections = new ArrayList<ServerEditorSection>(); |
| 199 |
sectionToInsertionId = new HashMap<String, List<ServerEditorSection>>(); |
208 |
sectionToInsertionId = new HashMap<String, List<ServerEditorSection>>(); |