本文整理汇总了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);
}
示例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);
}
示例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);
}
}