use of com.intellij.openapi.extensions.DefaultPluginDescriptor in project intellij-community by JetBrains.
the class ExtensionComponentAdapterTest method testUnknownAttributes.
@Test
public void testUnknownAttributes() {
String name = TestExtensionClassOne.class.getName();
Element element = readElement("<bean implementation=\"123\"/>");
DefaultPicoContainer container = new DefaultPicoContainer();
DefaultPluginDescriptor descriptor = new DefaultPluginDescriptor("test");
new ExtensionComponentAdapter(name, element, container, descriptor, false).getComponentInstance(container);
}
use of com.intellij.openapi.extensions.DefaultPluginDescriptor in project android by JetBrains.
the class CaptureServiceTest method testUpdate.
public void testUpdate() throws Exception {
CaptureService service = CaptureService.getInstance(myProject);
assertNull(service.getCapturesDirectory());
VirtualFile projectDir = LocalFileSystem.getInstance().findFileByPath(myProject.getBasePath());
assertNotNull(projectDir);
VirtualFile captures = createChildDirectory(projectDir, "captures");
assertTrue(service.getCaptures().isEmpty());
createChildData(captures, "data.capture");
service.update();
assertTrue(service.getCaptures().isEmpty());
ExtensionsArea area = Extensions.getRootArea();
Element element = readElement(" <extensions defaultExtensionNs=\"com.android\">\n" + " <captureType implementation=\"" + MyCaptureType.class.getName() + "\"/>\n </extensions>");
area.registerExtension(new DefaultPluginDescriptor(PluginId.getId("com.android")), element.getChild("captureType"));
MyCaptureType type = CaptureTypeService.getInstance().getType(MyCaptureType.class);
service.update();
assertEquals(1, service.getCaptures().size());
assertEquals(type, service.getCaptures().iterator().next().getType());
}
Aggregations