本文整理汇总了Java中com.intellij.ide.macro.MacroManager.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java MacroManager.getInstance方法的具体用法?Java MacroManager.getInstance怎么用?Java MacroManager.getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ide.macro.MacroManager
的用法示例。
在下文中一共展示了MacroManager.getInstance方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getExternalProperties
import com.intellij.ide.macro.MacroManager; //导入方法依赖的package包/类
@NotNull
public Map<String, String> getExternalProperties() {
Map<String, String> result = myCachedExternalProperties;
if (result == null) {
synchronized (myOptionsLock) {
result = myCachedExternalProperties;
if (result == null) {
result = new HashMap<String, String>();
final DataContext context = SimpleDataContext.getProjectContext(myProject);
final MacroManager macroManager = MacroManager.getInstance();
Iterator<BuildFileProperty> properties = ANT_PROPERTIES.getIterator(myAllOptions);
while (properties.hasNext()) {
BuildFileProperty property = properties.next();
try {
String value = property.getPropertyValue();
value = macroManager.expandSilentMarcos(value, true, context);
value = macroManager.expandSilentMarcos(value, false, context);
result.put(property.getPropertyName(), value);
}
catch (Macro.ExecutionCancelledException e) {
LOG.debug(e);
}
}
myCachedExternalProperties = result;
}
}
}
return result;
}
示例2: getExternalProperties
import com.intellij.ide.macro.MacroManager; //导入方法依赖的package包/类
@Override
@NotNull
public Map<String, String> getExternalProperties()
{
Map<String, String> result = myCachedExternalProperties;
if(result == null)
{
synchronized(myOptionsLock)
{
result = myCachedExternalProperties;
if(result == null)
{
result = new HashMap<String, String>();
final DataContext context = SimpleDataContext.getProjectContext(myProject);
final MacroManager macroManager = MacroManager.getInstance();
Iterator<BuildFileProperty> properties = ANT_PROPERTIES.getIterator(myAllOptions);
while(properties.hasNext())
{
BuildFileProperty property = properties.next();
try
{
String value = property.getPropertyValue();
value = macroManager.expandSilentMarcos(value, true, context);
value = macroManager.expandSilentMarcos(value, false, context);
result.put(property.getPropertyName(), value);
}
catch(Macro.ExecutionCancelledException e)
{
LOG.debug(e);
}
}
myCachedExternalProperties = result;
}
}
}
return result;
}
示例3: getMacroManager
import com.intellij.ide.macro.MacroManager; //导入方法依赖的package包/类
public static MacroManager getMacroManager() {
return MacroManager.getInstance();
}
示例4: getMacroManager
import com.intellij.ide.macro.MacroManager; //导入方法依赖的package包/类
public static MacroManager getMacroManager()
{
return MacroManager.getInstance();
}