missing Edit_Copy and Edit_Select_All toolbar buttons?

Post here questions and problems related to oXygen frameworks/document types.
sderrick
Posts: 219

missing Edit_Copy and Edit_Select_All toolbar buttons?

Fri May 22, 2015 8:26 pm

I generated the list of common actions for PAGE_TEXT

in the list were Copy and Select_All.

Edit/Edit_Copy=ro.sync.exml.editor.b.b.ib@64b67d68,
Edit/Edit_Select_All=ro.sync.exml.editor.b.b.kb@ed5403f,


Actually Copy was already being inserted in the demo.

Code: Select all

actionsToolbar.add(new ToolbarButton((Action) textCommonActions
                        .get("Edit/Edit_Copy"), false));


I added Select_All

Code: Select all

actionsToolbar.add(new ToolbarButton((Action) textCommonActions
                        .get("Edit/Edit_Select_All"), false));


it doesn't show up? I then noticed Copy is also missing in action?

Copy is the only one that is missing that was already setup in the sample applet.

I added the Format and Indent action which is called Source/Pretty_print_tooltip in the list and it works OK?

Code: Select all

actionsToolbar.add(new ToolbarButton((Action) textCommonActions
                        .get("Source/Pretty_print_tooltip"), false));


the only warning I get in the java console, which I have not tracked down is this which doesn't appear to be related?

0 WARN [ Applet 1 LiveConnect Worker Thread ] ro.sync.exml.editor.b.g - Action: Compare could not be added after :Open


here is the whole block of code for adding the toolbar actions for PAGE_TEXT

Code: Select all

