kate part

Roland Krause rokrau at yahoo.com
Wed Dec 19 01:49:02 UTC 2001


Sandy,
I spent a few hours yesterday learning about the gideon interfaces and
especially Editor and related things. 

The implementation of the TextEditor interface is now doubled with the
one in kdelibs. These dont go together well, unfortunately. I will try
and make the kwrite part work in gideon again. Maybe even try to
synchronize the changes from KDevelop-2 back in there too. 

Also I have an idea on how to get a kate part working, essentialy just
using the same technique as for the NEdit part and implementing it by
calling the appropriate Kate::Document Kate::View methods. Also not
really a big deal. 

MDI is a completely different animal and I do not fully understand what
all is involved with that. It seems like there is another interface to
be designed and implemented, not really in my line of interest. 

CodeCompletion is implemented in KTextEditor not in TextEditor. We will
need to drop one of the two interfaces.

Is Matthias Hoelzer-Kluepfel still around? What is his take on the
whole subject?

Roland

--- Sandy Meier <smeier at kdevelop.org> wrote:
> On Sunday, 16. December 2001 05:11, you wrote:
> > A Kate::Document inherits half a dozen classes that are all virtual
> > from KTextEditor, e.g. KTextEditor::Document, KTextEditor::Editor
> and
> > so on. Similar for a Kate::View. These together make up the
> interface.
> > The implementation classes are called KateDocument and KateView,
> these
> > actually do all the work and are the ones created throught the
> factory.
> >
> >
> > Create the documentation and you will see how this works.
> Ok, I understand. Thanks!
> 
> But I have a question using the kate part through the KTextEditor
> interface. 
> for instance:
> 
> // meta
> KTrader::OfferList offers = KTrader::self()->query(
> "KTextEditor/Document" );
> KService::Ptr service = *offers.begin();
> KLibFactory *factory = KLibLoader::self()->factory(
> service->library() );
> 
> // now a doc
> KTextEditor::Document* doc = static_cast<KTextEditor::Document 
> *>(factory->create( this, 0, "KTextEditor::Document" ) );
> 
> The document class contains only 2-3 methods, but no mechanismen to
> ask the 
> interfaces which are available (Matthias added some query methods for
> this in 
> the old interface) . Should I use RTTI or is there an other approach?
> 
> 
> This following one works but maybe the designer (Christoph?) had an
> other 
> solution in mind?
> 
> KTextEditor::EditInterface* edit = dynamic_cast
> <KTextEditor::EditInterface*> 
> (doc);
> 
> if(edit !=0){
>       // ok, edit interface available
> }
> 
> BTW: the code completion interface isn't implemented at the moment
> or? If 
> not, is it possible to add it before KDE3final? Otherwise we will end
> with a 
> copy of kate in the KDevelop branch. :-(
> 
> Ciao!
> Sandy
> 
> _______________________________________________
> Kdevelop-devel mailing list
> Kdevelop-devel at barney.cs.uni-potsdam.de
> http://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com




More information about the KDevelop-devel mailing list