diff --git a/plugin/build.properties b/plugin/build.properties index 35119812..10ed8f39 100644 --- a/plugin/build.properties +++ b/plugin/build.properties @@ -1,11 +1,11 @@ -bin.includes = icons/,\ +bin.includes = images/,\ plugin.xml,\ META-INF/,\ target/easyshell-library.jar,\ src/de/anbos/eclipse/easyshell/plugin/UIMessages.properties,\ releases/,\ scripts/ -src.includes = icons/,\ +src.includes = images/,\ manpages/,\ releases/CHANGES.TXT,\ releases/README.TXT,\ diff --git a/plugin/icons/clipboard.png b/plugin/images/clipboard.png similarity index 100% rename from plugin/icons/clipboard.png rename to plugin/images/clipboard.png diff --git a/plugin/icons/clipboard1.png b/plugin/images/clipboard1.png similarity index 100% rename from plugin/icons/clipboard1.png rename to plugin/images/clipboard1.png diff --git a/plugin/icons/default.png b/plugin/images/default.png similarity index 100% rename from plugin/icons/default.png rename to plugin/images/default.png diff --git a/plugin/icons/easyshell.png b/plugin/images/easyshell.png similarity index 100% rename from plugin/icons/easyshell.png rename to plugin/images/easyshell.png diff --git a/plugin/icons/eclipse.png b/plugin/images/eclipse.png similarity index 100% rename from plugin/icons/eclipse.png rename to plugin/images/eclipse.png diff --git a/plugin/icons/explore.png b/plugin/images/explore.png similarity index 100% rename from plugin/icons/explore.png rename to plugin/images/explore.png diff --git a/plugin/icons/explore1.png b/plugin/images/explore1.png similarity index 100% rename from plugin/icons/explore1.png rename to plugin/images/explore1.png diff --git a/plugin/icons/explore2.png b/plugin/images/explore2.png similarity index 100% rename from plugin/icons/explore2.png rename to plugin/images/explore2.png diff --git a/plugin/icons/macosx/explore.png b/plugin/images/macosx/explore.png similarity index 100% rename from plugin/icons/macosx/explore.png rename to plugin/images/macosx/explore.png diff --git a/plugin/icons/unknown.png b/plugin/images/none.png similarity index 100% rename from plugin/icons/unknown.png rename to plugin/images/none.png diff --git a/plugin/icons/open.png b/plugin/images/open.png similarity index 100% rename from plugin/icons/open.png rename to plugin/images/open.png diff --git a/plugin/icons/run.png b/plugin/images/run.png similarity index 100% rename from plugin/icons/run.png rename to plugin/images/run.png diff --git a/plugin/icons/run1.png b/plugin/images/run1.png similarity index 100% rename from plugin/icons/run1.png rename to plugin/images/run1.png diff --git a/plugin/icons/run2.gif b/plugin/images/run2.gif similarity index 100% rename from plugin/icons/run2.gif rename to plugin/images/run2.gif diff --git a/plugin/icons/user.png b/plugin/images/user.png similarity index 100% rename from plugin/icons/user.png rename to plugin/images/user.png diff --git a/plugin/icons/windows/easyshell.png b/plugin/images/windows/easyshell.png similarity index 100% rename from plugin/icons/windows/easyshell.png rename to plugin/images/windows/easyshell.png diff --git a/plugin/icons_example/gif/console_view.gif b/plugin/images_not_used/gif/console_view.gif similarity index 100% rename from plugin/icons_example/gif/console_view.gif rename to plugin/images_not_used/gif/console_view.gif diff --git a/plugin/icons_example/gif/copy.gif b/plugin/images_not_used/gif/copy.gif similarity index 100% rename from plugin/icons_example/gif/copy.gif rename to plugin/images_not_used/gif/copy.gif diff --git a/plugin/icons_example/gif/copy_edit.gif b/plugin/images_not_used/gif/copy_edit.gif similarity index 100% rename from plugin/icons_example/gif/copy_edit.gif rename to plugin/images_not_used/gif/copy_edit.gif diff --git a/plugin/icons_example/gif/copy_edit_co.gif b/plugin/images_not_used/gif/copy_edit_co.gif similarity index 100% rename from plugin/icons_example/gif/copy_edit_co.gif rename to plugin/images_not_used/gif/copy_edit_co.gif diff --git a/plugin/icons_example/gif/cpyqual_menu.gif b/plugin/images_not_used/gif/cpyqual_menu.gif similarity index 100% rename from plugin/icons_example/gif/cpyqual_menu.gif rename to plugin/images_not_used/gif/cpyqual_menu.gif diff --git a/plugin/icons_example/gif/easyshell.gif b/plugin/images_not_used/gif/easyshell.gif similarity index 100% rename from plugin/icons_example/gif/easyshell.gif rename to plugin/images_not_used/gif/easyshell.gif diff --git a/plugin/icons_example/gif/eclipse.gif b/plugin/images_not_used/gif/eclipse.gif similarity index 100% rename from plugin/icons_example/gif/eclipse.gif rename to plugin/images_not_used/gif/eclipse.gif diff --git a/plugin/icons_example/gif/editor.gif b/plugin/images_not_used/gif/editor.gif similarity index 100% rename from plugin/icons_example/gif/editor.gif rename to plugin/images_not_used/gif/editor.gif diff --git a/plugin/icons_example/gif/editor_area.gif b/plugin/images_not_used/gif/editor_area.gif similarity index 100% rename from plugin/icons_example/gif/editor_area.gif rename to plugin/images_not_used/gif/editor_area.gif diff --git a/plugin/icons_example/gif/environment_obj.gif b/plugin/images_not_used/gif/environment_obj.gif similarity index 100% rename from plugin/icons_example/gif/environment_obj.gif rename to plugin/images_not_used/gif/environment_obj.gif diff --git a/plugin/icons_example/gif/exclusion_filter_attrib.gif b/plugin/images_not_used/gif/exclusion_filter_attrib.gif similarity index 100% rename from plugin/icons_example/gif/exclusion_filter_attrib.gif rename to plugin/images_not_used/gif/exclusion_filter_attrib.gif diff --git a/plugin/icons_example/gif/external_tools.gif b/plugin/images_not_used/gif/external_tools.gif similarity index 100% rename from plugin/icons_example/gif/external_tools.gif rename to plugin/images_not_used/gif/external_tools.gif diff --git a/plugin/icons_example/gif/file_obj.gif b/plugin/images_not_used/gif/file_obj.gif similarity index 100% rename from plugin/icons_example/gif/file_obj.gif rename to plugin/images_not_used/gif/file_obj.gif diff --git a/plugin/icons_example/gif/filenav_nav.gif b/plugin/images_not_used/gif/filenav_nav.gif similarity index 100% rename from plugin/icons_example/gif/filenav_nav.gif rename to plugin/images_not_used/gif/filenav_nav.gif diff --git a/plugin/icons_example/gif/fldr_obj.gif b/plugin/images_not_used/gif/fldr_obj.gif similarity index 100% rename from plugin/icons_example/gif/fldr_obj.gif rename to plugin/images_not_used/gif/fldr_obj.gif diff --git a/plugin/icons_example/gif/folder.gif b/plugin/images_not_used/gif/folder.gif similarity index 100% rename from plugin/icons_example/gif/folder.gif rename to plugin/images_not_used/gif/folder.gif diff --git a/plugin/icons_example/gif/goto_input.gif b/plugin/images_not_used/gif/goto_input.gif similarity index 100% rename from plugin/icons_example/gif/goto_input.gif rename to plugin/images_not_used/gif/goto_input.gif diff --git a/plugin/icons_example/gif/help.gif b/plugin/images_not_used/gif/help.gif similarity index 100% rename from plugin/icons_example/gif/help.gif rename to plugin/images_not_used/gif/help.gif diff --git a/plugin/icons_example/gif/home_nav.gif b/plugin/images_not_used/gif/home_nav.gif similarity index 100% rename from plugin/icons_example/gif/home_nav.gif rename to plugin/images_not_used/gif/home_nav.gif diff --git a/plugin/icons_example/gif/prompt.gif b/plugin/images_not_used/gif/prompt.gif similarity index 100% rename from plugin/icons_example/gif/prompt.gif rename to plugin/images_not_used/gif/prompt.gif diff --git a/plugin/icons_example/gif/properties.gif b/plugin/images_not_used/gif/properties.gif similarity index 100% rename from plugin/icons_example/gif/properties.gif rename to plugin/images_not_used/gif/properties.gif diff --git a/plugin/icons_example/gif/run.gif b/plugin/images_not_used/gif/run.gif similarity index 100% rename from plugin/icons_example/gif/run.gif rename to plugin/images_not_used/gif/run.gif diff --git a/plugin/icons_example/gif/run_exc.gif b/plugin/images_not_used/gif/run_exc.gif similarity index 100% rename from plugin/icons_example/gif/run_exc.gif rename to plugin/images_not_used/gif/run_exc.gif diff --git a/plugin/icons_example/macosx/10.png b/plugin/images_not_used/macosx/10.png similarity index 100% rename from plugin/icons_example/macosx/10.png rename to plugin/images_not_used/macosx/10.png diff --git a/plugin/icons_example/macosx/Musett-Antares-IMac-OSX.ico b/plugin/images_not_used/macosx/Musett-Antares-IMac-OSX.ico similarity index 100% rename from plugin/icons_example/macosx/Musett-Antares-IMac-OSX.ico rename to plugin/images_not_used/macosx/Musett-Antares-IMac-OSX.ico diff --git a/plugin/icons_example/macosx/Terminal-Befehle-Ubuntu-Linux.png b/plugin/images_not_used/macosx/Terminal-Befehle-Ubuntu-Linux.png similarity index 100% rename from plugin/icons_example/macosx/Terminal-Befehle-Ubuntu-Linux.png rename to plugin/images_not_used/macosx/Terminal-Befehle-Ubuntu-Linux.png diff --git a/plugin/icons_example/macosx/Terminalicon.png b/plugin/images_not_used/macosx/Terminalicon.png similarity index 100% rename from plugin/icons_example/macosx/Terminalicon.png rename to plugin/images_not_used/macosx/Terminalicon.png diff --git a/plugin/icons_example/macosx/allmyfiles.png b/plugin/images_not_used/macosx/allmyfiles.png similarity index 100% rename from plugin/icons_example/macosx/allmyfiles.png rename to plugin/images_not_used/macosx/allmyfiles.png diff --git a/plugin/icons_example/macosx/allmyfiles@2x.png b/plugin/images_not_used/macosx/allmyfiles@2x.png similarity index 100% rename from plugin/icons_example/macosx/allmyfiles@2x.png rename to plugin/images_not_used/macosx/allmyfiles@2x.png diff --git a/plugin/icons_example/macosx/finder.png b/plugin/images_not_used/macosx/finder.png similarity index 100% rename from plugin/icons_example/macosx/finder.png rename to plugin/images_not_used/macosx/finder.png diff --git a/plugin/icons_example/macosx/finder@2x.png b/plugin/images_not_used/macosx/finder@2x.png similarity index 100% rename from plugin/icons_example/macosx/finder@2x.png rename to plugin/images_not_used/macosx/finder@2x.png diff --git a/plugin/icons_example/macosx/finder_16x16.png b/plugin/images_not_used/macosx/finder_16x16.png similarity index 100% rename from plugin/icons_example/macosx/finder_16x16.png rename to plugin/images_not_used/macosx/finder_16x16.png diff --git a/plugin/icons_example/macosx/icon_terminal_2x.jpg b/plugin/images_not_used/macosx/icon_terminal_2x.jpg similarity index 100% rename from plugin/icons_example/macosx/icon_terminal_2x.jpg rename to plugin/images_not_used/macosx/icon_terminal_2x.jpg diff --git a/plugin/icons_example/macosx/mac-terminal-icon-4519.png b/plugin/images_not_used/macosx/mac-terminal-icon-4519.png similarity index 100% rename from plugin/icons_example/macosx/mac-terminal-icon-4519.png rename to plugin/images_not_used/macosx/mac-terminal-icon-4519.png diff --git a/plugin/icons_example/macosx/terminal-app-icon-OS-X.png b/plugin/images_not_used/macosx/terminal-app-icon-OS-X.png similarity index 100% rename from plugin/icons_example/macosx/terminal-app-icon-OS-X.png rename to plugin/images_not_used/macosx/terminal-app-icon-OS-X.png diff --git a/plugin/icons_example/macosx/terminal-icon-osx-150x150.png b/plugin/images_not_used/macosx/terminal-icon-osx-150x150.png similarity index 100% rename from plugin/icons_example/macosx/terminal-icon-osx-150x150.png rename to plugin/images_not_used/macosx/terminal-icon-osx-150x150.png diff --git a/plugin/icons_example/macosx/terminal.png b/plugin/images_not_used/macosx/terminal.png similarity index 100% rename from plugin/icons_example/macosx/terminal.png rename to plugin/images_not_used/macosx/terminal.png diff --git a/plugin/icons_example/macosx/terminal_icons_by_isgie-d2xgmyw.png b/plugin/images_not_used/macosx/terminal_icons_by_isgie-d2xgmyw.png similarity index 100% rename from plugin/icons_example/macosx/terminal_icons_by_isgie-d2xgmyw.png rename to plugin/images_not_used/macosx/terminal_icons_by_isgie-d2xgmyw.png diff --git a/plugin/icons_example/macosx/url 2.png b/plugin/images_not_used/macosx/url 2.png similarity index 100% rename from plugin/icons_example/macosx/url 2.png rename to plugin/images_not_used/macosx/url 2.png diff --git a/plugin/icons_example/macosx/url.png b/plugin/images_not_used/macosx/url.png similarity index 100% rename from plugin/icons_example/macosx/url.png rename to plugin/images_not_used/macosx/url.png diff --git a/plugin/icons_example/macosx/url@2x 2.png b/plugin/images_not_used/macosx/url@2x 2.png similarity index 100% rename from plugin/icons_example/macosx/url@2x 2.png rename to plugin/images_not_used/macosx/url@2x 2.png diff --git a/plugin/icons_example/macosx/url@2x.png b/plugin/images_not_used/macosx/url@2x.png similarity index 100% rename from plugin/icons_example/macosx/url@2x.png rename to plugin/images_not_used/macosx/url@2x.png diff --git a/plugin/icons_example/png/console_view.png b/plugin/images_not_used/png/console_view.png similarity index 100% rename from plugin/icons_example/png/console_view.png rename to plugin/images_not_used/png/console_view.png diff --git a/plugin/icons_example/png/copy.png b/plugin/images_not_used/png/copy.png similarity index 100% rename from plugin/icons_example/png/copy.png rename to plugin/images_not_used/png/copy.png diff --git a/plugin/icons_example/png/copy_edit.png b/plugin/images_not_used/png/copy_edit.png similarity index 100% rename from plugin/icons_example/png/copy_edit.png rename to plugin/images_not_used/png/copy_edit.png diff --git a/plugin/icons_example/png/copy_edit_co.png b/plugin/images_not_used/png/copy_edit_co.png similarity index 100% rename from plugin/icons_example/png/copy_edit_co.png rename to plugin/images_not_used/png/copy_edit_co.png diff --git a/plugin/icons_example/png/copyviewtoclipboard_tsk.png b/plugin/images_not_used/png/copyviewtoclipboard_tsk.png similarity index 100% rename from plugin/icons_example/png/copyviewtoclipboard_tsk.png rename to plugin/images_not_used/png/copyviewtoclipboard_tsk.png diff --git a/plugin/icons_example/png/cpyqual_menu.png b/plugin/images_not_used/png/cpyqual_menu.png similarity index 100% rename from plugin/icons_example/png/cpyqual_menu.png rename to plugin/images_not_used/png/cpyqual_menu.png diff --git a/plugin/icons_example/png/easyshell.png b/plugin/images_not_used/png/easyshell.png similarity index 100% rename from plugin/icons_example/png/easyshell.png rename to plugin/images_not_used/png/easyshell.png diff --git a/plugin/icons_example/png/easyshell2.png b/plugin/images_not_used/png/easyshell2.png similarity index 100% rename from plugin/icons_example/png/easyshell2.png rename to plugin/images_not_used/png/easyshell2.png diff --git a/plugin/icons_example/png/easyshell_new.png b/plugin/images_not_used/png/easyshell_new.png similarity index 100% rename from plugin/icons_example/png/easyshell_new.png rename to plugin/images_not_used/png/easyshell_new.png diff --git a/plugin/icons_example/png/easyshell_old.png b/plugin/images_not_used/png/easyshell_old.png similarity index 100% rename from plugin/icons_example/png/easyshell_old.png rename to plugin/images_not_used/png/easyshell_old.png diff --git a/plugin/icons_example/png/eclipse.png b/plugin/images_not_used/png/eclipse.png similarity index 100% rename from plugin/icons_example/png/eclipse.png rename to plugin/images_not_used/png/eclipse.png diff --git a/plugin/icons_example/png/editor_area.png b/plugin/images_not_used/png/editor_area.png similarity index 100% rename from plugin/icons_example/png/editor_area.png rename to plugin/images_not_used/png/editor_area.png diff --git a/plugin/icons_example/png/environment_obj.png b/plugin/images_not_used/png/environment_obj.png similarity index 100% rename from plugin/icons_example/png/environment_obj.png rename to plugin/images_not_used/png/environment_obj.png diff --git a/plugin/icons_example/png/exclusion_filter_attrib.png b/plugin/images_not_used/png/exclusion_filter_attrib.png similarity index 100% rename from plugin/icons_example/png/exclusion_filter_attrib.png rename to plugin/images_not_used/png/exclusion_filter_attrib.png diff --git a/plugin/icons_example/png/external_tools.png b/plugin/images_not_used/png/external_tools.png similarity index 100% rename from plugin/icons_example/png/external_tools.png rename to plugin/images_not_used/png/external_tools.png diff --git a/plugin/icons_example/png/file-new-16x16.png b/plugin/images_not_used/png/file-new-16x16.png similarity index 100% rename from plugin/icons_example/png/file-new-16x16.png rename to plugin/images_not_used/png/file-new-16x16.png diff --git a/plugin/icons_example/png/file_obj.png b/plugin/images_not_used/png/file_obj.png similarity index 100% rename from plugin/icons_example/png/file_obj.png rename to plugin/images_not_used/png/file_obj.png diff --git a/plugin/icons_example/png/filenav_nav.png b/plugin/images_not_used/png/filenav_nav.png similarity index 100% rename from plugin/icons_example/png/filenav_nav.png rename to plugin/images_not_used/png/filenav_nav.png diff --git a/plugin/icons_example/png/fldr_obj.png b/plugin/images_not_used/png/fldr_obj.png similarity index 100% rename from plugin/icons_example/png/fldr_obj.png rename to plugin/images_not_used/png/fldr_obj.png diff --git a/plugin/icons_example/png/folder.png b/plugin/images_not_used/png/folder.png similarity index 100% rename from plugin/icons_example/png/folder.png rename to plugin/images_not_used/png/folder.png diff --git a/plugin/icons_example/png/goto_input.png b/plugin/images_not_used/png/goto_input.png similarity index 100% rename from plugin/icons_example/png/goto_input.png rename to plugin/images_not_used/png/goto_input.png diff --git a/plugin/icons_example/png/help.png b/plugin/images_not_used/png/help.png similarity index 100% rename from plugin/icons_example/png/help.png rename to plugin/images_not_used/png/help.png diff --git a/plugin/icons_example/png/home_nav.png b/plugin/images_not_used/png/home_nav.png similarity index 100% rename from plugin/icons_example/png/home_nav.png rename to plugin/images_not_used/png/home_nav.png diff --git a/plugin/icons_example/png/prompt.png b/plugin/images_not_used/png/prompt.png similarity index 100% rename from plugin/icons_example/png/prompt.png rename to plugin/images_not_used/png/prompt.png diff --git a/plugin/icons_example/png/prompt2.png b/plugin/images_not_used/png/prompt2.png similarity index 100% rename from plugin/icons_example/png/prompt2.png rename to plugin/images_not_used/png/prompt2.png diff --git a/plugin/icons_example/png/prompt_old.png b/plugin/images_not_used/png/prompt_old.png similarity index 100% rename from plugin/icons_example/png/prompt_old.png rename to plugin/images_not_used/png/prompt_old.png diff --git a/plugin/icons_example/png/prompt_old2.png b/plugin/images_not_used/png/prompt_old2.png similarity index 100% rename from plugin/icons_example/png/prompt_old2.png rename to plugin/images_not_used/png/prompt_old2.png diff --git a/plugin/icons_example/png/properties.png b/plugin/images_not_used/png/properties.png similarity index 100% rename from plugin/icons_example/png/properties.png rename to plugin/images_not_used/png/properties.png diff --git a/plugin/icons_example/png/run_exc.png b/plugin/images_not_used/png/run_exc.png similarity index 100% rename from plugin/icons_example/png/run_exc.png rename to plugin/images_not_used/png/run_exc.png diff --git a/plugin/icons_example/test/Command Prompt.png b/plugin/images_not_used/test/Command Prompt.png similarity index 100% rename from plugin/icons_example/test/Command Prompt.png rename to plugin/images_not_used/test/Command Prompt.png diff --git a/plugin/icons_example/test/Prompt.png b/plugin/images_not_used/test/Prompt.png similarity index 100% rename from plugin/icons_example/test/Prompt.png rename to plugin/images_not_used/test/Prompt.png diff --git a/plugin/icons_example/test/Terminal (2).png b/plugin/images_not_used/test/Terminal (2).png similarity index 100% rename from plugin/icons_example/test/Terminal (2).png rename to plugin/images_not_used/test/Terminal (2).png diff --git a/plugin/icons_example/test/Terminal (3).png b/plugin/images_not_used/test/Terminal (3).png similarity index 100% rename from plugin/icons_example/test/Terminal (3).png rename to plugin/images_not_used/test/Terminal (3).png diff --git a/plugin/icons_example/test/app_terminal.png b/plugin/images_not_used/test/app_terminal.png similarity index 100% rename from plugin/icons_example/test/app_terminal.png rename to plugin/images_not_used/test/app_terminal.png diff --git a/plugin/icons_example/test/app_terminal_16x16.png b/plugin/images_not_used/test/app_terminal_16x16.png similarity index 100% rename from plugin/icons_example/test/app_terminal_16x16.png rename to plugin/images_not_used/test/app_terminal_16x16.png diff --git a/plugin/icons_example/test/terminal (1).png b/plugin/images_not_used/test/terminal (1).png similarity index 100% rename from plugin/icons_example/test/terminal (1).png rename to plugin/images_not_used/test/terminal (1).png diff --git a/plugin/icons_example/test/terminal-19.png b/plugin/images_not_used/test/terminal-19.png similarity index 100% rename from plugin/icons_example/test/terminal-19.png rename to plugin/images_not_used/test/terminal-19.png diff --git a/plugin/icons_example/test/terminal-icon.png b/plugin/images_not_used/test/terminal-icon.png similarity index 100% rename from plugin/icons_example/test/terminal-icon.png rename to plugin/images_not_used/test/terminal-icon.png diff --git a/plugin/icons_example/test/terminal.gif b/plugin/images_not_used/test/terminal.gif similarity index 100% rename from plugin/icons_example/test/terminal.gif rename to plugin/images_not_used/test/terminal.gif diff --git a/plugin/icons_example/test/terminal.png b/plugin/images_not_used/test/terminal.png similarity index 100% rename from plugin/icons_example/test/terminal.png rename to plugin/images_not_used/test/terminal.png diff --git a/plugin/icons_example/test/terminal.svg b/plugin/images_not_used/test/terminal.svg similarity index 100% rename from plugin/icons_example/test/terminal.svg rename to plugin/images_not_used/test/terminal.svg diff --git a/plugin/icons_example/test/terminal_16x16.png b/plugin/images_not_used/test/terminal_16x16.png similarity index 100% rename from plugin/icons_example/test/terminal_16x16.png rename to plugin/images_not_used/test/terminal_16x16.png diff --git a/plugin/plugin.xml b/plugin/plugin.xml index 46fb4b07..6d3b8156 100644 --- a/plugin/plugin.xml +++ b/plugin/plugin.xml @@ -128,7 +128,7 @@ = Version.v2_0_003.getId()) { basicData.setUseWorkingDirectory(Boolean.valueOf(tokenizer.nextToken()).booleanValue()); basicData.setWorkingDirectory(tokenizer.nextToken()); @@ -299,6 +267,9 @@ public boolean deserialize(Version version, String value, StringTokenizer tokeni categoryStr = "categoryUser"; } setCategory(Category.getFromEnum(categoryStr)); + if (version.getId() >= Version.v2_1_005.getId()) { + imageIdStr = tokenizer.nextToken(); + } setCommandType(CommandType.getFromEnum(tokenizer.nextToken())); } else { basicData.setUseWorkingDirectory(false); @@ -307,6 +278,7 @@ public boolean deserialize(Version version, String value, StringTokenizer tokeni setCategory(Category.getFromDeprecatedCommandTypeEnum(commandTypeStr)); setCommandType(CommandType.getFromDeprecatedCommandTypeEnum(commandTypeStr)); } + setImageId(imageIdStr); // go on compatible String commandTokenizer = CommandTokenizer.commandTokenizerSpaces.toString(); if (version.getId() >= Version.v2_1_001.getId()) { @@ -350,6 +322,9 @@ public String serialize(Version version, String delimiter) { ret += Boolean.toString(basicData.isUseWorkingDirectory()) + delimiter; ret += basicData.getWorkingDirectory() + delimiter; ret += getCategory().toString() + delimiter; + if (version.getId() >= Version.v2_1_005.getId()) { + ret += getImageIdOwn() + delimiter; + } } ret += getCommandType().toString() + delimiter; if (version.getId() >= Version.v2_1_001.getId()) { diff --git a/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/CommandDataDialog.java b/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/CommandDataDialog.java index d77ddcab..cbb52dab 100644 --- a/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/CommandDataDialog.java +++ b/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/CommandDataDialog.java @@ -30,7 +30,6 @@ import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; @@ -441,7 +440,7 @@ public void widgetDefaultSelected(SelectionEvent e) { private void createCategoryCombo(Composite parent) { // draw label UtilsUI.createLabel(parent, Activator.getResourceString("easyshell.command.editor.dialog.label.combo.category"), Activator.getResourceString("easyshell.command.editor.dialog.label.tooltip.category")); - categoryImage = UtilsUI.createImageLabel(parent, Category.categoryDefault.getIcon()); + categoryImage = UtilsUI.createImageLabel(parent, Category.categoryUnknown.getImageId()); // draw combo categoryCombo = new Combo(parent,SWT.BORDER | SWT.READ_ONLY); categoryCombo.setToolTipText(Activator.getResourceString("easyshell.command.editor.dialog.combo.tooltip.category")); @@ -452,7 +451,7 @@ private void createCategoryCombo(Composite parent) { @Override public void widgetSelected(SelectionEvent e) { String text = categoryCombo.getItem(categoryCombo.getSelectionIndex()); - categoryImage.setImage(new Image(null, Activator.getImageDescriptor(Category.getFromName(text).getIcon()).getImageData())); + categoryImage.setImage(Activator.getImage(Category.getFromName(text).getImageId())); } @Override public void widgetDefaultSelected(SelectionEvent e) { diff --git a/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/CommandDataLabelProvider.java b/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/CommandDataLabelProvider.java index 6d254297..d0a30e95 100644 --- a/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/CommandDataLabelProvider.java +++ b/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/CommandDataLabelProvider.java @@ -26,7 +26,7 @@ public Image getColumnImage(Object element, int columnIndex) { CommandData data = (CommandData)element; switch(columnIndex) { case 0: - return new Image(null, Activator.getImageDescriptor(data.getCategory().getIcon()).getImageData()); + return Activator.getImage(data.getImageId()); default: return null; } diff --git a/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/MenuData.java b/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/MenuData.java index 049a273b..e3dacfab 100644 --- a/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/MenuData.java +++ b/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/MenuData.java @@ -14,6 +14,7 @@ import java.util.StringTokenizer; import java.util.UUID; +import de.anbos.eclipse.easyshell.plugin.Constants; import de.anbos.eclipse.easyshell.plugin.exceptions.UnknownCommandID; import de.anbos.eclipse.easyshell.plugin.types.Category; import de.anbos.eclipse.easyshell.plugin.types.MenuNameType; @@ -26,18 +27,20 @@ public class MenuData extends Data { private boolean enabled = true; private MenuNameType nameType = MenuNameType.menuNameTypeUnknown; private String namePattern = ""; + private String imageId = Constants.IMAGE_NONE; // copy of or reference to command private String commandId = null; - public MenuData(String id, boolean enabled, MenuNameType nameType, String namePattern, String commandId) { + public MenuData(String id, boolean enabled, MenuNameType nameType, String namePattern, String imageId, String commandId) { super(id); setEnabled(enabled); setNameType(nameType); setNamePattern(namePattern); + setImageId(imageId); setCommandId(commandId); } - public MenuData(String newId, String commandId) { + public MenuData(String newId, String commandId) { super(newId); setNameType(MenuNameType.menuNameTypeGeneric1); setCommandId(commandId); @@ -90,6 +93,22 @@ public String toString() { return getNameExpanded(); } + public String getImageId() { + if (!imageId.equals(Constants.IMAGE_NONE)) { + return imageId; + } else { + try { + return getCommandData().getImageId(); + } catch (UnknownCommandID e) { + return Constants.IMAGE_NONE; + } + } + } + + public String getImageIdOwn() { + return imageId; + } + public String getCommandId() { return commandId; } @@ -128,12 +147,15 @@ public boolean deserialize(Version version, String value, StringTokenizer tokeni nameType = MenuNameType.getFromEnum(tokenizer.nextToken()); } String namePatternReaded = tokenizer.nextToken(); + String imageIdStr = Constants.IMAGE_NONE; // ------------------------------------------------- - // read new id + // read new imageId and commandId if (version.getId() >= Version.v2_0_003.getId()) { + if (version.getId() >= Version.v2_1_005.getId()) { + imageIdStr = tokenizer.nextToken(); + } // read the new one setCommandId(tokenizer.nextToken()); - setNameType(nameType); } else { // read previous command data members CommandData oldData = new CommandData(); @@ -141,9 +163,7 @@ public boolean deserialize(Version version, String value, StringTokenizer tokeni setCommandId(oldData.getId()); // menu name type handling // set name type and read the old name as pattern and convert to new - if (version.getId() >= Version.v2_0_002.getId()) { - setNameType(nameType); - } else { + if (version.getId() < Version.v2_0_002.getId()) { // check if readed name is the same, like expanded from patterns for (MenuNameType type : MenuNameType.getAsList()) { setNamePattern(type.getPattern()); // set temporary @@ -152,9 +172,9 @@ public boolean deserialize(Version version, String value, StringTokenizer tokeni break; } } - setNameType(nameType); } } + setNameType(nameType); if (nameType == MenuNameType.menuNameTypeUser) { setNamePattern(namePatternReaded); } else if (version.getId() < Version.v2_0_004.getId()) { @@ -163,6 +183,7 @@ public boolean deserialize(Version version, String value, StringTokenizer tokeni setNameTypeFromCategory(); } } + setImageId(imageIdStr); return true; } @@ -179,6 +200,9 @@ public String serialize(Version version, String delimiter) { } ret += getNamePattern() + delimiter; if (version.getId() >= Version.v2_0_003.getId()) { + if (version.getId() >= Version.v2_1_005.getId()) { + ret += getImageIdOwn() + delimiter; + } ret += getCommandId() + delimiter; } else { try { @@ -211,6 +235,14 @@ public void setNamePattern(String namePattern) { } } + public void setImageId(String imageId) { + if (imageId != null) { + this.imageId = imageId; + } else { + this.imageId = Constants.IMAGE_NONE; + } + } + public void setCommandId(String commandId) { this.commandId = commandId; } @@ -225,6 +257,15 @@ public CommandData getCommandData() throws UnknownCommandID { } } + public String getCommand() { + try { + return getCommandData().getCommand(); + } catch (UnknownCommandID e) { + e.logInternalError(); + return "Unknown ID: " + e.getID(); + } + } + public void setNameTypeFromCategory() { try { setNameTypeFromCategory(getCommandData().getCategory()); diff --git a/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/MenuDataDialog.java b/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/MenuDataDialog.java index acea4bb4..006f4672 100644 --- a/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/MenuDataDialog.java +++ b/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/MenuDataDialog.java @@ -68,6 +68,7 @@ public class MenuDataDialog extends StatusDialog { private Combo nameTypeCombo; private Text namePatternText; ContentProposalAdapter namePatternTextAssist; + private Button categoryImageButton; private Text menuNameText; private Text commandText; @@ -172,7 +173,7 @@ public Group createGroupMenu(Composite parent) { pageGroupMenu.setText(Activator.getResourceString("easyshell.menu.editor.dialog.title.group.menu")); pageGroupMenu.setToolTipText(Activator.getResourceString("easyshell.menu.editor.dialog.title.group.tooltip.menu")); GridLayout layoutMenu = new GridLayout(); - layoutMenu.numColumns = 2; + layoutMenu.numColumns = 3; layoutMenu.makeColumnsEqualWidth = false; layoutMenu.marginWidth = 5; layoutMenu.marginHeight = 4; @@ -195,12 +196,7 @@ public void createCommandControls(Composite parent) { // create input commandText field String commandStr; - try { - commandStr = menuData.getCommandData().getCommand(); - } catch (UnknownCommandID e1) { - e1.logInternalError(); - commandStr = "Unknown ID: " + e1.getID(); - } + commandStr = menuData.getCommand(); commandText = UtilsUI.createTextField(parent, Activator.getResourceString("easyshell.menu.editor.dialog.label.command"), Activator.getResourceString("easyshell.menu.editor.dialog.label.tooltip.command"), commandStr, false, false); //createLabel(parent, "");createLabel(parent, ""); @@ -212,9 +208,9 @@ public void createCommandControls(Composite parent) { public void createNameControls(Composite parent) { // type combo - createNameTypeCombo(parent);//UtilsUI.createLabel(parent, "", null); + createNameTypeCombo(parent); // create input nameText field - namePatternText = UtilsUI.createTextField(parent, Activator.getResourceString("easyshell.menu.editor.dialog.label.pattern"), Activator.getResourceString("easyshell.menu.editor.dialog.label.tooltip.pattern"), menuData.getNamePattern(), false, true); + namePatternText = UtilsUI.createTextField(parent, Activator.getResourceString("easyshell.menu.editor.dialog.label.pattern"), Activator.getResourceString("easyshell.menu.editor.dialog.label.tooltip.pattern"), menuData.getNamePattern(), true, true); namePatternTextAssist = addContentAssistExtended(namePatternText); namePatternText.addModifyListener(new ModifyListener() { @Override @@ -227,10 +223,21 @@ public void modifyText(ModifyEvent e) { } } }); - //UtilsUI.createLabel(parent, "", null); // create output menuNameText field - menuNameText = UtilsUI.createTextField(parent, Activator.getResourceString("easyshell.menu.editor.dialog.label.name"), Activator.getResourceString("easyshell.menu.editor.dialog.label.tooltip.name"), menuData.getNameExpanded(), false, false); - //UtilsUI.createLabel(parent, "", null); + UtilsUI.createLabel(parent, Activator.getResourceString("easyshell.menu.editor.dialog.label.name"), Activator.getResourceString("easyshell.menu.editor.dialog.label.tooltip.name")); + //categoryImage = UtilsUI.createImageLabel(parent, Category.categoryDefault.getIcon()); + categoryImageButton = UtilsUI.createImageButton(parent, Category.categoryDefault.getImageId()); + categoryImageButton.addSelectionListener(new SelectionListener() { + @Override + public void widgetSelected(SelectionEvent e) { + //imageDialog(); + } + @Override + public void widgetDefaultSelected(SelectionEvent e) { + // TODO Auto-generated method stub + } + }); + menuNameText = UtilsUI.createTextField(parent, null, null, menuData.getNameExpanded(), false, false); } private void createRemoveButton(Composite parent) { @@ -499,7 +506,6 @@ private void createEnabledCheckBox(Composite parent) { enabledCheckBox = new Button(parent,SWT.CHECK); enabledCheckBox.setSelection(this.menuData.isEnabled()); UtilsUI.createLabel(parent, "", null); - //UtilsUI.createLabel(parent, "", null); } private String[] getAllNameTypesAsComboNames() { @@ -536,7 +542,6 @@ public void keyReleased(KeyEvent ke) { } }); searchText.setToolTipText(Activator.getResourceString("easyshell.command.page.text.tooltip.search")); - //createLabel(parent, ""); } private void createCommandCombo(Composite parent) { @@ -555,13 +560,15 @@ public void selectionChanged(TypedComboBox typedComboBox, CommandDa } String commandStr = null; PresetType presetType = PresetType.presetPlugin; + Category category = Category.categoryUnknown; try { - commandStr = menuData.getCommandData().getCommand(); + commandStr = menuData.getCommand(); presetType = menuData.getCommandData().getPresetType(); + category = menuData.getCommandData().getCategory(); } catch (UnknownCommandID e) { e.logInternalError(); - commandStr = "Unknown ID: " + e.getID(); } + categoryImageButton.setImage(Activator.getImage(category.getImageId())); commandText.setText(commandStr); boolean presetSelected = presetType == PresetType.presetPlugin; removeButton.setEnabled(!presetSelected); @@ -586,7 +593,7 @@ public String getListLabel(CommandData element) { @Override public Image getImage(CommandData element) { - return element.getCategoryImage(); + return Activator.getImage(element.getImageId()); } }); @@ -622,6 +629,7 @@ public void modifyText(ModifyEvent e) { private void createNameTypeCombo(Composite parent) { UtilsUI.createLabel(parent, Activator.getResourceString("easyshell.menu.editor.dialog.label.combo.pattern"), Activator.getResourceString("easyshell.menu.editor.dialog.combo.tooltip.pattern")); + UtilsUI.createLabel(parent, "", null); // draw combo nameTypeCombo = new Combo(parent,SWT.BORDER | SWT.READ_ONLY); nameTypeCombo.setToolTipText(Activator.getResourceString("easyshell.menu.editor.dialog.combo.tooltip.pattern")); diff --git a/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/MenuDataLabelProvider.java b/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/MenuDataLabelProvider.java index 1290c249..c268c7f9 100644 --- a/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/MenuDataLabelProvider.java +++ b/plugin/src/de/anbos/eclipse/easyshell/plugin/preferences/MenuDataLabelProvider.java @@ -16,8 +16,6 @@ import org.eclipse.swt.graphics.Image; import de.anbos.eclipse.easyshell.plugin.Activator; -import de.anbos.eclipse.easyshell.plugin.Constants; -import de.anbos.eclipse.easyshell.plugin.exceptions.UnknownCommandID; public class MenuDataLabelProvider extends LabelProvider implements ITableLabelProvider { @@ -26,17 +24,12 @@ public Image getColumnImage(Object element, int columnIndex) { return null; } MenuData data = (MenuData)element; - try { - switch(columnIndex) { - case 0: - return new Image(null, Activator.getImageDescriptor(data.getCommandData().getCategory().getIcon()).getImageData()); - default: - return null; - } - } catch (UnknownCommandID e) { - e.logInternalError(); - return new Image(null, Activator.getImageDescriptor(Constants.IMAGE_ECLIPSE).getImageData()); - } + switch(columnIndex) { + case 0: + return Activator.getImage(data.getImageId()); + default: + return null; + } } public String getColumnText(Object element, int columnIndex) { @@ -44,20 +37,14 @@ public String getColumnText(Object element, int columnIndex) { return ""; //$NON-NLS-1$ } MenuData data = (MenuData)element; - try { - switch(columnIndex) { - case 0: - return data.getNameExpanded(); - case 1: - return data.getCommandData().getCommand(); - default: - return ""; //$NON-NLS-1$ - } - } catch (UnknownCommandID e) { - e.logInternalError(); - return "Unknown ID: " + e.getID(); - } - + switch(columnIndex) { + case 0: + return data.getNameExpanded(); + case 1: + return data.getCommand(); + default: + return ""; //$NON-NLS-1$ + } } } diff --git a/plugin/src/de/anbos/eclipse/easyshell/plugin/types/Category.java b/plugin/src/de/anbos/eclipse/easyshell/plugin/types/Category.java index 30d141e4..96b6fa69 100644 --- a/plugin/src/de/anbos/eclipse/easyshell/plugin/types/Category.java +++ b/plugin/src/de/anbos/eclipse/easyshell/plugin/types/Category.java @@ -19,7 +19,7 @@ import de.anbos.eclipse.easyshell.plugin.Constants; public enum Category { - categoryUnknown(-1, "Unknown", Constants.IMAGE_UNKNOWN), + categoryUnknown(-1, "Unknown", Constants.IMAGE_NONE), categoryDefault(0, "Default", Constants.IMAGE_DEFAULT), categoryOpen(1, "Open", Constants.IMAGE_OPEN), categoryRun(2, "Run", Constants.IMAGE_RUN), @@ -29,12 +29,12 @@ public enum Category { // attributes private final int id; private final String name; - private final String icon; + private final String imageId; // construct - Category(int id, String name, String icon) { + Category(int id, String name, String imageId) { this.id = id; this.name = name; - this.icon = icon; + this.imageId = imageId; } public int getId() { return id; @@ -42,8 +42,8 @@ public int getId() { public String getName() { return name; } - public String getIcon() { - return icon; + public String getImageId() { + return imageId; } public static Category getFromId(int id) { Category ret = categoryUnknown; @@ -102,11 +102,11 @@ public static String[] getNamesAsArray() { } return arr; } - public static List getIconsAsList() { + public static List getImageIdsAsList() { List list = new ArrayList(); for(int i = 0; i < Category.values().length; i++) { if (Category.values()[i] != categoryUnknown) { - list.add(Category.values()[i].getIcon()); + list.add(Category.values()[i].getImageId()); } } return list; diff --git a/plugin/src/de/anbos/eclipse/easyshell/plugin/types/Version.java b/plugin/src/de/anbos/eclipse/easyshell/plugin/types/Version.java index 1e4a9771..a7828865 100644 --- a/plugin/src/de/anbos/eclipse/easyshell/plugin/types/Version.java +++ b/plugin/src/de/anbos/eclipse/easyshell/plugin/types/Version.java @@ -28,7 +28,8 @@ public enum Version { v2_1_001(8, "v2.1 alpha 1"), v2_1_002(9, "v2.1 alpha 2"), v2_1_003(10, "v2.1 beta 1 / 2"), - v2_1_004(11, "v2.1 beta 3"); + v2_1_004(11, "v2.1 beta 3"), + v2_1_005(12, "v2.1 RC1"); // actual version is always the last one! public static Version actual = Version.values()[Version.values().length-1]; // attributes