Skip to main content



      Home
Home » Archived » Visual Editor (VE) » stop parsing a method
stop parsing a method [message #103249] Wed, 24 August 2005 07:49 Go to next message
Eclipse UserFriend
Originally posted by: eldzino.gmail.com

hello,

is there any way to stop VE from parsing certain method in a class? i
have a visual class where a long method is called within initialization.
this method sets labels on certain conditions.. VE hangs with message:

An internal error occured during: "Setup Java Visual Editor"

If I comment the block of code in the method, everything is ok, but I
can't do it everytime I want to modify the appearance...

Thanks :)

This is the log generated:

!SESSION 2005-08-24 13:44:22.504
-----------------------------------------------
eclipse.buildId=I20050627-1435
java.version=1.5.0_03
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=sk_SK
Command-line arguments: -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.core.runtime 4 2 2005-08-24 13:45:28.719
!MESSAGE An internal error occurred during: "Setup Java Visual Editor".
!STACK 0
java.lang.StackOverflowError
at java.lang.String.valueOf(Unknown Source)
at
org.eclipse.ve.internal.java.codegen.model.BeanPartDeclerati on.createDeclerationHandle(BeanPartDecleration.java:273)
at
org.eclipse.ve.internal.java.codegen.model.BeanPartDeclerati on.createDeclerationHandle(BeanPartDecleration.java:283)
at
org.eclipse.ve.internal.java.codegen.util.CodeGenUtil.getBea nPart(CodeGenUtil.java:931)
at
org.eclipse.ve.internal.java.codegen.java.ConstructorDecoder Helper$CGResolver.resolveToBean(ConstructorDecoderHelper.jav a:222)
at
org.eclipse.ve.internal.java.codegen.java.ConstructorDecoder Helper$CGResolver.resolveName(ConstructorDecoderHelper.java: 173)
at
org.eclipse.jem.workbench.utility.ParseTreeCreationFromAST.v isit(ParseTreeCreationFromAST.java:518)
........
Re: stop parsing a method [message #103320 is a reply to message #103249] Wed, 24 August 2005 10:08 Go to previous messageGo to next message
Eclipse UserFriend
Hello,
Could you please paste the block of code which is causing a hang - we
would like to make sure this doesnt happen.
Regards,
Sri.


eldzi wrote:
> hello,
>
> is there any way to stop VE from parsing certain method in a class? i
> have a visual class where a long method is called within initialization.
> this method sets labels on certain conditions.. VE hangs with message:
>
> An internal error occured during: "Setup Java Visual Editor"
>
> If I comment the block of code in the method, everything is ok, but I
> can't do it everytime I want to modify the appearance...
>
> Thanks :)
>
> This is the log generated:
>
> !SESSION 2005-08-24 13:44:22.504
> -----------------------------------------------
> eclipse.buildId=I20050627-1435
> java.version=1.5.0_03
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=sk_SK
> Command-line arguments: -os win32 -ws win32 -arch x86
>
> !ENTRY org.eclipse.core.runtime 4 2 2005-08-24 13:45:28.719
> !MESSAGE An internal error occurred during: "Setup Java Visual Editor".
> !STACK 0
> java.lang.StackOverflowError
> at java.lang.String.valueOf(Unknown Source)
> at
> org.eclipse.ve.internal.java.codegen.model.BeanPartDeclerati on.createDeclerationHandle(BeanPartDecleration.java:273)
> at
> org.eclipse.ve.internal.java.codegen.model.BeanPartDeclerati on.createDeclerationHandle(BeanPartDecleration.java:283)
> at
> org.eclipse.ve.internal.java.codegen.util.CodeGenUtil.getBea nPart(CodeGenUtil.java:931)
> at
> org.eclipse.ve.internal.java.codegen.java.ConstructorDecoder Helper$CGResolver.resolveToBean(ConstructorDecoderHelper.jav a:222)
> at
> org.eclipse.ve.internal.java.codegen.java.ConstructorDecoder Helper$CGResolver.resolveName(ConstructorDecoderHelper.java: 173)
> at
> org.eclipse.jem.workbench.utility.ParseTreeCreationFromAST.v isit(ParseTreeCreationFromAST.java:518)
> .......
Re: stop parsing a method [message #103376 is a reply to message #103320] Wed, 24 August 2005 11:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eldzino.gmail.com

if you want I can provide the whole class but it is much longer :))

the block of code:

