|
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>>(); |