本文整理汇总了Java中de.ovgu.featureide.fm.core.configuration.Configuration类的典型用法代码示例。如果您正苦于以下问题:Java Configuration类的具体用法?Java Configuration怎么用?Java Configuration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Configuration类属于de.ovgu.featureide.fm.core.configuration包,在下文中一共展示了Configuration类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: nextExample
import de.ovgu.featureide.fm.core.configuration.Configuration; //导入依赖的package包/类
public Configuration nextExample() throws TimeoutException {
if (exampleSolver == null) {
if (bSatisfiable.isEmpty() && !findSatisfiable(true))
return null;
Node child = bChildren[bSatisfiable.removeFirst()];
exampleSolver = new SatSolver(new And(a, new Not(child.clone())), 1000);
}
String solution = exampleSolver.getSolution();
if (solution.equals(lastSolution)) {
exampleSolver = null;
return nextExample();
}
Configuration configuration = new Configuration(fm, false);
ConfigurationReader reader = new ConfigurationReader(configuration);
reader.readFromString(solution);
lastSolution = solution;
return configuration;
}
示例2: getConfiguredFeaturesOfProject
import de.ovgu.featureide.fm.core.configuration.Configuration; //导入依赖的package包/类
/**
* Get specified features of a project.
*
* @param project
* the project to check
* @return set of features
* @throws FeatureException
* configuration object could not be created and features could
* not be read
*/
public Set<Feature> getConfiguredFeaturesOfProject(IProject project)
throws FeatureException {
IProject featureInfoProject = getFeatureInfoProject();
IFile modelFile = null;
IFile configFile = null;
if (featureInfoProject != null) {
modelFile = featureInfoProject.getFile(FeatureConstants.MODEL_FILE);
configFile = featureInfoProject.getFolder(
FeatureConstants.CONFIGS_PATH).getFile(
project.getName() + "."
+ FeatureConstants.CONFIG_FILE_EXTENSION);
}
if (featureInfoProject != null && modelFile.exists()
&& configFile.exists()) {
Configuration config = null;
config = readConfig(configFile, modelFile);
return new HashSet<Feature>(config.getSelectedFeatures());
} else {
return new HashSet<Feature>();
}
}
示例3: calculateExample
import de.ovgu.featureide.fm.core.configuration.Configuration; //导入依赖的package包/类
public Configuration calculateExample(boolean added)
throws TimeoutException {
return added ? addedProducts.nextExample() : removedProducts
.nextExample();
}