Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ve-dev] Insert code to non-initialize method


The initialize() method is used for classes that extend a component.   ... VE's pattern will look for the method that  "initializes" a given component; typically the method that constructs the component.... this is the method where the "design time" visual view will be driven from (component settings could occur in many other methods as components state changes during the life cycle of the app.).

For a class that extends a component, the "this" component is implicitly constructed with its constructor... VE will append the initialize method for this (or the jbInit()....)

You can override the name of the method by creating a IThisReferenceRule,  see BeanPartFactory.generateThisInitMethod()


------------
Dr. Gili Mendel
IBM
Software Development
RTP Raleigh, NC
(919)543 6408, tie: 441 6408



Joe Winchester <WINCHEST@xxxxxxxxxx>
Sent by: ve-dev-bounces@xxxxxxxxxxx

07/11/2006 07:29 AM

Please respond to
Discussions people developing code for the Visual Editor project <ve-dev@xxxxxxxxxxx>

To
Discussions people developing code for the Visual Editor project <ve-dev@xxxxxxxxxxx>
cc
Subject
Re: [ve-dev] Insert code to non-initialize method






Hi Hung,


For a new class we always use initialize() I think.  However we recognize various other methods on parsing an existing class and these are specified in the preferences page.  One thing you could do is add your own method with a different name, such as jbInit() that JBuilder uses for example, and then when you open the VE and drop things I think we'll add into the existing method that we see on parsing is the one that does the initializaiton.


Let me know if this works or not.


Best regards,


Joe

Please respond to Discussions people developing code for the Visual Editor project <ve-dev@xxxxxxxxxxx>

Sent by:        ve-dev-bounces@xxxxxxxxxxx

To:        ve-dev@xxxxxxxxxxx
cc:        
Subject:        
[ve-dev] Insert code to non-initialize method



Hello,

I extended the Palette and code generation to insert Java Code when dropping our widget.   However, VE always drop the code in the "initialize" method.   Is there a way to insert code to other method, and not initialize()?   Thank you.


Regards,

Hung Lam
IBM HATS Development
Bldg 502-E226
hungvlam@xxxxxxxxxx
919-543-9053
_______________________________________________
ve-dev mailing list
ve-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ve-dev

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


Back to the top