| VE Unable to parse specific code [message #71229] |
Wed, 10 November 2004 22:35  |
Eclipse User |
|
|
|
Hi, just want to report a strange behaviour from VE:
I have a method "refresh" below which has nothing to do with graphical
edition, but part of a Composite subclass. The strange thing is VE seems
to have difficulty rendering the window if the method is present in the
file. With some investigations, I realize that the 2 combo variables
confuses VE, if I remove one of the 2 "combo" variable, VE comes back to
normal.
private void refresh() {
PatientInterface patient = getPatient();
checkBoxActive.setSelection(patient.isActive());
textFirstname.setText(patient.getFirstname());
textLastname.setText(patient.getLastname());
if (getPatient().getBirthday() != null) {
textBirthday.setText(patient.getBirthday().toString());
}
{//
Combo combo = comboGender;
List codes = (List) combo.getData();
String value = patient.getGender();
for (int i = 0; i < codes.size(); i++) {
CodeInterface c = (CodeInterface) codes.get(i);
if (c.getCodeKey().getKey().equals(value))
combo.select(i);
}
}
{//
Combo combo = comboLanguage;
List codes = (List) combo.getData();
String value = patient.getLanguage();
for (int i = 0; i < codes.size(); i++) {
CodeInterface c = (CodeInterface) codes.get(i);
if (c.getCodeKey().getKey().equals(value))
combo.select(i);
}
}
}
The "Error Log" view exposes the following errors:
Exception thrown:
java.lang.NullPointerException
at
org.eclipse.ve.internal.java.codegen.model.BeanPart.createEO bject(BeanPart.java:845)
at
org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.createJavaInstances(JavaSourceTranslator.java:693)
at
org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.buildCompositionModel(JavaSourceTranslator.java:774)
at
org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.decodeDocument(JavaSourceTranslator.java:881)
at
org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.loadModel(JavaSourceTranslator.java:656)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$Setup.run(JavaVisualEditorPart.java:1444)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
|
|
|
| Re: VE Unable to parse specific code [message #71444 is a reply to message #71229] |
Thu, 11 November 2004 11:44  |
Eclipse User |
|
|
|
Originally posted by: mendelgili.netscape.net
Tran Thanh Khiet wrote:
> Hi, just want to report a strange behaviour from VE:
> I have a method "refresh" below which has nothing to do with graphical
> edition, but part of a Composite subclass. The strange thing is VE seems
> to have difficulty rendering the window if the method is present in the
> file. With some investigations, I realize that the 2 combo variables
> confuses VE, if I remove one of the 2 "combo" variable, VE comes back to
> normal.
>
> private void refresh() {
> PatientInterface patient = getPatient();
> checkBoxActive.setSelection(patient.isActive());
> textFirstname.setText(patient.getFirstname());
> textLastname.setText(patient.getLastname());
> if (getPatient().getBirthday() != null) {
> textBirthday.setText(patient.getBirthday().toString());
> }
> {//
> Combo combo = comboGender;
> List codes = (List) combo.getData();
> String value = patient.getGender();
> for (int i = 0; i < codes.size(); i++) {
> CodeInterface c = (CodeInterface) codes.get(i);
> if (c.getCodeKey().getKey().equals(value))
> combo.select(i);
> }
> }
> {//
> Combo combo = comboLanguage;
> List codes = (List) combo.getData();
> String value = patient.getLanguage();
> for (int i = 0; i < codes.size(); i++) {
> CodeInterface c = (CodeInterface) codes.get(i);
> if (c.getCodeKey().getKey().equals(value))
> combo.select(i);
> }
> }
> }
The problem is due to the fact that 'combo' is instantiated in two places. VE scopes goes into methods, not blocks.
so the duplication confused it.
In any case the parsing error was fixed recently (in the maintenance build stream)
|
|
|
| Re: VE Unable to parse specific code [message #602993 is a reply to message #71229] |
Thu, 11 November 2004 11:44  |
Eclipse User |
|
|
|
Tran Thanh Khiet wrote:
> Hi, just want to report a strange behaviour from VE:
> I have a method "refresh" below which has nothing to do with graphical
> edition, but part of a Composite subclass. The strange thing is VE seems
> to have difficulty rendering the window if the method is present in the
> file. With some investigations, I realize that the 2 combo variables
> confuses VE, if I remove one of the 2 "combo" variable, VE comes back to
> normal.
>
> private void refresh() {
> PatientInterface patient = getPatient();
> checkBoxActive.setSelection(patient.isActive());
> textFirstname.setText(patient.getFirstname());
> textLastname.setText(patient.getLastname());
> if (getPatient().getBirthday() != null) {
> textBirthday.setText(patient.getBirthday().toString());
> }
> {//
> Combo combo = comboGender;
> List codes = (List) combo.getData();
> String value = patient.getGender();
> for (int i = 0; i < codes.size(); i++) {
> CodeInterface c = (CodeInterface) codes.get(i);
> if (c.getCodeKey().getKey().equals(value))
> combo.select(i);
> }
> }
> {//
> Combo combo = comboLanguage;
> List codes = (List) combo.getData();
> String value = patient.getLanguage();
> for (int i = 0; i < codes.size(); i++) {
> CodeInterface c = (CodeInterface) codes.get(i);
> if (c.getCodeKey().getKey().equals(value))
> combo.select(i);
> }
> }
> }
The problem is due to the fact that 'combo' is instantiated in two places. VE scopes goes into methods, not blocks.
so the duplication confused it.
In any case the parsing error was fixed recently (in the maintenance build stream)
|
|
|
Powered by
FUDForum. Page generated in 0.03734 seconds