当前位置: 首页>>代码示例>>Java>>正文


Java MacroManager.getInstance方法代码示例

本文整理汇总了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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:31,代码来源:AntBuildFileImpl.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo-apache-ant,代码行数:39,代码来源:AntBuildFileImpl.java

示例3: getMacroManager

import com.intellij.ide.macro.MacroManager; //导入方法依赖的package包/类
public static MacroManager getMacroManager() {
  return MacroManager.getInstance();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:GlobalAntConfiguration.java

示例4: getMacroManager

import com.intellij.ide.macro.MacroManager; //导入方法依赖的package包/类
public static MacroManager getMacroManager()
{
	return MacroManager.getInstance();
}
 
开发者ID:consulo,项目名称:consulo-apache-ant,代码行数:5,代码来源:GlobalAntConfiguration.java


注:本文中的com.intellij.ide.macro.MacroManager.getInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。