• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IDynamicVariable类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.core.variables.IDynamicVariable的典型用法代码示例。如果您正苦于以下问题:Java IDynamicVariable类的具体用法?Java IDynamicVariable怎么用?Java IDynamicVariable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IDynamicVariable类属于org.eclipse.core.variables包,在下文中一共展示了IDynamicVariable类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: resolveValue

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
@Override
public String resolveValue(IDynamicVariable variable, String argument)	throws CoreException {

	ArchToolchainPairList atlist = new ArchToolchainPairList(); 
	atlist.doLoad();
	String toolchainFile = atlist.get(argument);
	
	if(toolchainFile == null) {
		Status status = new Status(Status.INFO, Activator.PLUGIN_ID, "No CMake toolchainfile specified for architecture '" + argument +"'");
		throw new CoreException(status);
	}

	IStringVariableManager varMgr = VariablesPlugin.getDefault().getStringVariableManager();
	toolchainFile = varMgr.performStringSubstitution(toolchainFile);
	return toolchainFile;
}
 
开发者ID:rungemar,项目名称:cmake4cdt,代码行数:17,代码来源:ToolchainFileResolver.java


示例2: createKarafPlatformResources

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
private void createKarafPlatformResources(final IProgressMonitor monitor) throws CoreException {
    newKarafProject.getProjectHandle().getFolder(".bin").create(true, true, monitor);
    newKarafProject.getProjectHandle().getFolder(".bin/platform").create(true, true, monitor);
    newKarafProject.getProjectHandle().getFolder(".bin/platform/etc").createLink(workingPlatformModel.getParentKarafModel().getConfigurationDirectory(), 0, monitor);
    newKarafProject.getProjectHandle().getFolder(".bin/platform/deploy").createLink(workingPlatformModel.getParentKarafModel().getUserDeployedDirectory(), 0, monitor);
    newKarafProject.getProjectHandle().getFolder(".bin/platform/lib").createLink(workingPlatformModel.getParentKarafModel().getRootDirectory().append("lib"), 0, monitor);
    newKarafProject.getProjectHandle().getFolder(".bin/platform/system").createLink(workingPlatformModel.getParentKarafModel().getPluginRootDirectory(), 0, monitor);
    newKarafProject.getProjectHandle().getFolder(".bin/runtime").create(true, true, monitor);

    // TODO: Is this the right way to add the current installation?
    final IDynamicVariable eclipseHomeVariable = VariablesPlugin.getDefault().getStringVariableManager().getDynamicVariable("eclipse_home");
    final String eclipseHome = eclipseHomeVariable.getValue("");
    newKarafProject.getProjectHandle().getFolder(".bin/platform/eclipse").create(true, true, monitor);
    newKarafProject.getProjectHandle().getFolder(".bin/platform/eclipse/dropins").createLink(new Path(eclipseHome).append("dropins"), 0, monitor);
    newKarafProject.getProjectHandle().getFolder(".bin/platform/eclipse/plugins").createLink(new Path(eclipseHome).append("plugins"), 0, monitor);

    newKarafProject.getProjectHandle().setPersistentProperty(
            new QualifiedName(KarafUIPluginActivator.PLUGIN_ID, "karafProject"),
            "true");

    newKarafProject.getProjectHandle().setPersistentProperty(
            new QualifiedName(KarafUIPluginActivator.PLUGIN_ID, "karafModel"),
            karafPlatformModel.getRootDirectory().toString());
}
 
开发者ID:apache,项目名称:karaf-eik,代码行数:25,代码来源:NewKarafProjectOperation.java


示例3: resolveValue

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
public String resolveValue(IDynamicVariable variable, String argument) throws CoreException {
    String value = null;
    setupDialog(argument);

    VerilogPlugin.getStandardDisplay().syncExec(new Runnable() {
        public void run() {
            prompt();
        }
    });
    if (dialogResultString != null) {
        value = dialogResultString;
        lastValue = dialogResultString;
    } else {
        // dialogResultString == null means prompt was cancelled
        throw new DebugException(new Status(IStatus.CANCEL, VDT.ID_VDT, IStatus.CANCEL, Txt.s("Variable.Promp.Cancel.Message", new String[] { variable.getName() }), null)); 
    }
    return value;
}
 
