for (Object element : selectedItems) {
if (element instanceof IType) {
IType type = (IType) element;
IProject project = type.getJavaProject().getProject();
String typeName = BeansConfigFactory.JAVA_CONFIG_TYPE + type.getFullyQualifiedName();
IBeansProject springProject = BeansCorePlugin.getModel().getProject(project);
((BeansProject) springProject).addConfig(typeName, IBeansConfig.Type.MANUAL);
((BeansProject) springProject).saveDescription();
} else if (element instanceof IFile) {
IFile file = (IFile) element;
IProject project = file.getProject();
IBeansProject springProject = BeansCorePlugin.getModel().getProject(project);
((BeansProject) springProject).addConfig(file, IBeansConfig.Type.MANUAL);
((BeansProject) springProject).saveDescription();
}
}
BeansModelLabelDecorator.update();