本文整理汇总了Java中com.intellij.pom.PomRenameableTarget类的典型用法代码示例。如果您正苦于以下问题:Java PomRenameableTarget类的具体用法?Java PomRenameableTarget怎么用?Java PomRenameableTarget使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PomRenameableTarget类属于com.intellij.pom包,在下文中一共展示了PomRenameableTarget类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setName
import com.intellij.pom.PomRenameableTarget; //导入依赖的package包/类
public MyRenameableTarget setName(@NotNull final String newName) {
final ArrayList<PomRenameableTarget> list = new ArrayList<>(myTargets.size());
for (PomRenameableTarget target : myTargets) {
final Object result = target.setName(newName);
if (result instanceof PomRenameableTarget) {
list.add((PomRenameableTarget)result);
}
}
return new MyRenameableTarget(getCommonElement(), list);
}
示例2: getName
import com.intellij.pom.PomRenameableTarget; //导入依赖的package包/类
public String getName() {
final PomRenameableTarget target = findLast(myTargets,
(NullableFunction<PomRenameableTarget, PomRenameableTarget>)target1 -> target1
.getName() != null ? target1
: null, null);
return target == null? null : target.getName();
}
示例3: setName
import com.intellij.pom.PomRenameableTarget; //导入依赖的package包/类
public Object setName(@NotNull final String newName) {
final PsiElement element = getNavigationElement();
if (element instanceof PomRenameableTarget) {
return ((PomRenameableTarget)element).setName(newName);
}
throw new IncorrectOperationException("not implemented");
}
示例4: isWritable
import com.intellij.pom.PomRenameableTarget; //导入依赖的package包/类
@Override
public boolean isWritable() {
if (myTarget instanceof PomRenameableTarget) {
return ((PomRenameableTarget)myTarget).isWritable();
}
return false;
}
示例5: setName
import com.intellij.pom.PomRenameableTarget; //导入依赖的package包/类
@RequiredWriteAction
@Override
public PsiElement setName(@NonNls @Nonnull String name) throws IncorrectOperationException {
if (myTarget instanceof PomRenameableTarget) {
((PomRenameableTarget)myTarget).setName(name);
return this;
}
throw new UnsupportedOperationException("Cannot rename " + myTarget);
}
示例6: MyRenameableTarget
import com.intellij.pom.PomRenameableTarget; //导入依赖的package包/类
public MyRenameableTarget(CommonModelElement object, final List<PomRenameableTarget> targets) {
super(object, targets);
}
示例7: isWritable
import com.intellij.pom.PomRenameableTarget; //导入依赖的package包/类
public boolean isWritable() {
for (PomRenameableTarget target : myTargets) {
if (!target.isWritable()) return false;
}
return true;
}