Java 类org.eclipse.core.commands.IParameterValues 实例源码

项目:egradle    文件:LaunchGradleCommandHandler.java   
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    try {
        IParameter configparameter = event.getCommand().getParameter(PARAMETER_LAUNCHCONFIG);
        IParameterValues values = configparameter.getValues();
        if (values instanceof LaunchParameterValues){
            LaunchParameterValues launchParameterValues = (LaunchParameterValues) values;
            taskAttributeOverride = launchParameterValues.getOverriddenTasks();
            launch = launchParameterValues.getLaunch();
            postJob = launchParameterValues.getPostJob();

        }else{
            IDEUtil.logWarning(getClass().getSimpleName()+":parameter values without being a launch parameter value was used !??! :"+ values);
        }

    } catch (NotDefinedException | ParameterValuesException e) {
        throw new IllegalStateException("Cannot fetch command parameter!", e);
    }
    return super.execute(event);
}
项目:relations    文件:CommandHelper.java   
/**
 * This is an ugly workaround to prevent that
 * <code>PlatformUI.getWorkbench()</code> is called.
 */
private static boolean checkE4Parameter(final IParameterValues inValue) {
    if (inValue instanceof PerspectiveParameterValues
            || inValue instanceof PreferencePageParameterValues
            || inValue instanceof ViewParameterValues
            || inValue instanceof WizardParameterValues) {
        return false;
    }
    return true;
}
项目:elexis-3-core    文件:Handler.java   
public IParameterValues getValues() throws ParameterValuesException{
    return new IParameterValues() {

        public Map getParameterValues(){
            return new HashMap<String, String>();
        }
    };

}
项目:relations    文件:AbstractEditForm.java   
@Override
public IParameterValues getValues() throws ParameterValuesException {
    return null;
}