private void setItemTypeInfos(DefaultMutableTreeNode node) {
if(node == null) {
labelItemDescription.setText("");
labelPriceForUnit.setText("");
labelTaxRate.setText("");
labelUnit.setText("");
labelQuantity.setText("");
labelPrice.setText("");
labelPriceWithoutTax.setText("");
labelPriceWithTax.setText("");
labelDiscount.setText("");
labelTax.setText("");

panelDivider.setVisible(false);
// panelDivider2.setVisible(false);

labelLabelQuantity.setVisible(false);
labelLabelPriceForUnit.setVisible(false);
labelLabelDiscount.setVisible(false);
labelLabelPrice.setVisible(false);
labelLabelPriceWithoutTax.setVisible(false);
labelLabelTax.setVisible(false);
labelLabelPriceWithTax.setVisible(false);

labelMultiply.setVisible(false);
labelEqual.setVisible(false);
return;
}

DBItem itemType = (DBItem) node.getUserObject();

labelItemDescription.setText(itemType.getItemTypeCaption());
DecimalFormat s = (DecimalFormat) DecimalFormat.getCurrencyInstance();
s.setMaximumFractionDigits(2);
s.setMinimumFractionDigits(2);

labelPriceForUnit.setText(s.format(CalcNumberFormatter.round (itemType
.getPriceForUnit()))
+ "/");

s = (DecimalFormat) DecimalFormat.getPercentInstance();
s.setMaximumFractionDigits(0);
s.setMinimumFractionDigits(0);

labelTaxRate.setText("(" + s.format((double) itemType.getTaxRate() /
100) + ")");
labelUnit.setText(itemType.getItemType().getUnit());

labelQuantity.setText(new Integer(itemType.getQuantity()).toString());

double y = itemType.getPriceForUnit();
double price = CalcNumberFormatter.round(itemType.getQuantity() * y);

Double c = new Double(price);

s = (DecimalFormat) DecimalFormat.getCurrencyInstance();
s.setMaximumFractionDigits(2);
s.setMinimumFractionDigits(2);
labelPriceWithoutTax.setText(s.format(CalcNumberFormatter.ro und(c)));


labelDiscount.setText(s.format(CalcNumberFormatter.round(ite mType.getDiscount())));

price -= itemType.getDiscount();
c = new Double(price);
labelPrice.setText(s.format(CalcNumberFormatter.round(c)));

y = price * itemType.getTaxRate() / 100;
double tax = CalcNumberFormatter.round(y);
c = new Double(tax);

labelTax.setText(s.format(CalcNumberFormatter.round(c)));

price += tax;
c = new Double(price);

labelPriceWithTax.setText(s.format(CalcNumberFormatter.round (c)));


panelDivider.setVisible(true);
// panelDivider2.setVisible(true);

labelLabelQuantity.setVisible(true);
labelLabelPriceForUnit.setVisible(true);
labelLabelDiscount.setVisible(true);
labelLabelPrice.setVisible(true);
labelLabelPriceWithoutTax.setVisible(true);
labelLabelTax.setVisible(true);
labelLabelPriceWithTax.setVisible(true);

labelMultiply.setVisible(true);
labelEqual.setVisible(true);
}


