Eclipse e4 and translation experiments
authorChristian Femers <femers@in.tum.de>
Tue, 4 Jun 2019 01:52:04 +0000 (03:52 +0200)
committerChristian Femers <femers@in.tum.de>
Tue, 4 Jun 2019 01:52:04 +0000 (03:52 +0200)
17 files changed:
net.mograsim.rcp/Application.e4xmi
net.mograsim.rcp/META-INF/MANIFEST.MF
net.mograsim.rcp/OSGI-INF/l10n/bundle.properties
net.mograsim.rcp/OSGI-INF/l10n/bundle_de.properties [new file with mode: 0644]
net.mograsim.rcp/build.properties
net.mograsim.rcp/icons/af.png [deleted file]
net.mograsim.rcp/icons/embedded.png [deleted file]
net.mograsim.rcp/icons/enterprise.png [deleted file]
net.mograsim.rcp/icons/home.png [deleted file]
net.mograsim.rcp/icons/languages.png [deleted file]
net.mograsim.rcp/icons/open_in_app.png [deleted file]
net.mograsim.rcp/icons/rcp.png [deleted file]
net.mograsim.rcp/icons/save_edit.png [deleted file]
net.mograsim.rcp/plugin.xml
net.mograsim.rcp/src/net/mograsim/rcp/handlers/LangHandler.java [new file with mode: 0644]
net.mograsim.rcp/src/net/mograsim/rcp/i18n/Messages.java [new file with mode: 0644]
net.mograsim.rcp/src/net/mograsim/rcp/parts/SamplePart.java

index 3caa9c1..1aa8444 100644 (file)
@@ -1,23 +1,31 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xmi:id="_6wlLcMgZEeSyMNYR5xypkQ" elementId="Sample.application" bindingContexts="_6wlLecgZEeSyMNYR5xypkQ">
-  <children xsi:type="basic:TrimmedWindow" xmi:id="_6wlLccgZEeSyMNYR5xypkQ" elementId="Sample.window.main" label="Sample RCP4" iconURI="platform:/plugin/net.mograsim.rcp/icons/app/ico_16t.png" width="500" height="400">
+  <children xsi:type="basic:TrimmedWindow" xmi:id="_6wlLccgZEeSyMNYR5xypkQ" elementId="Sample.window.main" label="%trimmedwindow.label.1" iconURI="platform:/plugin/net.mograsim.rcp/icons/app/ico_16t.png" width="500" height="400">
     <children xsi:type="basic:PartSashContainer" xmi:id="_6wlLksgZEeSyMNYR5xypkQ" elementId="Sample.partsashcontainer.sample">
       <children xsi:type="basic:PartStack" xmi:id="_6wlLk8gZEeSyMNYR5xypkQ" elementId="Sample.partstack.sample">
-        <children xsi:type="basic:Part" xmi:id="_6wlLlMgZEeSyMNYR5xypkQ" elementId="Sample.part.sample" contributionURI="bundleclass://net.mograsim.rcp/net.mograsim.rcp.parts.SamplePart" label="Sample Part" iconURI="platform:/plugin/net.mograsim.rcp/icons/home.png"/>
-        <children xsi:type="basic:Part" xmi:id="_cldhcH1HEema06ZDPR6BSw" elementId="net.mograsim.rcp.part.logicui" contributionURI="bundleclass://net.mograsim.rcp/net.mograsim.rcp.parts.LogicUIPart" label="LogicUI part"/>
+        <children xsi:type="basic:Part" xmi:id="_6wlLlMgZEeSyMNYR5xypkQ" elementId="Sample.part.sample" contributionURI="bundleclass://net.mograsim.rcp/net.mograsim.rcp.parts.SamplePart" label="%part.label.1" iconURI="platform:/plugin/net.mograsim.rcp/icons/home.png"/>
+        <children xsi:type="basic:Part" xmi:id="_cldhcH1HEema06ZDPR6BSw" elementId="net.mograsim.rcp.part.logicui" contributionURI="bundleclass://net.mograsim.rcp/net.mograsim.rcp.parts.LogicUIPart" label="%part.label.2"/>
       </children>
       <children xsi:type="basic:PartStack" xmi:id="_l2EzYG6wEemo__tDmTCqCQ" elementId="sample.partstack.0">
