void (DynamicElementSettings settings) { assert settings != null; assert !settings.isMethod(); final DPropertyElement propertyElement = (DPropertyElement) createDynamicElement(settings); final DClassElement classElement = getOrCreateClassElement(myProject, settings.getContainingClassName()); ToolWindow window = DynamicToolWindowWrapper.getInstance(myProject).getToolWindow(); //important to fetch myToolWindow before adding classElement.addProperty(propertyElement); addItemInTree(classElement, propertyElement, window); }