开发者ID:Elphel,项目名称:vdt-plugin,代码行数:19,代码来源:PromptingResolver.java


示例4: resolveValue

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
public String resolveValue(IDynamicVariable variable, String argument) throws CoreException {
    IResource resource = null;
    if (argument == null) {
        resource = getSelectedResource(variable);
    } else {
        resource = getWorkspaceRoot().findMember(new Path(argument));
    }
    if (resource != null && resource.exists()) {
        resource = translateSelectedResource(resource);
        if (resource != null && resource.exists()) {
            return translateToValue(resource, variable);
        }
    }
    abort(Txt.s("Error.Variable.Verilog.NotExist", new String[]{getReferenceExpression(variable, argument)}), null);
    return null;
}
 
开发者ID:Elphel,项目名称:vdt-plugin,代码行数:17,代码来源:VerilogResolver.java


示例5: translateToValue

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
/**
 * Translates the given resource into a value for this variable resolver.
 * 
 * @param resource the resource applicable to this resolver's variable
 * @param variable the variable being resolved
 * @return variable value
 * @throws CoreException if the variable name is not recognized
 */
protected String translateToValue(IResource resource, IDynamicVariable variable) throws CoreException {
    String name = variable.getName();
    if (name.endsWith("project_loc")) { //$NON-NLS-1$
        resource = SelectedResourceManager.getDefault().getChosenVerilogFile();
        return resource.getProject().getLocation().toOSString();
        
    } else if (name.endsWith("_loc")) { //$NON-NLS-1$
        return resource.getLocation().toOSString();
    } else if (name.endsWith("_path")) { //$NON-NLS-1$
        return resource.getFullPath().toOSString();
    } else if (name.endsWith("_name")) { //$NON-NLS-1$
        return resource.getName();
    }
    abort(Txt.s("Error.Variable.Verilog.Unknown", new String[]{getReferenceExpression(variable, null)}), null); //$NON-NLS-1$
    return null;
}
 
开发者ID:Elphel,项目名称:vdt-plugin,代码行数:25,代码来源:VerilogResolver.java


示例6: resolveValue

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
@Override
	public String resolveValue(IDynamicVariable variable, String argument) throws CoreException
	{
//		String pathName = System.getenv(EngineReference.CUINA_SYSTEM_VARIABLE);
//		if (pathName == null) return null;
//		
//		Path path = Paths.get(pathName);
//		if (!path.isAbsolute())
//		{
//			path = getProjectPath().resolve(path);
//		}
//		if (Files.notExists(path))
//			throwException("File not found " + path.toString(), null);
//		
//		if (Files.isDirectory(path))
//		{
//			path = path.resolve(EngineReference.ENGINE_JAR);
//			if (Files.notExists(path))
//				throwException("File not found " + path.toString(), null);
//		}
//    	return path.toString();
		
		return VALUES.get(variable.getName());
	}
 
开发者ID:TheWhiteShadow3,项目名称:cuina,代码行数:25,代码来源:CuinaVariableResolver.java


示例7: resolveOneVariable

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
private String resolveOneVariable(String key, IStringVariableManager variableManager, boolean dynamicAllowed) {
    if (key != null) {
        if (variableManager == null) {
            variableManager = VariablesPlugin.getDefault().getStringVariableManager();
        }
        if (variableManager != null) {
            // static variable
            IValueVariable staticVar = variableManager.getValueVariable(key);
            if (staticVar != null) {
                return staticVar.getValue();
            }
            // dynamic variable
            else if (dynamicAllowed) {
                String varName = key;
                String valuePar = null;
                // check if parameterized and get parameter
                int index = key.indexOf(':');
                if (index > 1) {
                    varName = key.substring(0, index);
                    if (key.length() > index + 1)
                        valuePar = key.substring(index + 1);
                }
                // get dynamic variable
                IDynamicVariable dynVar = variableManager.getDynamicVariable(varName);
                if (dynVar == null)
                    return null;
                try {
                    return dynVar.getValue(valuePar);
                } catch (CoreException e) {
                    return null;
                }
            }
        }
    }
    return null;
}
 
