本文整理汇总了Java中org.eclipse.che.ide.api.project.MutableProjectConfig.setName方法的典型用法代码示例。如果您正苦于以下问题:Java MutableProjectConfig.setName方法的具体用法?Java MutableProjectConfig.setName怎么用?Java MutableProjectConfig.setName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.che.ide.api.project.MutableProjectConfig
的用法示例。
在下文中一共展示了MutableProjectConfig.setName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onImporterSelected
import org.eclipse.che.ide.api.project.MutableProjectConfig; //导入方法依赖的package包/类
@Override
public void onImporterSelected(ProjectImporterDescriptor importer) {
final MutableProjectConfig prevData = wizard.getDataObject();
wizard = getWizardForImporter(importer);
final MutableProjectConfig dataObject = wizard.getDataObject();
dataObject.getSource().setType(importer.getId());
// some values should be shared between wizards for different project types
dataObject.setName(prevData.getName());
dataObject.setDescription(prevData.getDescription());
WizardPage<MutableProjectConfig> firstPage = wizard.navigateToFirst();
if (firstPage != null) {
firstPage.init(dataObject);
}
WizardPage<MutableProjectConfig> importerPage = wizard.navigateToNext();
importerPage.go(mainPage.getImporterPanel());
}
示例2: actionPerformed
import org.eclipse.che.ide.api.project.MutableProjectConfig; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent event) {
Resource folder = getSelectedItem();
if (folder == null) {
return;
}
Path location = folder.getLocation();
if (location == null) {
return;
}
MutableProjectConfig mutableProjectConfig = new MutableProjectConfig();
mutableProjectConfig.setPath(location.toString());
mutableProjectConfig.setName(folder.getName());
projectConfigWizard.show(mutableProjectConfig);
}
示例3: onProjectTypeSelected
import org.eclipse.che.ide.api.project.MutableProjectConfig; //导入方法依赖的package包/类
@Override
public void onProjectTypeSelected(ProjectTypeDto projectType) {
final MutableProjectConfig prevData = wizard.getDataObject();
wizard = getWizardForProjectType(projectType, prevData);
wizard.navigateToFirst();
final MutableProjectConfig newProject = wizard.getDataObject();
// some values should be shared between wizards for different project types
newProject.setPath(prevData.getPath());
newProject.setName(prevData.getName());
newProject.setDescription(prevData.getDescription());
newProject.setMixins(prevData.getMixins());
if (wizardMode == UPDATE) {
newProject.setAttributes(prevData.getAttributes());
} else {
final MutableProjectConfig.MutableSourceStorage sourceStorage = prevData.getSource();
if (sourceStorage
!= null) { // some values should be cleared when user switch between categories
sourceStorage.setLocation("");
sourceStorage.setType("");
sourceStorage.getParameters().clear();
}
prevData.getProjects().clear();
final List<AttributeDto> attributes = projectType.getAttributes();
Map<String, List<String>> prevDataAttributes = prevData.getAttributes();
Map<String, List<String>> newAttributes = new HashMap<>();
for (AttributeDto attribute : attributes) {
if (prevDataAttributes.containsKey(attribute.getName())) {
newAttributes.put(attribute.getName(), prevDataAttributes.get(attribute.getName()));
}
}
newProject.setAttributes(newAttributes);
}
// set dataObject's values from projectType
newProject.setType(projectType.getId());
}