本文整理汇总了Java中com.intellij.execution.configurations.RunConfigurationBase.getUserData方法的典型用法代码示例。如果您正苦于以下问题:Java RunConfigurationBase.getUserData方法的具体用法?Java RunConfigurationBase.getUserData怎么用?Java RunConfigurationBase.getUserData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.execution.configurations.RunConfigurationBase
的用法示例。
在下文中一共展示了RunConfigurationBase.getUserData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: attachToProcess
import com.intellij.execution.configurations.RunConfigurationBase; //导入方法依赖的package包/类
public void attachToProcess(@NotNull final RunConfigurationBase configuration, @NotNull final ProcessHandler handler, RunnerSettings runnerSettings) {
SnapShooterConfigurationSettings settings = configuration.getUserData(SnapShooterConfigurationSettings.SNAP_SHOOTER_KEY);
if (settings != null) {
final Runnable runnable = settings.getNotifyRunnable();
if (runnable != null) {
settings.setNotifyRunnable(null);
handler.addProcessListener(new ProcessAdapter() {
public void startNotified(final ProcessEvent event) {
runnable.run();
}
});
}
}
}
示例2: get
import com.intellij.execution.configurations.RunConfigurationBase; //导入方法依赖的package包/类
public static SnapShooterConfigurationSettings get(final RunConfigurationBase config) {
SnapShooterConfigurationSettings settings = config.getUserData(SNAP_SHOOTER_KEY);
if (settings == null) {
settings = new SnapShooterConfigurationSettings();
config.putUserData(SNAP_SHOOTER_KEY, settings);
}
return settings;
}
示例3: writeExternal
import com.intellij.execution.configurations.RunConfigurationBase; //导入方法依赖的package包/类
@Override
protected void writeExternal(@NotNull RunConfigurationBase runConfiguration, @NotNull Element element) throws WriteExternalException {
GuardsAgentSettings settings = runConfiguration.getUserData(SETTINGS_KEY);
if ( settings != null ) {
XmlSerializer.serializeInto(settings, element);
}
}