Skip to content

Commit 35edd65

Browse files
authored
[abapGit Repo] Use eclipse Shared Images for repository status (#166)
Use ISharedImages from eclipse.ui for repository status images instead of using images from plugin bundles as the later is not a stable approach.
1 parent 5d79211 commit 35edd65

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

org.abapgit.adt.backend/src/org/abapgit/adt/backend/IRepository.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ public interface IRepository {
2525

2626
public String getPackage();
2727

28+
/**
29+
* Returns a flag which indicates the repository status. </br>
30+
* </br>
31+
* <b> S : Success </br>
32+
* W : Warning </br>
33+
* E : Error </br>
34+
* A : Abort </br>
35+
* R : Running </b>
36+
*/
2837
public String getStatusFlag();
2938

3039
public String getStatusText();

org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/repositories/AbapGitView.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -287,20 +287,15 @@ public Image getImage(Object element) {
287287
if (statusFlag != null) {
288288
switch (statusFlag) {
289289
case "W": //$NON-NLS-1$
290-
return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.jdt.ui", "icons/full/obj16/warning_obj.png") //$NON-NLS-1$//$NON-NLS-2$
291-
.createImage();
290+
return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK);
292291
case "E": //$NON-NLS-1$
293-
return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.jdt.ui", "icons/full/obj16/error_obj.png") //$NON-NLS-1$//$NON-NLS-2$
294-
.createImage();
292+
return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
295293
case "A": //$NON-NLS-1$
296-
return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.ui", "icons/full/elcl16/stop.png") //$NON-NLS-1$//$NON-NLS-2$
297-
.createImage();
294+
return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_ELCL_STOP);
298295
case "S": //$NON-NLS-1$
299-
return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.ui", "icons/full/eview16/tasks_tsk.png") //$NON-NLS-1$//$NON-NLS-2$
300-
.createImage();
296+
return PlatformUI.getWorkbench().getSharedImages().getImage(org.eclipse.ui.ide.IDE.SharedImages.IMG_OBJS_TASK_TSK);
301297
case "R": //$NON-NLS-1$
302-
return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.ui", "icons/full/elcl16/up_nav.png") //$NON-NLS-1$//$NON-NLS-2$
303-
.createImage();
298+
return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_UP);
304299
}
305300
}
306301
return null;

0 commit comments

Comments
 (0)