mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
IDEA-305004 Tooltip in *.form files is not taken from resource, <toolTipText resource-bundle> does not respected
GitOrigin-RevId: 0d3f9d22aa7e0e13b93938fc0512d59bd9e8c7b3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7dd09ea46f
commit
778532dd3b
@@ -70,10 +70,6 @@ public final class StringPropertyCodeGenerator extends PropertyCodeGenerator imp
|
|||||||
GetFontMethodProvider fontMethodProvider,
|
GetFontMethodProvider fontMethodProvider,
|
||||||
final int componentLocal,
|
final int componentLocal,
|
||||||
final String formClassName) throws IOException, ClassNotFoundException {
|
final String formClassName) throws IOException, ClassNotFoundException {
|
||||||
if (!"text".equals(property.getName())) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
StringDescriptor propertyValue = (StringDescriptor)lwComponent.getPropertyValue(property);
|
StringDescriptor propertyValue = (StringDescriptor)lwComponent.getPropertyValue(property);
|
||||||
String key = propertyValue.getKey();
|
String key = propertyValue.getKey();
|
||||||
|
|
||||||
@@ -81,6 +77,10 @@ public final class StringPropertyCodeGenerator extends PropertyCodeGenerator imp
|
|||||||
propertyValue.setFormClass(formClassName);
|
propertyValue.setFormClass(formClassName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!"text".equals(property.getName())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
InstrumentationClassFinder.PseudoClass abstractButtonClass = componentClass.getFinder().loadClass(AbstractButton.class.getName());
|
InstrumentationClassFinder.PseudoClass abstractButtonClass = componentClass.getFinder().loadClass(AbstractButton.class.getName());
|
||||||
InstrumentationClassFinder.PseudoClass jLabelClass = componentClass.getFinder().loadClass(JLabel.class.getName());
|
InstrumentationClassFinder.PseudoClass jLabelClass = componentClass.getFinder().loadClass(JLabel.class.getName());
|
||||||
if (!(abstractButtonClass.isAssignableFrom(componentClass) || jLabelClass.isAssignableFrom(componentClass))) {
|
if (!(abstractButtonClass.isAssignableFrom(componentClass) || jLabelClass.isAssignableFrom(componentClass))) {
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text resource-bundle="com/intellij/uiDesigner/core/TestProperties" key="test"/>
|
<text resource-bundle="com/intellij/uiDesigner/core/TestProperties" key="test"/>
|
||||||
|
<toolTipText resource-bundle="com/intellij/uiDesigner/core/TestProperties" key="test"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
</children>
|
</children>
|
||||||
|
|||||||
@@ -365,6 +365,7 @@ public class AsmCodeGeneratorTest extends JpsBuildTestCase {
|
|||||||
public void testTitledSeparator() throws Exception {
|
public void testTitledSeparator() throws Exception {
|
||||||
JPanel panel = (JPanel)getInstrumentedRootComponent("TestTitledSeparator.form", "BindingTest");
|
JPanel panel = (JPanel)getInstrumentedRootComponent("TestTitledSeparator.form", "BindingTest");
|
||||||
assertEquals("Test Value", ((JLabel)((JPanel)panel.getComponent(2)).getComponent(0)).getText());
|
assertEquals("Test Value", ((JLabel)((JPanel)panel.getComponent(2)).getComponent(0)).getText());
|
||||||
|
assertEquals("Test Value", ((JPanel)panel.getComponent(2)).getToolTipText());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGotItPanel() throws Exception {
|
public void testGotItPanel() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user