View | Details | Raw Unified | Return to bug 148078 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/gmf/runtime/draw2d/ui/render/awt/internal/graphics/GraphicsToGraphics2DAdaptor.java (-1 / +1 lines)
Lines 950-956 Link Here
950
	 * feature is rarely used, the dash pattern may not be preserved when calling
950
	 * feature is rarely used, the dash pattern may not be preserved when calling
951
	 * {@link #pushState()} and {@link #popState()}.
951
	 * {@link #pushState()} and {@link #popState()}.
952
	 * @param dash the pixel pattern
952
	 * @param dash the pixel pattern
953
	 * @since 3.1
953
	 * 
954
	 */
954
	 */
955
	public void setLineDash(int dash[]) {
955
	public void setLineDash(int dash[]) {
956
		float dashFlt[] = new float[dash.length];
956
		float dashFlt[] = new float[dash.length];
(-)src/org/eclipse/gmf/runtime/draw2d/ui/internal/routers/TreeRouter.java (-1 / +1 lines)
Lines 280-286 Link Here
280
	/**
280
	/**
281
	 * Returns the branch router in the chain.
281
	 * Returns the branch router in the chain.
282
	 * @return The getBranchRouter router
282
	 * @return The getBranchRouter router
283
	 * @since 2.0
283
	 * 
284
	 */
284
	 */
285
	protected BranchRouter getBranchRouter() {
285
	protected BranchRouter getBranchRouter() {
286
		return branchRouter;
286
		return branchRouter;
(-)src/org/eclipse/gmf/runtime/draw2d/ui/figures/RectangularDropShadowLineBorder.java (-2 / +2 lines)
Lines 43-49 Link Here
43
	 * of the specified width.
43
	 * of the specified width.
44
	 *
44
	 *
45
	 * @param w  Width of inset for border
45
	 * @param w  Width of inset for border
46
	 * @since 2.0
46
	 * 
47
	 */
47
	 */
48
	public RectangularDropShadowLineBorder(int w) {
48
	public RectangularDropShadowLineBorder(int w) {
49
		super(w);
49
		super(w);
Lines 53-59 Link Here
53
	 * Constructs a DropShadowLineBorder with the foreground color and backgroud color
53
	 * Constructs a DropShadowLineBorder with the foreground color and backgroud color
54
	 * of the figure that it is drawing the border for.
54
	 * of the figure that it is drawing the border for.
55
	 *
55
	 *
56
	 * @since 2.0
56
	 * 
57
	 */
57
	 */
58
	public RectangularDropShadowLineBorder() {
58
	public RectangularDropShadowLineBorder() {
59
		super();
59
		super();
(-)src/org/eclipse/gmf/runtime/draw2d/ui/figures/WrapLabel.java (-26 / +26 lines)
Lines 186-192 Link Here
186
	/**
186
	/**
187
	 * Construct an empty Label.
187
	 * Construct an empty Label.
188
	 * 
188
	 * 
189
	 * @since 2.0
189
	 * 
190
	 */
190
	 */
191
	public WrapLabel() {
191
	public WrapLabel() {
192
		// set defaults
192
		// set defaults
Lines 201-207 Link Here
201
	 * Construct a Label with passed String as its text.
201
	 * Construct a Label with passed String as its text.
202
	 * 
202
	 * 
203
	 * @param s the label text
203
	 * @param s the label text
204
	 * @since 2.0
204
	 * 
205
	 */
205
	 */
206
	public WrapLabel(String s) {
206
	public WrapLabel(String s) {
207
		setText(s);
207
		setText(s);
Lines 212-218 Link Here
212
	 * Construct a Label with passed Image as its icon.
212
	 * Construct a Label with passed Image as its icon.
213
	 * 
213
	 * 
214
	 * @param i the label image
214
	 * @param i the label image
215
	 * @since 2.0
215
	 * 
216
	 */
216
	 */
217
	public WrapLabel(Image i) {
217
	public WrapLabel(Image i) {
218
		setIcon(i);
218
		setIcon(i);
Lines 224-230 Link Here
224
	 * 
224
	 * 
225
	 * @param s the label text
225
	 * @param s the label text
226
	 * @param i the label image
226
	 * @param i the label image
227
	 * @since 2.0
227
	 * 
228
	 */
228
	 */
229
	public WrapLabel(String s, Image i) {
229
	public WrapLabel(String s, Image i) {
230
		setText(s);
230
		setText(s);
Lines 282-288 Link Here
282
	 * 
282
	 * 
283
	 * @param txtSize the precalculated size of the label's text
283
	 * @param txtSize the precalculated size of the label's text
284
	 * @return the label's size
284
	 * @return the label's size
285
	 * @since 2.0
285
	 * 
286
	 */
286
	 */
287
	protected Dimension calculateLabelSize(Dimension txtSize) {
287
	protected Dimension calculateLabelSize(Dimension txtSize) {
288
		int gap = getIconTextGap();
288
		int gap = getIconTextGap();
Lines 381-387 Link Here
381
	 * {@link #calculateTextSize(int, int)}.
381
	 * {@link #calculateTextSize(int, int)}.
382
	 * 
382
	 * 
383
	 * @return the size of the label's text, taking into account truncation
383
	 * @return the size of the label's text, taking into account truncation
384
	 * @since 2.0
384
	 * 
385
	 */
385
	 */
386
	protected Dimension calculateSubStringTextSize() {
386
	protected Dimension calculateSubStringTextSize() {
387
		return getTextExtents(getSubStringText(), getFont()); 
387
		return getTextExtents(getSubStringText(), getFont()); 
Lines 396-402 Link Here
396
	 * @param wHint a width hint
396
	 * @param wHint a width hint
397
	 * @param hHint a height hint
397
	 * @param hHint a height hint
398
	 * @return the size of the label's text, ignoring truncation
398
	 * @return the size of the label's text, ignoring truncation
399
	 * @since 2.0
399
	 * 
400
	 */
400
	 */
401
	protected Dimension calculateTextSize(int wHint, int hHint) {
401
	protected Dimension calculateTextSize(int wHint, int hHint) {
402
		return getTextExtents(getWrappedText(wHint, hHint), getFont());
402
		return getTextExtents(getWrappedText(wHint, hHint), getFont());
Lines 410-416 Link Here
410
	 * Returns the Label's icon.
410
	 * Returns the Label's icon.
411
	 * 
411
	 * 
412
	 * @return the label icon
412
	 * @return the label icon
413
	 * @since 2.0
413
	 * 
414
	 */
414
	 */
415
	public Image getIcon() {
415
	public Image getIcon() {
416
		return getIcon(0);
416
		return getIcon(0);
Lines 442-448 Link Here
442
	 * {@link PositionConstants#CENTER}.
442
	 * {@link PositionConstants#CENTER}.
443
	 * 
443
	 * 
444
	 * @return the icon alignment
444
	 * @return the icon alignment
445
	 * @since 2.0
445
	 * 
446
	 */
446
	 */
447
	public int getIconAlignment() {
447
	public int getIconAlignment() {
448
		return getAlignment(FLAG_ICON_ALIGN);
448
		return getAlignment(FLAG_ICON_ALIGN);
Lines 452-458 Link Here
452
	 * Returns the bounds of the Label's icon.
452
	 * Returns the bounds of the Label's icon.
453
	 * 
453
	 * 
454
	 * @return the icon's bounds
454
	 * @return the icon's bounds
455
	 * @since 2.0
455
	 * 
456
	 */
456
	 */
457
	public Rectangle getIconBounds() {
457
	public Rectangle getIconBounds() {
458
		return new Rectangle(getBounds().getLocation().translate(
458
		return new Rectangle(getBounds().getLocation().translate(
Lines 463-469 Link Here
463
	 * Returns the location of the Label's icon relative to the Label.
463
	 * Returns the location of the Label's icon relative to the Label.
464
	 * 
464
	 * 
465
	 * @return the icon's location
465
	 * @return the icon's location
466
	 * @since 2.0
466
	 * 
467
	 */
467
	 */
468
	protected Point getIconLocation() {
468
	protected Point getIconLocation() {
469
		if (iconLocation == null)
469
		if (iconLocation == null)
Lines 475-481 Link Here
475
	 * Returns the gap in pixels between the Label's icon and its text.
475
	 * Returns the gap in pixels between the Label's icon and its text.
476
	 * 
476
	 * 
477
	 * @return the gap
477
	 * @return the gap
478
	 * @since 2.0
478
	 * 
479
	 */
479
	 */
480
	public int getIconTextGap() {
480
	public int getIconTextGap() {
481
		return MapModeUtil.getMapMode(this).DPtoLP(3);
481
		return MapModeUtil.getMapMode(this).DPtoLP(3);
Lines 532-538 Link Here
532
	 * including an elipsis "..." if truncation is required.
532
	 * including an elipsis "..." if truncation is required.
533
	 * 
533
	 * 
534
	 * @return the substring
534
	 * @return the substring
535
	 * @since 2.0
535
	 * 
536
	 */
536
	 */
537
	public String getSubStringText() {
537
	public String getSubStringText() {
538
		if (subStringText != null)
538
		if (subStringText != null)
Lines 623-629 Link Here
623
	 * size.
623
	 * size.
624
	 * 
624
	 * 
625
	 * @return the size of this label's text, taking into account truncation
625
	 * @return the size of this label's text, taking into account truncation
626
	 * @since 2.0
626
	 * 
627
	 */
627
	 */
628
	protected Dimension getSubStringTextSize() {
628
	protected Dimension getSubStringTextSize() {
629
		return calculateSubStringTextSize();
629
		return calculateSubStringTextSize();
Lines 636-642 Link Here
636
	 * with truncation considered.
636
	 * with truncation considered.
637
	 * 
637
	 * 
638
	 * @return the complete text of this label
638
	 * @return the complete text of this label
639
	 * @since 2.0
639
	 * 
640
	 */
640
	 */
641
	public String getText() {
641
	public String getText() {
642
		return text;
642
		return text;
Lines 668-674 Link Here
668
	 * label's text is currently truncated.
668
	 * label's text is currently truncated.
669
	 * 
669
	 * 
670
	 * @return the bounds of this label's complete text
670
	 * @return the bounds of this label's complete text
671
	 * @since 2.0
671
	 * 
672
	 */
672
	 */
673
	public Rectangle getTextBounds() {
673
	public Rectangle getTextBounds() {
674
		return new Rectangle(getBounds().getLocation().translate(
674
		return new Rectangle(getBounds().getLocation().translate(
Lines 679-685 Link Here
679
	 * Returns the location of the label's text relative to the label.
679
	 * Returns the location of the label's text relative to the label.
680
	 * 
680
	 * 
681
	 * @return the text location
681
	 * @return the text location
682
	 * @since 2.0
682
	 * 
683
	 */
683
	 */
684
	protected Point getTextLocation() {
684
	protected Point getTextLocation() {
685
		if (textLocation != null)
685
		if (textLocation != null)
Lines 693-699 Link Here
693
	 * The default text placement is {@link PositionConstants#EAST}.
693
	 * The default text placement is {@link PositionConstants#EAST}.
694
	 * 
694
	 * 
695
	 * @return the text placement
695
	 * @return the text placement
696
	 * @since 2.0
696
	 * 
697
	 */
697
	 */
698
	public int getTextPlacement() {
698
	public int getTextPlacement() {
699
		return getPlacement(FLAG_TEXT_PLACEMENT);
699
		return getPlacement(FLAG_TEXT_PLACEMENT);
Lines 709-715 Link Here
709
	 * @param wHint a width hint
709
	 * @param wHint a width hint
710
	 * @param hHint a height hint
710
	 * @param hHint a height hint
711
	 * @return the size of this label's complete text
711
	 * @return the size of this label's complete text
712
	 * @since 2.0
712
	 * 
713
	 */
713
	 */
714
	protected Dimension getTextSize(int wHint, int hHint) {
714
	protected Dimension getTextSize(int wHint, int hHint) {
715
		if (textSize == null || wHint != cachedTextSizeHint.width || hHint != cachedTextSizeHint.height) {
715
		if (textSize == null || wHint != cachedTextSizeHint.width || hHint != cachedTextSizeHint.height) {
Lines 746-752 Link Here
746
	 * and is displaying an ellipsis, <code>false</code> otherwise.
746
	 * and is displaying an ellipsis, <code>false</code> otherwise.
747
	 * 
747
	 * 
748
	 * @return <code>true</code> if the label's text is truncated
748
	 * @return <code>true</code> if the label's text is truncated
749
	 * @since 2.0
749
	 * 
750
	 */
750
	 */
751
	public boolean isTextTruncated() {
751
	public boolean isTextTruncated() {
752
		return !getSubStringTextSize().equals(getTextSize());
752
		return !getSubStringTextSize().equals(getTextSize());
Lines 872-878 Link Here
872
	 * Sets the label's icon to the passed image.
872
	 * Sets the label's icon to the passed image.
873
	 * 
873
	 * 
874
	 * @param image the new label image
874
	 * @param image the new label image
875
	 * @since 2.0
875
	 * 
876
	 */
876
	 */
877
	public void setIcon(Image image) {
877
	public void setIcon(Image image) {
878
		setIcon(image, 0);
878
		setIcon(image, 0);
Lines 905-911 Link Here
905
	 * {@link PositionConstants#RIGHT}.
905
	 * {@link PositionConstants#RIGHT}.
906
	 * 
906
	 * 
907
	 * @param align the icon alignment
907
	 * @param align the icon alignment
908
	 * @since 2.0
908
	 * 
909
	 */
909
	 */
910
	public void setIconAlignment(int align) {
910
	public void setIconAlignment(int align) {
911
		if (getIconAlignment() == align)
911
		if (getIconAlignment() == align)
Lines 978-984 Link Here
978
	 * Sets the label's text.
978
	 * Sets the label's text.
979
	 * 
979
	 * 
980
	 * @param s the new label text
980
	 * @param s the new label text
981
	 * @since 2.0
981
	 * 
982
	 */
982
	 */
983
	public void setText(String s) {
983
	public void setText(String s) {
984
		//"text" will never be null.
984
		//"text" will never be null.
Lines 999-1005 Link Here
999
	 * {@link PositionConstants#LEFT}and {@link PositionConstants#RIGHT}.
999
	 * {@link PositionConstants#LEFT}and {@link PositionConstants#RIGHT}.
1000
	 * 
1000
	 * 
1001
	 * @param align the text alignment
1001
	 * @param align the text alignment
1002
	 * @since 2.0
1002
	 * 
1003
	 */
1003
	 */
1004
	public void setTextAlignment(int align) {
1004
	public void setTextAlignment(int align) {
1005
		if (getTextAlignment() == align)
1005
		if (getTextAlignment() == align)
Lines 1016-1022 Link Here
1016
	 * {@link PositionConstants#WEST}.
1016
	 * {@link PositionConstants#WEST}.
1017
	 * 
1017
	 * 
1018
	 * @param where the text placement
1018
	 * @param where the text placement
1019
	 * @since 2.0
1019
	 * 
1020
	 */
1020
	 */
1021
	public void setTextPlacement(int where) {
1021
	public void setTextPlacement(int where) {
1022
		if (getTextPlacement() == where)
1022
		if (getTextPlacement() == where)
Lines 1303-1309 Link Here
1303
	 * @param f the font
1303
	 * @param f the font
1304
	 * @param w the available width
1304
	 * @param w the available width
1305
	 * @return the largest substring that fits in the given width
1305
	 * @return the largest substring that fits in the given width
1306
	 * @since 2.0
1306
	 * 
1307
	 */
1307
	 */
1308
	private int getLargestSubstringConfinedTo(String s, Font f, int w) {
1308
	private int getLargestSubstringConfinedTo(String s, Font f, int w) {
1309
		int min, max;
1309
		int min, max;
(-)src/org/eclipse/gmf/runtime/diagram/ui/properties/sections/appearance/ColorPalettePopup.java (-1 / +1 lines)
Lines 86-92 Link Here
86
		 * 
86
		 * 
87
		 * @return a new image or <code>null</code> if the image could not be
87
		 * @return a new image or <code>null</code> if the image could not be
88
		 *         created
88
		 *         created
89
		 * @since 2.0
89
		 * 
90
		 */
90
		 */
91
		public Image createImage() {
91
		public Image createImage() {
92
92
(-)src/org/eclipse/gmf/runtime/diagram/ui/internal/figures/BorderItemContainerFigure.java (-1 / +1 lines)
Lines 54-60 Link Here
54
	 * 
54
	 * 
55
	 * @param graphics
55
	 * @param graphics
56
	 *            The Graphics used to paint
56
	 *            The Graphics used to paint
57
	 * @since 2.0
57
	 * 
58
	 */
58
	 */
59
	protected void paintClientArea(Graphics graphics) {
59
	protected void paintClientArea(Graphics graphics) {
60
		if (getChildren().isEmpty() || !isVisible())
60
		if (getChildren().isEmpty() || !isVisible())
(-)src/org/eclipse/gmf/runtime/diagram/ui/figures/LabelLocator.java (-1 / +1 lines)
Lines 134-140 Link Here
134
	/**
134
	/**
135
	 * Returns the alignment of ConnectionLocator. 
135
	 * Returns the alignment of ConnectionLocator. 
136
	 * @return The alignment
136
	 * @return The alignment
137
	 * @since 2.0
137
	 * 
138
	 */
138
	 */
139
	public int getAlignment() {
139
	public int getAlignment() {
140
		return alignment;
140
		return alignment;
(-)src/org/eclipse/gmf/runtime/diagram/ui/resources/editor/document/DocumentEvent.java (-1 / +1 lines)
Lines 29-35 Link Here
29
	public Object fEventInfo;
29
	public Object fEventInfo;
30
	/**
30
	/**
31
	 * The modification stamp of the document when firing this event.
31
	 * The modification stamp of the document when firing this event.
32
	 * @since 3.1
32
	 * 
33
	 */
33
	 */
34
	protected long fModificationStamp;
34
	protected long fModificationStamp;
35
	
35
	
(-)src/org/eclipse/gmf/runtime/diagram/ui/resources/editor/document/DiagramInputDocumentProvider.java (-7 / +7 lines)
Lines 96-102 Link Here
96
	/**
96
	/**
97
	 * Factory method for creating empty documents.
97
	 * Factory method for creating empty documents.
98
	 * @return the newly created document
98
	 * @return the newly created document
99
	 * @since 2.1
99
	 * 
100
	 */
100
	 */
101
	protected IDocument createEmptyDocument() {
101
	protected IDocument createEmptyDocument() {
102
		return new DiagramDocument();
102
		return new DiagramDocument();
Lines 144-150 Link Here
144
	 * @param encoding the character encoding used to read the editor input
144
	 * @param encoding the character encoding used to read the editor input
145
	 * @return <code>true</code> if the document content could be set, <code>false</code> otherwise
145
	 * @return <code>true</code> if the document content could be set, <code>false</code> otherwise
146
	 * @throws CoreException if the given editor input cannot be accessed
146
	 * @throws CoreException if the given editor input cannot be accessed
147
	 * @since 2.0
147
	 * 
148
	 */
148
	 */
149
	protected boolean setDocumentContent(IDocument document, IEditorInput editorInput) throws CoreException {
149
	protected boolean setDocumentContent(IDocument document, IEditorInput editorInput) throws CoreException {
150
		if (editorInput instanceof IDiagramEditorInput) {
150
		if (editorInput instanceof IDiagramEditorInput) {
Lines 168-174 Link Here
168
	 *
168
	 *
169
	 * @param exception the exception to be logged
169
	 * @param exception the exception to be logged
170
	 * @param message the message to be logged
170
	 * @param message the message to be logged
171
	 * @since 2.0
171
	 * 
172
	 */
172
	 */
173
	protected void handleCoreException(CoreException exception, String message) {
173
	protected void handleCoreException(CoreException exception, String message) {
174
174
Lines 186-192 Link Here
186
	 *
186
	 *
187
	 * @param input the input whose cache will be updated
187
	 * @param input the input whose cache will be updated
188
	 * @throws CoreException if the storage cannot be retrieved from the input
188
	 * @throws CoreException if the storage cannot be retrieved from the input
189
	 * @since 2.0
189
	 * 
190
	 */
190
	 */
191
	protected void updateCache(IDiagramEditorInput input) throws CoreException {
191
	protected void updateCache(IDiagramEditorInput input) throws CoreException {
192
		DiagramResourceInfo info= (DiagramResourceInfo) getElementInfo(input);
192
		DiagramResourceInfo info= (DiagramResourceInfo) getElementInfo(input);
Lines 203-209 Link Here
203
203
204
	/*
204
	/*
205
	 * @see IDocumentProviderExtension#isReadOnly(Object)
205
	 * @see IDocumentProviderExtension#isReadOnly(Object)
206
	 * @since 2.0
206
	 * 
207
	 */
207
	 */
208
	public boolean isReadOnly(Object element) {
208
	public boolean isReadOnly(Object element) {
209
		if (element instanceof IDiagramEditorInput) {
209
		if (element instanceof IDiagramEditorInput) {
Lines 224-230 Link Here
224
224
225
	/*
225
	/*
226
	 * @see IDocumentProviderExtension#isModifiable(Object)
226
	 * @see IDocumentProviderExtension#isModifiable(Object)
227
	 * @since 2.0
227
	 * 
228
	 */
228
	 */
229
	public boolean isModifiable(Object element) {
229
	public boolean isModifiable(Object element) {
230
		if (element instanceof IDiagramEditorInput) {
230
		if (element instanceof IDiagramEditorInput) {
Lines 245-251 Link Here
245
245
246
	/*
246
	/*
247
	 * @see AbstractDocumentProvider#doUpdateStateCache(Object)
247
	 * @see AbstractDocumentProvider#doUpdateStateCache(Object)
248
	 * @since 2.0
248
	 * 
249
	 */
249
	 */
250
	protected void doUpdateStateCache(Object element) throws CoreException {
250
	protected void doUpdateStateCache(Object element) throws CoreException {
251
		if (element instanceof IDiagramEditorInput) {
251
		if (element instanceof IDiagramEditorInput) {
(-)src/org/eclipse/gmf/runtime/diagram/ui/resources/editor/document/AbstractDocumentProvider.java (-27 / +27 lines)
Lines 150-156 Link Here
150
	 * Indicates whether this provider should behave as described in
150
	 * Indicates whether this provider should behave as described in
151
	 * use case 5 of http://bugs.eclipse.org/bugs/show_bug.cgi?id=10806.
151
	 * use case 5 of http://bugs.eclipse.org/bugs/show_bug.cgi?id=10806.
152
	 * Current value: <code>true</code> since 3.0
152
	 * Current value: <code>true</code> since 3.0
153
	 * @since 2.0
153
	 * 
154
	 */
154
	 */
155
	static final protected boolean PR10806_UC5_ENABLED= true;
155
	static final protected boolean PR10806_UC5_ENABLED= true;
156
156
Lines 160-178 Link Here
160
	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=14469
160
	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=14469
161
	 * Notes: This contradicts <code>PR10806_UC5_ENABLED</code>.
161
	 * Notes: This contradicts <code>PR10806_UC5_ENABLED</code>.
162
	 * Current value: <code>false</code> since 3.0
162
	 * Current value: <code>false</code> since 3.0
163
	 * @since 2.0
163
	 * 
164
	 */
164
	 */
165
	static final protected boolean PR14469_ENABLED= false;
165
	static final protected boolean PR14469_ENABLED= false;
166
166
167
	/**
167
	/**
168
	 * Constant for representing the OK status. This is considered a value object.
168
	 * Constant for representing the OK status. This is considered a value object.
169
	 * @since 2.0
169
	 * 
170
	 */
170
	 */
171
	static final public IStatus STATUS_OK= new Status(IStatus.OK, EditorPlugin.getPluginId(), IStatus.OK, EditorMessages.AbstractDocumentProvider_ok, null);
171
	static final public IStatus STATUS_OK= new Status(IStatus.OK, EditorPlugin.getPluginId(), IStatus.OK, EditorMessages.AbstractDocumentProvider_ok, null);
172
172
173
	/**
173
	/**
174
	 * Constant for representing the error status. This is considered a value object.
174
	 * Constant for representing the error status. This is considered a value object.
175
	 * @since 2.0
175
	 * 
176
	 */
176
	 */
177
	static final public IStatus STATUS_ERROR= new Status(IStatus.ERROR, EditorPlugin.getPluginId(), IStatus.INFO, EditorMessages.AbstractDocumentProvider_error, null);
177
	static final public IStatus STATUS_ERROR= new Status(IStatus.ERROR, EditorPlugin.getPluginId(), IStatus.INFO, EditorMessages.AbstractDocumentProvider_error, null);
178
178
Lines 235-241 Link Here
235
	 *
235
	 *
236
	 * @param monitor a progress monitor to track the operation
236
	 * @param monitor a progress monitor to track the operation
237
	 * @return the runnable context for this document provider
237
	 * @return the runnable context for this document provider
238
	 * @since 3.0
238
	 * 
239
	 */
239
	 */
240
	protected abstract IRunnableContext getOperationRunner(IProgressMonitor monitor);
240
	protected abstract IRunnableContext getOperationRunner(IProgressMonitor monitor);
241
241
Lines 246-252 Link Here
246
	 *
246
	 *
247
	 * @param element the element
247
	 * @param element the element
248
	 * @return the scheduling rule for <code>synchronize</code>
248
	 * @return the scheduling rule for <code>synchronize</code>
249
	 * @since 3.0
249
	 * 
250
	 */
250
	 */
251
	protected ISchedulingRule getSynchronizeRule(Object element) {
251
	protected ISchedulingRule getSynchronizeRule(Object element) {
252
		return null;
252
		return null;
Lines 259-265 Link Here
259
	 *
259
	 *
260
	 * @param element the element
260
	 * @param element the element
261
	 * @return the scheduling rule for <code>validateState</code>
261
	 * @return the scheduling rule for <code>validateState</code>
262
	 * @since 3.0
262
	 * 
263
	 */
263
	 */
264
	protected ISchedulingRule getValidateStateRule(Object element) {
264
	protected ISchedulingRule getValidateStateRule(Object element) {
265
		return null;
265
		return null;
Lines 272-278 Link Here
272
	 *
272
	 *
273
	 * @param element the element
273
	 * @param element the element
274
	 * @return the scheduling rule for <code>save</code>
274
	 * @return the scheduling rule for <code>save</code>
275
	 * @since 3.0
275
	 * 
276
	 */
276
	 */
277
	protected ISchedulingRule getSaveRule(Object element) {
277
	protected ISchedulingRule getSaveRule(Object element) {
278
		return null;
278
		return null;
Lines 285-291 Link Here
285
	 *
285
	 *
286
	 * @param element the element
286
	 * @param element the element
287
	 * @return the scheduling rule for <code>reset</code>
287
	 * @return the scheduling rule for <code>reset</code>
288
	 * @since 3.0
288
	 * 
289
	 */
289
	 */
290
	protected ISchedulingRule getResetRule(Object element) {
290
	protected ISchedulingRule getResetRule(Object element) {
291
		return null;
291
		return null;
Lines 403-409 Link Here
403
	 * This hook method is called when this provider starts managing documents for
403
	 * This hook method is called when this provider starts managing documents for
404
	 * elements. I.e. it is called when the first element gets connected to this provider.
404
	 * elements. I.e. it is called when the first element gets connected to this provider.
405
	 * Subclasses may extend.
405
	 * Subclasses may extend.
406
	 * @since 2.0
406
	 * 
407
	 */
407
	 */
408
	protected void connected() {
408
	protected void connected() {
409
		// for subclasses
409
		// for subclasses
Lines 435-441 Link Here
435
	 * This hook method is called when this provider stops managing documents for
435
	 * This hook method is called when this provider stops managing documents for
436
	 * element. I.e. it is called when the last element gets disconnected from this provider.
436
	 * element. I.e. it is called when the last element gets disconnected from this provider.
437
	 * Subclasses may extend.
437
	 * Subclasses may extend.
438
	 * @since 2.0
438
	 * 
439
	 */
439
	 */
440
	protected void disconnected() {
440
	protected void disconnected() {
441
		// for subclasses
441
		// for subclasses
Lines 483-489 Link Here
483
	 * @param element the element
483
	 * @param element the element
484
	 * @param monitor the progress monitor
484
	 * @param monitor the progress monitor
485
	 * @throws CoreException
485
	 * @throws CoreException
486
	 * @since 3.0
486
	 * 
487
	 */
487
	 */
488
	protected void doResetDocument(Object element, IProgressMonitor monitor) throws CoreException {
488
	protected void doResetDocument(Object element, IProgressMonitor monitor) throws CoreException {
489
		ElementInfo info= (ElementInfo) fElementInfoMap.get(element);
489
		ElementInfo info= (ElementInfo) fElementInfoMap.get(element);
Lines 519-525 Link Here
519
	 * @param operation the operation to be executes
519
	 * @param operation the operation to be executes
520
	 * @param monitor the progress monitor
520
	 * @param monitor the progress monitor
521
	 * @exception CoreException the operation's core exception
521
	 * @exception CoreException the operation's core exception
522
	 * @since 3.0
522
	 * 
523
	 */
523
	 */
524
	protected void executeOperation(DocumentProviderOperation operation, IProgressMonitor monitor) throws CoreException {
524
	protected void executeOperation(DocumentProviderOperation operation, IProgressMonitor monitor) throws CoreException {
525
		try {
525
		try {
Lines 731-737 Link Here
731
731
732
	/*
732
	/*
733
	 * @see IDocumentProvider#getModificationStamp(Object)
733
	 * @see IDocumentProvider#getModificationStamp(Object)
734
	 * @since 2.0
734
	 * 
735
	 */
735
	 */
736
	public long getModificationStamp(Object element) {
736
	public long getModificationStamp(Object element) {
737
		return 0;
737
		return 0;
Lines 739-745 Link Here
739
739
740
	/*
740
	/*
741
	 * @see IDocumentProvider#getSynchronizationStamp(Object)
741
	 * @see IDocumentProvider#getSynchronizationStamp(Object)
742
	 * @since 2.0
742
	 * 
743
	 */
743
	 */
744
	public long getSynchronizationStamp(Object element) {
744
	public long getSynchronizationStamp(Object element) {
745
		return 0;
745
		return 0;
Lines 747-753 Link Here
747
747
748
	/*
748
	/*
749
	 * @see IDocumentProvider#isDeleted(Object)
749
	 * @see IDocumentProvider#isDeleted(Object)
750
	 * @since 2.0
750
	 * 
751
	 */
751
	 */
752
	public boolean isDeleted(Object element) {
752
	public boolean isDeleted(Object element) {
753
		return false;
753
		return false;
Lines 755-761 Link Here
755
755
756
	/*
756
	/*
757
	 * @see IDocumentProviderExtension#isReadOnly(Object)
757
	 * @see IDocumentProviderExtension#isReadOnly(Object)
758
	 * @since 2.0
758
	 * 
759
	 */
759
	 */
760
	public boolean isReadOnly(Object element) {
760
	public boolean isReadOnly(Object element) {
761
		return true;
761
		return true;
Lines 763-769 Link Here
763
763
764
	/*
764
	/*
765
	 * @see IDocumentProviderExtension#isModifiable(Object)
765
	 * @see IDocumentProviderExtension#isModifiable(Object)
766
	 * @since 2.0
766
	 * 
767
	 */
767
	 */
768
	public boolean isModifiable(Object element) {
768
	public boolean isModifiable(Object element) {
769
		return false;
769
		return false;
Lines 775-781 Link Here
775
	 *
775
	 *
776
	 * @param element the element
776
	 * @param element the element
777
	 * @return whether <code>validateState</code> has been called for the given element
777
	 * @return whether <code>validateState</code> has been called for the given element
778
	 * @since 2.0
778
	 * 
779
	 */
779
	 */
780
	public boolean isStateValidated(Object element) {
780
	public boolean isStateValidated(Object element) {
781
		ElementInfo info= (ElementInfo) fElementInfoMap.get(element);
781
		ElementInfo info= (ElementInfo) fElementInfoMap.get(element);
Lines 791-797 Link Here
791
	 * @param element the element
791
	 * @param element the element
792
	 * @param computationContext the context in which validation happens
792
	 * @param computationContext the context in which validation happens
793
	 * @exception CoreException in case validation fails
793
	 * @exception CoreException in case validation fails
794
	 * @since 2.0
794
	 * 
795
	 */
795
	 */
796
	protected void doValidateState(Object  element, Object computationContext) throws CoreException {
796
	protected void doValidateState(Object  element, Object computationContext) throws CoreException {
797
		// empty block
797
		// empty block
Lines 799-805 Link Here
799
799
800
	/*
800
	/*
801
	 * @see IDocumentProviderExtension#validateState(Object, Object)
801
	 * @see IDocumentProviderExtension#validateState(Object, Object)
802
	 * @since 2.0
802
	 * 
803
	 */
803
	 */
804
	public void validateState(final Object element, final Object computationContext) throws CoreException {
804
	public void validateState(final Object element, final Object computationContext) throws CoreException {
805
		if (element == null)
805
		if (element == null)
Lines 833-839 Link Here
833
	 *
833
	 *
834
	 * @param element the element
834
	 * @param element the element
835
	 * @exception CoreException in case state cache updating fails
835
	 * @exception CoreException in case state cache updating fails
836
	 * @since 2.0
836
	 * 
837
	 */
837
	 */
838
	protected void doUpdateStateCache(Object element) throws CoreException {
838
	protected void doUpdateStateCache(Object element) throws CoreException {
839
		// for subclasses
839
		// for subclasses
Lines 846-852 Link Here
846
	 * @param element the element
846
	 * @param element the element
847
	 * @param wasReadOnly the previous read-only state
847
	 * @param wasReadOnly the previous read-only state
848
	 * @return <code>true</code> if the state of the given element must be invalidated
848
	 * @return <code>true</code> if the state of the given element must be invalidated
849
	 * @since 2.0
849
	 * 
850
	 */
850
	 */
851
	protected boolean invalidatesState(Object element, boolean wasReadOnly) {
851
	protected boolean invalidatesState(Object element, boolean wasReadOnly) {
852
		assert PR10806_UC5_ENABLED != PR14469_ENABLED;
852
		assert PR10806_UC5_ENABLED != PR14469_ENABLED;
Lines 892-898 Link Here
892
	 * @param element the element
892
	 * @param element the element
893
	 * @param isStateValidated
893
	 * @param isStateValidated
894
	 * @see IElementStateListenerExtension#elementStateValidationChanged(Object, boolean)
894
	 * @see IElementStateListenerExtension#elementStateValidationChanged(Object, boolean)
895
	 * @since 2.0
895
	 * 
896
	 */
896
	 */
897
	protected void fireElementStateValidationChanged(Object element, boolean isStateValidated) {
897
	protected void fireElementStateValidationChanged(Object element, boolean isStateValidated) {
898
		Iterator e= new ArrayList(fElementStateListeners).iterator();
898
		Iterator e= new ArrayList(fElementStateListeners).iterator();
Lines 911-917 Link Here
911
	 *
911
	 *
912
	 * @param element the element
912
	 * @param element the element
913
	 * @see IElementStateListenerExtension#elementStateChanging(Object)
913
	 * @see IElementStateListenerExtension#elementStateChanging(Object)
914
	 * @since 2.0
914
	 * 
915
	 */
915
	 */
916
	protected void fireElementStateChanging(Object element) {
916
	protected void fireElementStateChanging(Object element) {
917
		Iterator e= new ArrayList(fElementStateListeners).iterator();
917
		Iterator e= new ArrayList(fElementStateListeners).iterator();
Lines 930-936 Link Here
930
	 *
930
	 *
931
	 * @param element the element
931
	 * @param element the element
932
	 * @see IElementStateListenerExtension#elementStateChangeFailed(Object)
932
	 * @see IElementStateListenerExtension#elementStateChangeFailed(Object)
933
	 * @since 2.0
933
	 * 
934
	 */
934
	 */
935
	protected void fireElementStateChangeFailed(Object element) {
935
	protected void fireElementStateChangeFailed(Object element) {
936
		Iterator e= new ArrayList(fElementStateListeners).iterator();
936
		Iterator e= new ArrayList(fElementStateListeners).iterator();
Lines 963-969 Link Here
963
	 * @param element the element
963
	 * @param element the element
964
	 * @param monitor the progress monitor
964
	 * @param monitor the progress monitor
965
	 * @exception CoreException in the case that synchronization fails
965
	 * @exception CoreException in the case that synchronization fails
966
	 * @since 3.0
966
	 * 
967
	 */
967
	 */
968
	protected void doSynchronize(Object element, IProgressMonitor monitor) throws CoreException {
968
	protected void doSynchronize(Object element, IProgressMonitor monitor) throws CoreException {
969
		// for subclasses
969
		// for subclasses
(-)src/org/eclipse/gmf/runtime/diagram/ui/resources/editor/parts/DiagramDocumentEditor.java (-34 / +34 lines)
Lines 309-315 Link Here
309
	 * reimplement.
309
	 * reimplement.
310
	 *
310
	 *
311
	 * @param input the input of this editor.
311
	 * @param input the input of this editor.
312
	 * @since 3.0
312
	 * 
313
	 */
313
	 */
314
	protected void setDocumentProvider(IEditorInput input) {
314
	protected void setDocumentProvider(IEditorInput input) {
315
		IDocumentProvider provider = DocumentProviderRegistry.getDefault().getDocumentProvider(input, new IDocumentProviderSelector() {
315
		IDocumentProvider provider = DocumentProviderRegistry.getDefault().getDocumentProvider(input, new IDocumentProviderSelector() {
Lines 327-333 Link Here
327
	 * reimplement.
327
	 * reimplement.
328
	 *
328
	 *
329
	 * @param input the input of this editor.
329
	 * @param input the input of this editor.
330
	 * @since 3.0
330
	 * 
331
	 */
331
	 */
332
	protected IDocumentProvider getDocumentProvider(IEditorInput input) {
332
	protected IDocumentProvider getDocumentProvider(IEditorInput input) {
333
		IDocumentProvider provider = DocumentProviderRegistry.getDefault().getDocumentProvider(input, new IDocumentProviderSelector() {
333
		IDocumentProvider provider = DocumentProviderRegistry.getDefault().getDocumentProvider(input, new IDocumentProviderSelector() {
Lines 470-476 Link Here
470
	 * Disposes of the connection with the document provider. Subclasses
470
	 * Disposes of the connection with the document provider. Subclasses
471
	 * may extend.
471
	 * may extend.
472
	 *
472
	 *
473
	 * @since 3.0
473
	 * 
474
	 */
474
	 */
475
	protected void disposeDocumentProvider() {
475
	protected void disposeDocumentProvider() {
476
		IDocumentProvider provider= getDocumentProvider();
476
		IDocumentProvider provider= getDocumentProvider();
Lines 494-500 Link Here
494
	 * necessary to extend this method.
494
	 * necessary to extend this method.
495
	 *
495
	 *
496
	 * @return the progress monitor related to this editor
496
	 * @return the progress monitor related to this editor
497
	 * @since 2.1
497
	 * 
498
	 */
498
	 */
499
	protected IProgressMonitor getProgressMonitor() {
499
	protected IProgressMonitor getProgressMonitor() {
500
500
Lines 650-656 Link Here
650
	/**
650
	/**
651
	 * Enables/disables sanity checking.
651
	 * Enables/disables sanity checking.
652
	 * @param enable <code>true</code> if sanity checking should be enabled, <code>false</code> otherwise
652
	 * @param enable <code>true</code> if sanity checking should be enabled, <code>false</code> otherwise
653
	 * @since 2.0
653
	 * 
654
	 */
654
	 */
655
	protected void enableSanityChecking(boolean enable) {
655
	protected void enableSanityChecking(boolean enable) {
656
		synchronized (this) {
656
		synchronized (this) {
Lines 661-667 Link Here
661
	/**
661
	/**
662
	 * Checks the state of the given editor input if sanity checking is enabled.
662
	 * Checks the state of the given editor input if sanity checking is enabled.
663
	 * @param input the editor input whose state is to be checked
663
	 * @param input the editor input whose state is to be checked
664
	 * @since 2.0
664
	 * 
665
	 */
665
	 */
666
	protected void safelySanityCheckState(IEditorInput input) {
666
	protected void safelySanityCheckState(IEditorInput input) {
667
		boolean enabled= false;
667
		boolean enabled= false;
Lines 677-683 Link Here
677
	/**
677
	/**
678
	 * Checks the state of the given editor input.
678
	 * Checks the state of the given editor input.
679
	 * @param input the editor input whose state is to be checked
679
	 * @param input the editor input whose state is to be checked
680
	 * @since 2.0
680
	 * 
681
	 */
681
	 */
682
	protected void sanityCheckState(IEditorInput input) {
682
	protected void sanityCheckState(IEditorInput input) {
683
683
Lines 697-703 Link Here
697
	/**
697
	/**
698
	 * Enables/disables state validation.
698
	 * Enables/disables state validation.
699
	 * @param enable <code>true</code> if state validation should be enabled, <code>false</code> otherwise
699
	 * @param enable <code>true</code> if state validation should be enabled, <code>false</code> otherwise
700
	 * @since 2.1
700
	 * 
701
	 */
701
	 */
702
	protected void enableStateValidation(boolean enable) {
702
	protected void enableStateValidation(boolean enable) {
703
		synchronized (this) {
703
		synchronized (this) {
Lines 711-717 Link Here
711
	 * the input can persistently be changed.
711
	 * the input can persistently be changed.
712
	 *
712
	 *
713
	 * @param input the input to be validated
713
	 * @param input the input to be validated
714
	 * @since 2.0
714
	 * 
715
	 */
715
	 */
716
	protected void validateState(IEditorInput input) {
716
	protected void validateState(IEditorInput input) {
717
717
Lines 782-788 Link Here
782
	 * Updates the state of the given editor input such as read-only flag.
782
	 * Updates the state of the given editor input such as read-only flag.
783
	 *
783
	 *
784
	 * @param input the input to be validated
784
	 * @param input the input to be validated
785
	 * @since 2.0
785
	 * 
786
	 */
786
	 */
787
	protected void updateState(IEditorInput input) {
787
	protected void updateState(IEditorInput input) {
788
		IDocumentProvider provider= getDocumentProvider();
788
		IDocumentProvider provider= getDocumentProvider();
Lines 810-816 Link Here
810
	 *
810
	 *
811
	 * @param overwrite indicates whether or not overwriting is allowed
811
	 * @param overwrite indicates whether or not overwriting is allowed
812
	 * @param progressMonitor the monitor in which to run the operation
812
	 * @param progressMonitor the monitor in which to run the operation
813
	 * @since 3.0
813
	 * 
814
	 */
814
	 */
815
	protected void performSave(boolean overwrite, IProgressMonitor progressMonitor) {
815
	protected void performSave(boolean overwrite, IProgressMonitor progressMonitor) {
816
816
Lines 836-842 Link Here
836
836
837
	/**
837
	/**
838
	 * The number of re-entrances into error correction code while saving.
838
	 * The number of re-entrances into error correction code while saving.
839
	 * @since 2.0
839
	 * 
840
	 */
840
	 */
841
	private int fErrorCorrectionOnSave;
841
	private int fErrorCorrectionOnSave;
842
842
Lines 904-910 Link Here
904
	 * @param ex the core exception
904
	 * @param ex the core exception
905
	 * @return <code>true</code> iff the given core exception is exactly the
905
	 * @return <code>true</code> iff the given core exception is exactly the
906
	 *			exception which is thrown for a non-synchronized element
906
	 *			exception which is thrown for a non-synchronized element
907
	 * @since 3.1
907
	 * 
908
	 */
908
	 */
909
	private boolean isNotSynchronizedException(CoreException ex) {
909
	private boolean isNotSynchronizedException(CoreException ex) {
910
		if (ex == null)
910
		if (ex == null)
Lines 946-952 Link Here
946
	 * <p>
946
	 * <p>
947
	 * Clients may extended this method.
947
	 * Clients may extended this method.
948
	 *
948
	 *
949
	 * @since 3.0
949
	 * 
950
	 */
950
	 */
951
	protected void handleElementContentReplaced() {
951
	protected void handleElementContentReplaced() {
952
		initializeGraphicalViewerContents();
952
		initializeGraphicalViewerContents();
Lines 958-964 Link Here
958
	 * <p>
958
	 * <p>
959
	 * Clients may extended this method.
959
	 * Clients may extended this method.
960
	 *
960
	 *
961
	 * @since 3.0
961
	 * 
962
	 */
962
	 */
963
	protected void handleElementContentAboutToBeReplaced() {
963
	protected void handleElementContentAboutToBeReplaced() {
964
		releaseInput();
964
		releaseInput();
Lines 967-973 Link Here
967
	/**
967
	/**
968
	 * Returns the status line manager of this editor.
968
	 * Returns the status line manager of this editor.
969
	 * @return the status line manager of this editor
969
	 * @return the status line manager of this editor
970
	 * @since 2.0
970
	 * 
971
	 */
971
	 */
972
	private IStatusLineManager getStatusLineManager() {
972
	private IStatusLineManager getStatusLineManager() {
973
973
Lines 984-990 Link Here
984
	/**
984
	/**
985
	 * Hook which gets called when the editor has been saved.
985
	 * Hook which gets called when the editor has been saved.
986
	 * Subclasses may extend.
986
	 * Subclasses may extend.
987
	 * @since 2.1
987
	 * 
988
	 */
988
	 */
989
	protected void editorSaved() {
989
	protected void editorSaved() {
990
		// nothing to do
990
		// nothing to do
Lines 1015-1021 Link Here
1015
1015
1016
	/**
1016
	/**
1017
	 * The editor's activation listener.
1017
	 * The editor's activation listener.
1018
	 * @since 2.0
1018
	 * 
1019
	 */
1019
	 */
1020
	private ActivationListener fActivationListener;
1020
	private ActivationListener fActivationListener;
1021
//	private final String fReadOnlyLabel= EditorMessages.Editor_statusline_state_readonly_label;
1021
//	private final String fReadOnlyLabel= EditorMessages.Editor_statusline_state_readonly_label;
Lines 1028-1049 Link Here
1028
	private IDocumentProvider fExplicitDocumentProvider;
1028
	private IDocumentProvider fExplicitDocumentProvider;
1029
	/**
1029
	/**
1030
	 * Indicates whether sanity checking in enabled.
1030
	 * Indicates whether sanity checking in enabled.
1031
	 * @since 2.0
1031
	 * 
1032
	 */
1032
	 */
1033
	private boolean fIsSanityCheckEnabled= true;
1033
	private boolean fIsSanityCheckEnabled= true;
1034
	/**
1034
	/**
1035
	 * Indicates whether state validation is enabled.
1035
	 * Indicates whether state validation is enabled.
1036
	 * @since 2.1
1036
	 * 
1037
	 */
1037
	 */
1038
	private boolean fIsStateValidationEnabled= true;
1038
	private boolean fIsStateValidationEnabled= true;
1039
	/**
1039
	/**
1040
	 * Cached modification stamp of the editor's input.
1040
	 * Cached modification stamp of the editor's input.
1041
	 * @since 2.0
1041
	 * 
1042
	 */
1042
	 */
1043
	private long fModificationStamp= IResource.NULL_STAMP;
1043
	private long fModificationStamp= IResource.NULL_STAMP;
1044
	/**
1044
	/**
1045
	 * Internal part and shell activation listener for triggering state validation.
1045
	 * Internal part and shell activation listener for triggering state validation.
1046
	 * @since 2.0
1046
	 * 
1047
	 */
1047
	 */
1048
	class ActivationListener implements IPartListener, IWindowListener {
1048
	class ActivationListener implements IPartListener, IWindowListener {
1049
1049
Lines 1053-1059 Link Here
1053
		private boolean fIsHandlingActivation= false;
1053
		private boolean fIsHandlingActivation= false;
1054
		/**
1054
		/**
1055
		 * The part service.
1055
		 * The part service.
1056
		 * @since 3.1
1056
		 * 
1057
		 */
1057
		 */
1058
		private IPartService fPartService;
1058
		private IPartService fPartService;
1059
1059
Lines 1061-1067 Link Here
1061
		 * Creates this activation listener.
1061
		 * Creates this activation listener.
1062
		 *
1062
		 *
1063
		 * @param partService the part service on which to add the part listener
1063
		 * @param partService the part service on which to add the part listener
1064
		 * @since 3.1
1064
		 * 
1065
		 */
1065
		 */
1066
		public ActivationListener(IPartService partService) {
1066
		public ActivationListener(IPartService partService) {
1067
			fPartService= partService;
1067
			fPartService= partService;
Lines 1070-1076 Link Here
1070
		/**
1070
		/**
1071
		 * Disposes this activation listener.
1071
		 * Disposes this activation listener.
1072
		 *
1072
		 *
1073
		 * @since 3.1
1073
		 * 
1074
		 */
1074
		 */
1075
		public void dispose() {
1075
		public void dispose() {
1076
			fPartService= null;
1076
			fPartService= null;
Lines 1141-1147 Link Here
1141
1141
1142
		/*
1142
		/*
1143
		 * @see org.eclipse.ui.IWindowListener#windowActivated(org.eclipse.ui.IWorkbenchWindow)
1143
		 * @see org.eclipse.ui.IWindowListener#windowActivated(org.eclipse.ui.IWorkbenchWindow)
1144
		 * @since 3.1
1144
		 * 
1145
		 */
1145
		 */
1146
		public void windowActivated(IWorkbenchWindow window) {
1146
		public void windowActivated(IWorkbenchWindow window) {
1147
			if (window == getEditorSite().getWorkbenchWindow()) {
1147
			if (window == getEditorSite().getWorkbenchWindow()) {
Lines 1160-1166 Link Here
1160
1160
1161
		/*
1161
		/*
1162
		 * @see org.eclipse.ui.IWindowListener#windowDeactivated(org.eclipse.ui.IWorkbenchWindow)
1162
		 * @see org.eclipse.ui.IWindowListener#windowDeactivated(org.eclipse.ui.IWorkbenchWindow)
1163
		 * @since 3.1
1163
		 * 
1164
		 */
1164
		 */
1165
		public void windowDeactivated(IWorkbenchWindow window) {
1165
		public void windowDeactivated(IWorkbenchWindow window) {
1166
			// nothing to do
1166
			// nothing to do
Lines 1168-1174 Link Here
1168
1168
1169
		/*
1169
		/*
1170
		 * @see org.eclipse.ui.IWindowListener#windowClosed(org.eclipse.ui.IWorkbenchWindow)
1170
		 * @see org.eclipse.ui.IWindowListener#windowClosed(org.eclipse.ui.IWorkbenchWindow)
1171
		 * @since 3.1
1171
		 * 
1172
		 */
1172
		 */
1173
		public void windowClosed(IWorkbenchWindow window) {
1173
		public void windowClosed(IWorkbenchWindow window) {
1174
			// nothing to do
1174
			// nothing to do
Lines 1176-1182 Link Here
1176
1176
1177
		/*
1177
		/*
1178
		 * @see org.eclipse.ui.IWindowListener#windowOpened(org.eclipse.ui.IWorkbenchWindow)
1178
		 * @see org.eclipse.ui.IWindowListener#windowOpened(org.eclipse.ui.IWorkbenchWindow)
1179
		 * @since 3.1
1179
		 * 
1180
		 */
1180
		 */
1181
		public void windowOpened(IWorkbenchWindow window) {
1181
		public void windowOpened(IWorkbenchWindow window) {
1182
			// nothing to do
1182
			// nothing to do
Lines 1190-1196 Link Here
1190
1190
1191
		/**
1191
		/**
1192
		 * The display used for posting runnable into the UI thread.
1192
		 * The display used for posting runnable into the UI thread.
1193
		 * @since 3.0
1193
		 * 
1194
		 */
1194
		 */
1195
		private Display fDisplay;
1195
		private Display fDisplay;
1196
1196
Lines 1363-1369 Link Here
1363
		 * @param movedElement the moved element
1363
		 * @param movedElement the moved element
1364
		 * @return whether this editor can handle the move of the original element
1364
		 * @return whether this editor can handle the move of the original element
1365
		 *         so that it ends up being the moved element
1365
		 *         so that it ends up being the moved element
1366
		 * @since 2.0
1366
		 * 
1367
		 */
1367
		 */
1368
		protected boolean canHandleMove(IEditorInput originalElement, IEditorInput movedElement) {
1368
		protected boolean canHandleMove(IEditorInput originalElement, IEditorInput movedElement) {
1369
			return true;
1369
			return true;
Lines 1371-1377 Link Here
1371
1371
1372
		/*
1372
		/*
1373
		 * @see IElementStateListenerExtension#elementStateChanging(Object)
1373
		 * @see IElementStateListenerExtension#elementStateChanging(Object)
1374
		 * @since 2.0
1374
		 * 
1375
		 */
1375
		 */
1376
		public void elementStateChanging(Object element) {
1376
		public void elementStateChanging(Object element) {
1377
			if (element != null && element.equals(getEditorInput()))
1377
			if (element != null && element.equals(getEditorInput()))
Lines 1380-1386 Link Here
1380
1380
1381
		/*
1381
		/*
1382
		 * @see IElementStateListenerExtension#elementStateChangeFailed(Object)
1382
		 * @see IElementStateListenerExtension#elementStateChangeFailed(Object)
1383
		 * @since 2.0
1383
		 * 
1384
		 */
1384
		 */
1385
		public void elementStateChangeFailed(Object element) {
1385
		public void elementStateChangeFailed(Object element) {
1386
			if (element != null && element.equals(getEditorInput()))
1386
			if (element != null && element.equals(getEditorInput()))
Lines 1396-1402 Link Here
1396
		 *
1396
		 *
1397
		 * @param runnable runnable to be executed
1397
		 * @param runnable runnable to be executed
1398
		 * @param postAsync <code>true</code> if the runnable must be posted asynchronous, <code>false</code> otherwise
1398
		 * @param postAsync <code>true</code> if the runnable must be posted asynchronous, <code>false</code> otherwise
1399
		 * @since 3.0
1399
		 * 
1400
		 */
1400
		 */
1401
		private void execute(Runnable runnable, boolean postAsync) {
1401
		private void execute(Runnable runnable, boolean postAsync) {
1402
			if (postAsync || Display.getCurrent() == null) {
1402
			if (postAsync || Display.getCurrent() == null) {
(-)src/org/eclipse/gmf/runtime/diagram/ui/resources/editor/ide/document/StorageDocumentProvider.java (-9 / +9 lines)
Lines 59-65 Link Here
59
	/**
59
	/**
60
	 * Creates a new document provider.
60
	 * Creates a new document provider.
61
	 *
61
	 *
62
	 * @since 2.0
62
	 * 
63
	 */
63
	 */
64
	public StorageDocumentProvider() {
64
	public StorageDocumentProvider() {
65
		super();
65
		super();
Lines 97-103 Link Here
97
	/**
97
	/**
98
	 * Factory method for creating empty documents.
98
	 * Factory method for creating empty documents.
99
	 * @return the newly created document
99
	 * @return the newly created document
100
	 * @since 2.1
100
	 * 
101
	 */
101
	 */
102
	protected abstract IDocument createEmptyDocument();
102
	protected abstract IDocument createEmptyDocument();
103
103
Lines 144-150 Link Here
144
	 * @param encoding the character encoding used to read the editor input
144
	 * @param encoding the character encoding used to read the editor input
145
	 * @return <code>true</code> if the document content could be set, <code>false</code> otherwise
145
	 * @return <code>true</code> if the document content could be set, <code>false</code> otherwise
146
	 * @throws CoreException if the given editor input cannot be accessed
146
	 * @throws CoreException if the given editor input cannot be accessed
147
	 * @since 2.0
147
	 * 
148
	 */
148
	 */
149
	protected boolean setDocumentContent(IDocument document, IEditorInput editorInput) throws CoreException {
149
	protected boolean setDocumentContent(IDocument document, IEditorInput editorInput) throws CoreException {
150
		if (editorInput instanceof IStorageEditorInput) {
150
		if (editorInput instanceof IStorageEditorInput) {
Lines 162-168 Link Here
162
	 * @param contentStream the stream which delivers the document content
162
	 * @param contentStream the stream which delivers the document content
163
	 * @param encoding the character encoding for reading the given stream
163
	 * @param encoding the character encoding for reading the given stream
164
	 * @throws CoreException if the given stream can not be read
164
	 * @throws CoreException if the given stream can not be read
165
	 * @since 2.0
165
	 * 
166
	 */
166
	 */
167
	protected abstract void setDocumentContentFromStorage(IDocument document, IStorage storage) throws CoreException;
167
	protected abstract void setDocumentContentFromStorage(IDocument document, IStorage storage) throws CoreException;
168
168
Lines 179-185 Link Here
179
	 *
179
	 *
180
	 * @param exception the exception to be logged
180
	 * @param exception the exception to be logged
181
	 * @param message the message to be logged
181
	 * @param message the message to be logged
182
	 * @since 2.0
182
	 * 
183
	 */
183
	 */
184
	protected void handleCoreException(CoreException exception, String message) {
184
	protected void handleCoreException(CoreException exception, String message) {
185
185
Lines 197-203 Link Here
197
	 *
197
	 *
198
	 * @param input the input whose cache will be updated
198
	 * @param input the input whose cache will be updated
199
	 * @throws CoreException if the storage cannot be retrieved from the input
199
	 * @throws CoreException if the storage cannot be retrieved from the input
200
	 * @since 2.0
200
	 * 
201
	 */
201
	 */
202
	protected void updateCache(IStorageEditorInput input) throws CoreException {
202
	protected void updateCache(IStorageEditorInput input) throws CoreException {
203
		StorageInfo info= (StorageInfo) getElementInfo(input);
203
		StorageInfo info= (StorageInfo) getElementInfo(input);
Lines 218-224 Link Here
218
218
219
	/*
219
	/*
220
	 * @see IDocumentProvider#isReadOnly(Object)
220
	 * @see IDocumentProvider#isReadOnly(Object)
221
	 * @since 2.0
221
	 * 
222
	 */
222
	 */
223
	public boolean isReadOnly(Object element) {
223
	public boolean isReadOnly(Object element) {
224
		if (element instanceof IStorageEditorInput) {
224
		if (element instanceof IStorageEditorInput) {
Lines 239-245 Link Here
239
239
240
	/*
240
	/*
241
	 * @see IDocumentProvider#isModifiable(Object)
241
	 * @see IDocumentProvider#isModifiable(Object)
242
	 * @since 2.0
242
	 * 
243
	 */
243
	 */
244
	public boolean isModifiable(Object element) {
244
	public boolean isModifiable(Object element) {
245
		if (element instanceof IStorageEditorInput) {
245
		if (element instanceof IStorageEditorInput) {
Lines 260-266 Link Here
260
260
261
	/*
261
	/*
262
	 * @see AbstractDocumentProvider#doUpdateStateCache(Object)
262
	 * @see AbstractDocumentProvider#doUpdateStateCache(Object)
263
	 * @since 2.0
263
	 * 
264
	 */
264
	 */
265
	protected void doUpdateStateCache(Object element) throws CoreException {
265
	protected void doUpdateStateCache(Object element) throws CoreException {
266
		if (element instanceof IStorageEditorInput) {
266
		if (element instanceof IStorageEditorInput) {
(-)src/org/eclipse/gmf/runtime/diagram/ui/resources/editor/ide/document/WorkspaceOperationRunner.java (-1 / +1 lines)
Lines 26-32 Link Here
26
26
27
27
28
/**
28
/**
29
 * @since 3.0
29
 * 
30
 */
30
 */
31
public class WorkspaceOperationRunner implements IRunnableContext {
31
public class WorkspaceOperationRunner implements IRunnableContext {
32
32
(-)src/org/eclipse/gmf/runtime/diagram/ui/resources/editor/ide/document/FileDocumentProvider.java (-6 / +6 lines)
Lines 66-72 Link Here
66
	 * that a element change failed message is sent out to the element state listeners
66
	 * that a element change failed message is sent out to the element state listeners
67
	 * in case an exception occurred.
67
	 * in case an exception occurred.
68
	 *
68
	 *
69
	 * @since 2.0
69
	 * 
70
	 */
70
	 */
71
	protected class SafeChange implements Runnable {
71
	protected class SafeChange implements Runnable {
72
72
Lines 122-128 Link Here
122
		/**
122
		/**
123
		 * A flag indicating whether this synchronizer is installed or not.
123
		 * A flag indicating whether this synchronizer is installed or not.
124
		 *
124
		 *
125
		 * @since 2.1
125
		 * 
126
		 */
126
		 */
127
		protected boolean fIsInstalled= false;
127
		protected boolean fIsInstalled= false;
128
128
Lines 398-404 Link Here
398
	 * @param contentStream the stream which delivers the document content
398
	 * @param contentStream the stream which delivers the document content
399
	 * @param encoding the character encoding for reading the given stream
399
	 * @param encoding the character encoding for reading the given stream
400
	 * @throws CoreException if the given stream can not be read
400
	 * @throws CoreException if the given stream can not be read
401
	 * @since 2.0
401
	 * 
402
	 */
402
	 */
403
	protected abstract void saveDocumentToFile(IDocument document, IFile file, boolean overwrite, IProgressMonitor monitor) throws CoreException;
403
	protected abstract void saveDocumentToFile(IDocument document, IFile file, boolean overwrite, IProgressMonitor monitor) throws CoreException;
404
404
Lines 618-624 Link Here
618
	 * @param contentStream the stream which delivers the document content
618
	 * @param contentStream the stream which delivers the document content
619
	 * @param encoding the character encoding for reading the given stream
619
	 * @param encoding the character encoding for reading the given stream
620
	 * @throws CoreException if the given stream can not be read
620
	 * @throws CoreException if the given stream can not be read
621
	 * @since 2.0
621
	 * 
622
	 */
622
	 */
623
	protected void setDocumentContent(IDocument document, Object content) throws CoreException {
623
	protected void setDocumentContent(IDocument document, Object content) throws CoreException {
624
		document.setContent(content);
624
		document.setContent(content);
Lines 703-709 Link Here
703
	 *
703
	 *
704
	 * @param file
704
	 * @param file
705
	 * @throws CoreException if the refresh fails
705
	 * @throws CoreException if the refresh fails
706
	 * @since 2.1
706
	 * 
707
	 */
707
	 */
708
	protected void refreshFile(IFile file) throws CoreException {
708
	protected void refreshFile(IFile file) throws CoreException {
709
		refreshFile(file, getProgressMonitor());
709
		refreshFile(file, getProgressMonitor());
Lines 715-721 Link Here
715
	 * @param file the file to be refreshed
715
	 * @param file the file to be refreshed
716
	 * @param monitor the progress monitor
716
	 * @param monitor the progress monitor
717
	 * @throws  org.eclipse.core.runtime.CoreException if the refresh fails
717
	 * @throws  org.eclipse.core.runtime.CoreException if the refresh fails
718
	 * @since 3.0
718
	 * 
719
	 */
719
	 */
720
	protected void refreshFile(IFile file, IProgressMonitor monitor) throws CoreException {
720
	protected void refreshFile(IFile file, IProgressMonitor monitor) throws CoreException {
721
		try {
721
		try {

Return to bug 148078