DefaultAddAction: add @Nls capitalization rules

GitOrigin-RevId: eba268fdb5541200162d96aa8cfcf4adc2f28a76
This commit is contained in:
Yann Cébron
2019-09-27 13:34:01 +00:00
committed by intellij-monorepo-bot
parent eaeddf62c0
commit 3894a1e252
@@ -1,19 +1,4 @@
/*
* Copyright 2000-2015 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.util.xml.ui.actions;
import com.intellij.openapi.actionSystem.AnAction;
@@ -26,6 +11,7 @@ import com.intellij.psi.xml.XmlTag;
import com.intellij.util.IncorrectOperationException;
import com.intellij.util.xml.*;
import com.intellij.util.xml.reflect.DomCollectionChildDescription;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -38,11 +24,12 @@ public abstract class DefaultAddAction<T extends DomElement> extends AnAction {
super(ApplicationBundle.message("action.add"));
}
public DefaultAddAction(String text) {
public DefaultAddAction(@Nls(capitalization = Nls.Capitalization.Title) String text) {
super(text);
}
public DefaultAddAction(String text, String description, Icon icon) {
public DefaultAddAction(@Nls(capitalization = Nls.Capitalization.Title) String text,
@Nls(capitalization = Nls.Capitalization.Sentence) String description, Icon icon) {
super(text, description, icon);
}