if (EditorPageConstants.PAGE_TEXT.equals(editorComponent
                    .getWSEditorAccess().getCurrentPageID())) {
                // Maybe running in the Text page.
                Map<String, Object> textCommonActions = ((WSTextEditorPage) editorComponent
                        .getWSEditorAccess().getCurrentPage())
                        .getActionsProvider().getTextActions();

                                //System.out.println("Common actions: " + textCommonActions);
                // You can look in the list of actions to see what's available.
                // Uncomment this if you want to add the character map insertion
                // button.
                // actionsToolbar.add(new ToolBarButton(authorCommonActions
                // .get("Edit/Insert_from_Character_Map")));
                // Cut/Copy/Paste
                actionsToolbar.add(new ToolbarButton((Action) textCommonActions
                        .get("Edit/Edit_Cut"), false));
                actionsToolbar.add(new ToolbarButton((Action) textCommonActions
                        .get("Edit/Edit_Copy"), false));
                actionsToolbar.add(new ToolbarButton((Action) textCommonActions
                        .get("Edit/Edit_Paste"), false));
                actionsToolbar.add(new ToolbarButton((Action) textCommonActions
                        .get("Edit/Edit_Select_All"), false));
                actionsToolbar.addSeparator();

                // Undo/Redo
                actionsToolbar.add(new ToolbarButton((Action) textCommonActions
                        .get("Edit/Edit_Undo"), false));
                actionsToolbar.add(new ToolbarButton((Action) textCommonActions
                        .get("Edit/Edit_Redo"), false));
                actionsToolbar.addSeparator();

                actionsToolbar.add(new ToolbarButton((Action) textCommonActions
                        .get("Find/Find_replace"), false));
                actionsToolbar.add(new ToolbarButton((Action) textCommonActions
                        .get("Spelling/Check_spelling"), false));
                actionsToolbar.addSeparator();

                actionsToolbar.add(new ToolbarButton((Action) textCommonActions
                        .get("Source/Pretty_print_tooltip"), false));

                allActionsToolbar.removeAll();
                allActionsToolbar.add(actionsToolbar);
            } else {


here is the list

Edit/Edit_Undo=ro.sync.exml.editor.b.d$10@3b278c02,
Edit/Edit_Redo=ro.sync.exml.editor.b.d$11@6b65e65e,
Edit/Edit_Cut=ro.sync.exml.editor.b.b.z@10df0b7a,
Find/Goto=ro.sync.exml.editor.b.b.k@75d339fc,
Edit/Toggle_line_wrap=ro.sync.exml.editor.b.b.b@7293fcd8,
Folding/Toggle_fold=ro.sync.exml.editor.b.b.m@3680a3c2,
Folding/Expand_all=ro.sync.exml.editor.b.d$12@5e6ceab3,
Folding/Expand_child_folds=ro.sync.exml.editor.b.d$13@321c345b,
Folding/Collapse_child_folds=ro.sync.exml.editor.b.d$14@5f046bfc,
Folding/Collapse_other_folds=ro.sync.exml.editor.b.d$15@6c295d6d,
Font_size/Increase_font=ro.sync.exml.editor.b.b.h@55a91b29,
Font_size/Decrease_font=ro.sync.exml.editor.b.b.lb@644532b,
Font_size/Normal_font_size=ro.sync.exml.editor.b.b.cb@7ae39394,
Spell_Check/Learn_word=ro.sync.exml.editor.b.b.d@5c076b90,
Content_completion/Start_content_completion=ro.sync.exml.editor.b.b.e@41ea436a,
Content_completion/Show_code_templates=ro.sync.exml.editor.b.b.fb@65938d77,
Edit/Edit_change_orientation=ro.sync.exml.editor.b.b.f@38acd62,
Edit/Edit_Copy=ro.sync.exml.editor.b.b.ib@64b67d68,
Edit/Edit_Paste=ro.sync.exml.editor.b.b.qb@77d49387,
Edit/Edit_Select_All=ro.sync.exml.editor.b.b.kb@ed5403f,
Spelling/Check_spelling=ro.sync.exml.editor.b.b.db@5b617d5a,
Edit/Insert_from_Character_Map=ro.sync.exml.editor.xmleditor.e.d.e@ceb1663,
File/Open_file_at_caret_in_system_application=ro.sync.exml.editor.b.b.pb@5ff0e4d2,
File/Open_in_system_application=ro.sync.exml.editor.b.b.n@7b8093ab,
File/Insert_file_at_cursor=ro.sync.exml.editor.b.b.ob@2b5bba2c,
Split/Split_editor_horizontally=ro.sync.exml.editor.b.b.ab@7fd7e92a,
Split/Split_editor_vertically=ro.sync.exml.editor.b.b.ab@27595476,
Split/Unsplit_editor=ro.sync.exml.editor.b.b.r@583b96fd,
Edit/Toggle_comment=ro.sync.exml.editor.b.b.u@2e47dd0c,
Document/Minify_CSS=ro.sync.exml.editor.b.b.jb@6e99ff57,
Source/To_upper=ro.sync.exml.editor.b.b.x@30eec16,
Source/To_lower=ro.sync.exml.editor.b.b.q@7861ef4,
Source/Capitalize_lines=ro.sync.exml.editor.b.b.y@17390cb5,
Source/Join_and_normalize=ro.sync.exml.editor.b.b.g@36fb2a42,
Edit/Insert_new_line_after=ro.sync.exml.editor.b.b.eb@42e10ed7,
Highlights/Remove_all=ro.sync.exml.editor.b.b.nb@75a7d9c1,
Highlights/Modify_all_matches=ro.sync.exml.editor.b.b.w@2a243f64,
XML_Document/Go_to_matching_tag=ro.sync.exml.editor.xmleditor.e.d.nb@45e2a958,
XML_Document/Go_after_next_tag=ro.sync.exml.editor.xmleditor.e.d.g@fbf8085,
XML_Document/Go_after_previous_tag=ro.sync.exml.editor.xmleditor.e.d.cb@441d2962,
XML_Refactoring/Surround_with=ro.sync.exml.editor.xmleditor.e.d.t@4fc9e19a,
XML_Document/Copy_xpath_to_clipboard=ro.sync.exml.editor.xmleditor.e.d.s@1f312952,
Source/Shift_right=ro.sync.exml.editor.xmleditor.e.f$9@6cf93999,
Source/Shift_left=ro.sync.exml.editor.xmleditor.e.f$10@41025b5d,
Source/Escape_selection=ro.sync.exml.editor.xmleditor.e.d.i@41c7b7d6,
Source/Unescape_selection=ro.sync.exml.editor.xmleditor.e.d.bb@572a6d05,
Source/Indent_selection=ro.sync.exml.editor.xmleditor.e.d.f@72baa388,
Source/Pretty_print_element=ro.sync.exml.editor.xmleditor.e.d.kb@21b1d631,
Source/Import_entities=ro.sync.exml.editor.xmleditor.e.d.z@5d34acd6,
Source/Insert_xinclude=ro.sync.exml.editor.b.b.bb@5972b030,
XML_Document/Canonicalize=ro.sync.exml.editor.xmleditor.e.d.o@7ef3ee75,
XML_Document/Sign=ro.sync.exml.editor.xmleditor.e.d.ib@515cafc4,
XML_Document/Verify_signature=ro.sync.exml.editor.xmleditor.e.d.n@2976eb25,
Select/Content=ro.sync.exml.editor.xmleditor.e.d.ab@65c92d0b,
Select/Element=ro.sync.exml.editor.xmleditor.e.d.k@428e781,
Select/Parent=ro.sync.exml.editor.xmleditor.e.d.lb@30be4a4f,
Select/Attributes=ro.sync.exml.editor.xmleditor.e.d.hb@2e0fb0be,
XML_Refactoring/Surround_with_tag=ro.sync.exml.editor.xmleditor.e.d.h@2826101,
XML_Refactoring/Rename_element=ro.sync.exml.editor.xmleditor.e.d.y@41d59a3f,
XML_Refactoring/Rename_prefix=ro.sync.exml.editor.xmleditor.e.d.j@37b4c78,
XML_Refactoring/Split_element=ro.sync.exml.editor.xmleditor.e.d.b@50a286e9,
XML_Refactoring/Join_elements=ro.sync.exml.editor.xmleditor.e.d.jb@41396f95,
XML_Refactoring/Delete_tags=ro.sync.exml.editor.xmleditor.e.d.mb@2cd001ef,
Source/Pretty_print_tooltip=ro.sync.exml.editor.b.b.l@75118081,
Source/Lock_tags=ro.sync.exml.editor.xmleditor.e.d.w@31c0d504,
Highlights/Surround_all=ro.sync.exml.editor.xmleditor.e.d.eb@3b0f516e,
XML_Document/Learn_structure_XML_tooltip=ro.sync.exml.editor.xmleditor.e.d.d@17fce099,
XML_Document/Save_structure_XML_tooltip=ro.sync.exml.editor.xmleditor.e.d.db@6e106f6f,
XML_Document/Associate_xslt_css_stylesheet=ro.sync.exml.editor.xmleditor.e.d.gb@594fff5c,
Find/Find_replace=ro.sync.exml.editor.b.d$26@180a513a
Radu
Posts: 5762

Re: missing Edit_Copy and Edit_Select_All toolbar buttons?

Mon May 25, 2015 9:29 am

Hi Scott,

The "Select All" action does not have an icon. It's usually an action which is shown in a main menu and people are mostly used to using Ctrl-A to select the entire document anyway.
So the added toolbar button which by default does not show the action text is probably very thin horizontally.
You could either set your custom icon on the action or configure the button to present the text of the action:

Code: Select all

  /**
   * Constructor over an action.
   *
   * @param action Button action.
   * @param showText If show text, also show text.
   */
  public ToolBarButton(final Action action, boolean showText)


I will look into why the Copy action is not shown, probably a bug on our side, we possibly renamed its key in 17.0.
Could you also try to obtain it like textCommonActions.get("Edit/Copy_verb")?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 0 guests