Sri Gunturi wrote:
> Hello,
> Could you please paste the block of code which is causing a hang -
> we would like to make sure this doesnt happen.
> Regards,
> Sri.
>
>
> eldzi wrote:
>
>> hello,
>>
>> is there any way to stop VE from parsing certain method in a class? i
>> have a visual class where a long method is called within initialization.
>> this method sets labels on certain conditions.. VE hangs with message:
>>
>> An internal error occured during: "Setup Java Visual Editor"
>>
>> If I comment the block of code in the method, everything is ok, but I
>> can't do it everytime I want to modify the appearance...
>>
>> Thanks :)
>>
>> This is the log generated:
>>
>> !SESSION 2005-08-24 13:44:22.504
>> -----------------------------------------------
>> eclipse.buildId=I20050627-1435
>> java.version=1.5.0_03
>> java.vendor=Sun Microsystems Inc.
>> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=sk_SK
>> Command-line arguments: -os win32 -ws win32 -arch x86
>>
>> !ENTRY org.eclipse.core.runtime 4 2 2005-08-24 13:45:28.719
>> !MESSAGE An internal error occurred during: "Setup Java Visual Editor".
>> !STACK 0
>> java.lang.StackOverflowError
>> at java.lang.String.valueOf(Unknown Source)
>> at
>> org.eclipse.ve.internal.java.codegen.model.BeanPartDeclerati on.createDeclerationHandle(BeanPartDecleration.java:273)
>>
>> at
>> org.eclipse.ve.internal.java.codegen.model.BeanPartDeclerati on.createDeclerationHandle(BeanPartDecleration.java:283)
>>
>> at
>> org.eclipse.ve.internal.java.codegen.util.CodeGenUtil.getBea nPart(CodeGenUtil.java:931)
>>
>> at
>> org.eclipse.ve.internal.java.codegen.java.ConstructorDecoder Helper$CGResolver.resolveToBean(ConstructorDecoderHelper.jav a:222)
>>
>> at
>> org.eclipse.ve.internal.java.codegen.java.ConstructorDecoder Helper$CGResolver.resolveName(ConstructorDecoderHelper.java: 173)
>>
>> at
>> org.eclipse.jem.workbench.utility.ParseTreeCreationFromAST.v isit(ParseTreeCreationFromAST.java:518)
>>
>> .......
Re: stop parsing a method [message #105685 is a reply to message #103376] Thu, 08 September 2005 04:48 Go to previous message
Eclipse UserFriend
Originally posted by: eldzino.gmail.com

I installed new version of VE 1.1.0.1 and the problem is gone. thankx :)

eldzi wrote:
> if you want I can provide the whole class but it is much longer :))
>
> the block of code:
>
> private void setItemTypeInfos(DefaultMutableTreeNode node) {
> if(node == null) {
> labelItemDescription.setText("");
> labelPriceForUnit.setText("");
> labelTaxRate.setText("");
> labelUnit.setText("");
> labelQuantity.setText("");
> labelPrice.setText("");
> labelPriceWithoutTax.setText("");
> labelPriceWithTax.setText("");
> labelDiscount.setText("");
> labelTax.setText("");
>
> panelDivider.setVisible(false);
> // panelDivider2.setVisible(false);
>
> labelLabelQuantity.setVisible(false);
> labelLabelPriceForUnit.setVisible(false);
> labelLabelDiscount.setVisible(false);
> labelLabelPrice.setVisible(false);
> labelLabelPriceWithoutTax.setVisible(false);
> labelLabelTax.setVisible(false);
> labelLabelPriceWithTax.setVisible(false);
>
> labelMultiply.setVisible(false);
> labelEqual.setVisible(false);
> return;
> }
>
> DBItem itemType = (DBItem) node.getUserObject();
>
> labelItemDescription.setText(itemType.getItemTypeCaption());
> DecimalFormat s = (DecimalFormat) DecimalFormat.getCurrencyInstance();
> s.setMaximumFractionDigits(2);
> s.setMinimumFractionDigits(2);
>
> labelPriceForUnit.setText(s.format(CalcNumberFormatter.round (itemType
> .getPriceForUnit()))
> + "/");
>
> s = (DecimalFormat) DecimalFormat.getPercentInstance();
> s.setMaximumFractionDigits(0);
> s.setMinimumFractionDigits(0);
>
> labelTaxRate.setText("(" + s.format((double) itemType.getTaxRate() /
> 100) + ")");
> labelUnit.setText(itemType.getItemType().getUnit());
>
> labelQuantity.setText(new Integer(itemType.getQuantity()).toString());
>
> double y = itemType.getPriceForUnit();
> double price = CalcNumberFormatter.round(itemType.getQuantity() * y);
>
> Double c = new Double(price);
>
> s = (DecimalFormat) DecimalFormat.getCurrencyInstance();
> s.setMaximumFractionDigits(2);
> s.setMinimumFractionDigits(2);
> labelPriceWithoutTax.setText(s.format(CalcNumberFormatter.ro und(c)));
>
>
> labelDiscount.setText(s.format(CalcNumberFormatter.round(ite mType.getDiscount())));
>
> price -= itemType.getDiscount();
> c = new Double(price);
> labelPrice.setText(s.format(CalcNumberFormatter.round(c)));
>
> y = price * itemType.getTaxRate() / 100;
> double tax = CalcNumberFormatter.round(y);
> c = new Double(tax);
>
> labelTax.setText(s.format(CalcNumberFormatter.round(c)));
>
> price += tax;
> c = new Double(price);
>
> labelPriceWithTax.setText(s.format(CalcNumberFormatter.round (c)));
>
>
> panelDivider.setVisible(true);
> // panelDivider2.setVisible(true);
>
> labelLabelQuantity.setVisible(true);
> labelLabelPriceForUnit.setVisible(true);
> labelLabelDiscount.setVisible(true);
> labelLabelPrice.setVisible(true);
> labelLabelPriceWithoutTax.setVisible(true);
> labelLabelTax.setVisible(true);
> labelLabelPriceWithTax.setVisible(true);
>
> labelMultiply.setVisible(true);
> labelEqual.setVisible(true);
> }
>
>
> Sri Gunturi wrote:
>
>>Hello,
>> Could you please paste the block of code which is causing a hang -
>>we would like to make sure this doesnt happen.
>>Regards,
>>Sri.
>>
>>
>>eldzi wrote:
>>
>>
>>>hello,
>>>
>>>is there any way to stop VE from parsing certain method in a class? i
>>>have a visual class where a long method is called within initialization.
>>>this method sets labels on certain conditions.. VE hangs with message:
>>>
>>>An internal error occured during: "Setup Java Visual Editor"
>>>
>>>If I comment the block of code in the method, everything is ok, but I
>>>can't do it everytime I want to modify the appearance...
>>>
>>>Thanks :)
>>>
>>>This is the log generated:
>>>
>>>!SESSION 2005-08-24 13:44:22.504
>>>-----------------------------------------------
>>>eclipse.buildId=I20050627-1435
>>>java.version=1.5.0_03
>>>java.vendor=Sun Microsystems Inc.
>>>BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=sk_SK
>>>Command-line arguments: -os win32 -ws win32 -arch x86
>>>
>>>!ENTRY org.eclipse.core.runtime 4 2 2005-08-24 13:45:28.719
>>>!MESSAGE An internal error occurred during: "Setup Java Visual Editor".
>>>!STACK 0
>>>java.lang.StackOverflowError
>>> at java.lang.String.valueOf(Unknown Source)
>>> at
>>> org.eclipse.ve.internal.java.codegen.model.BeanPartDeclerati on.createDeclerationHandle(BeanPartDecleration.java:273)
>>>
>>> at
>>> org.eclipse.ve.internal.java.codegen.model.BeanPartDeclerati on.createDeclerationHandle(BeanPartDecleration.java:283)
>>>
>>> at
>>> org.eclipse.ve.internal.java.codegen.util.CodeGenUtil.getBea nPart(CodeGenUtil.java:931)
>>>
>>> at
>>> org.eclipse.ve.internal.java.codegen.java.ConstructorDecoder Helper$CGResolver.resolveToBean(ConstructorDecoderHelper.jav a:222)
>>>
>>> at
>>> org.eclipse.ve.internal.java.codegen.java.ConstructorDecoder Helper$CGResolver.resolveName(ConstructorDecoderHelper.java: 173)
>>>
>>> at
>>> org.eclipse.jem.workbench.utility.ParseTreeCreationFromAST.v isit(ParseTreeCreationFromAST.java:518)
>>>
>>>.......
Re: stop parsing a method [message #610368 is a reply to message #103249] Wed, 24 August 2005 10:08 Go to previous message
Eclipse UserFriend
Hello,
Could you please paste the block of code which is causing a hang - we
would like to make sure this doesnt happen.
Regards,
Sri.


eldzi wrote:
> hello,
>
> is there any way to stop VE from parsing certain method in a class? i
> have a visual class where a long method is called within initialization.
> this method sets labels on certain conditions.. VE hangs with message:
>
> An internal error occured during: "Setup Java Visual Editor"
>
> If I comment the block of code in the method, everything is ok, but I
> can't do it everytime I want to modify the appearance...
>
> Thanks :)
>
> This is the log generated:
>
> !SESSION 2005-08-24 13:44:22.504
> -----------------------------------------------
> eclipse.buildId=I20050627-1435
> java.version=1.5.0_03
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=sk_SK
> Command-line arguments: -os win32 -ws win32 -arch x86
>
> !ENTRY org.eclipse.core.runtime 4 2 2005-08-24 13:45:28.719
> !MESSAGE An internal error occurred during: "Setup Java Visual Editor".
> !STACK 0
> java.lang.StackOverflowError
> at java.lang.String.valueOf(Unknown Source)
> at
> org.eclipse.ve.internal.java.codegen.model.BeanPartDeclerati on.createDeclerationHandle(BeanPartDecleration.java:273)
> at
> org.eclipse.ve.internal.java.codegen.model.BeanPartDeclerati on.createDeclerationHandle(BeanPartDecleration.java:283)
> at
> org.eclipse.ve.internal.java.codegen.util.CodeGenUtil.getBea nPart(CodeGenUtil.java:931)
> at
> org.eclipse.ve.internal.java.codegen.java.ConstructorDecoder Helper$CGResolver.resolveToBean(ConstructorDecoderHelper.jav a:222)
> at
> org.eclipse.ve.internal.java.codegen.java.ConstructorDecoder Helper$CGResolver.resolveName(ConstructorDecoderHelper.java: 173)
> at
> org.eclipse.jem.workbench.utility.ParseTreeCreationFromAST.v isit(ParseTreeCreationFromAST.java:518)
> .......
Re: stop parsing a method [message #610373 is a reply to message #103320] Wed, 24 August 2005 11:52 Go to previous message
Eclipse UserFriend
Originally posted by: eldzino.gmail.com

if you want I can provide the whole class but it is much longer :))

