Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dtp-dev] Add more nodes to Schema tree node

Hi Larry

My intention is to expose Oracle specific database objects on the DSE. org.eclipse.datatools.modelbase.dbdefinition.DatabaseVendorDefinition seems to have getters for Schema, Sequence, Udt etc. and these objects currently appear on DSE; So I thought this would be the starting point to extend to create Oracle specific DatabaseVendorDefinition and have specific objects like Materialized Views. 

Or should I be extending org.eclipse.datatools.modelbase.sql.schema.Schema ? I have already tried it; but didnot get any far.

Regards
Anthos 
On 23/05/2006, at 4:44 AM, Lawrence E Dunnell wrote:


Anil,

The SQL Model and the DBDefinitions are actually two different models.  What Brian was describing below refers to extending the SQL Model.  The dbdefintion model is not intended to be extended but instead specific instances of the model are created for each vendor and version.  The purpose of the dbdefinition is to store metadata about each vendor's database such as the datatypes supported, identifier lengths, etc.

There are two methods  for creating an instance of the dbdefinition:  1) The method described in the whitepaper on the DTP website involves programmatically instantiating an instance of the dbdefinition model and setting the values, then saving the instance of the model or 2)  just copy an existing dbdefinition model instance and hand edit it in a text editor so that it reflects the values of the database you are adding support for  (this is the method used to create the existing dbdefinitions.)  Many of the properties in the dbdefinition model have default values so all of the properties are not reflected in each dbdefinition instance.  You'll need to look at the dbdefinition model to see all the properties supported.

The dbdefinition model is in org.eclipse.datatools.modelbase.dbdefinition.  The individual instances of the model are in org.eclipse.datatools.connectivity.dbdefinition.*.

The SQL model lives in org.eclipse.datatools.modelbase.sql.  And currently the only extention of the model lives in org.eclipse.datatools.modelbase.derby.

Larry Dunnell
Internet address: ledunnel@xxxxxxxxxx




"Anil Samuel" <anil.samuel@xxxxxxxxx>
Sent by: dtp-dev-bounces@xxxxxxxxxxx

05/21/2006 07:19 PM

Please respond to
DTP development mailing list <dtp-dev@xxxxxxxxxxx>

To
"DTP development mailing list" <dtp-dev@xxxxxxxxxxx>
cc
Subject
Re: [dtp-dev] Add more nodes to Schema tree node





Hi

Could someone please explain how-to generate the code found in org.eclipse.datatools.connectivity.dbdefinition.oracle plugin ? I did have a look at the build scripts; but unable to figure out how .ecore and .genmodels are used for this purpose.

Regards
Anthos

On 5/19/06, Anil Samuel <anil.samuel@xxxxxxxxx> wrote:
Do you recommend any book ? I saw few on Amazon but the reviews didnot look that good.

back to the topic, meanwhile I like to get ahead with the model creation. So once Ihave the .ecore and .genmodel that extend from SQLModel, how do I generate the
artifacts found in plugins/org.eclipse.datatools.connectivity.dbdefinition.oracle_*/ ? especially runtime/vendor/ stuff.

Thanks again & Regards
Anthos


On 5/19/06, brian.fitzpatrick@xxxxxxxxxx < brian.fitzpatrick@xxxxxxxxxx> wrote:
Hi Anthos,

Not necessarily, you can create a new ecore that references the SQL Model
ecore file and then create a genmodel file and create it that way. It's a
little tricky with EMF, but there are some good EMF books out now that
should help you to go that route. The SQL Model folks like to use Rational
Rose. But it's not the only way.

Good luck!




            "Anil Samuel"
            <anil.samuel@gmai
           
l.com>                                                     To
            Sent by:                  "DTP development mailing list"
            dtp-dev-bounces@e          <
dtp-dev@xxxxxxxxxxx>
           
clipse.org                                                 cc

                                                                  Subject
            05/18/2006 09:05          Re: [dtp-dev] Add more nodes to
            PM                        Schema tree node


            Please respond to
             DTP development
              mailing list
            <dtp-dev@eclipse.
                  org>






Hi Brian

Do I need to use Rational Rose to modify the Rose model to extend the SQL
Model's ecore EMF model definition ?

Regards
Anthos

On 2/4/06,
brian.fitzpatrick@xxxxxxxxxx < brian.fitzpatrick@xxxxxxxxxx>
wrote:
 Hi Anthos...

 If you take a look at these two links, you'll see some code that provides
 a
 basic example of extending the model and adding your own objects to the
 tree. I recently had to go through this process myself for one of the
 Sybase databases.

 
http://www.eclipse.org/datatools/project_modelbase/modelbase_doc/EclipseWorld/EclipseWorld_701_Building_with_the_Data_Tools_project.ppt

 
http://www.eclipse.org/downloads/download.php?file=/datatools/downloads/eclipseworld05/DTP_EclipseWorld.zip


 Basically it amounts to doing a few things...

 1) Extending the base SQL Model's ecore EMF model definition and
 generating
 your own model extensions.
 2) Creating a catalog loader (like Larry's suggesting).
 3) Creating logical containment elements to add the new elements to the
 view (logical containment extension point)
 4) Creating navigator content extensions to put new elements in the tree
 (along with the new node IVirtualNode classes)
 5) Adding a label service (extension point) to contribute icons for those
 nodes.

 Hopefully the EclipseWorld example will help.

 Brian Fitzpatrick
 Senior Software Engineer/DTP Committer
 Sybase, Inc.



              Anil Samuel
              <anil.samuel@gmai
             
l.com>
 To
              Sent by:                  DTP development mailing list
              dtp-dev-bounces@e         <
dtp-dev@xxxxxxxxxxx>
             
clipse.org
 cc


 Subject
              02/03/2006 03:38          Re: [dtp-dev] Add more nodes to
              PM                        Schema tree node


              Please respond to
               DTP development
                mailing list
              <dtp-dev@eclipse.
                    org>






 Thanks Larry. How about if I want to add nodes that are currently not
 there
 ?

 Anthos

 On 2/4/06, Lawrence E Dunnell <
ledunnel@xxxxxxxxxx > wrote:

   The nodes already exist in the view, the model just needs to be
 populated
   so that the Triggers and Indexes will be displayed.  The triggers and
   indexes are currently displayed under the node of the associated table.

   Larry Dunnell
   Internet address:
ledunnel@xxxxxxxxxx




 Anil Samuel <
anil.samuel@xxxxxxxxx
 >
 Sent by:
 
dtp-dev-bounces@xxxxxxxxxxx                                            To
                                               DTP development mailing
 list
                                               <
dtp-dev@xxxxxxxxxxx >
 02/02/2006 05:34 PM                                                    cc


 Subject
           Please respond to                   Re: [dtp-dev] Add more
 nodes
    DTP development mailing list <             to Schema tree node
         
dtp-dev@xxxxxxxxxxx >











   I am bit puzzled to tell you that I dont see any much code in
   DerbyCatalogProvider which would add more nodes to the view.

 
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.datatools.connectivity/plugins/org.eclipse.datatools.connectivity.derby/src/org/eclipse/datatools/connectivity/internal/derby/catalog/DerbyCatalogProvider.java?rev=HEAD&cvsroot=Datatools_Project&content-type=text/vnd.viewcvs-markup



   Should I be using public void
 setInitializationData(IConfigurationElement
   config, String propertyName, Object data) method ?


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


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

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



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



--
Anil Samuel <
anil.samuel@xxxxxxxxxx >
Principal Technical Member
Product Development
Oracle Corporation _______________________________________________
dtp-dev mailing list

dtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dtp-dev


_______________________________________________
dtp-dev mailing list

dtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dtp-dev



--

Anil Samuel <
anil.samuel@xxxxxxxxxx>
Principal Technical Member
Product Development
Oracle Corporation




--
Anil Samuel <
anil.samuel@xxxxxxxxxx>
Principal Technical Member
Product Development
Oracle Corporation
_______________________________________________
dtp-dev mailing list
dtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dtp-dev

_______________________________________________
dtp-dev mailing list



Back to the top