Package melnorme.lang.ide.core.utils.prefs

Source Code of melnorme.lang.ide.core.utils.prefs.ProgramArgumentsPreference

/*******************************************************************************
* Copyright (c) 2014, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*     Bruno Medeiros - initial API and implementation
*******************************************************************************/
package melnorme.lang.ide.core.utils.prefs;

import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.variables.IStringVariableManager;
import org.eclipse.core.variables.VariablesPlugin;
import org.eclipse.debug.core.DebugPlugin;

public class ProgramArgumentsPreference extends StringPreference {
 
  public ProgramArgumentsPreference(String key, String defaultValue) {
    super(key, defaultValue);
  }
 
  public String[] getParsedArguments(IProject project) throws CoreException {
    String extraOptionsString = get(project);
    IStringVariableManager varMgr = VariablesPlugin.getDefault().getStringVariableManager();
    extraOptionsString = varMgr.performStringSubstitution(extraOptionsString, true);
    return DebugPlugin.parseArguments(extraOptionsString);
  }
 
}
TOP

Related Classes of melnorme.lang.ide.core.utils.prefs.ProgramArgumentsPreference

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.