Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ve-dev] Not able to Customise Java Beans View

Hi Joe,
Thanks for the input. I shall try to find more information with the light of your pointer. I was looking for some extension point to serve my purpose and have still not tried subclassing the visual editor.I understand that there is no extension point available right now to give me access to the ContentOutlinePage of visual editor.I was still hoping not to use the hack. It would be helpful if you are able to give any more insights into the task if possible.
 
Best Regards
-Rashmi


Message: 3
Date: Thu, 11 Aug 2005 18:24:36 +0530
From: "Rashmi H. Ramachandra" <rashmi.ramchandra@xxxxxxxxxxxxxxxxxx>
Subject: [ve-dev] Not able to Customise Java Beans View 
To: <ve-dev@xxxxxxxxxxx>
Message-ID:
	<1668D20B966DEE458A971083818EB30499BCC5@xxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"

Hi all ,
I'm currently working on extending the VE to support additional feature for my custom implementation. 
For this exercise, I need to access the components of the JavaBean View. The JavaBean View needs to be customised to show both visual and non-visual components present in the java file. Is there any API provided for developers to access the JavaBean View components and does this API help me to add and modify the Tree values in the JavaBean View? My specific customisations include grouping or categorising identical elements together and providing nodes for non-visual components. For example, if there are 3 JPanels in my java code, they need to appear as 3 nodes under a heading "Panel" in the Javabean view. I need to add a new non-visual node ["abc"] when my java code has a variable declaration like "String abc = new String()" as a class variable. I have tried going through the current API and the source code available for tracking the JavaBean View components, but it has not been fruitful. 
Help is greatly appreciated.
Thanks in advance, 
-Rashmi 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://eclipse.org/pipermail/ve-dev/attachments/20050811/46fa819f/attachment.html

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

Message: 4
Date: Thu, 11 Aug 2005 14:39:38 +0100
From: Joe Winchester <WINCHEST@xxxxxxxxxx>
Subject: Re: [ve-dev] Not able to Customise Java Beans View
To: Discussions people developing code for the Visual Editor project
	<ve-dev@xxxxxxxxxxx>
Message-ID:
	<OF9A44B196.B6F9C3A9-ON8025705A.0049138E-8025705A.004B0A09@xxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"

Hi Rashmi,

The JavaBeans view is created by the JavaVisualEditorPart which returns it 
as the answer to the question
        getAdapter(BeansList.class);
This returns an instance of JavaVisualEditorOutlinePage.  This is the 
class that is the JavaBeans view and it creates the topmost object that is 
a SubclassCompositionComponentsTreeEditPart.  This class is responsible 
for creating the children beneath it.

There are two ways I think you could get your own children into the tree.
First - if you have your own editor that subclassed JavaVisualEditorPart 
you could return your own outline page that would control the children. 
However if you don't already have your own editor this would be a hack.

Second - some kind of extension API should be opened up.  I think the best 
would be that the SubclassCompositionComponentsTreeEditPart wasn't hard 
coded as it currently is, but instead came from looking up a decorator 
that you could change with a .override, although this would have to be an 
BeanComposition which isn't a reflected JavaObject (most of our .overrides 
are from target VM Java classes).

Rich - do you have any ideas ?

Best regards,

Joe Winchester



Back to the top