-        <children xsi:type="basic:Part" xmi:id="_mW1XEG6wEemo__tDmTCqCQ" elementId="sample.part.none" label="None" tooltip="Something"/>
+        <children xsi:type="basic:Part" xmi:id="_mW1XEG6wEemo__tDmTCqCQ" elementId="sample.part.none" label="%part.label.3" tooltip="%part.tooltip.1"/>
       </children>
     </children>
     <mainMenu xmi:id="_6wlLicgZEeSyMNYR5xypkQ" elementId="org.eclipse.ui.main.menu">
-      <children xsi:type="menu:Menu" xmi:id="_6wlLisgZEeSyMNYR5xypkQ" elementId="file" label="File">
-        <children xsi:type="menu:HandledMenuItem" xmi:id="_6wlLi8gZEeSyMNYR5xypkQ" elementId="Sample.handleditem.file.open" label="Open" iconURI="platform:/plugin/net.mograsim.rcp/icons/open_in_app.png" command="_6wlLgMgZEeSyMNYR5xypkQ"/>
-        <children xsi:type="menu:HandledMenuItem" xmi:id="_6wlLjMgZEeSyMNYR5xypkQ" elementId="Sample.handleditem.save" label="Save" iconURI="platform:/plugin/net.mograsim.rcp/icons/save_edit.png" command="_6wlLg8gZEeSyMNYR5xypkQ"/>
-        <children xsi:type="menu:HandledMenuItem" xmi:id="_6wlLjcgZEeSyMNYR5xypkQ" elementId="Sample.handleditem.quit" label="Quit" command="_6wlLfMgZEeSyMNYR5xypkQ"/>
+      <children xsi:type="menu:Menu" xmi:id="_6wlLisgZEeSyMNYR5xypkQ" elementId="file" label="%menu.label.1">
+        <children xsi:type="menu:HandledMenuItem" xmi:id="_6wlLi8gZEeSyMNYR5xypkQ" elementId="Sample.handleditem.file.open" label="%handledmenuitem.label.1" iconURI="platform:/plugin/net.mograsim.rcp/icons/open_in_app.png" command="_6wlLgMgZEeSyMNYR5xypkQ"/>
+        <children xsi:type="menu:HandledMenuItem" xmi:id="_6wlLjMgZEeSyMNYR5xypkQ" elementId="Sample.handleditem.save" label="%handledmenuitem.label.2" iconURI="platform:/plugin/net.mograsim.rcp/icons/save_edit.png" command="_6wlLg8gZEeSyMNYR5xypkQ"/>
+        <children xsi:type="menu:HandledMenuItem" xmi:id="_6wlLjcgZEeSyMNYR5xypkQ" elementId="Sample.handleditem.quit" label="%handledmenuitem.label.3" command="_6wlLfMgZEeSyMNYR5xypkQ"/>
       </children>
-      <children xsi:type="menu:Menu" xmi:id="_6wlLjsgZEeSyMNYR5xypkQ" elementId="help" label="Help">
-        <children xsi:type="menu:HandledMenuItem" xmi:id="_6wlLj8gZEeSyMNYR5xypkQ" elementId="Sample.handleditem.about" label="About" command="_6wlLhsgZEeSyMNYR5xypkQ"/>
+      <children xsi:type="menu:Menu" xmi:id="_6wlLjsgZEeSyMNYR5xypkQ" elementId="help" label="%menu.label.2">
+        <children xsi:type="menu:HandledMenuItem" xmi:id="_6wlLj8gZEeSyMNYR5xypkQ" elementId="Sample.handleditem.about" label="%handledmenuitem.label.4" command="_6wlLhsgZEeSyMNYR5xypkQ"/>
+      </children>
+      <children xsi:type="menu:Menu" xmi:id="_iemosIZTEemVfN3A_OcXgw" elementId="net.mograsim.rcp.menu.lang" label="Lang">
+        <children xsi:type="menu:HandledMenuItem" xmi:id="_JldvcIZUEemVfN3A_OcXgw" elementId="net.mograsim.rcp.handledmenuitem.de" label="DE" command="_LfFjgIZUEemVfN3A_OcXgw">
+          <parameters xmi:id="_klSy8IZUEemVfN3A_OcXgw" elementId="net.mograsim.rcp.parameter.0" name="change_lang_locale" value="de"/>
+        </children>
+        <children xsi:type="menu:HandledMenuItem" xmi:id="_zzPj0IZUEemVfN3A_OcXgw" elementId="net.mograsim.rcp.handledmenuitem.en" label="EN" command="_LfFjgIZUEemVfN3A_OcXgw">
+          <parameters xmi:id="_2orf4IZUEemVfN3A_OcXgw" elementId="net.mograsim.rcp.parameter.1" name="change_lang_locale" value="en"/>
+        </children>
       </children>
     </mainMenu>
     <trimBars xmi:id="_6wlLlcgZEeSyMNYR5xypkQ" elementId="Sample.trimbar.top">
@@ -31,6 +39,7 @@
   <handlers xmi:id="_6wlLgcgZEeSyMNYR5xypkQ" elementId="sample.handler.openCommand" contributionURI="bundleclass://net.mograsim.rcp/net.mograsim.rcp.handlers.OpenHandler" command="_6wlLgMgZEeSyMNYR5xypkQ"/>
   <handlers xmi:id="_6wlLhMgZEeSyMNYR5xypkQ" elementId="sample.handler.saveCommand" contributionURI="bundleclass://net.mograsim.rcp/net.mograsim.rcp.handlers.SaveHandler" command="_6wlLg8gZEeSyMNYR5xypkQ"/>
   <handlers xmi:id="_6wlLh8gZEeSyMNYR5xypkQ" elementId="sample.handler.aboutCommand" contributionURI="bundleclass://net.mograsim.rcp/net.mograsim.rcp.handlers.AboutHandler" command="_6wlLhsgZEeSyMNYR5xypkQ"/>
+  <handlers xmi:id="_89lMcIZUEemVfN3A_OcXgw" elementId="net.mograsim.rcp.handler.0" contributionURI="bundleclass://net.mograsim.rcp/net.mograsim.rcp.handlers.LangHandler" command="_LfFjgIZUEemVfN3A_OcXgw"/>
   <bindingTables xmi:id="_6wlLfsgZEeSyMNYR5xypkQ" elementId="Sample.bindingtable" bindingContext="_6wlLecgZEeSyMNYR5xypkQ">
     <bindings xmi:id="_6wlLf8gZEeSyMNYR5xypkQ" elementId="Sample.keybinding.m1q" keySequence="M1+Q" command="_6wlLfMgZEeSyMNYR5xypkQ"/>
     <bindings xmi:id="_6wlLgsgZEeSyMNYR5xypkQ" elementId="Sample.keybinding.m1o" keySequence="M1+O" command="_6wlLgMgZEeSyMNYR5xypkQ"/>
     <children xmi:id="_6wlLesgZEeSyMNYR5xypkQ" elementId="org.eclipse.ui.contexts.window" name="In Windows"/>
     <children xmi:id="_6wlLe8gZEeSyMNYR5xypkQ" elementId="org.eclipse.ui.contexts.dialog" name="In Dialogs"/>
   </rootContext>