开发者ID:anb0s,项目名称:eclox,代码行数:37,代码来源:Doxygen.java


示例8: resolveValue

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
public String resolveValue(IDynamicVariable variable, String argument)
    throws CoreException {
  /*
   * TODO: Generally, a unique ID would work, but the current logic for
   * referencing back to a launch config searches each launch config's
   * command-line args for this string. Having it too short (e.g. based off an
   * AtomicInteger) causes that to fail. Instead of causing churn on that
   * code, we revert back to using nanoTime as the unique ID.
   */
  return String.valueOf(System.nanoTime());
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:12,代码来源:UniqueIdVariableResolver.java


示例9: resolveValue

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
public String resolveValue(IDynamicVariable variable, String argument)
    throws CoreException {
  try {
    return String.valueOf(RemoteUIServer.getInstance().getPort());
  } catch (Throwable e) {
    CorePluginLog.logError(e, "Could not get remote UI server's port");
    // We can pass an invalid value which will cause GWT's Swing UI to be used
    return "-1";
  }
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:11,代码来源:GwtRemoteUiServerPortVariableResolver.java


示例10: resolveValue

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
@Override
public String resolveValue(IDynamicVariable variable, String argument)
		throws CoreException {
    String variableName = variable.getName();
	if (variableName.equals("easyshell")) {
	    return handleOwnVariable(argument);
	} else {
           return handleEclipseVariable(variableName, argument);
       }
}
 
开发者ID:anb0s,项目名称:EasyShell,代码行数:11,代码来源:DynamicVariableResolver.java


示例11: getSelectedResource

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
/**
     * Returns the selected resource.
     * 
     * @param variable variable referencing a resource
     * @return selected resource
     * @throws CoreException if there is no selection
     */
    protected IResource getSelectedResource(IDynamicVariable variable) throws CoreException {
//        IResource resource = SelectedResourceManager.getDefault().getSelectedVerilogFile();
        IResource resource = SelectedResourceManager.getDefault().getChosenVerilogFile();
        if (resource == null) {
            abort(Txt.s("Error.Variable.Verilog.NoSelection", new String[]{getReferenceExpression(variable, null)}), null);
        }
        return resource;    
    }
 
开发者ID:Elphel,项目名称:vdt-plugin,代码行数:16,代码来源:VerilogResolver.java


示例12: getReferenceExpression

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
/**
 * Returns an expression used to reference the given variable and optional argument.
 * For example, <code>${var_name:arg}</code>.
 * 
 * @param variable referenced variable
 * @param argument referenced argument or <code>null</code>
 * @return vraiable reference expression
 */
protected String getReferenceExpression(IDynamicVariable variable, String argument) {
    StringBuffer reference = new StringBuffer();
    reference.append("${");
    reference.append(variable.getName());
    if (argument != null) {
        reference.append(":");
        reference.append(argument);
    }
    reference.append("}");
    return reference.toString();
}
 
开发者ID:Elphel,项目名称:vdt-plugin,代码行数:20,代码来源:VerilogResolver.java


示例13: resolveValue

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
public String resolveValue(IDynamicVariable variable, String argument) throws CoreException
{
	try {
		return LeJOSEV3Util.getEV3Home().getAbsolutePath();
	} catch (LeJOSEV3Exception e) {
		throw new CoreException(new Status(IStatus.ERROR, LeJOSEV3Plugin.ID, "could not determine EV3_HOME", e));
	}
}
 
开发者ID:JanKoehnlein,项目名称:XRobot,代码行数:9,代码来源:EV3HomeResolver.java


示例14: getDynamicVariable

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
@Override
public IDynamicVariable getDynamicVariable(String name) {
	IDynamicVariable variable = dynamicVariables.get(name);
	if(variable != null) {
		return variable;
	}
	
	return super.getDynamicVariable(name);
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:10,代码来源:VariablesResolver.java


示例15: getDynamicVariables

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
@Override
public IDynamicVariable[] getDynamicVariables() {
	HashMap2<String, IDynamicVariable> newMap = dynamicVariables.copyToHashMap();
	
	IDynamicVariable[] parentVars = super.getDynamicVariables();
	for (IDynamicVariable parentVar : parentVars) {
		// Do not put vars that have same name  
		newMap.putIfAbsent(parentVar.getName(), parentVar);
	}
	return newMap.getValuesView().toArray(IDynamicVariable.class);
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:12,代码来源:VariablesResolver.java


示例16: getVariables

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
@Override
public IStringVariable[] getVariables() {
	IValueVariable[] valueVars = getValueVariables();
	IDynamicVariable[] dynVars = getDynamicVariables();
	
	ArrayList2<IStringVariable> variables = new ArrayList2<>(valueVars.length + dynVars.length);
	variables.addElements(dynVars);
	variables.addElements(valueVars);
	return variables.toArray(IStringVariable.class);
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:11,代码来源:VariablesResolver.java


示例17: resolveValue

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
@Override
public String resolveValue(IDynamicVariable variable, String argument)
		throws CoreException {
	// TODO Auto-generated method stub
	return null;
}
 
开发者ID:rungemar,项目名称:cmake4cdt,代码行数:7,代码来源:ProjectPathResolver.java


示例18: build

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
@Override
public void build(final int kind, @SuppressWarnings("rawtypes") final Map args, final IProgressMonitor monitor) throws CoreException {
    final IKarafProject newKarafProject = getKarafProject();
    final IProject project = newKarafProject.getProjectHandle();

    for (final String folderName : new String[] { ".bin", ".bin/platform", ".bin/runtime" }) {
        final IFolder folder = project.getFolder(folderName);
        if (!folder.exists()) {
            folder.create(true, true, monitor);
        }
    }

    if (!project.getFolder(".bin/platform/etc").exists()) {
        project.getFolder(".bin/platform/etc").createLink(getKarafPlatformModel().getConfigurationDirectory(), 0, monitor);
    }

    if (!project.getFolder(".bin/platform/deploy").exists()) {
        project.getFolder(".bin/platform/deploy").createLink(getKarafPlatformModel().getUserDeployedDirectory(), 0, monitor);
    }

    if (!project.getFolder(".bin/platform/lib").exists()) {
        project.getFolder(".bin/platform/lib").createLink(getKarafPlatformModel().getRootDirectory().append("lib"), 0, monitor);
    }

    if (!project.getFolder(".bin/platform/system").exists()) {
        project.getFolder(".bin/platform/system").createLink(getKarafPlatformModel().getPluginRootDirectory(), 0, monitor);
    }

    // TODO: Is this the right way to add the current installation?
    final IDynamicVariable eclipseHomeVariable = VariablesPlugin.getDefault().getStringVariableManager().getDynamicVariable("eclipse_home");
    final String eclipseHome = eclipseHomeVariable.getValue("");

    if (!project.getFolder(".bin/platform/eclipse").exists()) {
        project.getFolder(".bin/platform/eclipse").create(true, true, monitor);
    }

    if (!project.getFolder(".bin/platform/eclipse/dropins").exists()) {
        project.getFolder(".bin/platform/eclipse/dropins").createLink(new Path(eclipseHome).append("dropins"), 0, monitor);
    }

    if (!project.getFolder(".bin/platform/eclipse/plugins").exists()) {
        project.getFolder(".bin/platform/eclipse/plugins").createLink(new Path(eclipseHome).append("plugins"), 0, monitor);
    }
}
 
开发者ID:apache,项目名称:karaf-eik,代码行数:45,代码来源:KarafPlatformResourcesBuildUnit.java


示例19: getDynamicVariables

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
@Override
public IDynamicVariable[] getDynamicVariables() {
    throw new AssertionFailedError("Unexpected method call in MockStringVariableManager");
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:5,代码来源:MockStringVariableManager.java


示例20: getDynamicVariable

import org.eclipse.core.variables.IDynamicVariable; //导入依赖的package包/类
@Override
public IDynamicVariable getDynamicVariable(String name) {
    throw new AssertionFailedError("Unexpected method call in MockStringVariableManager");
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:5,代码来源:MockStringVariableManager.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TextAreaElement类代码示例发布时间:2022-05-22
下一篇:
Java WorldGenGlowStone2类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap