Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » code/assist Java code - jdt
code/assist Java code - jdt [message #253154] Mon, 05 May 2008 09:58 Go to next message
Eclipse UserFriend
Originally posted by: lewisstrauss.hotmail.com

Hi,

I would like to have a custom View which allows users to code/assist Java
code. I would like to take advantage of the already existing
functionality in the JavaEditor from the JDT project for code
assist/syntax.


The problem for me is that don't must be an open JavaEditor in the
workbench and I only want to see the code snippet in the View.


How J use: JavaContentAssistInvocationContext,
CompletionProposalLabelProvider or other ..... in simple mode?

There is a example for simple view java using code assist?

Help Me!

Thanks in advanced!
Re: code/assist Java code - jdt [message #253159 is a reply to message #253154] Mon, 05 May 2008 11:04 Go to previous messageGo to next message
Eclipse UserFriend
Luca wrote:
> Hi,
>
> I would like to have a custom View which allows users to code/assist
> Java code. I would like to take advantage of the already existing
> functionality in the JavaEditor from the JDT project for code
> assist/syntax.
>
>
> The problem for me is that don't must be an open JavaEditor in the
> workbench and I only want to see the code snippet in the View.
>
> How J use: JavaContentAssistInvocationContext,
> CompletionProposalLabelProvider or other ..... in simple mode?
>
> There is a example for simple view java using code assist?
To get all JDT proposals is not possible without the editor. What you
can get are the proposals returned by JDT Core. If that's enough for you
I can give you some hints.

Dani
>
> Help Me!
>
> Thanks in advanced!
Re: code/assist Java code - jdt [message #253163 is a reply to message #253159] Mon, 05 May 2008 11:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lewisstrauss.hotmail.com

Hi,

j'm confuse :(

As I must build a little “TextEditor” for Java, with code completion as
its main functionality.
I mustn’t build a plugin but a simple  TextEditor (simple view) that is
opened with a click on a button of a RCP application, could you please
give me advice more specifically on the techniques used for Java code
completion code assist (org.eclipse.jface.text or
org.eclipse.jdt.ui.text.java or ........).
  
Thanks in advanced.

Help me!

Luca
Venice (Italy)
Re: code/assist Java code - jdt [message #253170 is a reply to message #253163] Mon, 05 May 2008 12:17 Go to previous messageGo to next message
Eclipse UserFriend
Luca wrote:
> Hi,
>
> j'm confuse :(
>
> As I must build a little �TextEditor� for Java, with code completion
> as its main functionality.
> I mustn�t build a plugin but a simple TextEditor (simple view) that is
> opened with a click on a button of a RCP application, could you please
> give me advice more specifically on the techniques used for Java code
> completion code assist (org.eclipse.jface.text or
> org.eclipse.jdt.ui.text.java or ........).
JDT Core offers standard Java code completion but the Java editor has
more: it e.g. shows template proposals and proposals contributed by
other plug-ins via extension point.

Dani
>
> Thanks in advanced.
>
> Help me!
>
> Luca
> Venice (Italy)
>
Re: code/assist Java code - jdt [message #253178 is a reply to message #253154] Mon, 05 May 2008 14:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Luca wrote:
> Hi,
>
> I would like to have a custom View which allows users to code/assist
> Java code. I would like to take advantage of the already existing
> functionality in the JavaEditor from the JDT project for code
> assist/syntax.
>
>
> The problem for me is that don't must be an open JavaEditor in the
> workbench and I only want to see the code snippet in the View.
>
> How J use: JavaContentAssistInvocationContext,
> CompletionProposalLabelProvider or other ..... in simple mode?
>
> There is a example for simple view java using code assist?

The JDT is a very large feature with lots of components. I doubt the
content-assist portion is something that can be extracted from the rest
of JDT and used by itself - it is just too dependent on the other
infrastrcture of JDT (for example, the Abstract Syntax Tree, the Java
Project nature, etc). You would probably be better off trying to get the
JDT to work in an RCP and then use its editor as your "simple view."

Eric
Re: code/assist Java code - jdt [message #253202 is a reply to message #253178] Tue, 06 May 2008 10:40 Go to previous message
Eclipse UserFriend
Originally posted by: lewisstrauss.hotmail.com

Hi,

I think that my problem has no simple solution :((


I must build a little and simple TextEditor that is opened with a click
on a button of a RCP application for BeanShell or Java, with code
completion as its main functionality.

I found out this plug-in
http://www.eclipseplugincentral.com/Web_Links-index-req-view link-cid-582.html
that could be useful to me but is not very simple modify the source code.

j think other solution its use java package org.eclipse.jdt,
org.eclipse.jdt.ui.text.java ...... to take advantage of the already
existing
functionality in the JavaEditor.
But I dont'n think the content-assist portion is something that can be
extracted from the rest of JDT and used by itself - it is just too
dependent on the other infrastrcture of JDT.

In old post j find this: " A better way would be to more or less copy the
contents of JavaSourceViewerConfiguration::getContentAssistant.
Instead of the JavaCompletionProcessors you could create your own
ContentAssistProcessor subclass (since you don't seem to mind using
internal code...) that does not require an editor. To create a
JavaContentAssistInvocationContext, use its constructor taking a
compilation unit." But for me at moment is complex... J dont't find any
java source code
for help me.......

:(

Thank you very much

See you
Previous Topic:Possible bug in launch configuration
Next Topic:Java editor's persistent Content Assistance dialog
Goto Forum:
  


Current Time: Tue Jun 03 20:13:13 EDT 2025

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

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

Back to the top