-  <commands xmi:id="_6wlLfMgZEeSyMNYR5xypkQ" elementId="org.eclipse.ui.file.exit" commandName="quitCommand"/>
-  <commands xmi:id="_6wlLgMgZEeSyMNYR5xypkQ" elementId="org.eclipse.ui.file.open" commandName="openCommand"/>
-  <commands xmi:id="_6wlLg8gZEeSyMNYR5xypkQ" elementId="org.eclipse.ui.file.save" commandName="saveCommand"/>
-  <commands xmi:id="_6wlLhsgZEeSyMNYR5xypkQ" elementId="org.eclipse.ui.help.aboutAction" commandName="aboutCommand"/>
+  <commands xmi:id="_6wlLfMgZEeSyMNYR5xypkQ" elementId="org.eclipse.ui.file.exit" commandName="%command.commandname.1"/>
+  <commands xmi:id="_6wlLgMgZEeSyMNYR5xypkQ" elementId="org.eclipse.ui.file.open" commandName="%command.commandname.2"/>
+  <commands xmi:id="_6wlLg8gZEeSyMNYR5xypkQ" elementId="org.eclipse.ui.file.save" commandName="%command.commandname.3"/>
+  <commands xmi:id="_6wlLhsgZEeSyMNYR5xypkQ" elementId="org.eclipse.ui.help.aboutAction" commandName="%command.commandname.4"/>
+  <commands xmi:id="_LfFjgIZUEemVfN3A_OcXgw" elementId="net.mograsim.rcp.command.changelang" commandName="changeLang">
+    <parameters xmi:id="_NW29cIZUEemVfN3A_OcXgw" elementId="change_lang_locale" name="locale" optional="false"/>
+  </commands>
   <addons xmi:id="_6wlLcsgZEeSyMNYR5xypkQ" elementId="org.eclipse.e4.core.commands.service" contributionURI="bundleclass://org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"/>
   <addons xmi:id="_6wlLc8gZEeSyMNYR5xypkQ" elementId="org.eclipse.e4.ui.contexts.service" contributionURI="bundleclass://org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"/>
   <addons xmi:id="_6wlLdMgZEeSyMNYR5xypkQ" elementId="org.eclipse.e4.ui.bindings.service" contributionURI="bundleclass://org.eclipse.e4.ui.bindings/org.eclipse.e4.ui.bindings.BindingServiceAddon"/>
index 1c5e2a7..cf712fe 100644 (file)
@@ -4,6 +4,10 @@ Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: net.mograsim.rcp;singleton:=true
 Bundle-Version: 1.0.0.qualifier
 Bundle-Vendor: %Bundle-Vendor
+Bundle-Localization: OSGI-INF/l10n/bundle
+Export-Package: net.mograsim.rcp.handlers;uses:="org.eclipse.swt.widgets,org.eclipse.e4.ui.workbench,org.eclipse.e4.ui.workbench.modeling",
+ net.mograsim.rcp.parts;uses:="org.eclipse.swt.widgets",
+ net.mograsim.rcp.splashhandlers
 Require-Bundle: org.eclipse.core.runtime;bundle-version="3.15.200",
  org.eclipse.e4.ui.model.workbench;bundle-version="2.1.300",
  org.eclipse.jface;bundle-version="3.15.100",
@@ -12,9 +16,9 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.15.200",
  org.eclipse.e4.ui.di;bundle-version="1.2.500",
  org.eclipse.ui.workbench;bundle-version="3.113.0",
  javax.annotation;bundle-version="1.2.0",
- net.mograsim.logic.ui
+ net.mograsim.logic.ui,
+ org.eclipse.osgi.services;bundle-version="3.8.0",
+ org.eclipse.e4.core.services;bundle-version="2.1.400"
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Automatic-Module-Name: Sample
-Export-Package: net.mograsim.rcp.handlers;uses:="org.eclipse.swt.widgets,org.eclipse.e4.ui.workbench,org.eclipse.e4.ui.workbench.modeling",
- net.mograsim.rcp.parts;uses:="org.eclipse.swt.widgets",
- net.mograsim.rcp.splashhandlers
+Import-Package: javax.inject;version="1.0.0"
index e07734a..11c4aaf 100644 (file)
@@ -3,4 +3,20 @@ Bundle-Vendor = MYSELF
 Bundle-Name = Sample
 product.name = Sample
 extension-point.name = Splash Extensions
