Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Database programming, Third party components re-usability(Major disapointement trying to program E4 platform)
Database programming, Third party components re-usability [message #1841129] Tue, 04 May 2021 13:43 Go to next message
Charly Clément is currently offline Charly ClémentFriend
Messages: 5
Registered: June 2020
Junior Member
Dears,

I am a just retired engineer, 40 years exclusively focused in software development, and I cannot understand how peoples was able to write (yet so nice) applications in the eclipse platform. !!??

I would like to develop, from scratch, an eclipse RCP application, for managing crypto currencies wallets, trading sites, accessing « natively » to miscelaneous blockchains, accessing « REST API » to miscelaneous trading sites, displaying data grids, charts, using in internal a SQLite database,...... and so on.

In short, a « prototype » GUI application which I estimate that I would have done alone in one month with DotNet / C#.

Bur now, after 1 month, reading the Vogel's book and surfing about 24/24 on Internet, I am still not able to connect to a fucking sqlite database and displaying a single row of a table.

Third party Applications :
I wanted to start from an existing open source nice applications such as Dbeaver, Apache DirectoryStudio, and/or other.
But :

  • I was unable to « dismount » such applications, to keep the few essential parts of my interest, as these apps are non modular, full of dependencies and so on, despite that eclipse is touted as the summit of modularity.
  • I even don't yet know if these applications are E3 or E4 ones.
  • I only observed that between Vogel's book (E4) and these applications, these are two things different.


Modularity, Re-usability :
OK, I then started from scratch, roughly understanding what I did using the Vogel's book.
I now have a small result which I could like.
So, as modular as described in the book, I then wanted to try to use some Dialogs, Wizards and other, from the Dbeaver application, which I downloaded and full compiled and built in my eclipse workspace.
After passing days and days adjusting MyApp.product, MyFeature(s).xml , MyPlugins manifests and so on, I finally was able to call the DBeaver's NewConnectionWizard.
   @Execute public void execute(EPartService p, IWorkbench w, Shell s)
    {
        NewConnectionWizard wiz = new NewConnectionWizard();
        WizardDialog wizd = new WizardDialog(s, wiz);
        wizd.create();
        wizd.. .. .. ..
        wizd.. .. .. ..
    }

But absolutely WITHOUT ANY SUCCESS :
After days and days trying exploit all that I can find in Iworkbench.., Shell.., MApplication, MWindow,...... to find a way to pass any « good » parameters, or initialize « something » in Dbeaver, the only result I had was always, always, always:
java.lang.IllegalStateException: Workbench has not been created yet.
(after stepping probably about 90 % of the code of the « create », then perhaps not so far of the goal !?)
I finally concluded that nothing is modular, nothing is reusable, nothing is accessible, and then I decided to step down a level, using lowest level libraries.

DTP, What's that, it seems magic !:
I then discovered the DTP framework, which would probably solves my problem.
Relatively quickly, I can connect to my sqlite DB from my Eclipse IDE.
From there, It should be easy to retrieve my connection, as defined in my IDE,for using in my app.

But NO:
I didn't find any place where the IDE stores the leas of information about my connection, and obviously, I have never been able to exploit anything defined in the IDE from my code.
I then created the profile, then the connection with the following,
Properties			props	= generateMyProperties();
ProfileManager		pm	= ProfileManager.getInstance();       
IconnectionProfile	cp		= pm.createProfile("xxx","yyy", providerID, MyProps);
Istatus				s		= cp.connect();

[b]with :[/b]
providerID  = "org.eclipse.datatools.connectivity.";

with MyProps : 
    vendor   = "SQLite"; //$NON-NLS-1$
    version  = "3.5.9" ; //$NON-NLS-1$
    jarList  = "/XXXX/lib/sqlite-jdbc-3.5.9-universal.jar"
    userName = ""; 
    password = "";
    driverClass = "org.sqlite"; //$NON-NLS-1$
    driverURL   = "jdbc:sqlite:/XXXX/DbXchange.sqlite" + ";create=true"; 

Which seems run. My Status is OK !

And now, Jface TableViewer, ContentProvider !:
Now I am just tired searching on Internet a way, with DTP and RCP, to work with my database.
I would like to obtains the structure of my database, the tables, the columns.
In the worst case, I could even « duplicate » my data structures and then « mapping » them to my database tables, in the goal to select data, display them, ... handle them.

I don't know on which planet is eclipse / google located, because I expected that googeling terms around « Eclipse RCP DTP sqlite Jface database TableViewer ContentProvider » would have gave me thousands and thousands of examples and simple explainations about how to do that.
BUT NOTHING !

My Questions ?

  • Does using DTP have a sense in a RCP4 application ?
  • Why am I unable to exploit the least of third party software component in my E4 app (DTP, Dbeaver,...) ?
  • Is E4 usable or, even from scratch it would be preferable trading my Vogel's book for a Eclipse 3 book,... and restarting with E3 ?

If applicable regarding my first questions :
Can someone explain to me precisely, as a typical textbook case, how:

  • Opening the Dbeaver's NewConnectionWizard
  • The simplest way to access my sqlite DB, in the goal to use it with ArrayContentProvider, or any provider I could write.

Please don't say me to return to the vaccinator's .net platform.
(I liked it, but not the MS, it's why I am on debian for more than ten years)

Thanks in advance for answers, and/or discussion.
Charly.



Re: Database programming, Third party components re-usability [message #1841233 is a reply to message #1841129] Fri, 07 May 2021 09:23 Go to previous message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 260
Registered: April 2012
Senior Member
First, I have never tried to do database connections in Eclipse and never build a real RCP application before. Main experience is in building Eclipse IDE based products.

The core of Eclipse RCP is fully based on E4, so you should be able to build a full E4 application from scratch. However, Eclipse IDE still heavily depends on the E3 compatibility layer. The majority of plugins still uses E3 editors and views. To re-use these views in an E4 application all kind of wrapping is needed, of which some are provided by the RCP framework. For full compatibility with Eclipse IDE, you should build on top of the Eclipse IDE stack. In that way some of the pre-conditions assumed by the plugins u are re-using are better satisfied. Note that E3/E4 are mainly related to the UI of Eclipse, and then targeted at the workbench part of it (Stacks, Parts, Commands, Handlers, Menu, Toolbars), where E3 offers many static services and E4 provides a context that can inject services. The grapical internals of parts are all based on plain JFace/SWT. The backend can be any Java code.

The Eclipse DTP project seems not very active, last major release in 2017.

For questions about the specific projects, please try on their support channels. There will be nobody from Dbeaver or DTP reading on this part of the forum.
Previous Topic:Empty Window after second call
Next Topic:Drag a part to a part stack in another monitor
Goto Forum:
  


Current Time: Thu Apr 25 11:21:29 GMT 2024

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

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

Back to the top