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


Java VariablesPlugin.getStringVariableManager方法代码示例

本文整理汇总了Java中org.eclipse.core.variables.VariablesPlugin.getStringVariableManager方法的典型用法代码示例。如果您正苦于以下问题:Java VariablesPlugin.getStringVariableManager方法的具体用法?Java VariablesPlugin.getStringVariableManager怎么用?Java VariablesPlugin.getStringVariableManager使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.core.variables.VariablesPlugin的用法示例。


在下文中一共展示了VariablesPlugin.getStringVariableManager方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doCheckState

import org.eclipse.core.variables.VariablesPlugin; //导入方法依赖的package包/类
@Override
public boolean doCheckState() {
	VariablesPlugin variablesPlugin = VariablesPlugin.getDefault();
	
	String value = getStringValue();
	
	IStringVariableManager manager = variablesPlugin.getStringVariableManager();
	// check if there are substitutions
	String result;
	try {
		result = manager.performStringSubstitution(value, false);
		if(!result.equals(getStringValue())) {
			// string substitution present ... field editor cannot validate the value.
			return true;
		}
	} catch (CoreException e) {
		// replacement failed (but there are replaceable variables present)
		return true;
	}
	
	if ( new File(value).isAbsolute()) {
		return super.doCheckState();
	}
	return true;
}
 
开发者ID:USESystemEngineeringBV,项目名称:cmake-eclipse-helper,代码行数:26,代码来源:WorkbenchPreferencePage.java

示例2: checkState

import org.eclipse.core.variables.VariablesPlugin; //导入方法依赖的package包/类
@Override
public boolean checkState() {
	VariablesPlugin variablesPlugin = VariablesPlugin.getDefault();
	
	IStringVariableManager manager = variablesPlugin.getStringVariableManager();
	// check if there are substitutions
	String result;
	try {
		result = manager.performStringSubstitution(getStringValue(), false);
		if(!result.equals(getStringValue())) {
			// string substitution present ... field editor cannot validate the value.
			return true;
		}
	} catch (CoreException e) {
		e.printStackTrace();
	}
	return super.doCheckState();
}
 
开发者ID:USESystemEngineeringBV,项目名称:cmake-eclipse-helper,代码行数:19,代码来源:WorkbenchPreferencePage.java

示例3: registerResolvers

import org.eclipse.core.variables.VariablesPlugin; //导入方法依赖的package包/类
/**
 * Register all resolvers of this plugin.
 */
private void registerResolvers() {

  JavaPlugin javaPlugin = JavaPlugin.getDefault();
  Assert.isNotNull(javaPlugin);
  addResolver(javaPlugin, new MavenVersionResolver());
  addResolver(javaPlugin, new MavenArtifactIdResolver());
  VariablesPlugin variablesPlugin = VariablesPlugin.getDefault();
  IStringVariableManager stringVariableManager = variablesPlugin.getStringVariableManager();
  IValueVariable[] variables = stringVariableManager.getValueVariables();
  for (IValueVariable variable : variables) {
    addResolver(javaPlugin, new StringValueTemplateVariableResolver(variable));
  }
  stringVariableManager.addValueVariableListener(new ValueVariableListener());
}
 
开发者ID:m-m-m,项目名称:eclipse-templatevariables,代码行数:18,代码来源:TemplateVariablesStartup.java

示例4: replacePathVariables

import org.eclipse.core.variables.VariablesPlugin; //导入方法依赖的package包/类
private static String replacePathVariables(String path) {
	VariablesPlugin variablesPlugin = VariablesPlugin.getDefault();
	IStringVariableManager manager = variablesPlugin.getStringVariableManager();
	try {
		return manager.performStringSubstitution(path, false);
	} catch (CoreException e) {
		return path;
	}
}
 
开发者ID:USESystemEngineeringBV,项目名称:cmake-eclipse-helper,代码行数:10,代码来源:Activator.java

示例5: getStringVariableManager

import org.eclipse.core.variables.VariablesPlugin; //导入方法依赖的package包/类
private IStringVariableManager getStringVariableManager() {
    if (SharedCorePlugin.inTestMode()) {
        return stringVariableManagerForTests;
    }
    VariablesPlugin variablesPlugin = VariablesPlugin.getDefault();
    return variablesPlugin.getStringVariableManager();
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:8,代码来源:InterpreterInfo.java


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