Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » New to SWT programming
New to SWT programming [message #539648] Fri, 11 June 2010 15:56 Go to next message
John is currently offline JohnFriend
Messages: 3
Registered: June 2010
Junior Member
I've been porting a PyQT hobby project of mine to SWT. I am moving along fine, but I'd like some pointers on useful SWT APIs I maybe unaware of.

* For a standalone app, is it a good idea to include JFace and all of its dependencies. I am using the TextEditor API in JFace for its built-in text search, undo/redo manager, and modification stamp. However, I end up including many dependencies. It seems that JFace is meant to be used for Eclipse plugin development, not exactly for standalone apps. In other words, is it better to write my own code for search, undo/redo, and detecting if the document was modified?

* Is there an existing library that adds common operations for text fields: a context menu with undo, redo, cut, copy, paste, and select all?



Re: New to SWT programming [message #539682 is a reply to message #539648] Fri, 11 June 2010 20:20 Go to previous messageGo to next message
Vijay RajFriend
Messages: 608
Registered: July 2009
Senior Member
Jface nothing but MVC applied upon SWT...

so if u want all those functions u have to use jface,

a plain SWT application can have JFACE,its not necessary that JFACE should be used with RCP application ....

infact many of the plugins of eclipse can be used out side OSGi environment as plain jars...
(pls correct me if i am wrong)

and by the why not port u r application to RCP rather then SWT???


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: New to SWT programming [message #539715 is a reply to message #539682] Sat, 12 June 2010 04:59 Go to previous messageGo to next message
John is currently offline JohnFriend
Messages: 3
Registered: June 2010
Junior Member
Thanks for the tip. I checked out an Eclipse RCP tutorial. It does provide a good framework for building applications. However, even a simple application ended up with a 80mb memory footprint on my system. My JFace/SWT app has a 40mb memory footprint.

From what I can see, an RCP app needs to be distributed as a zip file, where as an app directly coded using JFace/SWT can be distributed as a single jar file.

Re: New to SWT programming [message #539722 is a reply to message #539715] Sat, 12 June 2010 08:18 Go to previous message
Vijay RajFriend
Messages: 608
Registered: July 2009
Senior Member
but it has many advantages...

you can easily add new functionalities without touching the current code...

the memory footprint will differ once the application size grows,
an swt application will have a almost constant memory footprint thruout the applicayion runtime,where as RCP will have low footprint at start and will increase as the user uses the application.

jared applications are the old way,give a proper application with exe and all that man.....

Any way the advantages outway all the drawbacks which u mentioned...

If your application has scope for new functionality which would be added in later stages
my recomendation would be to go for RCP application...


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Previous Topic:Browser calls "completed(Event e)" of ProgressAdapter more than once
Next Topic:Canvas border blinking on resize
Goto Forum:
  


Current Time: Thu Apr 25 10:19:45 GMT 2024

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

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

Back to the top