當前位置: 首頁>>代碼示例>>Java>>正文


Java ToggleCommentAction類代碼示例

本文整理匯總了Java中org.eclipse.jdt.internal.ui.javaeditor.ToggleCommentAction的典型用法代碼示例。如果您正苦於以下問題:Java ToggleCommentAction類的具體用法?Java ToggleCommentAction怎麽用?Java ToggleCommentAction使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ToggleCommentAction類屬於org.eclipse.jdt.internal.ui.javaeditor包,在下文中一共展示了ToggleCommentAction類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createActions

import org.eclipse.jdt.internal.ui.javaeditor.ToggleCommentAction; //導入依賴的package包/類
protected void createActions() {
	super.createActions();
	// Add content assist propsal action
	ContentAssistAction action = new ContentAssistAction(Plugin
			.getDefault().getResourceBundle(),
			"VelocityEditor.ContentAssist", this);
	action
			.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
	setAction("Velocity.ContentAssist", action);
	action.setEnabled(true);
	
	// add toggle comment action
	ToggleCommentAction toggleCommentAction = new ToggleCommentAction(Plugin
			.getDefault().getResourceBundle(),
			"VelocityEditor.ToggleComment", this);
	toggleCommentAction.configure(getSourceViewer(), getSourceViewerConfiguration());
	
	setAction("Velocity.ToggleComment", toggleCommentAction );
	toggleCommentAction.setEnabled(true);
}
 
開發者ID:ninneko,項目名稱:velocity-edit,代碼行數:21,代碼來源:VelocityEditor.java

示例2: createActions

import org.eclipse.jdt.internal.ui.javaeditor.ToggleCommentAction; //導入依賴的package包/類
@Override
protected void createActions() {
	super.createActions();

	IAction action= new ToggleCommentAction(PropertiesFileEditorMessages.getBundleForConstructedKeys(), "ToggleComment.", this); //$NON-NLS-1$
	action.setActionDefinitionId(IJavaEditorActionDefinitionIds.TOGGLE_COMMENT);
	setAction(IJavaEditorActionDefinitionIds.TOGGLE_COMMENT, action);
	markAsStateDependentAction(IJavaEditorActionDefinitionIds.TOGGLE_COMMENT, true);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(action, IJavaHelpContextIds.TOGGLE_COMMENT_ACTION);
	configureToggleCommentAction();

	fOpenAction= new OpenAction(this);
	fOpenAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_EDITOR);
	setAction(JdtActionConstants.OPEN, fOpenAction);
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:16,代碼來源:PropertiesFileEditor.java

示例3: configureToggleCommentAction

import org.eclipse.jdt.internal.ui.javaeditor.ToggleCommentAction; //導入依賴的package包/類
/**
 * Configures the toggle comment action.
 *
 * @since 3.4
 */
private void configureToggleCommentAction() {
	IAction action= getAction(IJavaEditorActionDefinitionIds.TOGGLE_COMMENT);
	if (action instanceof ToggleCommentAction) {
		ISourceViewer sourceViewer= getSourceViewer();
		SourceViewerConfiguration configuration= getSourceViewerConfiguration();
		((ToggleCommentAction)action).configure(sourceViewer, configuration);
	}
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:14,代碼來源:PropertiesFileEditor.java


注:本文中的org.eclipse.jdt.internal.ui.javaeditor.ToggleCommentAction類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。