Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Content assistant provided?
Content assistant provided? [message #755805] Wed, 09 November 2011 16:13 Go to next message
Eclipse User
Hey,

is there a way to support content assistance while direct editing of
texts with graphiti? I'd like to add a Content Assistant for OCL
expressions.

best regards,

Lilija
Re: Content assistant provided? [message #755811 is a reply to message #755805] Wed, 09 November 2011 16:24 Go to previous messageGo to next message
Jos Warmer is currently offline Jos Warmer
Messages: 108
Registered: October 2010
Senior Member
Alexander Ny├čen had a preentation on work done to include Xtext editors inside GMF. See http://eclipsecon.org/sessions/tmf-meets-gmf-combining-graphical-and-textual-modeling.

This turned out to almost be GMF independent, and is a good basis for getting this inside Graphiti. This can solve your problem.

Jos
Re: Content assistant provided? [message #755972 is a reply to message #755805] Thu, 10 November 2011 10:58 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1618
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Besides to what Jos wrote, you can provide copletion values by implementing
AbstrctDirectEditingFeature.getValueProposals for text edit fields.

HTH,
Michael
Re: Content assistant provided? [message #999944 is a reply to message #755972] Sun, 13 January 2013 14:14 Go to previous messageGo to next message
Andreas Graf is currently offline Andreas Graf
Messages: 154
Registered: July 2009
Senior Member
Hi all,

I have implemented a test of content assist by putting

 @Override
    	public String[] getValueProposals(String value, int caretPos,
    			IDirectEditingContext context) {
    		System.out.println("___________________________");
    		return new String[] {"A","B"};
    	}

in my direct editing feature. However, the code does not seem to be called. What is the keycode to invoke the content assist in a direct editing text?

Thanks,

Andreas
Re: Content assistant provided? [message #1000332 is a reply to message #999944] Mon, 14 January 2013 14:42 Go to previous message
Michael Wenz is currently offline Michael Wenz
Messages: 1618
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Andreas,

the key to invoke auto completion is CTRL-Space (as in standard Eclipse text
editors). Did you enable auto completion in your direct editing feature by
retunring true in the methods isCompletionAvailable and
isAutoCompletionEnabled?

Michael
Previous Topic:How do I link by ID instead of hierarchy
Next Topic:Style with LineWidth and LineStyle does not work
Goto Forum:
  


Current Time: Fri Oct 24 09:33:38 GMT 2014

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

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