本文整理匯總了Java中org.eclipse.debug.core.ILaunchConfiguration.getWorkingCopy方法的典型用法代碼示例。如果您正苦於以下問題:Java ILaunchConfiguration.getWorkingCopy方法的具體用法?Java ILaunchConfiguration.getWorkingCopy怎麽用?Java ILaunchConfiguration.getWorkingCopy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.debug.core.ILaunchConfiguration
的用法示例。
在下文中一共展示了ILaunchConfiguration.getWorkingCopy方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: enable
import org.eclipse.debug.core.ILaunchConfiguration; //導入方法依賴的package包/類
public static void enable(ILaunchConfiguration config) throws CoreException {
if(config instanceof ILaunchConfigurationWorkingCopy) {
enable((ILaunchConfigurationWorkingCopy) config);
} else {
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
enable(wc);
wc.doSave();
}
}
示例2: launch
import org.eclipse.debug.core.ILaunchConfiguration; //導入方法依賴的package包/類
public static void launch(NgCommand ngCommand, IProject project, String mode) throws CoreException {
String workingDir = AngularCLILaunchHelper.getWorkingDir(project);
String operation = ngCommand.name().toLowerCase();
// Check if configuration already exists
ILaunchConfiguration ngConfiguration = chooseLaunchConfiguration(workingDir, operation);
if (ngConfiguration != null) {
ILaunchConfigurationWorkingCopy wc = ngConfiguration.getWorkingCopy();
// Update nodejs file path if needed
if (wc.getAttribute(AngularCLILaunchConstants.NODE_FILE_PATH, (String) null) == null) {
updateNodeFilePath(project, wc);
}
// Update ng file path
if (wc.getAttribute(AngularCLILaunchConstants.NG_FILE_PATH, (String) null) == null) {
updateNgFilePath(project, wc);
}
ngConfiguration = wc.doSave();
DebugUITools.launch(ngConfiguration, mode);
} else {
// Creating Launch Configuration from scratch
ILaunchConfigurationWorkingCopy newConfiguration = createEmptyLaunchConfiguration(project.getName(),
operation);
// nodejs file to use
updateNodeFilePath(project, newConfiguration);
// ng file to use
updateNgFilePath(project, newConfiguration);
newConfiguration.setAttribute(AngularCLILaunchConstants.WORKING_DIR, workingDir);
newConfiguration.setAttribute(AngularCLILaunchConstants.OPERATION, operation);
// newConfiguration.setAttribute(AngularCLILaunchConstants.OPERATION_PARAMETERS,
// "--live-reload-port 65535");
newConfiguration.doSave();
DebugUITools.launch(newConfiguration, mode);
}
}
示例3: disable
import org.eclipse.debug.core.ILaunchConfiguration; //導入方法依賴的package包/類
public static void disable(ILaunchConfiguration config) throws CoreException {
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER, (String) null);
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, (String) null);
wc.doSave();
}