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

Collapse All | Expand All

(-)plugin.xml (-6 / +10 lines)
Lines 275-284 Link Here
275
			</action>
275
			</action>
276
		</objectContribution>
276
		</objectContribution>
277
	</extension>
277
	</extension>
278
278
279
279
	<!-- =============================================================================== -->
280
	<!-- =============================================================================== -->
280
	<!-- Allow the 'New XML' wizard to be accessed via the 'Generate' menu on a DTD file -->
281
	<!-- Allow the 'New XML' wizard to be accessed via the 'Generate' menu on a DTD file -->
281
	<!-- =============================================================================== -->
282
	<!-- =============================================================================== -->
283
<!--	
282
	<extension point="org.eclipse.ui.popupMenus">
284
	<extension point="org.eclipse.ui.popupMenus">
283
		<objectContribution
285
		<objectContribution
284
			objectClass="org.eclipse.core.resources.IFile"
286
			objectClass="org.eclipse.core.resources.IFile"
Lines 299-305 Link Here
299
			</action>
301
			</action>
300
		</objectContribution>
302
		</objectContribution>
301
	</extension>
303
	</extension>
302
304
-->
303
	<!-- =============================================================================== -->
305
	<!-- =============================================================================== -->
304
	<!-- Contribute a New->Example... entry for Editing and Validating XML files         -->
306
	<!-- Contribute a New->Example... entry for Editing and Validating XML files         -->
305
	<!-- =============================================================================== -->
307
	<!-- =============================================================================== -->
Lines 393-399 Link Here
393
		</provider>
395
		</provider>
394
	</extension>
396
	</extension>
395
397
396
398
<!--
397
	<extension point="org.eclipse.ui.popupMenus">
399
	<extension point="org.eclipse.ui.popupMenus">
398
		<viewerContribution
400
		<viewerContribution
399
			targetID="org.eclipse.core.runtime.xml.source.RulerContext"
401
			targetID="org.eclipse.core.runtime.xml.source.RulerContext"
Lines 416-422 Link Here
416
			</action>
418
			</action>
417
		</viewerContribution>
419
		</viewerContribution>
418
	</extension>
420
	</extension>
419
421
-->
420
	<!-- ====================================================== -->
422
	<!-- ====================================================== -->
421
	<!-- An extension for creating nested validation messages.  -->
423
	<!-- An extension for creating nested validation messages.  -->
422
	<!-- This extension should be moved when the referenced     -->
424
	<!-- This extension should be moved when the referenced     -->
Lines 443-449 Link Here
443
		</objectContribution>
445
		</objectContribution>
444
	</extension>
446
	</extension>
445
447
446
	
448
449
<!--	
447
	<extension point="org.eclipse.ui.editorActions">
450
	<extension point="org.eclipse.ui.editorActions">
448
		<editorContribution
451
		<editorContribution
449
			id="org.eclipse.core.runtime.xml.source.editorActions"
452
			id="org.eclipse.core.runtime.xml.source.editorActions"
Lines 535-541 Link Here
535
               actionID="RulerClick"
538
               actionID="RulerClick"
536
               id="org.eclipse.ui.texteditor.SelectRulerAction"/>
539
               id="org.eclipse.ui.texteditor.SelectRulerAction"/>
537
        </editorContribution>
540
        </editorContribution>
538
	</extension>
541
	</extension>
542
-->
539
	<extension
543
	<extension
540
		point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectorTargets">
544
		point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectorTargets">
541
		<target
545
		<target
(-)plugin.xml (-4 / +85 lines)
Lines 381-387 Link Here
381
			symbolicFontName="org.eclipse.wst.sse.ui.textfont"
381
			symbolicFontName="org.eclipse.wst.sse.ui.textfont"
382
			id="org.eclipse.wst.sse.ui.StructuredTextEditor">
382
			id="org.eclipse.wst.sse.ui.StructuredTextEditor">
383
		</editor>
383
		</editor>
384
	</extension>
384
	</extension>
385
386
<!--
385
	<extension point="org.eclipse.ui.popupMenus">
387
	<extension point="org.eclipse.ui.popupMenus">
386
		<objectContribution
388
		<objectContribution
387
			objectClass="org.eclipse.core.resources.IContainer"
389
			objectClass="org.eclipse.core.resources.IContainer"
