当前位置: 首页>>代码示例>>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;未经允许,请勿转载。