Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [Solved] XbaseHoverDocumentationProvider
[Solved] XbaseHoverDocumentationProvider [message #856206] Wed, 25 April 2012 13:19 Go to next message
Freddy H is currently offline Freddy HFriend
Messages: 26
Registered: April 2012
Junior Member
Hello,

I work with xtext 2.1 and i need to use class XbaseHoverDocuementProvider... Rolling Eyes

how to use it ? because eclipse give a warning :

Discouraged access: The type XbaseHoverDocumentationProvider is not accessible due to restriction on required library org.eclipse.xtext.xbase.ui_2.3.0.v201203201034.jar

else how can i to adapt functionality..

sorry for my english limited
Freddy.

[Updated on: Fri, 27 April 2012 09:26]

Report message to a moderator

Re: XbaseHoverDocumentationProvider [message #856214 is a reply to message #856206] Wed, 25 April 2012 13:25 Go to previous messageGo to next message
Holger Schill is currently offline Holger SchillFriend
Messages: 75
Registered: July 2009
Member
Hi Freddy,

the XbaseHoverDocumentationProvider is there since 2.3. How can you
access it within 2.1?
However, xbase is not public API until now. You can ignore the warning
and add a @SuppressWarning.

Cheers,

Holger
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: XbaseHoverDocumentationProvider [message #856246 is a reply to message #856214] Wed, 25 April 2012 13:54 Go to previous messageGo to next message
Freddy H is currently offline Freddy HFriend
Messages: 26
Registered: April 2012
Junior Member
i need this class to format my javadoc comment of type :

/** *....... *.......*/

i am not allowed to use the methods I need with the @suppressWarning.

Freddy.
Re: XbaseHoverDocumentationProvider [message #856287 is a reply to message #856246] Wed, 25 April 2012 14:29 Go to previous messageGo to next message
Holger Schill is currently offline Holger SchillFriend
Messages: 75
Registered: July 2009
Member
What methods do you want to call? Are you sure that they are public?
Cheers,
Holger


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: XbaseHoverDocumentationProvider [message #856302 is a reply to message #856287] Wed, 25 April 2012 14:47 Go to previous messageGo to next message
Freddy H is currently offline Freddy HFriend
Messages: 26
Registered: April 2012
Junior Member
I don't know exactly that method use,
i have just to format my string,
i saw this solution on another post : Custom hover support with Xtext 2.3

Cheers,
Freddy.
Re: XbaseHoverDocumentationProvider [message #856311 is a reply to message #856302] Wed, 25 April 2012 14:52 Go to previous messageGo to next message
Holger Schill is currently offline Holger SchillFriend
Messages: 75
Registered: July 2009
Member
Just use
org.eclipse.xtext.xbase.ui.hover.XbaseHoverDocumentationProvider.computeDocumentation(EObject)
and handle in your Object where the MultiLineComment is on and you will
get HTML back.

--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: XbaseHoverDocumentationProvider [message #856382 is a reply to message #856311] Wed, 25 April 2012 16:03 Go to previous messageGo to next message
Freddy H is currently offline Freddy HFriend
Messages: 26
Registered: April 2012
Junior Member
hum i d'ont see this method "computeDocumention" on the documentation :

download.eclipse.org/modeling/tmf/xtext/javadoc/2.3/org/eclipse/xtext/xbase/ui/hover/XbaseHoverDocumentationProvider.html

-> i have an error if i test...

Freddy.
Re: XbaseHoverDocumentationProvider [message #856552 is a reply to message #856382] Wed, 25 April 2012 19:29 Go to previous messageGo to next message
Holger Schill is currently offline Holger SchillFriend
Messages: 75
Registered: July 2009
Member
Grap the sourcecode drom repository. Then you'll see the method.
If you have errors fix them or remove the unnecessary stuff.


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: XbaseHoverDocumentationProvider [message #857091 is a reply to message #856552] Thu, 26 April 2012 08:30 Go to previous messageGo to next message
Freddy H is currently offline Freddy HFriend
Messages: 26
Registered: April 2012
Junior Member
hi Holger..

hum have you another solution ?
i have the sourcecode for XBaseHoverDocumentationProvider, but if i correct one error, i recover ten error...

for exemple, i have warning discourage access :

import org.eclipse.jdt.internal.corext.dom.ASTNodes;
import org.eclipse.xtext.xbase.compiler.JvmModelGenerator;
import org.eclipse.xtext.xbase.compiler.output.FakeTreeAppendable;
import org.eclipse.xtext.xbase.compiler.output.ITreeAppendable;
import org.eclipse.xtext.xbase.jvmmodel.IJvmModelAssociations;

Freddy.
Re: XbaseHoverDocumentationProvider [message #857177 is a reply to message #857091] Thu, 26 April 2012 09:56 Go to previous messageGo to next message
Holger Schill is currently offline Holger SchillFriend
Messages: 75
Registered: July 2009
Member
That's ok because Xbase is not marked as API until now. Just add a
@SuppressWarnings

Cheers,
Holger

--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: XbaseHoverDocumentationProvider [message #857402 is a reply to message #857177] Thu, 26 April 2012 14:00 Go to previous messageGo to next message
Freddy H is currently offline Freddy HFriend
Messages: 26
Registered: April 2012
Junior Member
ty, i just have last problem
in getJavaDoc :

Object classpathURIContext = ((XtextResourceSet) context.eResource().getResourceSet()).getClasspathURIContext() ;

classpathURIContext is null, my context is instance of referenceName.
Re: XbaseHoverDocumentationProvider [message #857408 is a reply to message #857402] Thu, 26 April 2012 14:02 Go to previous messageGo to next message
Holger Schill is currently offline Holger SchillFriend
Messages: 75
Registered: July 2009
Member
Please use the ResourceSetProvider to grab a new ResourceSet and handle
in a IJavaProject where the resource ist contained. Every correct
initialized resourceSet has a ClassPathURIContext of Type IJAvaProject.

Cheers,

Holger

--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: XbaseHoverDocumentationProvider [message #858753 is a reply to message #857408] Fri, 27 April 2012 09:26 Go to previous message
Freddy H is currently offline Freddy HFriend
Messages: 26
Registered: April 2012
Junior Member
thank you Holger !
my solution is different but functional...
I created a JavaProject directly and i pass the test to get my object.

Freddy.
Previous Topic:Is it possible to define built-in EObjects
Next Topic:METADATA
Goto Forum:
  


Current Time: Mon Jul 06 16:36:14 GMT 2020

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

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

Back to the top