Lines 417-423 Link Here
417
				id="org.eclipse.wst.sse.ui.actions.FileSourceActions.Format">
419
				id="org.eclipse.wst.sse.ui.actions.FileSourceActions.Format">
418
			</action>
420
			</action>
419
		</objectContribution>
421
		</objectContribution>
420
   	</extension>
422
   	</extension>
423
-->   	
424
<!--   	
421
   <extension
425
   <extension
422
         point="org.eclipse.ui.editorActions">
426
         point="org.eclipse.ui.editorActions">
423
      <editorContribution
427
      <editorContribution
Lines 438-444 Link Here
438
         </action>
442
         </action>
439
      </editorContribution>
443
      </editorContribution>
440
   </extension>
444
   </extension>
441
445
-->
442
	<!--================================================================================================-->
446
	<!--================================================================================================-->
443
	<!-- contribute a SearchResultViewPage for Occurrences in file                                      -->
447
	<!-- contribute a SearchResultViewPage for Occurrences in file                                      -->
444
	<!--================================================================================================-->
448
	<!--================================================================================================-->
Lines 461-465 Link Here
461
	<extension-point
465
	<extension-point
462
		id="sourcevalidation"
466
		id="sourcevalidation"
463
		name="%Source_Validation_Extension_Point.name"
467
		name="%Source_Validation_Extension_Point.name"
464
		schema="schema/org.eclipse.wst.sse.ui.sourcevalidation.exsd" />
468
		schema="schema/org.eclipse.wst.sse.ui.sourcevalidation.exsd" />
469
 <extension
470
       point="org.eclipse.ui.menus">
471
    <menuContribution
472
          locationURI="menu:org.eclipse.ui.main.menu?after=edit">
473
       <menu
474
             id="sourceMenuId"
475
             label="Source"
476
             mnemonic="S">
477
       </menu>
478
    </menuContribution>
479
    <menuContribution
480
          locationURI="menu:sourceMenuId">
481
       <separator
482
             name="sourceBegin"
483
             visible="false">
484
       </separator>
485
       <command
486
             commandId="org.eclipse.wst.sse.ui.toggle.comment"
487
             id="ToggleComment"
488
             style="push">
489
       </command>
490
       <command
491
             commandId="org.eclipse.wst.sse.ui.add.block.comment"
492
             id="AddBlockComment"
493
             style="push">
494
       </command>
495
       <command
496
             commandId="org.eclipse.wst.sse.ui.remove.block.comment"
497
             id="RemoveBlockComment"
498
             style="push">
499
       </command>
500
       <separator
501
             name="shiftStart"
502
             visible="true">
503
       </separator>
504
       <command
505
             commandId="org.eclipse.ui.edit.text.shiftRight"
506
             id="ShiftRight"
507
             style="push">
508
       </command>
509
       <command
510
             commandId="org.eclipse.ui.edit.text.shiftLeft"
511
             id="ShiftLeft"
512
             style="push">
513
       </command>
514
       <separator
515
             name="shiftEnd"
516
             visible="true">
517
       </separator>
518
       <separator
519
             name="additions"
520
             visible="false">
521
       </separator>
522
       <command
523
             commandId="org.eclipse.wst.sse.ui.format.document"
524
             id="FormatDocument"
525
             mnemonic="F"
526
             style="push">
527
       </command>
528
       <command
529
             commandId="org.eclipse.wst.sse.ui.format.active.elements"
530
             id="FormatElements"
531
             mnemonic="i"
532
             style="push">
533
       </command>
534
    </menuContribution>
535
    <menuContribution
536
          locationURI="menu:edit?after=additions">
537
       <command
538
             commandId="org.eclipse.ui.edit.text.toggleInsertMode"
539
             id="ToggleInsertMode"
540
             label="Smart Insert Mode"
541
             mnemonic="r"
542
             style="toggle">
543
       </command>
544
    </menuContribution>
545
 </extension>
465
</plugin>
546
</plugin>
(-)src/org/eclipse/wst/sse/ui/internal/actions/ActionContributor.java (-32 / +32 lines)
Lines 12-22 Link Here
12
 *******************************************************************************/
12
 *******************************************************************************/