the block of code:

private void setItemTypeInfos(DefaultMutableTreeNode node) {
if(node == null) {
labelItemDescription.setText("");
labelPriceForUnit.setText("");
labelTaxRate.setText("");
labelUnit.setText("");
labelQuantity.setText("");
labelPrice.setText("");
labelPriceWithoutTax.setText("");
labelPriceWithTax.setText("");
labelDiscount.setText("");
labelTax.setText("");

panelDivider.setVisible(false);
// panelDivider2.setVisible(false);

labelLabelQuantity.setVisible(false);
labelLabelPriceForUnit.setVisible(false);
labelLabelDiscount.setVisible(false);
labelLabelPrice.setVisible(false);
labelLabelPriceWithoutTax.setVisible(false);
labelLabelTax.setVisible(false);
labelLabelPriceWithTax.setVisible(false);

labelMultiply.setVisible(false);
labelEqual.setVisible(false);
return;
}

DBItem itemType = (DBItem) node.getUserObject();

labelItemDescription.setText(itemType.getItemTypeCaption());
DecimalFormat s = (DecimalFormat) DecimalFormat.getCurrencyInstance();
s.setMaximumFractionDigits(2);
s.setMinimumFractionDigits(2);

labelPriceForUnit.setText(s.format(CalcNumberFormatter.round (itemType
.getPriceForUnit()))
+ "/");

s = (DecimalFormat) DecimalFormat.getPercentInstance();
s.setMaximumFractionDigits(0);
s.setMinimumFractionDigits(0);

labelTaxRate.setText("(" + s.format((double) itemType.getTaxRate() /
100) + ")");
labelUnit.setText(itemType.getItemType().getUnit());

labelQuantity.setText(new Integer(itemType.getQuantity()).toString());

double y = itemType.getPriceForUnit();
double price = CalcNumberFormatter.round(itemType.getQuantity() * y);

Double c = new Double(price);

s = (DecimalFormat) DecimalFormat.getCurrencyInstance();
s.setMaximumFractionDigits(2);
s.setMinimumFractionDigits(2);
labelPriceWithoutTax.setText(s.format(CalcNumberFormatter.ro und(c)));


labelDiscount.setText(s.format(CalcNumberFormatter.round(ite mType.getDiscount())));

price -= itemType.getDiscount();
c = new Double(price);
labelPrice.setText(s.format(CalcNumberFormatter.round(c)));

y = price * itemType.getTaxRate() / 100;
double tax = CalcNumberFormatter.round(y);
c = new Double(tax);

labelTax.setText(s.format(CalcNumberFormatter.round(c)));

price += tax;
c = new Double(price);

labelPriceWithTax.setText(s.format(CalcNumberFormatter.round (c)));


panelDivider.setVisible(true);
// panelDivider2.setVisible(true);

labelLabelQuantity.setVisible(true);
labelLabelPriceForUnit.setVisible(true);
labelLabelDiscount.setVisible(true);
labelLabelPrice.setVisible(true);
labelLabelPriceWithoutTax.setVisible(true);
labelLabelTax.setVisible(true);
labelLabelPriceWithTax.setVisible(true);

labelMultiply.setVisible(true);
labelEqual.setVisible(true);
}