-product.name.0 = Simulator WIP
\ No newline at end of file
+product.name = Simulator WIP
+trimmedwindow.label.1 = Sample RCP4
+part.label.1 = Sample Part
+part.label.2 = LogicUI part
+part.label.3 = None
+part.tooltip.1 = Something
+menu.label.1 = File
+handledmenuitem.label.1 = Open
+handledmenuitem.label.2 = Save
+handledmenuitem.label.3 = Quit
+menu.label.2 = Help
+handledmenuitem.label.4 = About
+command.commandname.1 = quitCommand
+command.commandname.2 = openCommand
+command.commandname.3 = saveCommand
+command.commandname.4 = aboutCommand
+sample_part_input_hint = Enter text to mark part as dirty
diff --git a/net.mograsim.rcp/OSGI-INF/l10n/bundle_de.properties b/net.mograsim.rcp/OSGI-INF/l10n/bundle_de.properties
new file mode 100644 (file)
index 0000000..67bf148
--- /dev/null
@@ -0,0 +1,22 @@
+#Properties file for Sample
+Bundle-Vendor = ICH
+Bundle-Name = Beispiel
+product.name = Beispiel
+extension-point.name = Splash Extensions
+product.name = Simulator WIP
+trimmedwindow.label.1 = Beispiel RCP4
+part.label.1 = Sample Part
+part.label.2 = LogicUI part
+part.label.3 = Nix
+part.tooltip.1 = Irgendwas
+menu.label.1 = Datei
+handledmenuitem.label.1 = Öffnen
+handledmenuitem.label.2 = Speichern
+handledmenuitem.label.3 = Schließen
+menu.label.2 = Hilfe
+handledmenuitem.label.4 = Über
+command.commandname.1 = quitCommand
+command.commandname.2 = openCommand
+command.commandname.3 = saveCommand
+command.commandname.4 = aboutCommand
+sample_part_input_hint = ALKSKSKS
index d1ae984..7eb5b4a 100644 (file)
@@ -7,12 +7,11 @@ bin.includes = plugin.xml,\
                css/,\
                splash.bmp,\
                schema/,\
-               OSGI-INF/l10n/bundle.properties,\
                OSGI-INF/
 source.. = src/
 src.includes = Application.e4xmi,\
-               OSGI-INF/l10n/bundle.properties,\
                css/,\
                icons/,\
                schema/,\
                splash.bmp
+javacProjectSettings = true
diff --git a/net.mograsim.rcp/icons/af.png b/net.mograsim.rcp/icons/af.png
deleted file mode 100644 (file)
index bcd0ce8..0000000
Binary files a/net.mograsim.rcp/icons/af.png and /dev/null differ
diff --git a/net.mograsim.rcp/icons/embedded.png b/net.mograsim.rcp/icons/embedded.png
deleted file mode 100644 (file)
index 57edc6a..0000000
Binary files a/net.mograsim.rcp/icons/embedded.png and /dev/null differ
diff --git a/net.mograsim.rcp/icons/enterprise.png b/net.mograsim.rcp/icons/enterprise.png
deleted file mode 100644 (file)
index 7fe2f5c..0000000
Binary files a/net.mograsim.rcp/icons/enterprise.png and /dev/null differ
diff --git a/net.mograsim.rcp/icons/home.png b/net.mograsim.rcp/icons/home.png
deleted file mode 100644 (file)
index e9ace41..0000000
Binary files a/net.mograsim.rcp/icons/home.png and /dev/null differ
diff --git a/net.mograsim.rcp/icons/languages.png b/net.mograsim.rcp/icons/languages.png
deleted file mode 100644 (file)
index 98af2da..0000000
Binary files a/net.mograsim.rcp/icons/languages.png and /dev/null differ
diff --git a/net.mograsim.rcp/icons/open_in_app.png b/net.mograsim.rcp/icons/open_in_app.png
deleted file mode 100644 (file)
index 9df4eeb..0000000
Binary files a/net.mograsim.rcp/icons/open_in_app.png and /dev/null differ
diff --git a/net.mograsim.rcp/icons/rcp.png b/net.mograsim.rcp/icons/rcp.png
deleted file mode 100644 (file)
index b248ca2..0000000
Binary files a/net.mograsim.rcp/icons/rcp.png and /dev/null differ
diff --git a/net.mograsim.rcp/icons/save_edit.png b/net.mograsim.rcp/icons/save_edit.png
deleted file mode 100644 (file)
index b17caf5..0000000
Binary files a/net.mograsim.rcp/icons/save_edit.png and /dev/null differ
index a22663b..7c2dac5 100644 (file)
@@ -8,14 +8,14 @@
          point="org.eclipse.core.runtime.products">
       <product
             application="org.eclipse.e4.ui.workbench.swt.E4Application"