13
package org.eclipse.wst.sse.ui.internal.actions;
13
package org.eclipse.wst.sse.ui.internal.actions;
14
14
15
import java.util.ResourceBundle;
15
//import java.util.ResourceBundle;
16
16
17
import org.eclipse.core.runtime.Platform;
17
import org.eclipse.core.runtime.Platform;
18
import org.eclipse.jface.action.GroupMarker;
18
import org.eclipse.jface.action.GroupMarker;
19
import org.eclipse.jface.action.IAction;
19
//import org.eclipse.jface.action.IAction;
20
import org.eclipse.jface.action.IMenuManager;
20
import org.eclipse.jface.action.IMenuManager;
21
import org.eclipse.jface.action.IStatusLineManager;
21
import org.eclipse.jface.action.IStatusLineManager;
22
import org.eclipse.jface.action.IToolBarManager;
22
import org.eclipse.jface.action.IToolBarManager;
Lines 24-44 Link Here
24
import org.eclipse.jface.action.Separator;
24
import org.eclipse.jface.action.Separator;
25
import org.eclipse.ui.IActionBars;
25
import org.eclipse.ui.IActionBars;
26
import org.eclipse.ui.IEditorPart;
26
import org.eclipse.ui.IEditorPart;
27
import org.eclipse.ui.IWorkbenchActionConstants;
27
//import org.eclipse.ui.IWorkbenchActionConstants;
28
import org.eclipse.ui.IWorkbenchPage;
28
import org.eclipse.ui.IWorkbenchPage;
29
import org.eclipse.ui.actions.ActionFactory;
29
//import org.eclipse.ui.actions.ActionFactory;
30
import org.eclipse.ui.editors.text.TextEditorActionContributor;
30
import org.eclipse.ui.editors.text.TextEditorActionContributor;
31
import org.eclipse.ui.ide.IDEActionFactory;
31
//import org.eclipse.ui.ide.IDEActionFactory;
32
import org.eclipse.ui.texteditor.ITextEditor;
32
import org.eclipse.ui.texteditor.ITextEditor;
33
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
33
//import org.eclipse.ui.texteditor.ITextEditorActionConstants;
34
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
34
//import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
35
import org.eclipse.ui.texteditor.ITextEditorExtension;
35
//import org.eclipse.ui.texteditor.ITextEditorExtension;
36
import org.eclipse.ui.texteditor.RetargetTextEditorAction;
36
import org.eclipse.ui.texteditor.RetargetTextEditorAction;
37
import org.eclipse.wst.sse.ui.internal.ExtendedEditorActionBuilder;
37
//import org.eclipse.wst.sse.ui.internal.ExtendedEditorActionBuilder;
38
import org.eclipse.wst.sse.ui.internal.GotoAnnotationAction;
38
import org.eclipse.wst.sse.ui.internal.GotoAnnotationAction;
39
import org.eclipse.wst.sse.ui.internal.IExtendedContributor;
39
import org.eclipse.wst.sse.ui.internal.IExtendedContributor;
40
import org.eclipse.wst.sse.ui.internal.ISourceViewerActionBarContributor;
40
import org.eclipse.wst.sse.ui.internal.ISourceViewerActionBarContributor;
41
import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
41
//import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
42
import org.eclipse.wst.sse.ui.internal.ui.OffsetStatusLineContributionItem;
42
import org.eclipse.wst.sse.ui.internal.ui.OffsetStatusLineContributionItem;
43
43
44
/**
44
/**
Lines 85-91 Link Here
85
	public ActionContributor() {
85
	public ActionContributor() {
86
		super();
86
		super();
87
87
88
		ResourceBundle resourceBundle = SSEUIMessages.getResourceBundle();
88
/*		ResourceBundle resourceBundle = SSEUIMessages.getResourceBundle();
89
89
90
		fCommandsSeparator = new Separator();
90
		fCommandsSeparator = new Separator();
91
91
Lines 146-156 Link Here
146
		if (_showDebugStatus) {
146
		if (_showDebugStatus) {
147
			fDebugStatusOffset = new OffsetStatusLineContributionItem(StructuredTextEditorActionConstants.STATUS_CATEGORY_OFFSET, true, 20);
147
			fDebugStatusOffset = new OffsetStatusLineContributionItem(StructuredTextEditorActionConstants.STATUS_CATEGORY_OFFSET, true, 20);
148
		}
148
		}
149
	}
149
*/	}
150
150
151
	protected void addToMenu(IMenuManager menu) {
151
	protected void addToMenu(IMenuManager menu) {
152
		// edit commands
152
		// edit commands
153
		IMenuManager editMenu = menu.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
153
/*		IMenuManager editMenu = menu.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
154
		if (editMenu != null) {
154
		if (editMenu != null) {
155
			editMenu.add(fCommandsSeparator);
155
			editMenu.add(fCommandsSeparator);
156
			editMenu.add(fToggleInsertModeAction);
156
			editMenu.add(fToggleInsertModeAction);
Lines 159-165 Link Here
159
			editMenu.add(fCommandsSeparator);
159
			editMenu.add(fCommandsSeparator);
160
			editMenu.add(fMenuAdditionsGroupMarker);
160
			editMenu.add(fMenuAdditionsGroupMarker);
161
		}
161
		}
162
162
		
163
		// source commands
163
		// source commands
164
		String sourceMenuLabel = SSEUIMessages.SourceMenu_label; //$NON-NLS-1$
164
		String sourceMenuLabel = SSEUIMessages.SourceMenu_label; //$NON-NLS-1$
165
		String sourceMenuId = "sourceMenuId"; // This is just a menu id. No //$NON-NLS-1$
165
		String sourceMenuId = "sourceMenuId"; // This is just a menu id. No //$NON-NLS-1$
Lines 175-181 Link Here
175
			sourceMenu.add(fShiftRight);
175
			sourceMenu.add(fShiftRight);
176
			sourceMenu.add(fShiftLeft);
176
			sourceMenu.add(fShiftLeft);
177
		}
177
		}
178
	}
178
*/	}
179
179
180
	protected void addToPopupMenu(IMenuManager menu) {
180
	protected void addToPopupMenu(IMenuManager menu) {
181
		// add nothing
181
		// add nothing
Lines 188-209 Link Here
188
	}
188
	}
189
189
190
	protected void addToToolBar(IToolBarManager toolBarManager) {
190
	protected void addToToolBar(IToolBarManager toolBarManager) {
191
		toolBarManager.add(fToolbarSeparator);
191
/*		toolBarManager.add(fToolbarSeparator);
192
		toolBarManager.add(fToolbarAdditionsGroupMarker);
192
		toolBarManager.add(fToolbarAdditionsGroupMarker);
193
	}
193
*/	}
194
194
195
	/**
195
	/**
196
	 * @see org.eclipse.ui.part.EditorActionBarContributor#contributeToMenu(IMenuManager)
196
	 * @see org.eclipse.ui.part.EditorActionBarContributor#contributeToMenu(IMenuManager)
197
	 */
197
	 */
198
	public void contributeToMenu(IMenuManager menu) {
198
	public void contributeToMenu(IMenuManager menu) {
199
		super.contributeToMenu(menu);
199
		super.contributeToMenu(menu);
200
200
/*
201
		addToMenu(menu);
201
		addToMenu(menu);
202
202
203
		if (extendedContributor != null) {
203
		if (extendedContributor != null) {
204
			extendedContributor.contributeToMenu(menu);
204
			extendedContributor.contributeToMenu(menu);
205
		}
205
		}
206
	}
206
*/	}
207
207
208
	/*
208
	/*
209
	 * (non-Javadoc)
209
	 * (non-Javadoc)
Lines 212-223 Link Here
212
	 */
212
	 */
213
	public void contributeToPopupMenu(IMenuManager menu) {
213
	public void contributeToPopupMenu(IMenuManager menu) {
214
214
215
		addToPopupMenu(menu);
215
/*		addToPopupMenu(menu);
216
216
217
		if (extendedContributor != null) {
217
		if (extendedContributor != null) {
218
			extendedContributor.contributeToPopupMenu(menu);
218
			extendedContributor.contributeToPopupMenu(menu);
219
		}
219
		}
220
	}
220
*/	}
221
221
222
	/*
222
	/*
223
	 * (non-Javadoc)
223
	 * (non-Javadoc)
Lines 240-251 Link Here
240
	public void contributeToToolBar(IToolBarManager toolBarManager) {
240
	public void contributeToToolBar(IToolBarManager toolBarManager) {
241
		super.contributeToToolBar(toolBarManager);
241
		super.contributeToToolBar(toolBarManager);
242
242
243
		addToToolBar(toolBarManager);
243
/*		addToToolBar(toolBarManager);
244
244
245
		if (extendedContributor != null) {
245
		if (extendedContributor != null) {
246
			extendedContributor.contributeToToolBar(toolBarManager);
246
			extendedContributor.contributeToToolBar(toolBarManager);
247
		}
247
		}
248
	}
248
*/	}
249
249
250
	/**
250
	/**
251
	 * @see org.eclipse.ui.part.EditorActionBarContributor#dispose()
251
	 * @see org.eclipse.ui.part.EditorActionBarContributor#dispose()
Lines 300-308 Link Here
300
			return;
300
			return;
301
		super.setActiveEditor(activeEditor);
301
		super.setActiveEditor(activeEditor);
302
302
303
		ITextEditor textEditor = getTextEditor(activeEditor);
303
//		ITextEditor textEditor = getTextEditor(activeEditor);
304
304
305
		IActionBars actionBars = getActionBars();
305
/*		IActionBars actionBars = getActionBars();
306
		if (actionBars != null) {
306
		if (actionBars != null) {
307
			actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_NEXT_ANNOTATION, fNextAnnotation);
307
			actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_NEXT_ANNOTATION, fNextAnnotation);
308
			actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_PREVIOUS_ANNOTATION, fPreviousAnnotation);
308
			actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_PREVIOUS_ANNOTATION, fPreviousAnnotation);
Lines 342-348 Link Here
342
			((ITextEditorExtension) textEditor).setStatusField(fDebugStatusOffset, StructuredTextEditorActionConstants.STATUS_CATEGORY_OFFSET);
342
			((ITextEditorExtension) textEditor).setStatusField(fDebugStatusOffset, StructuredTextEditorActionConstants.STATUS_CATEGORY_OFFSET);
343
			fDebugStatusOffset.setActiveEditor(textEditor);
343
			fDebugStatusOffset.setActiveEditor(textEditor);
344
		}
344
		}
345
	}
345
*/	}
346
346
347
	/*
347
	/*
348
	 * (non-Javadoc)
348
	 * (non-Javadoc)
Lines 350-368 Link Here
350
	 * @see org.eclipse.wst.sse.ui.ISourceViewerActionBarContributor#setViewerSpecificContributionsEnabled(boolean)
350
	 * @see org.eclipse.wst.sse.ui.ISourceViewerActionBarContributor#setViewerSpecificContributionsEnabled(boolean)
351
	 */
351
	 */
352
	public void setViewerSpecificContributionsEnabled(boolean enabled) {
352
	public void setViewerSpecificContributionsEnabled(boolean enabled) {
353
		fShiftRight.setEnabled(enabled);
353
/*		fShiftRight.setEnabled(enabled);
354
		fShiftLeft.setEnabled(enabled);
354
		fShiftLeft.setEnabled(enabled);
355
		fNextAnnotation.setEnabled(enabled);
355
		fNextAnnotation.setEnabled(enabled);
356
		fPreviousAnnotation.setEnabled(enabled);
356
		fPreviousAnnotation.setEnabled(enabled);
357
357
358
		/*
358
		
359
		 * fComment.setEnabled(enabled); fUncomment.setEnabled(enabled);
359
		 * fComment.setEnabled(enabled); fUncomment.setEnabled(enabled);
360
		 */
360
		 
361
		fToggleComment.setEnabled(enabled);
361
		fToggleComment.setEnabled(enabled);
362
		fAddBlockComment.setEnabled(enabled);
362
		fAddBlockComment.setEnabled(enabled);
363
		fRemoveBlockComment.setEnabled(enabled);
363
		fRemoveBlockComment.setEnabled(enabled);
364
		// convert line delimiters are not source viewer-specific
364
		// convert line delimiters are not source viewer-specific
365
	}
365
*/	}
366
366
367
	/*
367
	/*
368
	 * (non-Javadoc)
368
	 * (non-Javadoc)
Lines 370-377 Link Here
370
	 * @see org.eclipse.wst.sse.ui.extension.IExtendedContributor#updateToolbarActions()
370
	 * @see org.eclipse.wst.sse.ui.extension.IExtendedContributor#updateToolbarActions()
371
	 */
371
	 */
372
	public void updateToolbarActions() {
372
	public void updateToolbarActions() {
373
		if (extendedContributor != null) {
373
/*		if (extendedContributor != null) {
374
			extendedContributor.updateToolbarActions();
374
			extendedContributor.updateToolbarActions();
375
		}
375
		}
376
	}
376
*/	}
377
}
377
}

Return to bug 212330