Sri Gunturi wrote:
> Hello,
> Could you please paste the block of code which is causing a hang -
> we would like to make sure this doesnt happen.
> Regards,
> Sri.
>
>
> eldzi wrote:
>
>> hello,
>>
>> is there any way to stop VE from parsing certain method in a class? i
>> have a visual class where a long method is called within initialization.
>> this method sets labels on certain conditions.. VE hangs with message:
>>
>> An internal error occured during: "Setup Java Visual Editor"
>>
>> If I comment the block of code in the method, everything is ok, but I
>> can't do it everytime I want to modify the appearance...
>>
>> Thanks :)
>>
>> This is the log generated:
>>
>> !SESSION 2005-08-24 13:44:22.504
>> -----------------------------------------------
>> eclipse.buildId=I20050627-1435
>> java.version=1.5.0_03
>> java.vendor=Sun Microsystems Inc.
>> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=sk_SK
>> Command-line arguments: -os win32 -ws win32 -arch x86
>>
>> !ENTRY org.eclipse.core.runtime 4 2 2005-08-24 13:45:28.719
>> !MESSAGE An internal error occurred during: "Setup Java Visual Editor".
>> !STACK 0
>> java.lang.StackOverflowError
>> at java.lang.String.valueOf(Unknown Source)
>> at
>> org.eclipse.ve.internal.java.codegen.model.BeanPartDeclerati on.createDeclerationHandle(BeanPartDecleration.java:273)
>>
>> at
>> org.eclipse.ve.internal.java.codegen.model.BeanPartDeclerati on.createDeclerationHandle(BeanPartDecleration.java:283)
>>
>> at
>> org.eclipse.ve.internal.java.codegen.util.CodeGenUtil.getBea nPart(CodeGenUtil.java:931)
>>
>> at
>> org.eclipse.ve.internal.java.codegen.java.ConstructorDecoder Helper$CGResolver.resolveToBean(ConstructorDecoderHelper.jav a:222)
>>
>> at
>> org.eclipse.ve.internal.java.codegen.java.ConstructorDecoder Helper$CGResolver.resolveName(ConstructorDecoderHelper.java: 173)
>>
>> at
>> org.eclipse.jem.workbench.utility.ParseTreeCreationFromAST.v isit(ParseTreeCreationFromAST.java:518)
>>
>> .......
Re: stop parsing a method [message #610699 is a reply to message #103376] Thu, 08 September 2005 04:48 Go to previous message
Eclipse UserFriend
Originally posted by: eldzino.gmail.com

I installed new version of VE 1.1.0.1 and the problem is gone. thankx :)

