Skip to content
Snippets Groups Projects
Commit 9721c302 authored by Sebastian Bergemann's avatar Sebastian Bergemann
Browse files

Updated icon of new reuse context menu entry, etc.

Issue-Ref: 4149
Issue-Url: af3#4149



Signed-off-by: default avatarSebastian Bergemann <bergemann@fortiss.org>
parent c797c636
No related branches found
No related tags found
1 merge request!181Added correct hash creation in reuse (+ update detection)
org.fortiss.tooling.ext.reuse.ui/icons/lib_update_info.png

612 B

AddElementContextMenu.java 1b5436d37bd93fe9106a3f21cf3d5a2b3656490e GREEN
GetUpdatedOriginsContextMenu.java 1868ca162db785d6ac87fd05314c657dda4f09b2 YELLOW
UpdateFromLibContextMenu.java cada9a1366409893e8d5c8068ad27588b296392f YELLOW
UpdateInLibContextMenu.java 4cfbf79a22ecda48cb7796a8a416025b4ced1370 YELLOW
GetUpdatedOriginsContextMenu.java 6d79cfc4c9c033f74b1786a4f97124dd1131daf7 YELLOW
UpdateFromLibContextMenu.java 887f69a9ae6140cfafbc4db6553ccf12d7b58bea YELLOW
UpdateInLibContextMenu.java 7ec942d0267f7b4cdc02c9b46ac5f7447e426f0e YELLOW
......@@ -17,7 +17,7 @@ package org.fortiss.tooling.ext.reuse.ui.commands;
import static java.util.Collections.emptyList;
import static org.conqat.ide.commons.ui.dialog.MessageUtils.showInfo;
import static org.fortiss.tooling.ext.reuse.ui.commands.UpdateFromLibContextMenu.contextMenuString;
import static org.fortiss.tooling.ext.reuse.ui.commands.UpdateFromLibContextMenu.updateFromContextMenuString;
import static org.fortiss.tooling.ext.reuse.utils.ReuseLibraryUtils.getFirstSourceLibraryOfElement;
import static org.fortiss.tooling.ext.reuse.utils.ReuseLibraryUtils.getLibraryIDName;
import static org.fortiss.tooling.ext.reuse.utils.ReuseLibraryUtils.getReuseElementLastUpdateString;
......@@ -50,6 +50,9 @@ public class GetUpdatedOriginsContextMenu implements IContextMenuContributor {
/** The title of the dialog shell(s). */
private final String shellTitle = "Information about updated reuse origins";
/** The string of the context menu entry. */
public static final String updatedOrigincontextMenuString = "Get reuse update information";
/** {@inheritDoc} */
@Override
public List<IContributionItem> getContributedItems(EObject selection, ContextMenuContextProvider contextProvider) {
......@@ -93,7 +96,8 @@ public class GetUpdatedOriginsContextMenu implements IContextMenuContributor {
String infoMessage;
if (updatedReuseOrigins.isEmpty()) {
infoMessage = "None of the found reuse origins was updated since the selected reuse element was reused or updated (based of these origins)."
+ "\n\nTherefore, it is not needed to get updates from any of them except you want to get the original version (e.g., if you have manipulated the selected reuse element in the meantime and wants to reset it).";
+ "\n\nTherefore, it is not needed to get updates from any of them except you want to get the original version (e.g., if you have manipulated the selected reuse element in the meantime and wants to reset it)."
+ "\n\nKeep in mind: Updated reuse origins cannot be found if your local reuse libraries are not up to date as well!";
} else {
infoMessage = "The following reuse origins of the selected reuse element were updated since the selected reuse element was reused or updated (based of these origins):\n";
for (EObject updatedReuseOrigin : updatedReuseOrigins) {
......@@ -106,7 +110,7 @@ public class GetUpdatedOriginsContextMenu implements IContextMenuContributor {
infoMessage += "Within library: '" + libraryName + "'\n";
infoMessage += "Last updated: " + lastUpdate + "\n";
}
infoMessage += "\nIf you want to get one of these updates, please use the '" + contextMenuString
infoMessage += "\nIf you want to get one of these updates, please use the '" + updateFromContextMenuString
+ "' context menu entry.";
}
showInfo(shellTitle, infoMessage);
......@@ -120,8 +124,8 @@ public class GetUpdatedOriginsContextMenu implements IContextMenuContributor {
/** Constructor. Takes the selected element as input. */
GetUpdateInfoAction(EObject element) {
// TODO: change icon
super("Get reuse update information", ToolingReuseUIActivator.getImageDescriptor("icons/library_add.png"));
super(updatedOrigincontextMenuString,
ToolingReuseUIActivator.getImageDescriptor("icons/lib_update_info.png"));
selectedElement = element;
}
......
......@@ -66,7 +66,7 @@ public class UpdateFromLibContextMenu implements IContextMenuContributor {
private final String shellTitle = "Update Element From Reuse Library";
/** The string of the context menu entry. */
public static final String contextMenuString = "Update from Reuse Library";
public static final String updateFromContextMenuString = "Update from Reuse Library";
/** {@inheritDoc} */
@Override
......@@ -135,7 +135,7 @@ public class UpdateFromLibContextMenu implements IContextMenuContributor {
/** Constructor. Takes the selected element as input. */
UpdateFromLibAction(EObject element) {
super(contextMenuString, ToolingReuseUIActivator.getImageDescriptor("icons/update_from_library.png"));
super(updateFromContextMenuString, ToolingReuseUIActivator.getImageDescriptor("icons/update_from_library.png"));
selectedElement = element;
}
......
......@@ -66,6 +66,9 @@ public class UpdateInLibContextMenu implements IContextMenuContributor {
/** The title of the dialog shell(s). */
private final String shellTitle = "Update Element In Reuse Library";
/** The string of the context menu entry. */
public static final String updateInContextMenuString = "Update in Reuse Library";
/** {@inheritDoc} */
@Override
public List<IContributionItem> getContributedItems(EObject selection, ContextMenuContextProvider contextProvider) {
......@@ -133,7 +136,7 @@ public class UpdateInLibContextMenu implements IContextMenuContributor {
/** Constructor. Takes the selected element as input. */
UpdateInLibAction(EObject element) {
super("Update in Reuse Library", ToolingReuseUIActivator.getImageDescriptor("icons/update_in_library.png"));
super(updateInContextMenuString, ToolingReuseUIActivator.getImageDescriptor("icons/update_in_library.png"));
selectedElement = element;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment