|
Link Here
|
| 25 |
import org.eclipse.e4.core.contexts.RunAndTrack; |
25 |
import org.eclipse.e4.core.contexts.RunAndTrack; |
| 26 |
import org.eclipse.e4.core.services.events.IEventBroker; |
26 |
import org.eclipse.e4.core.services.events.IEventBroker; |
| 27 |
import org.eclipse.e4.core.services.log.Logger; |
27 |
import org.eclipse.e4.core.services.log.Logger; |
|
|
28 |
import org.eclipse.e4.core.services.translation.TranslationService; |
| 28 |
import org.eclipse.e4.ui.internal.workbench.ContributionsAnalyzer; |
29 |
import org.eclipse.e4.ui.internal.workbench.ContributionsAnalyzer; |
| 29 |
import org.eclipse.e4.ui.model.application.MApplication; |
30 |
import org.eclipse.e4.ui.model.application.MApplication; |
|
|
31 |
import org.eclipse.e4.ui.model.application.MApplicationElement; |
| 30 |
import org.eclipse.e4.ui.model.application.ui.MCoreExpression; |
32 |
import org.eclipse.e4.ui.model.application.ui.MCoreExpression; |
| 31 |
import org.eclipse.e4.ui.model.application.ui.MElementContainer; |
33 |
import org.eclipse.e4.ui.model.application.ui.MElementContainer; |
| 32 |
import org.eclipse.e4.ui.model.application.ui.MUIElement; |
34 |
import org.eclipse.e4.ui.model.application.ui.MUIElement; |
|
Link Here
|
| 754 |
if (text == null || text.length() == 0) { |
756 |
if (text == null || text.length() == 0) { |
| 755 |
return NO_LABEL; |
757 |
return NO_LABEL; |
| 756 |
} |
758 |
} |
| 757 |
return text; |
759 |
// XXX |
|
|
760 |
return translate(text, menuModel); |
| 761 |
} |
| 762 |
|
| 763 |
private String translate(String key, MApplicationElement element) { |
| 764 |
IEclipseContext parentContext = modelService |
| 765 |
.getContainingContext((MUIElement) element); |
| 766 |
TranslationService translation = parentContext |
| 767 |
.get(TranslationService.class); |
| 768 |
String translated = translation.translate(key, |
| 769 |
element.getContributorURI()); |
| 770 |
return translated; |
| 758 |
} |
771 |
} |
| 759 |
|
772 |
|
| 760 |
private ImageDescriptor getImageDescriptor(MUILabel element) { |
773 |
private ImageDescriptor getImageDescriptor(MUILabel element) { |