eldzi wrote:
> if you want I can provide the whole class but it is much longer :))
>
> the block of code:
>
> private void setItemTypeInfos(DefaultMutableTreeNode node) {
> if(node == null) {
> labelItemDescription.setText("");
> labelPriceForUnit.setText("");
> labelTaxRate.setText("");
> labelUnit.setText("");
> labelQuantity.setText("");
> labelPrice.setText("");
> labelPriceWithoutTax.setText("");
> labelPriceWithTax.setText("");
> labelDiscount.setText("");
> labelTax.setText("");
>
> panelDivider.setVisible(false);
> // panelDivider2.setVisible(false);
>
> labelLabelQuantity.setVisible(false);
> labelLabelPriceForUnit.setVisible(false);
> labelLabelDiscount.setVisible(false);
> labelLabelPrice.setVisible(false);
> labelLabelPriceWithoutTax.setVisible(false);
> labelLabelTax.setVisible(false);
> labelLabelPriceWithTax.setVisible(false);
>
> labelMultiply.setVisible(false);
> labelEqual.setVisible(false);
> return;
> }
>
> DBItem itemType = (DBItem) node.getUserObject();
>
> labelItemDescription.setText(itemType.getItemTypeCaption());
> DecimalFormat s = (DecimalFormat) DecimalFormat.getCurrencyInstance();
> s.setMaximumFractionDigits(2);
> s.setMinimumFractionDigits(2);
>
> labelPriceForUnit.setText(s.format(CalcNumberFormatter.round (itemType
> .getPriceForUnit()))
> + "/");
>
> s = (DecimalFormat) DecimalFormat.getPercentInstance();
> s.setMaximumFractionDigits(0);
> s.setMinimumFractionDigits(0);
>
> labelTaxRate.setText("(" + s.format((double) itemType.getTaxRate() /
> 100) + ")");
> labelUnit.setText(itemType.getItemType().getUnit());
>
> labelQuantity.setText(new Integer(itemType.getQuantity()).toString());
>
> double y = itemType.getPriceForUnit();
> double price = CalcNumberFormatter.round(itemType.getQuantity() * y);
>
> Double c = new Double(price);
>
> s = (DecimalFormat) DecimalFormat.getCurrencyInstance();
> s.setMaximumFractionDigits(2);
> s.setMinimumFractionDigits(2);
> labelPriceWithoutTax.setText(s.format(CalcNumberFormatter.ro und(c)));
>
>
> labelDiscount.setText(s.format(CalcNumberFormatter.round(ite mType.getDiscount())));
>
> price -= itemType.getDiscount();
> c = new Double(price);
> labelPrice.setText(s.format(CalcNumberFormatter.round(c)));
>
> y = price * itemType.getTaxRate() / 100;
> double tax = CalcNumberFormatter.round(y);
> c = new Double(tax);
>
> labelTax.setText(s.format(CalcNumberFormatter.round(c)));
>
> price += tax;
> c = new Double(price);
>
> labelPriceWithTax.setText(s.format(CalcNumberFormatter.round (c)));
>
>
> panelDivider.setVisible(true);
> // panelDivider2.setVisible(true);
>
> labelLabelQuantity.setVisible(true);
> labelLabelPriceForUnit.setVisible(true);
> labelLabelDiscount.setVisible(true);
> labelLabelPrice.setVisible(true);
> labelLabelPriceWithoutTax.setVisible(true);
> labelLabelTax.setVisible(true);
> labelLabelPriceWithTax.setVisible(true);
>
> labelMultiply.setVisible(true);
> labelEqual.setVisible(true);
> }
>
>
> Sri Gunturi wrote:
>
>>Hello,
>> Could you please paste the block of code which is causing a hang -
>>we would like to make sure this doesnt happen.
>>Regards,
>>Sri.
>>
>>
>>eldzi wrote:
>>
>>
>>>hello,
>>>
>>>is there any way to stop VE from parsing certain method in a class? i
>>>have a visual class where a long method is called within initialization.
>>>this method sets labels on certain conditions.. VE hangs with message:
>>>
>>>An internal error occured during: "Setup Java Visual Editor"
>>>
>>>If I comment the block of code in the method, everything is ok, but I
>>>can't do it everytime I want to modify the appearance...
>>>
>>>Thanks :)
>>>
>>>This is the log generated:
>>>
>>>!SESSION 2005-08-24 13:44:22.504
>>>-----------------------------------------------
>>>eclipse.buildId=I20050627-1435
>>>java.version=1.5.0_03
>>>java.vendor=Sun Microsystems Inc.
>>>BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=sk_SK
>>>Command-line arguments: -os win32 -ws win32 -arch x86
>>>
>>>!ENTRY org.eclipse.core.runtime 4 2 2005-08-24 13:45:28.719
>>>!MESSAGE An internal error occurred during: "Setup Java Visual Editor".
>>>!STACK 0
>>>java.lang.StackOverflowError
>>> at java.lang.String.valueOf(Unknown Source)
>>> at
>>> org.eclipse.ve.internal.java.codegen.model.BeanPartDeclerati on.createDeclerationHandle(BeanPartDecleration.java:273)
>>>
>>> at
>>> org.eclipse.ve.internal.java.codegen.model.BeanPartDeclerati on.createDeclerationHandle(BeanPartDecleration.java:283)
>>>
>>> at
>>> org.eclipse.ve.internal.java.codegen.util.CodeGenUtil.getBea nPart(CodeGenUtil.java:931)
>>>
>>> at
>>> org.eclipse.ve.internal.java.codegen.java.ConstructorDecoder Helper$CGResolver.resolveToBean(ConstructorDecoderHelper.jav a:222)
>>>
>>> at
>>> org.eclipse.ve.internal.java.codegen.java.ConstructorDecoder Helper$CGResolver.resolveName(ConstructorDecoderHelper.java: 173)
>>>
>>> at
>>> org.eclipse.jem.workbench.utility.ParseTreeCreationFromAST.v isit(ParseTreeCreationFromAST.java:518)
>>>
>>>.......
Previous Topic:Error Message whenever i close Visual Editor
Next Topic:Property check
Goto Forum:
  


Current Time: Tue Jul 22 13:10:51 EDT 2025

Powered by FUDForum. Page generated in 0.06273 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top