Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Completition Proposal not working
icon8.gif  Completition Proposal not working [message #536666] Sat, 29 May 2010 14:16 Go to next message
Filip Kis is currently offline Filip KisFriend
Messages: 31
Registered: April 2010
Member
Hi guys!

I really hope you can help me, because my project depends on this and I'm running out of time and solutions.

I'm developing a plugin that should provide extra proposals while editing jsp file. But I never managed to get it working. So I've tried with a new plugin (to make sure some of my code is not messing up) and while debugging it I've noticed that sessionStarted() method is called, but the computeCompletionProposals() is never called.

Did I do something wrong or is there a error somewhere in the plugin extension code.

Please if there is any way this can be solved ASAP I would appreciate it a lot.

Here is my plugin.xml;

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         point="org.eclipse.wst.sse.ui.completionProposal">
      <proposalComputer
            activate="true"
            categoryId="org.eclipse.jst.jsp.ui.proposalCategory.jsp"
            class="testincompletionproposal.CompletionProposalComputer2"
            id="TestinCompletionProposal.proposalComputer2">
         <contentType
               id="jspsource">
         </contentType>
      </proposalComputer>
   </extension>

</plugin>



And here is the proposal computer code. Currently there is nothing here, but as said earlier, the debug shows that the computeCompletionProposals is never accessed.

package testincompletionproposal;

import java.util.List;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext;
import org.eclipse.wst.sse.ui.contentassist.ICompletionProposalComputer;

public class CompletionProposalComputer2 implements ICompletionProposalComputer {

	public void sessionStarted() {
		// TODO Auto-generated method stub

	}

	public List computeCompletionProposals(CompletionProposalInvocationContext context, IProgressMonitor monitor) {

		return null;
	}

	public List computeContextInformation(CompletionProposalInvocationContext context, IProgressMonitor monitor) {
		// TODO Auto-generated method stub
		return null;
	}

	public String getErrorMessage() {
		// TODO Auto-generated method stub
		return null;
	}

	public void sessionEnded() {
		// TODO Auto-generated method stub

	}

}

Re: Completition Proposal not working [message #536669 is a reply to message #536666] Sat, 29 May 2010 15:35 Go to previous messageGo to next message
Filip Kis is currently offline Filip KisFriend
Messages: 31
Registered: April 2010
Member

So I've managed to figure out what is wrong.

I had content type just set to htmlsource instead of org.eclipse.wst.html.core.htmlsource.

I guess this is a bug in extension editor, because I used the browse button to find content type.

If this is true, should i file a bug report?

I've also noticed that when the class is automatically created created for the CompletionProposaclComputer it uses the wrong interface (that doesn't exist anymore), that is the one in the internal.provisional. package.
Re: Completition Proposal not working [message #536734 is a reply to message #536669] Sun, 30 May 2010 14:55 Go to previous messageGo to next message
Ian Tewksbury is currently offline Ian TewksburyFriend
Messages: 48
Registered: July 2009
Location: RTP, NC, USA
Member
Filip Kis wrote on Sat, 29 May 2010 11:35
So I've managed to figure out what is wrong.
I had content type just set to htmlsource instead of org.eclipse.wst.html.core.htmlsource.
I guess this is a bug in extension editor, because I used the browse button to find content type.
If this is true, should i file a bug report?
I have noticed that before as well, and not sure if its a bug or a works as designed issue, but opening a bug would hopefully get you an answer.

Filip Kis wrote on Sat, 29 May 2010 11:35
I've also noticed that when the class is automatically created created for the CompletionProposaclComputer it uses the wrong interface (that doesn't exist anymore), that is the one in the internal.provisional. package.
That is strange opening a bug on Source Editor for that explaining the steps you took would be helpful. Please report back here with the bug number for history purposes.


Ian Tewksbury
WTP JavaScript Tools
IBM Rational
-----
“When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return.” ~Leonardo da Vinci
Re: Completition Proposal not working [message #537309 is a reply to message #536734] Tue, 01 June 2010 21:38 Go to previous message
Filip Kis is currently offline Filip KisFriend
Messages: 31
Registered: April 2010
Member
Ian Tewksbury wrote on Sun, 30 May 2010
I have noticed that before as well, and not sure if its a bug or a works as designed issue, but opening a bug would hopefully get you an answer.


Here is one:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=315312


Ian Tewksbury wrote on Sun, 30 May 2010
That is strange opening a bug on Source Editor for that explaining the steps you took would be helpful. Please report back here with the bug number for history purposes.



And here is the other:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=315313
Previous Topic:m2eclipse mojo Exceptions
Next Topic:J2EE Runtime Library
Goto Forum:
  


Current Time: Thu Apr 25 03:53:30 GMT 2024

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

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

Back to the top