本文整理汇总了Java中com.intellij.openapi.module.ModifiableModuleModel.getNewName方法的典型用法代码示例。如果您正苦于以下问题:Java ModifiableModuleModel.getNewName方法的具体用法?Java ModifiableModuleModel.getNewName怎么用?Java ModifiableModuleModel.getNewName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.module.ModifiableModuleModel
的用法示例。
在下文中一共展示了ModifiableModuleModel.getNewName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: render
import com.intellij.openapi.module.ModifiableModuleModel; //导入方法依赖的package包/类
public void render(@NotNull PresentationData presentationData, SimpleTextAttributes mainAttributes, SimpleTextAttributes commentAttributes) {
final Module module = findModule();
if (myTestOutput) {
presentationData.setIcon(PlatformIcons.TEST_SOURCE_FOLDER);
}
else if (module != null) {
presentationData.setIcon(ModuleType.get(module).getIcon());
}
String moduleName;
if (module != null) {
moduleName = module.getName();
final ModifiableModuleModel moduleModel = myContext.getModifiableModuleModel();
if (moduleModel != null) {
final String newName = moduleModel.getNewName(module);
if (newName != null) {
moduleName = newName;
}
}
}
else if (myModulePointer != null) {
moduleName = myModulePointer.getModuleName();
}
else {
moduleName = "<unknown>";
}
String text = myTestOutput ? CompilerBundle.message("node.text.0.test.compile.output", moduleName)
: CompilerBundle.message("node.text.0.compile.output", moduleName);
presentationData.addText(text, module != null ? mainAttributes : SimpleTextAttributes.ERROR_ATTRIBUTES);
}
示例2: getModuleName
import com.intellij.openapi.module.ModifiableModuleModel; //导入方法依赖的package包/类
@Override
@NotNull
public String getModuleName(@Nullable ModifiableModuleModel moduleModel) {
if (moduleModel != null && myFacet != null) {
final String newName = moduleModel.getNewName(myFacet.getModule());
if (newName != null) {
return newName;
}
}
return myModuleName;
}
示例3: render
import com.intellij.openapi.module.ModifiableModuleModel; //导入方法依赖的package包/类
@Override
public void render(@Nonnull PresentationData presentationData,
SimpleTextAttributes mainAttributes,
SimpleTextAttributes commentAttributes) {
final Module module = findModule();
presentationData.setIcon(myContentFolderType.getIcon());
String moduleName;
if (module != null) {
moduleName = module.getName();
final ModifiableModuleModel moduleModel = myContext.getModifiableModuleModel();
if (moduleModel != null) {
final String newName = moduleModel.getNewName(module);
if (newName != null) {
moduleName = newName;
}
}
}
else if (myModulePointer != null) {
moduleName = myModulePointer.getName();
}
else {
moduleName = "<unknown>";
}
presentationData
.addText(CompilerBundle.message("node.text.0.1.compile.output", moduleName, StringUtil.toLowerCase(myContentFolderType.getName())),
module != null ? mainAttributes : SimpleTextAttributes.ERROR_ATTRIBUTES);
}
示例4: getRealName
import com.intellij.openapi.module.ModifiableModuleModel; //导入方法依赖的package包/类
public String getRealName(final Module module) {
final ModifiableModuleModel moduleModel = myModulesConfigurator.getModuleModel();
String newName = moduleModel.getNewName(module);
return newName != null ? newName : module.getName();
}