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 08:22 Go to previous 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 |
-----------------------------
 
Read Message
Read Message
Read Message
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: Thu May 23 06:12:19 EDT 2013

Powered by FUDForum. Page generated in 0.01872 seconds