You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an exception that sporadically shows up in our application...
What seems to be happening is that the following properties of the Java project are not guaranteed to be set, by the time they are requested by WindowBuilder:
JavaCore.CODEASSIST_LOCAL_PREFIXES
JavaCore.CODEASSIST_LOCAL_SUFFIXES
JavaCore.CODEASSIST_FIELD_PREFIXES
JavaCore.CODEASSIST_FIELD_SUFFIXES
We use those properties to remove any prefixes and suffixes of the variables. Given that we're relying on JDT, I think it makes more sense to simply move on, rather than throwing an exception.
Stacktrace:
java.lang.NullPointerException: Cannot read the array length because "prefixes" is null
at org.eclipse.wb.internal.core.model.variable.VariableUtils.stripPrefixSuffix(VariableUtils.java:138) ~[org.eclipse.wb.core.java_1.9.3.202306071608.jar:?]
at org.eclipse.wb.internal.core.model.variable.LazyVariableSupportUtils.getExpectedMethodName(LazyVariableSupportUtils.java:339) ~[org.eclipse.wb.core.java_1.9.3.202306071608.jar:?]
at org.eclipse.wb.internal.core.model.variable.LazyVariableSupport.add_getVariableStatementSource(LazyVariableSupport.java:229) ~[org.eclipse.wb.core.java_1.9.3.202306071608.jar:?]
at org.eclipse.wb.internal.core.model.generation.statement.lazy.LazyStatementGenerator.add(LazyStatementGenerator.java:54) ~[org.eclipse.wb.core.java_1.9.3.202306071608.jar:?]
at org.eclipse.wb.internal.core.model.JavaInfoUtils.add(JavaInfoUtils.java:1392) ~[org.eclipse.wb.core.java_1.9.3.202306071608.jar:?]
at org.eclipse.wb.internal.core.model.JavaInfoUtils.add(JavaInfoUtils.java:1295) ~[org.eclipse.wb.core.java_1.9.3.202306071608.jar:?]
at org.eclipse.wb.internal.core.model.JavaInfoUtils.add(JavaInfoUtils.java:1225) ~[org.eclipse.wb.core.java_1.9.3.202306071608.jar:?]
at org.eclipse.wb.internal.swing.model.layout.LayoutInfo.add(LayoutInfo.java:330) ~[org.eclipse.wb.swing_1.9.2.202306071608.jar:?]
at org.eclipse.wb.internal.swing.model.layout.GenericFlowLayoutInfo.add(GenericFlowLayoutInfo.java:52) ~[org.eclipse.wb.swing_1.9.2.202306071608.jar:?]
at org.eclipse.wb.internal.swing.gef.policy.layout.GenericFlowLayoutEditPolicy.command_CREATE(GenericFlowLayoutEditPolicy.java:84) ~[org.eclipse.wb.swing_1.9.2.202306071608.jar:?]
at org.eclipse.wb.internal.swing.gef.policy.layout.GenericFlowLayoutEditPolicy.command_CREATE(GenericFlowLayoutEditPolicy.java:1) ~[org.eclipse.wb.swing_1.9.2.202306071608.jar:?]
at org.eclipse.wb.core.gef.policy.layout.flow.ObjectFlowLayoutEditPolicy$1.executeEdit(ObjectFlowLayoutEditPolicy.java:54) ~[org.eclipse.wb.core_1.12.0.202306071608.jar:?]
at org.eclipse.wb.core.gef.command.EditCommand$1.run(EditCommand.java:53) ~[org.eclipse.wb.core_1.12.0.202306071608.jar:?]
at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.run(ExecutionUtils.java:331) ~[org.eclipse.wb.core_1.12.0.202306071608.jar:?]
at org.eclipse.wb.core.gef.command.EditCommand.execute(EditCommand.java:50) ~[org.eclipse.wb.core_1.12.0.202306071608.jar:?]
at org.eclipse.wb.internal.gef.core.EditDomain.executeCommand(EditDomain.java:59) ~[org.eclipse.wb.core_1.12.0.202306071608.jar:?]
at org.eclipse.wb.gef.core.tools.Tool.executeCommand(Tool.java:209) ~[org.eclipse.wb.core_1.12.0.202306071608.jar:?]
at org.eclipse.wb.gef.core.tools.AbstractCreationTool.handleButtonUp(AbstractCreationTool.java:62) ~[org.eclipse.wb.core_1.12.0.202306071608.jar:?]
at org.eclipse.wb.gef.core.tools.Tool.mouseUp(Tool.java:395) ~[org.eclipse.wb.core_1.12.0.202306071608.jar:?]
at org.eclipse.wb.internal.gef.core.EditDomain.mouseUp(EditDomain.java:255) ~[org.eclipse.wb.core_1.12.0.202306071608.jar:?]
at org.eclipse.wb.internal.gef.graphical.EditEventManager.mouseUp(EditEventManager.java:151) ~[org.eclipse.wb.core_1.12.0.202306071608.jar:?]
at jdk.internal.reflect.GeneratedMethodAccessor398.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.eclipse.wb.internal.draw2d.EventManager$1.invoke(EventManager.java:317) ~[org.eclipse.wb.core_1.12.0.202306071608.jar:?]
The text was updated successfully, but these errors were encountered:
Use the JDT NamingConventions class for adding or removing the prefix
and/or suffix of a given variable name. This avoids having to explicitly
load the project-specific prefix/suffix properties.
Resolveseclipse-windowbuilder#717
Use the JDT NamingConventions class for adding or removing the prefix
and/or suffix of a given variable name. This avoids having to explicitly
load the project-specific prefix/suffix properties.
Resolves#717
This is an exception that sporadically shows up in our application...
What seems to be happening is that the following properties of the Java project are not guaranteed to be set, by the time they are requested by WindowBuilder:
We use those properties to remove any prefixes and suffixes of the variables. Given that we're relying on JDT, I think it makes more sense to simply move on, rather than throwing an exception.
Stacktrace:
The text was updated successfully, but these errors were encountered: