本文整理匯總了Java中com.intellij.openapi.vcs.actions.ShowNextChangeMarkerAction類的典型用法代碼示例。如果您正苦於以下問題:Java ShowNextChangeMarkerAction類的具體用法?Java ShowNextChangeMarkerAction怎麽用?Java ShowNextChangeMarkerAction使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ShowNextChangeMarkerAction類屬於com.intellij.openapi.vcs.actions包,在下文中一共展示了ShowNextChangeMarkerAction類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: buildToolbar
import com.intellij.openapi.vcs.actions.ShowNextChangeMarkerAction; //導入依賴的package包/類
@NotNull
private static ActionToolbar buildToolbar(@NotNull Range range,
@NotNull Editor editor,
@NotNull LineStatusTracker tracker,
@NotNull Disposable parentDisposable) {
final DefaultActionGroup group = new DefaultActionGroup();
final ShowPrevChangeMarkerAction localShowPrevAction = new ShowPrevChangeMarkerAction(tracker.getPrevRange(range), tracker, editor);
final ShowNextChangeMarkerAction localShowNextAction = new ShowNextChangeMarkerAction(tracker.getNextRange(range), tracker, editor);
final RollbackLineStatusRangeAction rollback = new RollbackLineStatusRangeAction(tracker, range, editor);
final ShowLineStatusRangeDiffAction showDiff = new ShowLineStatusRangeDiffAction(tracker, range, editor);
final CopyLineStatusRangeAction copyRange = new CopyLineStatusRangeAction(tracker, range);
group.add(localShowPrevAction);
group.add(localShowNextAction);
group.add(rollback);
group.add(showDiff);
group.add(copyRange);
JComponent editorComponent = editor.getComponent();
EmptyAction.setupAction(localShowPrevAction, "VcsShowPrevChangeMarker", editorComponent);
EmptyAction.setupAction(localShowNextAction, "VcsShowNextChangeMarker", editorComponent);
EmptyAction.setupAction(rollback, IdeActions.SELECTED_CHANGES_ROLLBACK, editorComponent);
EmptyAction.setupAction(showDiff, "ChangesView.Diff", editorComponent);
EmptyAction.setupAction(copyRange, IdeActions.ACTION_COPY, editorComponent);
final List<AnAction> actionList = ActionUtil.getActions(editorComponent);
Disposer.register(parentDisposable, new Disposable() {
@Override
public void dispose() {
actionList.remove(localShowPrevAction);
actionList.remove(localShowNextAction);
actionList.remove(rollback);
actionList.remove(showDiff);
actionList.remove(copyRange);
}
});
return ActionManager.getInstance().createActionToolbar(ActionPlaces.FILEHISTORY_VIEW_TOOLBAR, group, true);
}
示例2: buildToolbar
import com.intellij.openapi.vcs.actions.ShowNextChangeMarkerAction; //導入依賴的package包/類
@Nonnull
@Override
protected ActionToolbar buildToolbar(@Nullable Point mousePosition, @Nonnull Disposable parentDisposable) {
final DefaultActionGroup group = new DefaultActionGroup();
final ShowPrevChangeMarkerAction localShowPrevAction = new ShowPrevChangeMarkerAction(myTracker.getPrevRange(myRange), myTracker, myEditor);
final ShowNextChangeMarkerAction localShowNextAction = new ShowNextChangeMarkerAction(myTracker.getNextRange(myRange), myTracker, myEditor);
final RollbackLineStatusRangeAction rollback = new RollbackLineStatusRangeAction(myTracker, myRange, myEditor);
final ShowLineStatusRangeDiffAction showDiff = new ShowLineStatusRangeDiffAction(myTracker, myRange, myEditor);
final CopyLineStatusRangeAction copyRange = new CopyLineStatusRangeAction(myTracker, myRange);
final ToggleByWordDiffAction toggleWordDiff = new ToggleByWordDiffAction(myRange, myEditor, myTracker, mousePosition);
group.add(localShowPrevAction);
group.add(localShowNextAction);
group.add(rollback);
group.add(showDiff);
group.add(copyRange);
group.add(toggleWordDiff);
JComponent editorComponent = myEditor.getComponent();
DiffUtil.registerAction(localShowPrevAction, editorComponent);
DiffUtil.registerAction(localShowNextAction, editorComponent);
DiffUtil.registerAction(rollback, editorComponent);
DiffUtil.registerAction(showDiff, editorComponent);
DiffUtil.registerAction(copyRange, editorComponent);
final List<AnAction> actionList = ActionUtil.getActions(editorComponent);
Disposer.register(parentDisposable, new Disposable() {
@Override
public void dispose() {
actionList.remove(localShowPrevAction);
actionList.remove(localShowNextAction);
actionList.remove(rollback);
actionList.remove(showDiff);
actionList.remove(copyRange);
}
});
return ActionManager.getInstance().createActionToolbar(ActionPlaces.FILEHISTORY_VIEW_TOOLBAR, group, true);
}