Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Difficulties with StructuredTextEditor in a MultiPageEditorPart
Difficulties with StructuredTextEditor in a MultiPageEditorPart [message #211601] Wed, 02 April 2008 21:30 Go to next message
Eclipse UserFriend
Originally posted by: jfolap.gmail.com

I have a MultiPageEditorPart which offers a GraphicalEditorWithFlyoutPalette
and a StructuredTextEditor. Things work pretty good except that the Source
menu has problems when my StructuredTextEditor is active. The menu labels
are not being retrieved nor do the actions function as expected.

For example, the "Source" menu shows "ToggleComment.label",
"AddBlockComment.label", etc. Only "Shift Right", "Shift Left", and
"Format" appear and function as expected. Clicking any of the problemmatic
actions, such as "ToggleComment.label", has no effect.

I assume I need to do something with the action contributor of the
StructuredTextEditor when the multipage editor makes it the active part.
However, I am not sure what that is.

Any help would be appreciated.

Thank you
Re: Difficulties with StructuredTextEditor in a MultiPageEditorPart [message #211776 is a reply to message #211601] Thu, 03 April 2008 18:31 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4434
Registered: July 2009
Senior Member

john wrote:
> I have a MultiPageEditorPart which offers a GraphicalEditorWithFlyoutPalette
> and a StructuredTextEditor. Things work pretty good except that the Source
> menu has problems when my StructuredTextEditor is active. The menu labels
> are not being retrieved nor do the actions function as expected.
>
> For example, the "Source" menu shows "ToggleComment.label",
> "AddBlockComment.label", etc. Only "Shift Right", "Shift Left", and
> "Format" appear and function as expected. Clicking any of the problemmatic
> actions, such as "ToggleComment.label", has no effect.
>
> I assume I need to do something with the action contributor of the
> StructuredTextEditor when the multipage editor makes it the active part.
> However, I am not sure what that is.
>
> Any help would be appreciated.
>
> Thank you

Which version are you using? Have you told the StructuredTextEditor
about your main editor part?

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


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Difficulties with StructuredTextEditor in a MultiPageEditorPart [message #211836 is a reply to message #211776] Fri, 04 April 2008 22:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: john.palof.logiclibrary.com

Thank you for replying.

Yes, I set my MultiPageEditorPart as the StructuredTextEditor's content
via setEditorPart.

Regarding the version (excerpts from Configuration Details):
Feature:
org.eclipse.wst (1.5.1.v200609111500-X3TmmF3AeboB5EW) "Web Standard Tools
(WST)"

Plugins:
org.eclipse.wst.sse.core (1.1.100.v200609182120) "Structured Text Model"
[Active]
org.eclipse.wst.sse.doc.user (1.0.203.v200608300230) "Structured text
editor and snippets documentation" [Resolved]
org.eclipse.wst.sse.ui (1.0.200.v200609211325) "Structured Source Editor"
[Active]
org.eclipse.wst.sse.ui.infopop (1.0.101.v200605040131) "SSE infopops"
[Resolved]
Re: Difficulties with StructuredTextEditor in a MultiPageEditorPart [message #211919 is a reply to message #211836] Mon, 07 April 2008 16:57 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4434
Registered: July 2009
Senior Member

John wrote:
> Thank you for replying.
>
> Yes, I set my MultiPageEditorPart as the StructuredTextEditor's content
> via setEditorPart.
>
> Regarding the version (excerpts from Configuration Details):
> Feature:
> org.eclipse.wst (1.5.1.v200609111500-X3TmmF3AeboB5EW) "Web Standard
> Tools (WST)"
>
> Plugins:
> org.eclipse.wst.sse.core (1.1.100.v200609182120) "Structured Text Model"
> [Active]
> org.eclipse.wst.sse.doc.user (1.0.203.v200608300230) "Structured text
> editor and snippets documentation" [Resolved]
> org.eclipse.wst.sse.ui (1.0.200.v200609211325) "Structured Source
> Editor" [Active]
> org.eclipse.wst.sse.ui.infopop (1.0.101.v200605040131) "SSE infopops"
> [Resolved]
>

Hmm, best to open a bug report, then. If at all possible, also try
it with the upcoming 3.0M6 build. The menu contribution story has
been revamped to make use of handlers and UI contexts, and it's
possible that the problem is fixed by these changes.

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


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Difficulties with StructuredTextEditor in a MultiPageEditorPart [message #211926 is a reply to message #211919] Mon, 07 April 2008 19:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: john.palof.logiclibrary.com

I will give 3.0M6 a try and report back to this posting.
Re: Difficulties with StructuredTextEditor in a MultiPageEditorPart [message #212149 is a reply to message #211926] Tue, 08 April 2008 19:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wuamy.ca.ibm.com

If your multipage editor edits xml content, the easiest thing to do prior
to WTP 3. M6 would be to add the following code to your multipage editor:
/**
* @see
org.eclipse.ui.part.MultiPageEditorPart#createSite(org.eclip se.ui.IEditorPart)
*/
protected IEditorSite createSite(IEditorPart page) {
IEditorSite site = null;
if (page == editor) {
site = new MultiPageEditorSite(this, page) {
public String getId() {
// Sets this ID so nested editor is configured for XML source
return ContentTypeIdForXML.ContentTypeID_XML + ".source";
//$NON-NLS-1$;
}
};
}
else {
site = super.createSite(page);
}
return site;
}

See this page for more info:
http://www.eclipse.org/webtools/wst/components/sse/tutorials /multipage-editor-tutorial.html


After 3.0 M6, check out this wiki page for more info:
http://wiki.eclipse.org/Table_of_WTP_IDs
Re: Difficulties with StructuredTextEditor in a MultiPageEditorPart [message #212869 is a reply to message #212149] Wed, 23 April 2008 19:38 Go to previous message
Eclipse UserFriend
Originally posted by: john.palof.logiclibrary.com

Thank you! Your suggestion worked perfectly and the links to the related
documents helped.
Previous Topic:Need to launch the "Generate Java Bean Skeleton" Wizard
Next Topic:J2EE Preview Server, Jetty, Dynamic Web Projects and log4j
Goto Forum:
  


Current Time: Sat Apr 20 04:18:25 GMT 2024

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

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

Back to the top