BaseTaskAction: add @Nls capitalization rules

GitOrigin-RevId: b7d7a2b11df6788668cb9177c6e852c272cc7357
This commit is contained in:
Yann Cébron
2019-09-27 13:34:01 +00:00
committed by intellij-monorepo-bot
parent 7512fb0de0
commit eaeddf62c0
@@ -1,19 +1,4 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.tasks.actions;
import com.intellij.openapi.actionSystem.AnAction;
@@ -22,6 +7,7 @@ import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.tasks.LocalTask;
import com.intellij.tasks.TaskManager;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -35,16 +21,18 @@ public abstract class BaseTaskAction extends AnAction implements DumbAware {
protected BaseTaskAction() {
}
protected BaseTaskAction(String text) {
protected BaseTaskAction(@Nls(capitalization = Nls.Capitalization.Title) String text) {
super(text);
}
protected BaseTaskAction(@Nullable final String text, @Nullable final String description, @Nullable final Icon icon) {
protected BaseTaskAction(@Nullable @Nls(capitalization = Nls.Capitalization.Title) final String text,
@Nullable @Nls(capitalization = Nls.Capitalization.Sentence) final String description,
@Nullable final Icon icon) {
super(text, description, icon);
}
@Override
public void update(@NotNull AnActionEvent event){
public void update(@NotNull AnActionEvent event) {
event.getPresentation().setEnabled(getProject(event) != null);
}