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 109468 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/wst/xsd/ui/internal/XSDActionBarContributor.java (-1 / +1 lines)
Lines 44-50 Link Here
44
public class XSDActionBarContributor extends MultiPageEditorActionBarContributor
44
public class XSDActionBarContributor extends MultiPageEditorActionBarContributor
45
{
45
{
46
  protected XSDEditor xsdEditor;
46
  protected XSDEditor xsdEditor;
47
  protected XSDTextEditor textEditor;
47
  protected ITextEditor textEditor;
48
  protected IEditorActionBarContributor sourceViewerActionContributor = null;
48
  protected IEditorActionBarContributor sourceViewerActionContributor = null;
49
  
49
  
50
  protected ReloadDependenciesAction reloadDependenciesAction;
50
  protected ReloadDependenciesAction reloadDependenciesAction;
(-)src/org/eclipse/wst/xsd/ui/internal/XSDMultiPageEditorPart.java (-2 / +8 lines)
Lines 50-58 Link Here
50
import org.eclipse.wst.sse.ui.internal.StructuredTextEditor;
50
import org.eclipse.wst.sse.ui.internal.StructuredTextEditor;
51
import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISourceEditingTextTools;
51
import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISourceEditingTextTools;
52
import org.eclipse.wst.xml.core.internal.provisional.IXMLPreferenceNames;
52
import org.eclipse.wst.xml.core.internal.provisional.IXMLPreferenceNames;
53
import org.eclipse.wst.xml.core.internal.provisional.contenttype.ContentTypeIdForXML;
53
import org.eclipse.wst.xml.ui.internal.Logger;
54
import org.eclipse.wst.xml.ui.internal.Logger;
54
import org.eclipse.wst.xml.ui.internal.provisional.IDOMSourceEditingTextTools;
55
import org.eclipse.wst.xml.ui.internal.provisional.IDOMSourceEditingTextTools;
55
import org.eclipse.wst.xml.ui.internal.provisional.StructuredTextEditorXML;
56
import org.eclipse.wst.xml.ui.internal.tabletree.XMLEditorMessages;
56
import org.eclipse.wst.xml.ui.internal.tabletree.XMLEditorMessages;
57
import org.w3c.dom.Document;
57
import org.w3c.dom.Document;
58
58
Lines 213-218 Link Here
213
					IEditorActionBarContributor multiContributor = XSDMultiPageEditorPart.this.getEditorSite().getActionBarContributor();
213
					IEditorActionBarContributor multiContributor = XSDMultiPageEditorPart.this.getEditorSite().getActionBarContributor();
214
					return contributor;
214
					return contributor;
215
				}
215
				}
216
				
217
				public String getId() {
218
					// sets this id so nested editor is considered xml source
219
					// page
220
					return ContentTypeIdForXML.ContentTypeID_XML + ".source"; //$NON-NLS-1$;
221
				}
216
			};
222
			};
217
		}
223
		}
