Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » content assist hot key does not work in my customized xml editor on Eclipse 3.4
content assist hot key does not work in my customized xml editor on Eclipse 3.4 [message #228993] Sun, 15 March 2009 12:22 Go to next message
nick tan is currently offline nick tan
Messages: 56
Registered: July 2009
Member
Hi, all

First of all, the xml editor I'll mention below is a self implemented
xml editor, NOT extended from WTP-WST (why I have not migrated to WTP is
another story)
Now, the problem is the Content assist does not work on Eclipse 3.4
via pressing hot key "alt+/" (my customized key), but it works well on
Eclipse 3.3
And I checked out StructuredTextEditor.java and found nothing special
in org.eclipse.wst.sse.ui.StructuredTextEditor#createActions();
To make sure I did not miss anything, I copied some codes from
StructuredTextEditor#createActions() to mine, and it does NOT work either.

Here is code sinppet:

<pre>
protected void createActions() {
super.createActions();
ResourceBundle bundle = getEditorE34ResourceBundle();
IAction action = new TextOperationAction(bundle,
XmlEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS
+ UNDERSCORE, this, ISourceViewer.CONTENTASSIST_PROPOSALS,
true);
action.setActionDefinitionId(ITextEditorActionDefinitionIds. CONTENT_ASSIST_PROPOSALS);

setAction(XmlEditorActionConstants.ACTION_NAME_CONTENTASSIST _PROPOSALS,
action);
markAsStateDependentAction(XmlEditorActionConstants.ACTION_N AME_CONTENTASSIST_PROPOSALS,
true);

action = new TextOperationAction(bundle,
XmlEditorActionConstants.ACTION_NAME_CONTENTASSIST_CONTEXT_I NFORMATION
+ UNDERSCORE, this,
ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION);

action.setActionDefinitionId(ITextEditorActionDefinitionIds. CONTENT_ASSIST_CONTEXT_INFORMATION);

setAction(XmlEditorActionConstants.ACTION_NAME_CONTENTASSIST _CONTEXT_INFORMATION,
action);

markAsStateDependentAction(XmlEditorActionConstants.ACTION_N AME_CONTENTASSIST_CONTEXT_INFORMATION,
true);
// StructuredTextViewer Action - requesting format
// of the whole
// document
action = new TextOperationAction(bundle,
XmlEditorActionConstants.ACTION_NAME_CONTENT_FORMAT + UNDERSCORE,
this, ISourceViewer.FORMAT);

action.setActionDefinitionId(IJavaEditorActionDefinitionIds. FORMAT);
setAction(XmlEditorActionConstants.ACTION_NAME_CONTENT_FORMA T,
action); //$NON-NLS-1$
markAsStateDependentAction(XmlEditorActionConstants.ACTION_N AME_CONTENT_FORMAT,
true);
markAsSelectionDependentAction(XmlEditorActionConstants.ACTI ON_NAME_CONTENT_FORMAT,
true);

}
</pre>

Did I missing anything? or is there any related changes from eclipse
3.3 to 3.4?


PS: here is a story about why I have not migrated to WTP yet!
We use internal DTD declaration in the xml for some historical reason. and
my xml editor support Content assit for internal DTD entity declaration.
When I investigating on WTP codes, unfortunately, I found that WTP does
not support this type of content assist. and I did not found a way out to
make WTP support it.
So, another question, is there any way I can add content assist for
internal DTD entity declarations?


--
Thanks & Best Regards!
///
(. .)
--------ooO--(_)--Ooo--------
| Nick Tan |
-----------------------------
Re: content assist hot key does not work in my customized xml editor on Eclipse 3.4 [message #229001 is a reply to message #228993] Sun, 15 March 2009 14:47 Go to previous messageGo to next message
Eclipse User
Originally posted by: dcarver.starstandard.org

nick tan wrote:
> PS: here is a story about why I have not migrated to WTP yet!
> We use internal DTD declaration in the xml for some historical reason.
> and my xml editor support Content assit for internal DTD entity
> declaration. When I investigating on WTP codes, unfortunately, I found
> that WTP does not support this type of content assist. and I did not
> found a way out to make WTP support it.
> So, another question, is there any way I can add content assist for
> internal DTD entity declarations?

You are correct, the WTP XML Editor does not provide content assist for
internal DTDs. While investigating this, I also found out that it
apparently doesn't provide content assistance for DTDs at all. Even in
the DTD editor.

I've opened bugs 268671, and 268670 for the DTD content assistance for
both the DTD editor as well as the internal subset within the XML editor.
Re: content assist hot key does not work in my customized xml editor on Eclipse 3.4 [message #229022 is a reply to message #228993] Mon, 16 March 2009 05:36 Go to previous message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2272
Registered: July 2009
Senior Member
nick tan wrote:

Is it possible you've missed something in the editor contributor?

> PS: here is a story about why I have not migrated to WTP yet!
> We use internal DTD declaration in the xml for some historical reason.
> and my xml editor support Content assit for internal DTD entity
> declaration. When I investigating on WTP codes, unfortunately, I found
> that WTP does not support this type of content assist. and I did not
> found a way out to make WTP support it.
> So, another question, is there any way I can add content assist for
> internal DTD entity declarations?

High quality patches implementing content assist for DTDs would be
gladly accepted. The internal DTD subset doesn't have its own
partition type, which I find surprising, but once the partitioner is
updated to have one, it's a simple matter of mapping that partition
type to a content assist processor. If someone gets the ball
rolling on the content assist processor for DTDs, we'd be more
likely to put that XML partitioner work into the plan so that XML
can also benefit from it.

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


---
Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:marker & squiggle creation problem after XML validation
Next Topic:How to build a web service with webtool, or fix invocationTargetException
Goto Forum:
  


Current Time: Fri Sep 19 19:58:21 GMT 2014

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

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