]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/Activator.java
Externalize strings
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / Activator.java
index 5a4a58f33ffbe971cbc4daa8a5caeb975171605f..565c30895da465eec60cfbaf72298d312ee77b4f 100644 (file)
@@ -28,7 +28,7 @@ import org.simantics.utils.ui.BundleUtils;
 
 public class Activator extends AbstractUIPlugin {
 
-    public static final String PLUGIN_ID = "org.simantics.modeling.ui";
+    public static final String PLUGIN_ID = "org.simantics.modeling.ui"; //$NON-NLS-1$
 
     // The shared instance
     private static Activator plugin;
@@ -102,76 +102,76 @@ public class Activator extends AbstractUIPlugin {
 
         Bundle bundle = context.getBundle();
 
-        DOCUMENT_SVG_TEXT = FileUtils.getContents(bundle.getResource("icons/Gnome-mime-document.svg"));
-        FATAL_SVG_TEXT = FileUtils.getContents(bundle.getResource("icons/fatal.svg"));
-        ERROR_SVG_TEXT = FileUtils.getContents(bundle.getResource("icons/error.svg"));
-        WARNING_SVG_TEXT = FileUtils.getContents(bundle.getResource("icons/warning.svg"));
-        INFO_SVG_TEXT = FileUtils.getContents(bundle.getResource("icons/info.svg"));
-        NOTE_SVG_TEXT = FileUtils.getContents(bundle.getResource("icons/note4.svg"));
-
-        BULLET_GREEN_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/bullet_green.png"));
-        BULLET_YELLOW_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/bullet_yellow.png"));
-
-        MODEL_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/chart_organisation.png"));
-        COMPONENT_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/brick.png"));
-        COMPONENT_TYPE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/box.png"));
-        COMPOSITE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/bricks.png"));
-        INTERFACE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/application_view_list.png"));
-        CONNECTION_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/connection.png"));
-        CONNECTION_PROPERTY_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/table_relationship.png"));
-        OPEN_CONNECTION_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/open_connection.png"));
-        VARIABLE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/variable.png"));
-
-        ARROW_LEFT_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/arrow_left.png"));
-        ARROW_RIGHT_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/arrow_right.png"));
-
-        SYMBOL_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/photo.png"));
-
-        EXPERIMENTS_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/folder.png"));
-        ATTACHED_EXPERIMENT_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/time_attach.png"));
-        EXPERIMENT_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/time.png"));
-        EXPERIMENT_RESULT_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/chart_bar.png"));
-        EXPERIMENT_RESULT_TRANSIENT_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/chart_bar_light.png"));
-
-        QUERY_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/report.png"));
-
-        STATES_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/folder_tag_red.png"));
-        STATE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/tag_red.png"));
-
-        TRENDS_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/folder.png"));
-        TREND_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/chart_line.png"));
-
-        CHARTGROUP_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/chart_group2.png"));
-        CHARTS_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/folder.png"));
-        CHART_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/chart_line.png"));
-        PLOT_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/tag_blue.png"));
-
-        SPREADSHEET_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/table.png"));
-        SPREADSHEETS_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/folder_table.png"));
-
-        SUBSCRIPTION_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/subscription.png"));
-        SUBSCRIPTION_DISABLED_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/subscription_disabled.png"));
-        SUBSCRIPTIONS_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/subscriptions.png"));
-        SUBSCRIPTION_ITEM_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/tag_blue.png"));
-
-        IMAGE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/image.png"));
-        IMAGES_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/images.png"));
-
-        SEGMENT_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/segment_edit.gif"));
-
-        TICK_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/tick.png"));
-        CROSS_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/silk/cross.png"));
-        STOP_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/stop_red.png"));
-        ARROW_IN_ICON = BundleUtils.getImageDescriptorFromPlugin("com.famfamfam.silk", "icons/arrow_in.png");
-        ARROW_UP_ICON = BundleUtils.getImageDescriptorFromPlugin("com.famfamfam.silk", "icons/bullet_arrow_up.png");
-        ARROW_DOWN_ICON = BundleUtils.getImageDescriptorFromPlugin("com.famfamfam.silk", "icons/bullet_arrow_down.png");
-        SHOW_PROFILE_MONITOR_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/show-profile-monitors.png"));
-        HIDE_PROFILE_MONITOR_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/hide-profile-monitors.png"));
-
-        POINTER_MODE = ImageDescriptor.createFromURL(bundle.getResource("icons/pointertool.png"));
-        CONNECT_MODE = ImageDescriptor.createFromURL(bundle.getResource("icons/connecttool.png"));
+        DOCUMENT_SVG_TEXT = FileUtils.getContents(bundle.getResource("icons/Gnome-mime-document.svg")); //$NON-NLS-1$
+        FATAL_SVG_TEXT = FileUtils.getContents(bundle.getResource("icons/fatal.svg")); //$NON-NLS-1$
+        ERROR_SVG_TEXT = FileUtils.getContents(bundle.getResource("icons/error.svg")); //$NON-NLS-1$
+        WARNING_SVG_TEXT = FileUtils.getContents(bundle.getResource("icons/warning.svg")); //$NON-NLS-1$
+        INFO_SVG_TEXT = FileUtils.getContents(bundle.getResource("icons/info.svg")); //$NON-NLS-1$
+        NOTE_SVG_TEXT = FileUtils.getContents(bundle.getResource("icons/note4.svg")); //$NON-NLS-1$
+
+        BULLET_GREEN_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/bullet_green.png")); //$NON-NLS-1$
+        BULLET_YELLOW_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/bullet_yellow.png")); //$NON-NLS-1$
+
+        MODEL_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/chart_organisation.png")); //$NON-NLS-1$
+        COMPONENT_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/brick.png")); //$NON-NLS-1$
+        COMPONENT_TYPE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/box.png")); //$NON-NLS-1$
+        COMPOSITE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/bricks.png")); //$NON-NLS-1$
+        INTERFACE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/application_view_list.png")); //$NON-NLS-1$
+        CONNECTION_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/connection.png")); //$NON-NLS-1$
+        CONNECTION_PROPERTY_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/table_relationship.png")); //$NON-NLS-1$
+        OPEN_CONNECTION_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/open_connection.png")); //$NON-NLS-1$
+        VARIABLE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/variable.png")); //$NON-NLS-1$
+
+        ARROW_LEFT_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/arrow_left.png")); //$NON-NLS-1$
+        ARROW_RIGHT_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/arrow_right.png")); //$NON-NLS-1$
+
+        SYMBOL_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/photo.png")); //$NON-NLS-1$
+
+        EXPERIMENTS_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/folder.png")); //$NON-NLS-1$
+        ATTACHED_EXPERIMENT_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/time_attach.png")); //$NON-NLS-1$
+        EXPERIMENT_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/time.png")); //$NON-NLS-1$
+        EXPERIMENT_RESULT_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/chart_bar.png")); //$NON-NLS-1$
+        EXPERIMENT_RESULT_TRANSIENT_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/chart_bar_light.png")); //$NON-NLS-1$
+
+        QUERY_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/report.png")); //$NON-NLS-1$
+
+        STATES_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/folder_tag_red.png")); //$NON-NLS-1$
+        STATE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/tag_red.png")); //$NON-NLS-1$
+
+        TRENDS_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/folder.png")); //$NON-NLS-1$
+        TREND_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/chart_line.png")); //$NON-NLS-1$
+
+        CHARTGROUP_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/chart_group2.png")); //$NON-NLS-1$
+        CHARTS_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/folder.png")); //$NON-NLS-1$
+        CHART_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/chart_line.png")); //$NON-NLS-1$
+        PLOT_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/tag_blue.png")); //$NON-NLS-1$
+
+        SPREADSHEET_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/table.png")); //$NON-NLS-1$
+        SPREADSHEETS_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/folder_table.png")); //$NON-NLS-1$
+
+        SUBSCRIPTION_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/subscription.png")); //$NON-NLS-1$
+        SUBSCRIPTION_DISABLED_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/subscription_disabled.png")); //$NON-NLS-1$
+        SUBSCRIPTIONS_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/subscriptions.png")); //$NON-NLS-1$
+        SUBSCRIPTION_ITEM_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/tag_blue.png")); //$NON-NLS-1$
+
+        IMAGE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/image.png")); //$NON-NLS-1$
+        IMAGES_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/images.png")); //$NON-NLS-1$
+
+        SEGMENT_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/segment_edit.gif")); //$NON-NLS-1$
+
+        TICK_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/tick.png")); //$NON-NLS-1$
+        CROSS_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/silk/cross.png")); //$NON-NLS-1$
+        STOP_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/stop_red.png")); //$NON-NLS-1$
+        ARROW_IN_ICON = BundleUtils.getImageDescriptorFromPlugin("com.famfamfam.silk", "icons/arrow_in.png"); //$NON-NLS-1$ //$NON-NLS-2$
+        ARROW_UP_ICON = BundleUtils.getImageDescriptorFromPlugin("com.famfamfam.silk", "icons/bullet_arrow_up.png"); //$NON-NLS-1$ //$NON-NLS-2$
+        ARROW_DOWN_ICON = BundleUtils.getImageDescriptorFromPlugin("com.famfamfam.silk", "icons/bullet_arrow_down.png"); //$NON-NLS-1$ //$NON-NLS-2$
+        SHOW_PROFILE_MONITOR_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/show-profile-monitors.png")); //$NON-NLS-1$
+        HIDE_PROFILE_MONITOR_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/hide-profile-monitors.png")); //$NON-NLS-1$
+
+        POINTER_MODE = ImageDescriptor.createFromURL(bundle.getResource("icons/pointertool.png")); //$NON-NLS-1$
+        CONNECT_MODE = ImageDescriptor.createFromURL(bundle.getResource("icons/connecttool.png")); //$NON-NLS-1$
         
-        ARROW_REFRESH = ImageDescriptor.createFromURL(bundle.getResource("icons/arrow_refresh.png"));
+        ARROW_REFRESH = ImageDescriptor.createFromURL(bundle.getResource("icons/arrow_refresh.png")); //$NON-NLS-1$
         
         Hashtable<String, String> properties = new Hashtable<String, String>();
         context.registerService(SCLConsoleListener.class,
@@ -190,15 +190,15 @@ public class Activator extends AbstractUIPlugin {
 
     @Override
     protected void initializeImageRegistry(ImageRegistry reg) {
-        reg.put("tick", TICK_ICON);
-        reg.put("cross", CROSS_ICON);
-        reg.put("stop", STOP_ICON);
-        reg.put("arrowIn", ARROW_IN_ICON);
-        reg.put("arrowUp", ARROW_UP_ICON);
-        reg.put("arrowDown", ARROW_DOWN_ICON);
-        reg.put("showProfileMonitors", SHOW_PROFILE_MONITOR_ICON);
-        reg.put("hideProfileMonitors", HIDE_PROFILE_MONITOR_ICON);
-        reg.put("arrow_refresh", ARROW_REFRESH);
+        reg.put("tick", TICK_ICON); //$NON-NLS-1$
+        reg.put("cross", CROSS_ICON); //$NON-NLS-1$
+        reg.put("stop", STOP_ICON); //$NON-NLS-1$
+        reg.put("arrowIn", ARROW_IN_ICON); //$NON-NLS-1$
+        reg.put("arrowUp", ARROW_UP_ICON); //$NON-NLS-1$
+        reg.put("arrowDown", ARROW_DOWN_ICON); //$NON-NLS-1$
+        reg.put("showProfileMonitors", SHOW_PROFILE_MONITOR_ICON); //$NON-NLS-1$
+        reg.put("hideProfileMonitors", HIDE_PROFILE_MONITOR_ICON); //$NON-NLS-1$
+        reg.put("arrow_refresh", ARROW_REFRESH); //$NON-NLS-1$
     }
 
     /*