-            name="Simulator WIP">
+            name="%product.name">
          <property
                name="applicationCSS"
                value="platform:/plugin/net.mograsim.rcp/css/default.css">
          </property>
          <property
                name="appName"
-               value="Simulator WIP">
+               value="%product.name">
          </property>
          <property
                name="windowImages"
             splashId="net.mograsim.rcp.splashHandlers.extensible">
       </splashHandlerProductBinding>
    </extension>
-   <extension
-         point="net.mograsim.rcp.splashExtension">
-      <splashExtension
-            icon="icons/af.png"
-            id="af"
-            tooltip="Application Framework">
-      </splashExtension>
-      <splashExtension
-            icon="icons/embedded.png"
-            id="embedded"
-            tooltip="Embedded">
-      </splashExtension>
-      <splashExtension
-            icon="icons/enterprise.png"
-            id="enterprise"
-            tooltip="Enterprise">
-      </splashExtension>
-      <splashExtension
-            icon="icons/languages.png"
-            id="languages"
-            tooltip="Languages">
-      </splashExtension>
-      <splashExtension
-            icon="icons/rcp.png"
-            id="rcp"
-            tooltip="RCP">
-      </splashExtension>
-   </extension>
 
 </plugin>
diff --git a/net.mograsim.rcp/src/net/mograsim/rcp/handlers/LangHandler.java b/net.mograsim.rcp/src/net/mograsim/rcp/handlers/LangHandler.java
new file mode 100644 (file)
index 0000000..f009a9b
--- /dev/null
@@ -0,0 +1,22 @@
+
+package net.mograsim.rcp.handlers;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.core.services.nls.ILocaleChangeService;
+
+public class LangHandler
+{
+
+       @Inject
+       ILocaleChangeService lcs;
+
+       @Execute
+       public void execute(@Named("change_lang_locale") String change_lang_locale)
+       {
+               lcs.changeApplicationLocale(change_lang_locale);
+       }
+
+}
\ No newline at end of file
diff --git a/net.mograsim.rcp/src/net/mograsim/rcp/i18n/Messages.java b/net.mograsim.rcp/src/net/mograsim/rcp/i18n/Messages.java
new file mode 100644 (file)
index 0000000..fb9e585
--- /dev/null
@@ -0,0 +1,6 @@
+package net.mograsim.rcp.i18n;
+
+public class Messages
+{
+       public String sample_part_input_hint;
+}
index 0bbe8aa..fde7162 100644 (file)
@@ -6,6 +6,7 @@ import java.util.List;
 import javax.annotation.PostConstruct;
 import javax.inject.Inject;
 
+import org.eclipse.e4.core.services.nls.Translation;
 import org.eclipse.e4.ui.di.Focus;
 import org.eclipse.e4.ui.di.Persist;
 import org.eclipse.e4.ui.model.application.ui.basic.MPart;
@@ -17,10 +18,13 @@ import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Text;
 
+import net.mograsim.rcp.i18n.Messages;
+
 public class SamplePart
 {
 
        private TableViewer tableViewer;
+       private Text txtInput;
 
        @Inject
        private MPart part;
@@ -30,7 +34,7 @@ public class SamplePart
        {
                parent.setLayout(new GridLayout(1, false));
 
-               Text txtInput = new Text(parent, SWT.BORDER);
+               txtInput = new Text(parent, SWT.BORDER);
                txtInput.setMessage("Enter text to mark part as dirty");
                txtInput.addModifyListener(e -> part.setDirty(true));
                txtInput.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -58,4 +62,11 @@ public class SamplePart
        {
                return Arrays.asList("Sample item 1", "Sample item 2", "Sample item 3", "Sample item 4", "Sample item 5");
        }
+
+       @Inject
+       public void translate(@Translation Messages m)
+       {
+               if (txtInput != null && !txtInput.isDisposed())
+                       txtInput.setMessage(m.sample_part_input_hint);
+       }
 }
\ No newline at end of file