1 package com
.intellij
.ide
.macro
;
3 import com
.intellij
.ide
.IdeBundle
;
4 import com
.intellij
.openapi
.actionSystem
.DataContext
;
5 import com
.intellij
.openapi
.actionSystem
.PlatformDataKeys
;
6 import com
.intellij
.openapi
.project
.Project
;
8 public final class ProjectNameMacro
extends Macro
{
9 public String
getName() {
13 public String
getDescription() {
14 return IdeBundle
.message("macro.project.file.name");
17 public String
expand(DataContext dataContext
) {
18 final Project project
= PlatformDataKeys
.PROJECT
.getData(dataContext
);
19 if (project
== null) {
22 return project
.getName();