218
    else {
224
    else {
Lines 243-249 Link Here
243
   * @return StructuredTextEditor
249
   * @return StructuredTextEditor
244
   */
250
   */
245
  protected StructuredTextEditor createTextEditor() {
251
  protected StructuredTextEditor createTextEditor() {
246
    return new StructuredTextEditorXML();
252
    return new StructuredTextEditor();
247
  }
253
  }
248
254
249
  public void dispose()
255
  public void dispose()
(-)src/org/eclipse/wst/xsd/ui/internal/XSDTextEditor.java (-54 / +2 lines)
Lines 17-24 Link Here
17
import org.eclipse.core.resources.IFile;
17
import org.eclipse.core.resources.IFile;
18
import org.eclipse.core.runtime.Platform;
18
import org.eclipse.core.runtime.Platform;
19
import org.eclipse.jface.action.IMenuManager;
19
import org.eclipse.jface.action.IMenuManager;
20
import org.eclipse.jface.text.source.ISourceViewer;
21
import org.eclipse.jface.text.source.IVerticalRuler;
22
import org.eclipse.jface.viewers.ISelectionChangedListener;
20
import org.eclipse.jface.viewers.ISelectionChangedListener;
23
import org.eclipse.jface.viewers.SelectionChangedEvent;
21
import org.eclipse.jface.viewers.SelectionChangedEvent;
24
import org.eclipse.jface.viewers.StructuredSelection;
22
import org.eclipse.jface.viewers.StructuredSelection;
Lines 26-45 Link Here
26
import org.eclipse.swt.events.KeyAdapter;
24
import org.eclipse.swt.events.KeyAdapter;
27
import org.eclipse.swt.events.KeyEvent;
25
import org.eclipse.swt.events.KeyEvent;
28
import org.eclipse.swt.widgets.Composite;
26
import org.eclipse.swt.widgets.Composite;
29
import org.eclipse.ui.IEditorInput;
30
import org.eclipse.ui.actions.ActionContext;
27
import org.eclipse.ui.actions.ActionContext;
31
import org.eclipse.ui.actions.ActionGroup;
28
import org.eclipse.ui.actions.ActionGroup;
32
import org.eclipse.ui.texteditor.ITextEditor;
29
import org.eclipse.ui.texteditor.ITextEditor;
33
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
30
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
34
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
31
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
35
import org.eclipse.ui.views.properties.IPropertySheetPage;
32
import org.eclipse.ui.views.properties.IPropertySheetPage;
36
import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
33
import org.eclipse.wst.sse.ui.internal.StructuredTextEditor;
37
import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
34
import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
38
import org.eclipse.wst.sse.ui.internal.openon.OpenOnAction;
35
import org.eclipse.wst.sse.ui.internal.openon.OpenOnAction;
39
import org.eclipse.wst.sse.ui.internal.view.events.INodeSelectionListener;
36
import org.eclipse.wst.sse.ui.internal.view.events.INodeSelectionListener;
40
import org.eclipse.wst.sse.ui.internal.view.events.NodeSelectionChangedEvent;
37
import org.eclipse.wst.sse.ui.internal.view.events.NodeSelectionChangedEvent;
41
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
38
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
42
import org.eclipse.wst.xml.ui.internal.provisional.StructuredTextEditorXML;
43
import org.eclipse.wst.xsd.ui.internal.properties.section.XSDTabbedPropertySheetPage;
39
import org.eclipse.wst.xsd.ui.internal.properties.section.XSDTabbedPropertySheetPage;
44
import org.eclipse.wst.xsd.ui.internal.provider.CategoryAdapter;
40
import org.eclipse.wst.xsd.ui.internal.provider.CategoryAdapter;
45
import org.eclipse.wst.xsd.ui.internal.provider.XSDAdapterFactoryLabelProvider;
41
import org.eclipse.wst.xsd.ui.internal.provider.XSDAdapterFactoryLabelProvider;
Lines 54-60 Link Here
54
import org.w3c.dom.Node;
50
import org.w3c.dom.Node;
55
51
56
52
57
public class XSDTextEditor extends StructuredTextEditorXML implements INodeSelectionListener, ISelectionChangedListener
53
public class XSDTextEditor extends StructuredTextEditor implements INodeSelectionListener, ISelectionChangedListener
58
{
54
{
59
  protected XSDSelectionManager xsdSelectionManager;
55
  protected XSDSelectionManager xsdSelectionManager;
60
  protected XSDModelAdapterFactoryImpl xsdModelAdapterFactory;
56
  protected XSDModelAdapterFactoryImpl xsdModelAdapterFactory;
Lines 224-238 Link Here
224
    }
220
    }
225
  }
221
  }
226
222
227
  
228
  /*
229
   * @see ITextEditor#doRevertToSaved()
230
   */
231
  public void doRevertToSaved()
232
  {
233
    super.doRevertToSaved();
234
  }
235
236
  /*
223
  /*
237
   * @see StructuredTextEditor#update()
224
   * @see StructuredTextEditor#update()
238
   */
225
   */
Lines 263-299 Link Here
263
    });
250
    });
264
  }
251
  }
265
252
266
 // private static Color dividerColor;
267
268
	protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler verticalRuler, int styles) {
269
270
		fAnnotationAccess= createAnnotationAccess();
271
		fOverviewRuler= createOverviewRuler(getSharedColors());
272
273
		StructuredTextViewer sourceViewer = createStructedTextViewer(parent, verticalRuler, styles);
274
		initSourceViewer(sourceViewer);
275
276
    // end of super createSourceViewer
277
		
278
    //StructuredAnnotationAccess annotationAccess = new StructuredAnnotationAccess();
279
	 // DefaultMarkerAnnotationAccess annotationAccess = new DefaultMarkerAnnotationAccess();
280
		
281
	//  ISharedTextColors sharedColors = getTextColorsCache();
282
////  fOverviewRuler = new OverviewRuler(annotationAccess, OVERVIEW_RULER_WIDTH, sharedColors);
283
	//  fOverviewRuler = new OverviewRuler(createAnnotationAccess(), 12, sharedColors);
284
	  
285
//	  fOverviewRuler.addHeaderAnnotationType(StructuredAnnotationType.ERROR);
286
//	  fOverviewRuler.addHeaderAnnotationType(StructuredAnnotationType.WARNING);
287
	  
288
	 // fSourceViewerDecorationSupport = new SourceViewerDecorationSupport(sourceViewer, fOverviewRuler, annotationAccess, sharedColors);
289
    //configureSourceViewerDecorationSupport(fSourceViewerDecorationSupport);    
290
291
// The following method was removed
292
//    sourceViewer.setEditor(this);
293
294
		return sourceViewer;
295
	}
296
297
  protected IFile file;
253
  protected IFile file;
298
254
299
255
Lines 310-323 Link Here
310
  {
266
  {
311
    return (XSDEditor)getEditorPart();
267
    return (XSDEditor)getEditorPart();
312
  }
268
  }
313
 
314
  /**
315
   * @see org.eclipse.ui.texteditor.AbstractTextEditor#safelySanityCheckState(IEditorInput)
316
   */
317
	public void safelySanityCheckState(IEditorInput input)
318
  {
319
    super.safelySanityCheckState(input);
320
  }
321
269
322
  protected class WrappedOpenFileAction extends OpenOnAction
270
  protected class WrappedOpenFileAction extends OpenOnAction
323
  {
271
  {
(-)src/org/eclipse/wst/xsd/ui/internal/graph/BaseGraphicalViewer.java (-1 / +1 lines)
Lines 107-113 Link Here
107
    editDomain.addViewer(this);
107
    editDomain.addViewer(this);
108
  
108
  
109
    //jvh - gef port - moved this from below so it is available when adding context menu below
109
    //jvh - gef port - moved this from below so it is available when adding context menu below
110
    menuProvider = new GraphContextMenuProvider(this, menuSelectionProvider, editor.getXSDTextEditor());
110
    menuProvider = new GraphContextMenuProvider(this, menuSelectionProvider);
111
    setContextMenu(menuProvider);
111
    setContextMenu(menuProvider);
112
  
112
  
113
    // add context menu to the graph
113
    // add context menu to the graph
(-)src/org/eclipse/wst/xsd/ui/internal/graph/GraphContextMenuProvider.java (-3 / +1 lines)
Lines 15-21 Link Here
15
import org.eclipse.jface.action.IMenuManager;
15
import org.eclipse.jface.action.IMenuManager;
16
import org.eclipse.jface.viewers.ISelectionProvider;
16
import org.eclipse.jface.viewers.ISelectionProvider;
17
import org.eclipse.wst.xsd.ui.internal.XSDMenuListener;
17
import org.eclipse.wst.xsd.ui.internal.XSDMenuListener;
18
import org.eclipse.wst.xsd.ui.internal.XSDTextEditor;
19
18
20
19
21
public class GraphContextMenuProvider extends ContextMenuProvider
20
public class GraphContextMenuProvider extends ContextMenuProvider
Lines 30-37 Link Here
30
   */
29
   */
31
  public GraphContextMenuProvider(
30
  public GraphContextMenuProvider(
32
    EditPartViewer viewer,
31
    EditPartViewer viewer,
33
    ISelectionProvider selectionProvider,
32
    ISelectionProvider selectionProvider)
34
    XSDTextEditor editor)
35
  {
33
  {
36
    super(viewer);
34
    super(viewer);
37
    this.viewer = viewer;
35
    this.viewer = viewer;

Return to bug 109468