Home » Language IDEs » ServerTools (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  |
Eclipse User |
|
|
|
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 #229022 is a reply to message #228993] |
Mon, 16 March 2009 01:36  |
Eclipse User |
|
|
|
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
|
|
|
Goto Forum:
Current Time: Tue Jul 22 18:11:46 EDT 2025
Powered by FUDForum. Page generated in 0.04125 seconds
|