Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [ve-dev] separator

Dear VE Team:

Two questions:

1. Suppressing generation of var and instanciation stmt for a bean:

>>> GM >>>
Off hand, my first approach would be to treat this (in codegen) as a special
property that is set on the toolbar.  CodeGen will treat is as a "special"
property settings on the tool bar, but the decoder helper that is associated
with this new feature will create a Separator instance with the proper
allocation tree.
>>>>>

I created a separate feature on ULCMenu and for ULCSeparator, in codegen
generate, addSepartor() and in decoder create an instance of ULCSeparator.

The code looks as follows:

	private ULCMenu ulcMenu = null;

	private ULCMenu getUlcMenu() {
		if (ulcMenu == null) {
			ulcMenu = new ULCMenu();
			ULCSeparator ulcMenuSeparator = new ULCSeparator();
			ulcMenu.addSeparator();
		}
		return ulcMenu;
	}

The question is:

How do I suppress the generation of ULCSeparator ulcMenuSeparator = new
ULCSeparator();?

-------------------------------------

2. import stmt for an inner class:

For ULCToolBar life is bit easy in ULC. I can continue to us
ULCToolBar.add(ULCComponent)  method (instead of the convenience method
addSeparator()) because ULCToolBar$ULCSeparator descends from ULCComponent.
But there is one problem.

The separator for ULCToolBar is an inner public class of ULCToolBar nameley
ULCToolBar$ULCSeparator. The codegen generates an import statement:

     import com.ulcjava.base.application.ULCToolBar.ULCSeparator;

This is a compilation error and perhaps a bug : For inner class shouldn't it
import the outer class?

How do I get it to generate:	import com.ulcjava.base.application.ULCToolBar?

Thanks and regards,

Janak

"Janak Mulani" <janak.mulani@xxxxxxxxx>
Sent by: ve-dev-bounces@xxxxxxxxxxx
07/15/2005 02:44 AM Please respond to
Discussions people developing code for the Visual Editor project

To"ve-Dev@Eclipse. Org" <ve-dev@xxxxxxxxxxx>
cc
Subject[ve-dev] separator







Hi,

The separators for toolbar and menu are not supported in Swing VE.

In ULC we have ULCSeparator like JSeparator of swing.

I would like to generate addSeparator() method on tool bar and menu. But at
the same time suppress the generation of new ULCSepartor() expression and
also suppress generation of global or local var and getters.

In general is there a way to suppress generation of instantiation, variables
and getters?

Can I do the following:

In override file for ULCSeparator specify a CodeGenHelperClass that extends
AbstractExpressionDecoder.

The helper for decoder extends from ConstructorDecoderHelper and generates
nothing!

Or is there a better way to do separator?

Thanks,

Janak

_______________________________________________
ve-dev mailing list
ve-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ve-dev



Back to the top